Imported Upstream version 2.28.6 upstream/2.28.6
authorAnas Nashif <anas.nashif@intel.com>
Wed, 7 Nov 2012 15:59:10 +0000 (07:59 -0800)
committerAnas Nashif <anas.nashif@intel.com>
Wed, 7 Nov 2012 15:59:10 +0000 (07:59 -0800)
358 files changed:
AUTHORS [new file with mode: 0644]
COPYING [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
ChangeLog.pre-2.18 [new file with mode: 0644]
INSTALL [new file with mode: 0644]
MANIFEST.in [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
Makefile.in [new file with mode: 0644]
NEWS [new file with mode: 0644]
PKG-INFO [new file with mode: 0644]
PKG-INFO.in [new file with mode: 0644]
README [new file with mode: 0644]
README.win32 [new file with mode: 0644]
aclocal.m4 [new file with mode: 0644]
codegen/Makefile.am [new file with mode: 0644]
codegen/Makefile.in [new file with mode: 0644]
codegen/README.defs [new file with mode: 0644]
codegen/__init__.py [new file with mode: 0644]
codegen/argtypes.py [new file with mode: 0644]
codegen/code-coverage.py [new file with mode: 0755]
codegen/codegen.py [new file with mode: 0755]
codegen/createdefs.py [new file with mode: 0755]
codegen/definitions.py [new file with mode: 0644]
codegen/defsconvert.py [new file with mode: 0755]
codegen/defsgen.py [new file with mode: 0755]
codegen/defsparser.py [new file with mode: 0644]
codegen/docextract.py [new file with mode: 0644]
codegen/docextract_to_xml.py [new file with mode: 0755]
codegen/docgen.py [new file with mode: 0755]
codegen/h2def.py [new file with mode: 0755]
codegen/mergedefs.py [new file with mode: 0755]
codegen/missingdefs.py [new file with mode: 0755]
codegen/mkskel.py [new file with mode: 0755]
codegen/override.py [new file with mode: 0644]
codegen/pygobject-codegen-2.0.in [new file with mode: 0644]
codegen/reversewrapper.py [new file with mode: 0644]
codegen/scanvirtuals.py [new file with mode: 0755]
codegen/scmexpr.py [new file with mode: 0755]
compile [new file with mode: 0755]
config.guess [new file with mode: 0755]
config.h.in [new file with mode: 0644]
config.sub [new file with mode: 0755]
configure [new file with mode: 0755]
configure.ac [new file with mode: 0644]
depcomp [new file with mode: 0755]
docs/Makefile.am [new file with mode: 0644]
docs/Makefile.in [new file with mode: 0644]
docs/html/class-gioappinfo.html [new file with mode: 0644]
docs/html/class-gioapplaunchcontext.html [new file with mode: 0644]
docs/html/class-gioasyncresult.html [new file with mode: 0644]
docs/html/class-giobufferedinputstream.html [new file with mode: 0644]
docs/html/class-giobufferedoutputstream.html [new file with mode: 0644]
docs/html/class-giocancellable.html [new file with mode: 0644]
docs/html/class-giodatainputstream.html [new file with mode: 0644]
docs/html/class-giodataoutputstream.html [new file with mode: 0644]
docs/html/class-giodrive.html [new file with mode: 0644]
docs/html/class-gioemblem.html [new file with mode: 0644]
docs/html/class-gioemblemedicon.html [new file with mode: 0644]
docs/html/class-giofile.html [new file with mode: 0644]
docs/html/class-giofileattributeinfo.html [new file with mode: 0644]
docs/html/class-giofileenumerator.html [new file with mode: 0644]
docs/html/class-giofileicon.html [new file with mode: 0644]
docs/html/class-giofileinfo.html [new file with mode: 0644]
docs/html/class-giofileinputstream.html [new file with mode: 0644]
docs/html/class-giofilemonitor.html [new file with mode: 0644]
docs/html/class-giofileoutputstream.html [new file with mode: 0644]
docs/html/class-giofilterinputstream.html [new file with mode: 0644]
docs/html/class-giofilteroutputstream.html [new file with mode: 0644]
docs/html/class-gioicon.html [new file with mode: 0644]
docs/html/class-gioinputstream.html [new file with mode: 0644]
docs/html/class-gioloadableicon.html [new file with mode: 0644]
docs/html/class-giomemoryinputstream.html [new file with mode: 0644]
docs/html/class-giomemoryoutputstream.html [new file with mode: 0644]
docs/html/class-giomount.html [new file with mode: 0644]
docs/html/class-giomountoperation.html [new file with mode: 0644]
docs/html/class-giooutputstream.html [new file with mode: 0644]
docs/html/class-gioseekable.html [new file with mode: 0644]
docs/html/class-giosimpleasyncresult.html [new file with mode: 0644]
docs/html/class-giothemedicon.html [new file with mode: 0644]
docs/html/class-giounixinputstream.html [new file with mode: 0644]
docs/html/class-giounixoutputstream.html [new file with mode: 0644]
docs/html/class-giovolume.html [new file with mode: 0644]
docs/html/class-giovolumemonitor.html [new file with mode: 0644]
docs/html/class-glibmaincontext.html [new file with mode: 0644]
docs/html/class-glibmainloop.html [new file with mode: 0644]
docs/html/class-gobject.html [new file with mode: 0644]
docs/html/class-gobjectgboxed.html [new file with mode: 0644]
docs/html/class-gobjectginterface.html [new file with mode: 0644]
docs/html/class-gobjectgpointer.html [new file with mode: 0644]
docs/html/gio-class-reference.html [new file with mode: 0644]
docs/html/gio-constants.html [new file with mode: 0644]
docs/html/gio-functions.html [new file with mode: 0644]
docs/html/giounix-class-reference.html [new file with mode: 0644]
docs/html/glib-class-reference.html [new file with mode: 0644]
docs/html/glib-constants.html [new file with mode: 0644]
docs/html/glib-functions.html [new file with mode: 0644]
docs/html/gobject-class-reference.html [new file with mode: 0644]
docs/html/gobject-constants.html [new file with mode: 0644]
docs/html/gobject-functions.html [new file with mode: 0644]
docs/html/index.html [new file with mode: 0644]
docs/html/index.sgml [new file with mode: 0644]
docs/html/pygobject-introduction.html [new file with mode: 0644]
docs/html/pygobject.devhelp [new file with mode: 0644]
docs/reference/entities.docbook.in [new file with mode: 0644]
docs/reference/pygio-appinfo.xml [new file with mode: 0644]
docs/reference/pygio-applaunchcontext.xml [new file with mode: 0644]
docs/reference/pygio-asyncresult.xml [new file with mode: 0644]
docs/reference/pygio-bufferedinputstream.xml [new file with mode: 0644]
docs/reference/pygio-bufferedoutputstream.xml [new file with mode: 0644]
docs/reference/pygio-cancellable.xml [new file with mode: 0644]
docs/reference/pygio-classes.xml [new file with mode: 0644]
docs/reference/pygio-constants.xml [new file with mode: 0644]
docs/reference/pygio-datainputstream.xml [new file with mode: 0644]
docs/reference/pygio-dataoutputstream.xml [new file with mode: 0644]
docs/reference/pygio-drive.xml [new file with mode: 0644]
docs/reference/pygio-emblem.xml [new file with mode: 0644]
docs/reference/pygio-emblemedicon.xml [new file with mode: 0644]
docs/reference/pygio-file.xml [new file with mode: 0644]
docs/reference/pygio-fileattributeinfo.xml [new file with mode: 0644]
docs/reference/pygio-fileenumerator.xml [new file with mode: 0644]
docs/reference/pygio-fileicon.xml [new file with mode: 0644]
docs/reference/pygio-fileinfo.xml [new file with mode: 0644]
docs/reference/pygio-fileinputstream.xml [new file with mode: 0644]
docs/reference/pygio-filemonitor.xml [new file with mode: 0644]
docs/reference/pygio-fileoutputstream.xml [new file with mode: 0644]
docs/reference/pygio-filterinputstream.xml [new file with mode: 0644]
docs/reference/pygio-filteroutputstream.xml [new file with mode: 0644]
docs/reference/pygio-functions.xml [new file with mode: 0644]
docs/reference/pygio-icon.xml [new file with mode: 0644]
docs/reference/pygio-inputstream.xml [new file with mode: 0644]
docs/reference/pygio-loadableicon.xml [new file with mode: 0644]
docs/reference/pygio-memoryinputstream.xml [new file with mode: 0644]
docs/reference/pygio-memoryoutputstream.xml [new file with mode: 0644]
docs/reference/pygio-mount.xml [new file with mode: 0644]
docs/reference/pygio-mountoperation.xml [new file with mode: 0644]
docs/reference/pygio-outputstream.xml [new file with mode: 0644]
docs/reference/pygio-seekable.xml [new file with mode: 0644]
docs/reference/pygio-simpleasyncresult.xml [new file with mode: 0644]
docs/reference/pygio-themedicon.xml [new file with mode: 0644]
docs/reference/pygio-unixinputstream.xml [new file with mode: 0644]
docs/reference/pygio-unixoutputstream.xml [new file with mode: 0644]
docs/reference/pygio-volume.xml [new file with mode: 0644]
docs/reference/pygio-volumemonitor.xml [new file with mode: 0644]
docs/reference/pygiounix-classes.xml [new file with mode: 0644]
docs/reference/pyglib-classes.xml [new file with mode: 0644]
docs/reference/pyglib-constants.xml [new file with mode: 0644]
docs/reference/pyglib-functions.xml [new file with mode: 0644]
docs/reference/pyglib-maincontext.xml [new file with mode: 0644]
docs/reference/pyglib-mainloop.xml [new file with mode: 0644]
docs/reference/pygobject-classes.xml [new file with mode: 0644]
docs/reference/pygobject-constants.xml [new file with mode: 0644]
docs/reference/pygobject-functions.xml [new file with mode: 0644]
docs/reference/pygobject-gboxed.xml [new file with mode: 0644]
docs/reference/pygobject-ginterface.xml [new file with mode: 0644]
docs/reference/pygobject-gpointer.xml [new file with mode: 0644]
docs/reference/pygobject-introduction.xml [new file with mode: 0644]
docs/reference/pygobject-ref.xml [new file with mode: 0644]
docs/reference/pygobject.xml [new file with mode: 0644]
docs/style.css [new file with mode: 0644]
docs/xsl/common.xsl [new file with mode: 0644]
docs/xsl/devhelp.xsl [new file with mode: 0644]
docs/xsl/fixxref.py [new file with mode: 0644]
docs/xsl/fixxref.py.in [new file with mode: 0644]
docs/xsl/html.xsl [new file with mode: 0644]
docs/xsl/pdf-style.xsl [new file with mode: 0644]
docs/xsl/pdf.xsl [new file with mode: 0644]
docs/xsl/ref-html-style.xsl [new file with mode: 0644]
dsextras.py [new file with mode: 0644]
examples/Makefile.am [new file with mode: 0644]
examples/Makefile.in [new file with mode: 0644]
examples/cairo-demo.py [new file with mode: 0755]
examples/option.py [new file with mode: 0644]
examples/properties.py [new file with mode: 0644]
examples/signal.py [new file with mode: 0644]
gi/Makefile.am [new file with mode: 0644]
gi/Makefile.in [new file with mode: 0644]
gi/__init__.py [new file with mode: 0644]
gi/gimodule.c [new file with mode: 0644]
gi/importer.py [new file with mode: 0644]
gi/module.py [new file with mode: 0644]
gi/overrides/GIMarshallingTests.py [new file with mode: 0644]
gi/overrides/GLib.py [new file with mode: 0644]
gi/overrides/Gdk.py [new file with mode: 0644]
gi/overrides/Gio.py [new file with mode: 0644]
gi/overrides/Gtk.py [new file with mode: 0644]
gi/overrides/Makefile.am [new file with mode: 0644]
gi/overrides/Makefile.in [new file with mode: 0644]
gi/overrides/Pango.py [new file with mode: 0644]
gi/overrides/__init__.py [new file with mode: 0644]
gi/overrides/keysyms.py [new file with mode: 0644]
gi/pygi-argument.c [new file with mode: 0644]
gi/pygi-argument.h [new file with mode: 0644]
gi/pygi-boxed.c [new file with mode: 0644]
gi/pygi-boxed.h [new file with mode: 0644]
gi/pygi-callbacks.c [new file with mode: 0644]
gi/pygi-callbacks.h [new file with mode: 0644]
gi/pygi-closure.c [new file with mode: 0644]
gi/pygi-closure.h [new file with mode: 0644]
gi/pygi-foreign-cairo.c [new file with mode: 0644]
gi/pygi-foreign-gvariant.c [new file with mode: 0644]
gi/pygi-foreign-gvariant.h [new file with mode: 0644]
gi/pygi-foreign.c [new file with mode: 0644]
gi/pygi-foreign.h [new file with mode: 0644]
gi/pygi-info.c [new file with mode: 0644]
gi/pygi-info.h [new file with mode: 0644]
gi/pygi-invoke.c [new file with mode: 0644]
gi/pygi-invoke.h [new file with mode: 0644]
gi/pygi-private.h [new file with mode: 0644]
gi/pygi-property.c [new file with mode: 0644]
gi/pygi-property.h [new file with mode: 0644]
gi/pygi-repository.c [new file with mode: 0644]
gi/pygi-repository.h [new file with mode: 0644]
gi/pygi-signal-closure.c [new file with mode: 0644]
gi/pygi-signal-closure.h [new file with mode: 0644]
gi/pygi-struct.c [new file with mode: 0644]
gi/pygi-struct.h [new file with mode: 0644]
gi/pygi-type.c [new file with mode: 0644]
gi/pygi-type.h [new file with mode: 0644]
gi/pygi.h [new file with mode: 0644]
gi/pygobject-external.h [new file with mode: 0644]
gi/repository/Makefile.am [new file with mode: 0644]
gi/repository/Makefile.in [new file with mode: 0644]
gi/repository/__init__.py [new file with mode: 0644]
gi/types.py [new file with mode: 0644]
gio/Makefile.am [new file with mode: 0644]
gio/Makefile.in [new file with mode: 0644]
gio/__init__.py [new file with mode: 0644]
gio/gappinfo.override [new file with mode: 0644]
gio/gapplaunchcontext.override [new file with mode: 0644]
gio/gbufferedinputstream.override [new file with mode: 0644]
gio/gcancellable.override [new file with mode: 0644]
gio/gdatainputstream.override [new file with mode: 0644]
gio/gdrive.override [new file with mode: 0644]
gio/gfile.override [new file with mode: 0644]
gio/gfileattribute.override [new file with mode: 0644]
gio/gfileenumerator.override [new file with mode: 0644]
gio/gfileinfo.override [new file with mode: 0644]
gio/gfileinputstream.override [new file with mode: 0644]
gio/gfileiostream.override [new file with mode: 0644]
gio/gfileoutputstream.override [new file with mode: 0644]
gio/gicon.override [new file with mode: 0644]
gio/ginputstream.override [new file with mode: 0644]
gio/gio-types.defs [new file with mode: 0644]
gio/gio.defs [new file with mode: 0644]
gio/gio.override [new file with mode: 0644]
gio/giomodule.c [new file with mode: 0644]
gio/giostream.override [new file with mode: 0644]
gio/gmemoryinputstream.override [new file with mode: 0644]
gio/gmemoryoutputstream.override [new file with mode: 0644]
gio/gmount.override [new file with mode: 0644]
gio/goutputstream.override [new file with mode: 0644]
gio/gresolver.override [new file with mode: 0644]
gio/gsocket.override [new file with mode: 0644]
gio/gvolume.override [new file with mode: 0644]
gio/gvolumemonitor.override [new file with mode: 0644]
gio/pygio-utils.c [new file with mode: 0644]
gio/pygio-utils.h [new file with mode: 0644]
gio/unix-types.defs [new file with mode: 0644]
gio/unix.defs [new file with mode: 0644]
gio/unix.override [new file with mode: 0644]
gio/unixmodule.c [new file with mode: 0644]
glib/Makefile.am [new file with mode: 0644]
glib/Makefile.in [new file with mode: 0644]
glib/__init__.py [new file with mode: 0644]
glib/glibmodule.c [new file with mode: 0644]
glib/option.py [new file with mode: 0644]
glib/pygiochannel.c [new file with mode: 0644]
glib/pygiochannel.h [new file with mode: 0644]
glib/pyglib-private.h [new file with mode: 0644]
glib/pyglib-python-compat.h [new file with mode: 0644]
glib/pyglib.c [new file with mode: 0644]
glib/pyglib.h [new file with mode: 0644]
glib/pygmaincontext.c [new file with mode: 0644]
glib/pygmaincontext.h [new file with mode: 0644]
glib/pygmainloop.c [new file with mode: 0644]
glib/pygmainloop.h [new file with mode: 0644]
glib/pygoptioncontext.c [new file with mode: 0644]
glib/pygoptioncontext.h [new file with mode: 0644]
glib/pygoptiongroup.c [new file with mode: 0644]
glib/pygoptiongroup.h [new file with mode: 0644]
glib/pygsource.c [new file with mode: 0644]
glib/pygsource.h [new file with mode: 0644]
glib/pygspawn.c [new file with mode: 0644]
glib/pygspawn.h [new file with mode: 0644]
gobject/Makefile.am [new file with mode: 0644]
gobject/Makefile.in [new file with mode: 0644]
gobject/__init__.py [new file with mode: 0644]
gobject/constants.py [new file with mode: 0644]
gobject/ffi-marshaller.c [new file with mode: 0644]
gobject/ffi-marshaller.h [new file with mode: 0644]
gobject/gobjectmodule.c [new file with mode: 0644]
gobject/propertyhelper.py [new file with mode: 0644]
gobject/pygboxed.c [new file with mode: 0644]
gobject/pygboxed.h [new file with mode: 0644]
gobject/pygenum.c [new file with mode: 0644]
gobject/pygenum.h [new file with mode: 0644]
gobject/pygflags.c [new file with mode: 0644]
gobject/pygflags.h [new file with mode: 0644]
gobject/pyginterface.c [new file with mode: 0644]
gobject/pyginterface.h [new file with mode: 0644]
gobject/pygobject-private.h [new file with mode: 0644]
gobject/pygobject.c [new file with mode: 0644]
gobject/pygobject.h [new file with mode: 0644]
gobject/pygparamspec.c [new file with mode: 0644]
gobject/pygparamspec.h [new file with mode: 0644]
gobject/pygpointer.c [new file with mode: 0644]
gobject/pygpointer.h [new file with mode: 0644]
gobject/pygtype.c [new file with mode: 0644]
gobject/pygtype.h [new file with mode: 0644]
install-sh [new file with mode: 0755]
ltmain.sh [new file with mode: 0755]
m4/as-ac-expand.m4 [new file with mode: 0644]
m4/jhflags.m4 [new file with mode: 0644]
m4/libtool.m4 [new file with mode: 0644]
m4/ltoptions.m4 [new file with mode: 0644]
m4/ltsugar.m4 [new file with mode: 0644]
m4/ltversion.m4 [new file with mode: 0644]
m4/lt~obsolete.m4 [new file with mode: 0644]
m4/python.m4 [new file with mode: 0644]
missing [new file with mode: 0755]
py-compile [new file with mode: 0755]
pygobject-2.0-uninstalled.pc.in [new file with mode: 0644]
pygobject-2.0.pc.in [new file with mode: 0644]
pygobject_postinstall.py [new file with mode: 0644]
pygtk.py [new file with mode: 0644]
setup.py [new file with mode: 0755]
tests/Makefile.am [new file with mode: 0644]
tests/Makefile.in [new file with mode: 0644]
tests/compathelper.py [new file with mode: 0644]
tests/org.gnome.test.gschema.xml [new file with mode: 0644]
tests/runtests.py [new file with mode: 0644]
tests/test-floating.c [new file with mode: 0644]
tests/test-floating.h [new file with mode: 0644]
tests/test-thread.c [new file with mode: 0644]
tests/test-thread.h [new file with mode: 0644]
tests/test-unknown.c [new file with mode: 0644]
tests/test-unknown.h [new file with mode: 0644]
tests/test_everything.py [new file with mode: 0644]
tests/test_gcancellable.py [new file with mode: 0644]
tests/test_gdbus.py [new file with mode: 0644]
tests/test_gi.py [new file with mode: 0644]
tests/test_gicon.py [new file with mode: 0644]
tests/test_gio.py [new file with mode: 0644]
tests/test_gobject.py [new file with mode: 0644]
tests/test_gresolver.py [new file with mode: 0644]
tests/test_gsocket.py [new file with mode: 0644]
tests/test_interface.py [new file with mode: 0644]
tests/test_mainloop.py [new file with mode: 0644]
tests/test_option.py [new file with mode: 0644]
tests/test_overrides.py [new file with mode: 0644]
tests/test_properties.py [new file with mode: 0644]
tests/test_signal.py [new file with mode: 0644]
tests/test_source.py [new file with mode: 0644]
tests/test_subprocess.py [new file with mode: 0644]
tests/test_thread.py [new file with mode: 0644]
tests/test_uris.py [new file with mode: 0644]
tests/testhelpermodule.c [new file with mode: 0644]
tests/testmodule.py [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..4a37fe3
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,8 @@
+Original Authors
+James Henstridge <james@daa.com.au>
+Johan Dahlin <johan@gnome.org>
+
+Current Maintainers
+Gustavo J A M Carneiro <gjc@gnome.org>
+Paul Pogonyshev <pogonyshev@gmx.net>
+Gian Mario Tagliaretti <gianmt@gnome.org>
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..ae23fcf
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,504 @@
+                 GNU LESSER GENERAL PUBLIC LICENSE
+                      Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  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.
+\f
+  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.
+\f
+                 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.
+\f
+  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.
+\f
+  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.
+\f
+  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.
+\f
+  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.
+\f
+  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.
+\f
+  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
+\f
+           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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  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!
+
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..8a72a87
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,11914 @@
+commit 42970db5949c615078c38a039da4745eeb194ac1
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Fri Jun 10 14:01:32 2011 +0200
+
+    closure: avoid double free crash
+
+ gi/pygi-closure.c |   12 ++++--------
+ 1 files changed, 4 insertions(+), 8 deletions(-)
+
+commit 78366697d8f7fc53f20d9f52f9f39552c5e99bd1
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Fri Jun 10 16:48:28 2011 -0400
+
+    [gi] backport of "GVariant has a GType" fe386a
+
+    * backport the switch to using GIInterfaceInfo instead of GITypeInfo
+      for foreign types to support this patch - 01596a
+
+ gi/pygi-argument.c         |   10 +++++-----
+ gi/pygi-foreign-cairo.c    |   18 ++++++++++--------
+ gi/pygi-foreign-gvariant.c |   15 +++++++--------
+ gi/pygi-foreign-gvariant.h |   14 ++++++--------
+ gi/pygi-foreign.c          |   21 +++++++++------------
+ gi/pygi-foreign.h          |   16 ++++++++--------
+ gi/pygi-invoke.c           |   26 ++++++++++++++++----------
+ 7 files changed, 61 insertions(+), 59 deletions(-)
+
+commit 0c348da3d974f63629c44e75067b8056dacc60d3
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Fri Jun 10 16:46:20 2011 -0400
+
+    [gi] fixes to backport commit 6b5a65 - in older glib GVariants are
+    still structs
+
+ gi/gimodule.c |    6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 6b5a656a3b77438c9bbb897c65343634b981c0e5
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:   Mon Jun 6 19:05:07 2011 +0200
+
+    GVariantType is a boxed struct
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=647509
+
+ gi/gimodule.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3f6bba909486d0ad1a27592fcf09c7ac8744fded
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:   Mon Jun 6 17:38:21 2011 +0200
+
+    Use _gi.Struct to wrap fundamentals
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=647509
+
+ gi/module.py |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit b7f5ce021bf16a422dc410b3ff44303e0757dc6e
+Author: Jason Siefken <siefkenj@gmail.com>
+Date:   Fri Jun 3 23:11:17 2011 -0700
+
+    Added __eq__ method for Gdk.Color and Gdk.RGBA
+
+    Call Gdk.Color.equal and Gdk.RGBA.equal when
+    == equality testing is used.
+
+ gi/overrides/Gdk.py     |    6 ++++++
+ tests/test_overrides.py |    4 ++++
+ 2 files changed, 10 insertions(+), 0 deletions(-)
+
+commit c016c27f545f398f1b57cf31f37392c97d2b5e50
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Wed Jun 8 19:21:23 2011 +0200
+
+    Remove useless import
+
+ tests/test_everything.py |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 1598047c0ddd6a1d04d41e59dd182f3c0524f3c4
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Wed Jun 8 19:18:23 2011 +0200
+
+    Revert "[gi] Removed hack to avoid using GLib.Variant.new_variant."
+
+    This reverts commit dfe95b9ec598b57deaabd98ab488ab054a44ec09.
+
+ gi/overrides/GLib.py |   14 +++++++++++++-
+ 1 files changed, 13 insertions(+), 1 deletions(-)
+
+commit ae9e098c14de3d2364c8b16c862aa77570c06a4a
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Wed Jun 8 19:13:48 2011 +0200
+
+    closure: Check the out arg is not null. Fixes bug #651812
+
+ gi/pygi-closure.c |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit eca590a3ff6bbfb78eef7b88d36cee59eb51b1d0
+Author: Daniel Drake <dsd@laptop.org>
+Date:   Fri Jun 3 16:59:15 2011 +0100
+
+    Fix GC-related crash during PyGObject deallocation
+
+    Python-2.7.1's GC source has the following comment:
+
+            /* Python's cyclic gc should never see an incoming refcount
+             * of 0:  if something decref'ed to 0, it should have been
+             * deallocated immediately at that time.
+             * Possible cause (if the assert triggers):  a tp_dealloc
+             * routine left a gc-aware object tracked during its teardown
+             * phase, and did something-- or allowed something to
+             happen --
+             * that called back into Python.  gc can trigger then, and may
+             * see the still-tracked dying object.  Before this assert
+             * was added, such mistakes went on to allow gc to try to
+             * delete the object again.  In a debug build, that caused
+             * a mysterious segfault, when _Py_ForgetReference tried
+             * to remove the object from the doubly-linked list of all
+             * objects a second time.  In a release build, an actual
+             * double deallocation occurred, which leads to corruption
+             * of the allocator's internal bookkeeping pointers.  That's
+             * so serious that maybe this should be a release-build
+             * check instead of an assert?
+             */
+
+    As shown in a backtrace at
+    https://bugzilla.redhat.com/show_bug.cgi?id=640972 , pygobject
+    is making
+    this exact mistake. Before untracking its object, pygobject_dealloc
+    calls PyObject_ClearWeakRefs() which can call back into python, create
+    new allocations, and trigger the GC.
+
+    This is causing Sugar (based on pygobject2 + pygtk2 static bindings)
+    to
+    crash on a regular basis while interacting with widgets or launching
+    applications.
+
+    Fix this by untracking the object early. Also fix the same issue
+    spotted
+    in the GSource wrapper.
+
+    Thanks to Bernie Innocenti for initial diagnosis.
+
+ glib/pygsource.c    |    6 ++++--
+ gobject/pygobject.c |    8 +++++++-
+ 2 files changed, 11 insertions(+), 3 deletions(-)
+
+commit ad96a3f1d187a640ec0a463b766fd5e027f3c16a
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Mon May 2 15:49:52 2011 +0200
+
+    Fix symbol names to be locale independent
+
+    We currently use upper() to present enum values, which are usually
+    defined in
+    lower case in the typelib, in upper cases. However, upper() is locale
+    dependent, so that e. g. in tr_TR.UTF-8, "invalid" becomes "iNVALiD"
+    because Turkish has some extra variants of "i".
+
+    Use a local ASCII-only translate() call instead to avoid this. Thanks
+    to Nils
+    Philippsen for the idea!
+
+    This also adds a test locale "te_ST@nouppera" which defines
+    toupper('a') == 'a'.
+    Run the Enum tests under this locale to reproduce the bug and verify
+    the fix.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=649165
+
+ gi/module.py         |    9 ++++++++-
+ tests/te_ST@nouppera |   50
+ ++++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gi.py     |   30 ++++++++++++++++++++++++++++++
+ 3 files changed, 88 insertions(+), 1 deletions(-)
+
+commit 90530b52f6eaa30bb704e413c01bb94ee511a0bb
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Mon Apr 18 18:36:25 2011 +0200
+
+    Updated DOAP file
+
+ pygobject.doap |   15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+commit 996e5676a00e8d8fc55ef7400d15ccf5a4d904eb
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Mon Apr 18 18:16:42 2011 +0200
+
+    Post release version bump to 2.28.5
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit afbcc71b71343b5a16dc8873c2ac7b9ca7dd801a
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Mon Apr 18 18:06:56 2011 +0200
+
+    Release 2.28.4
+
+ NEWS         |   11 +++++++++++
+ configure.ac |    2 +-
+ 2 files changed, 12 insertions(+), 1 deletions(-)
+
+commit 4643bcad5845f5ec3dd9961616e3ed3b0946001f
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Sat Apr 16 16:02:05 2011 +0200
+
+    [gi] Don't create variant twice
+
+ gi/overrides/GLib.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0e9e4ec7c28ac4564e15283636adc8b7bc1a83be
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Fri Apr 15 16:14:43 2011 +0200
+
+    pygi-convert.sh: Make sure the uppercase GObject module is imported
+    instead of the lowercase
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=647736
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit dfe95b9ec598b57deaabd98ab488ab054a44ec09
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Fri Apr 15 15:58:53 2011 +0200
+
+    [gi] Removed hack to avoid using GLib.Variant.new_variant.
+
+    The bug in the annotations of GLib is fixed now.
+    https://bugzilla.gnome.org/show_bug.cgi?id=639952
+    https://bugzilla.gnome.org/show_bug.cgi?id=647796
+
+ gi/overrides/GLib.py |   14 +-------------
+ 1 files changed, 1 insertions(+), 13 deletions(-)
+
+commit cfccd55128377864e3a42a64785637bd453621b2
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Fri Apr 15 15:58:31 2011 +0200
+
+    [gi] Added additional test case for GVariant handling
+
+ tests/test_overrides.py |   15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+commit 666ec192a4369e2fae508261a7a81b34326fc227
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Mon Apr 11 18:34:31 2011 +0200
+
+    [gi] Added support for GVariant arguments
+
+    This is required in order for the "g-signal" signal of GDBusProxy
+    to work properly and thus to properly receive DBus signals with any
+    type of argument.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=647477
+
+ gi/pygi-argument.c |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit cc0e8423f36486d15f751bd3c14351edda28538d
+Author: Steve Frécinaux <code@istique.net>
+Date:   Mon Apr 4 21:12:18 2011 +0200
+
+    Fix ABI break in old static bindings.
+
+    Commit 84d6142c14a7ebfb7284d3db52e14d3393f93905 (Always register a new
+    GType when a GObject class is subclassed) breaks the more advanced
+    usage
+    of PyGObject with regards to "metaclass hackery" as used in for
+    example
+    the kiwi and sqlkit projects. But the users of the gi-based bindings
+    now rely on the new behaviour.
+
+    We fix this by restraining the systematical registering of new
+    types to
+    the new gi-based bindings, leaving the old pygtk ones untouched.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=646437
+
+ gi/types.py         |    9 +++++++++
+ gobject/__init__.py |   16 +++++++++-------
+ 2 files changed, 18 insertions(+), 7 deletions(-)
+
+commit b0e499744d337adc608e2aa8996469bca2df044a
+Author: Mike Gorse <mgorse@novell.com>
+Date:   Sat Apr 2 18:45:40 2011 -0500
+
+    fetch size from an enum type
+
+    Do not assume that an enum is returned as a long; treat it as an
+    int if
+    the type indicates that its size is that of an int.
+
+    http://bugzilla.gnome.org/show_bug.cgi?id=646581
+
+ gi/pygi-argument.c |   25 ++++++++++++++++++++++---
+ 1 files changed, 22 insertions(+), 3 deletions(-)
+
+commit 4f59bee3a875eb71b8c9adce855b9addc965fe3b
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:   Tue Mar 22 20:47:51 2011 +0100
+
+    dsextras.py: ensure eol characters are preserved when writing template
+    files (so \n does not become \r\n)
+
+ dsextras.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b7a6f884e9ea5946691dd661b79e3094b6e1b34c
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Thu Mar 24 12:10:47 2011 -0400
+
+    release 2.28.3
+
+ NEWS         |    3 +++
+ configure.ac |    2 +-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 99689e2849a9df78980c9d25d9ddabc1e95f1252
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Thu Mar 24 12:08:10 2011 -0400
+
+    Revert "dsextras.py: ensure eol characters are preserved when writing
+    template files (so \n does not become \r\n)"
+
+    This reverts commit 27496e0e86e7d8798caf019fd09af5c6a30ec633.
+
+ dsextras.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 27496e0e86e7d8798caf019fd09af5c6a30ec633
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:   Tue Mar 22 20:47:51 2011 +0100
+
+    dsextras.py: ensure eol characters are preserved when writing template
+    files (so \n does not become \r\n)
+
+ dsextras.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b7449d63e0c1bdfb5acbd8c5ec073711441301b9
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:   Tue Mar 22 11:35:44 2011 +0100
+
+    dsextras.py: remove \r as wel as \n character
+
+ dsextras.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 075ead0533ba311120b3ca9ac9ae75ca84ace8fb
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Mar 23 10:39:19 2011 -0400
+
+    fix a typo when converting objects to strings gvalues
+
+ gobject/pygtype.c        |    4 ++--
+ tests/test_properties.py |    8 ++++++++
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+commit a904f0dea4b7f04aac7c9ddd3b01ffbbd808375e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Mar 22 21:56:14 2011 -0400
+
+    prep 2.28.2 release
+
+ NEWS         |    6 ++++++
+ configure.ac |    2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit c1ee6642d4b69a8c417cf92534ba091f89c7f68c
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Mar 22 18:46:28 2011 -0400
+
+    fix static ABI for setting string gvalues from python objects
+
+     * the static bindings used to be able to set a string gvalue to
+     any python
+       object that implemented __str__, for instance when setting a
+       treemodel column
+     * this restores that code while still keeping unicode and python 3
+       compatability
+
+ gobject/pygtype.c |   28 +++++++++++++++++++---------
+ 1 files changed, 19 insertions(+), 9 deletions(-)
+
+commit cd38572b9781502d3228e74c017cb7cc39a07b3d
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Mar 22 15:04:01 2011 +0100
+
+    Fix GSchema tests for separate build tree
+
+    When using a separate build tree, the compiled GSettings schema will
+    be in the
+    build tree, but as the test scripts are only in the source tree they
+    won't find
+    the compiled schema. Pass the build dir as environment variable and
+    prefer it
+    over test_overrides.py's directory.
+
+ tests/Makefile.am       |    3 ++-
+ tests/test_overrides.py |    4 +++-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+commit be81ea00d6cd92a5ae77c5bb301b6f6baeb6d89a
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Mar 22 14:02:46 2011 +0100
+
+    GIO tests: Fix remaining test case for separate build tree
+
+ tests/test_gio.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 178df3e438835bec9b40dea243867784dee35815
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Mar 22 13:21:27 2011 +0100
+
+    GIO tests: Fix for separate build tree
+
+    When using a separate build tree, "test_gio.py" is not in the
+    current working
+    dir (which is the build tree), but in the srcdir. Use __file__
+    instead.
+
+ tests/test_gio.py |   14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 27dcb9b1963be0c0d18e19a0b108a4a64d5e048b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Mar 21 12:42:36 2011 -0400
+
+    prep for 2.28.1 release
+
+ NEWS |   15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+commit 072d45cbfa7b360a0e616c4c56ba75d4dc08e7df
+Author: John Stowers <john.stowers@gmail.com>
+Date:   Sun Mar 6 23:41:30 2011 +1300
+
+    pygi-convert.sh remove gobject tests, GObject works now
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=644347
+
+ pygi-convert.sh |   28 ----------------------------
+ 1 files changed, 0 insertions(+), 28 deletions(-)
+
+commit 205fee1622e461c0bcbe50e8befe30f01aac81eb
+Author: John Stowers <john.stowers@gmail.com>
+Date:   Sun Mar 6 23:41:01 2011 +1300
+
+    pygi-convert.sh add GObject.xxx and webkit
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=644347
+
+ pygi-convert.sh |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit f5ee2924af489c17b64e56be5d2bd1c39d1293d1
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Mar 16 17:34:18 2011 -0400
+
+    [gi] marshal raw closures
+
+    * before we were able to marshal python callables into methods
+    that took
+      GClosures but we had no way to take a GClosure returned from one
+      method and pass it to another - this enables that usecase
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=644757
+
+ gi/pygi-argument.c |   15 ++++++++++-----
+ tests/test_gi.py   |    4 ++++
+ 2 files changed, 14 insertions(+), 5 deletions(-)
+
+commit ac11dc70b34fe077be18f7e605c9f3cce03ad3fa
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Mon Mar 21 13:25:12 2011 +0100
+
+    Revert "Deduce PYTHON_LIBS in addition to PYTHON_INCLUDES"
+
+    This reverts commit fc7d7f7f153d57ff3866b7bfd5e6479d702cc4d9.
+
+    This introduces additional libpython dependencies, which breaks
+    distributions
+    which support multiple Python versions, and also causes the python
+    interpreter
+    to be in memory twice in some cases.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620215
+
+ gi/Makefile.am    |    4 +---
+ gio/Makefile.am   |    2 +-
+ glib/Makefile.am  |    2 +-
+ m4/python.m4      |    7 ++-----
+ tests/Makefile.am |    2 +-
+ 5 files changed, 6 insertions(+), 11 deletions(-)
+
+commit aed7582de1c0623042601c8038a7631fa41d087d
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:   Fri Mar 18 17:06:08 2011 +0100
+
+    setup.py: fix user_access_control option
+
+ setup.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 6f0d33101a2451854f216291813951349d5ac471
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Mar 16 15:20:43 2011 -0400
+
+    [gi-overrides] fix marshalling pygobjects in treemodels
+
+     * PyGObjects wern't being marshalled correctly as python objects
+     when a
+       treemodel column was set to take pyobjects
+     * Fix this by explicetly marshalling all PyObjects as boxed gvalue
+     types
+       in the overrides
+
+ gi/overrides/Gtk.py     |    9 +++++----
+ tests/test_overrides.py |   34 ++++++++++++++++++++++++++--------
+ 2 files changed, 31 insertions(+), 12 deletions(-)
+
+commit adb6f0320bed9a00a96c99424d4982199dc85af2
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Mar 16 10:22:35 2011 +0100
+
+    [gi] Respect the MessageType for Gtk.MessageDialog
+
+    Don't just ignore the type argument, actually pass it on. Thanks
+    to Tualatrix
+    Chou for spotting this!
+
+ gi/overrides/Gtk.py |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 115c4750f071270b648218c9678931a65a4b3e3d
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Mar 15 10:22:39 2011 +0100
+
+    [gi] Do not require signature for D-BUS methods without arguments
+
+    Calling methods on DBusProxy objects usually requires specifying
+    the signature
+    as first argument. However, if the D-BUS method does not take any
+    arguments,
+    specifying the empty '()' signature does not give any additional
+    information,
+    so allow the caller to just call the proxy method without any
+    arguments.
+
+    Also ensure that passing a non-string signature raises a
+    comprehensible
+    exception, instead of crashing deep in the GVariant leaf constructor.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=644260
+
+ gi/overrides/Gio.py |   16 +++++++++++++++-
+ tests/test_gdbus.py |   13 +++++++++++++
+ 2 files changed, 28 insertions(+), 1 deletions(-)
+
+commit 0df9e153812e1e5077bb906449e211ecb0af8736
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Fri Mar 11 14:09:02 2011 -0500
+
+    [gi-demos] add pickers demo
+
+ demos/gtk-demo/demos/pickers.py |   74
+ +++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 74 insertions(+), 0 deletions(-)
+
+commit 419bfdd44b566ffb88f71165c00728872987dc5e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Thu Mar 10 18:12:50 2011 -0500
+
+    [gi-demos] add menu demo
+
+ demos/gtk-demo/demos/menus.py |  122
+ +++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 122 insertions(+), 0 deletions(-)
+
+commit 0877670e184a591866cbf3ab14284fcb217b540b
+Author: John Stowers <john.stowers@gmail.com>
+Date:   Sun Mar 6 23:05:33 2011 +1300
+
+    [gi-overrides] TreeViewColumn.set_cell_data_func func_data can be None
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=644343
+
+ gi/overrides/Gtk.py |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 1f69c520d95fec30094fac47cb0efa31c79da81c
+Author: John Stowers <john.stowers@gmail.com>
+Date:   Sun Mar 6 17:48:04 2011 +1300
+
+    [gi-demos] dont try and run demos that represent directories
+
+ demos/gtk-demo/gtk-demo.py |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit f06ad511725b28d821532acae45a25d0a186fc9f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Mar 9 13:02:50 2011 -0500
+
+    [gi-overrides] fix exception block so it works in Python 2.5
+
+ gi/overrides/Gio.py |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit a784350b6e76c6c66fb2856dd597238f4ac992e9
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Mar 8 13:25:57 2011 -0500
+
+    post release version bump
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit aa745352bb99862c360dc56e2fececc4b2968cbc
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Mar 8 13:20:31 2011 -0500
+
+    prep 2.28.0 release
+
+ NEWS         |   25 +++++++++++++++++++++++++
+ configure.ac |    4 ++--
+ 2 files changed, 27 insertions(+), 2 deletions(-)
+
+commit d3bafc0a8bacf99e22b18c978012ab719e70954e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Mar 7 18:09:18 2011 -0500
+
+    [gi-demos] some python 3 compat fixes
+
+ demos/gtk-demo/demos/Icon View/iconviewbasics.py |    6 ++++++
+ demos/gtk-demo/demos/Tree View/liststore.py      |    2 +-
+ demos/gtk-demo/demos/rotatedtext.py              |    4 ++--
+ demos/gtk-demo/gtk-demo.py                       |    4 ++--
+ 4 files changed, 11 insertions(+), 5 deletions(-)
+
+commit eaafff23d397852b08384b4e15d68e3888e99b48
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Mar 7 18:08:40 2011 -0500
+
+    [gi-demos] catch the correct error class
+
+ demos/gtk-demo/demos/images.py |   11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+commit b113540b452638601945f63297e68b7564c3d4df
+Author: Steve Frécinaux <code@istique.net>
+Date:   Mon Mar 7 01:58:36 2011 +0100
+
+    Try not to sink objects returned by C functions.
+
+    When creating a wrapper around an object to call a python function, we
+    try to avoid calling pygobject_sink() when the object was not
+    created by
+    pygobject or the static bindings because otherwise we can end
+    up leaking
+    one reference for GInitiallyUnowned subclasses if the object was
+    already
+    owned by someone else.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=644067
+
+ gobject/pygobject-private.h |    1 +
+ gobject/pygobject.c         |    7 +++++++
+ gobject/pygtype.c           |    6 +++---
+ 3 files changed, 11 insertions(+), 3 deletions(-)
+
+commit 7bece91e83e3c72a7bd04d2096dcf9b31aa9d366
+Author: Steve Frécinaux <code@istique.net>
+Date:   Sun Mar 6 21:18:36 2011 +0100
+
+    Do not leak python references when using the gobject.property()
+    helper.
+
+    Since this helper was storing plain references in a long-lived
+    dict, the
+    refcount for the instances would never drop to zero, and so they would
+    never get finalized.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=644039
+
+ gobject/propertyhelper.py |    5 ++---
+ tests/test_properties.py  |   23 +++++++++++++++++++++++
+ 2 files changed, 25 insertions(+), 3 deletions(-)
+
+commit 030695cb4306d915044aea4fae7c7122ccde31b4
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Mar 7 11:13:12 2011 -0500
+
+    [gi] fix try except blocks so they work in Python 2.5
+
+    * use etype, e = sys.exc_info[:2] to extract error details instead of
+      except Exception as e or except Exception, e
+
+ tests/test_gdbus.py |   27 ++++++++++++++++++++-------
+ 1 files changed, 20 insertions(+), 7 deletions(-)
+
+commit 7e6d833c7f74031b010b45b635214cde5d85f7ae
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Fri Mar 4 12:25:49 2011 -0500
+
+    handle uchar as bytes, not strings in python 3
+
+    * This worked in Python2 because bytes and strings are equivilant
+    and the macro
+      PYGLIB_PyString_FromStringAndSize evaluated to a PyString
+    * In Python 3 PYGLIB_PyString_FromStringAndSize evaluates to
+    a PyUnicode
+    * PYGLIB_PyBytes_FromStringAndSize evaluates to a PyString in Python 2
+      and a PyBytes object in Python 3
+
+ gobject/pygtype.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit aae4ce5d9e9b7747bf5847071a72a6cdd1371a3e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Fri Mar 4 12:24:35 2011 -0500
+
+    [gi-overrides] handle unichar gvalues when setting treemodels
+
+ gi/overrides/Gtk.py |   10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 0d65223992abec46eee7b2b3c76f68da67de4905
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Fri Mar 4 11:43:51 2011 -0500
+
+    [gi-overrides] special case python 2 keywords that crept in
+
+ gi/overrides/Gtk.py     |    6 +++++-
+ tests/test_overrides.py |    8 ++++----
+ 2 files changed, 9 insertions(+), 5 deletions(-)
+
+commit 094b355a785fbe7ebc776cbbd059e6a3d9241ce2
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Fri Mar 4 11:10:16 2011 -0500
+
+    check for the py3 _thread module in configure.ac if thread is
+    not found
+
+ configure.ac |    6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit b0d537c58e6997b546a9a367860abb3b93ce3440
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Fri Mar 4 00:39:23 2011 -0500
+
+    [gi-demos] add iconview demo
+
+ demos/gtk-demo/demos/Icon View/iconviewbasics.py |  212
+ ++++++++++++++++++++++
+ 1 files changed, 212 insertions(+), 0 deletions(-)
+
+commit e5aa7268c2a0fc285d60b30e135fd79d039b9ae5
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Thu Mar 3 18:39:16 2011 -0500
+
+    [gi] wrap the keyword argument in a dict so we don't break Python 2.5
+
+    * python < 2.6 does not allow sending in keyword litterals after
+    sending in
+      *args.  You can only send in **kwds.
+
+ gi/types.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 79d03b40b2395874556860e7e39e0c607b6a676a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Thu Mar 3 18:30:40 2011 -0500
+
+    [gi-demos] add the combobox with string ids section to the demos
+
+ demos/gtk-demo/demos/combobox.py |   49
+ +++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 48 insertions(+), 1 deletions(-)
+
+commit 1b4ac8bef90ed1d3d51d45dafa61bfd70c6f9eb7
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Thu Mar 3 16:47:51 2011 -0500
+
+    [gi-overrides] add an override for Gdk.RGBA
+
+ gi/overrides/Gdk.py     |   18 ++++++++++++++++++
+ tests/test_overrides.py |   10 ++++++++++
+ 2 files changed, 28 insertions(+), 0 deletions(-)
+
+commit c1c491c8cb4684a10404fee59b2706bec6b8606b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Thu Mar 3 16:10:17 2011 -0500
+
+    [gi-demos] fix up search-entry to reflect annotations fixed in Gtk+
+    master
+
+ demos/gtk-demo/demos/Entry/search_entry.py |   23 +++++++++--------------
+ 1 files changed, 9 insertions(+), 14 deletions(-)
+
+commit 9687fbcf75582986e95188c5b2a24d0fe6b855db
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Mar 2 18:13:43 2011 -0500
+
+    [gi-demos] add search entry demo
+
+ demos/gtk-demo/demos/Entry/search_entry.py |  257
+ ++++++++++++++++++++++++++++
+ 1 files changed, 257 insertions(+), 0 deletions(-)
+
+commit 28fbd6a11bda726fecfd7322f4acf41d06c54ec3
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Mar 2 15:37:27 2011 -0500
+
+    [gi] wrap map in a list for Python 3 compat
+
+ gi/types.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d71224aa5b329cbb7116d35b8f98027fc27e630d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Mar 1 14:52:00 2011 -0500
+
+    [gi-demos] fix up the validation combobox
+
+ demos/gtk-demo/demos/combobox.py |   21 +++++++++++++++------
+ 1 files changed, 15 insertions(+), 6 deletions(-)
+
+commit d7d2f9c185773b35a6b89379be9bd96d04be79fb
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Mar 1 12:31:35 2011 -0500
+
+    add overridesdir variable in the .pc file for 3rd party overrides
+
+ pygobject-2.0.pc.in |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit c2cfdfa6c08b9da6bff9fc9d479e441a83cbf60a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Mar 1 12:19:28 2011 -0500
+
+    [gi] remove unref for closures since they are floating objects that
+    get sunk
+
+    * right now we trust that the containers we send the closures into
+    will sink
+      them
+    * we should research this a bit more to see if there is a better
+    way to handle
+      floating closures once we are free to break static binding ABI
+    * for now this is the least invasive of all the options
+    * don't assert on transfer != GI_TRANSFER_NONE since the behavior for
+      closures is always the same (and should actually be
+      GI_TRANSFER_FULL)
+
+ gi/pygi-argument.c      |    6 ------
+ tests/test_overrides.py |    8 ++++++++
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+commit e016486cbb24f696ebfc0cf1f457ec4e37a123cb
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:   Fri Feb 11 17:14:11 2011 +0100
+
+    setup.py: Set bdist_wininst user-access-control property
+
+ setup.py |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 2923f26c7850d12ece67b3ef96054721d38f888f
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Mar 2 16:29:00 2011 +0100
+
+    Fix uninitialized variable in gi.require_version()
+
+ gi/__init__.py |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit aaaa00bb4027432503efee88622d9289319b1983
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Mar 1 23:26:07 2011 +0100
+
+    Run tests with LC_MESSAGES="C"
+
+    Some tests, such as tests/test_gdbus.py check parts of error messages
+    or other
+    visible strings. Ensure that these do not get translated in the
+    test suite.
+
+ tests/runtests.py |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 3aa089668f9ff3de86d2ca28e72c206c16c3403a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Feb 28 18:21:43 2011 -0500
+
+    [gi-overrides] override Gtk.stock_lookup to not return success
+
+ demos/gtk-demo/demos/combobox.py |    2 +-
+ gi/overrides/Gtk.py              |    9 +++++++++
+ 2 files changed, 10 insertions(+), 1 deletions(-)
+
+commit 9614680269a267f8cf32a2d5534c50fb76ec48ec
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Feb 28 14:23:04 2011 -0500
+
+    post release bump
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 093334ee29b5846ff57b4e9f74380efc9ed591e7
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Feb 28 14:16:00 2011 -0500
+
+    prep for 2.27.91 release
+
+ NEWS |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 50 insertions(+), 0 deletions(-)
+
+commit 4b49a4f6123f0bbd5a36eba65b00142e3df7e595
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Feb 28 14:08:05 2011 -0500
+
+    [gi-tests] use Gdk.test_simulate_button instead of emitting event
+    ourselves
+
+     * this function is available specifically so we can test events so
+     use this
+       instead of creating our own button press event
+
+ tests/test_overrides.py |    9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+commit baa9865e6ff8b4eee4b16235b8dcc5dc48d2634d
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Thu Feb 24 19:30:32 2011 +0100
+
+    [gi-tests] tests for EventButton override.
+
+     * John (J5) Palmieri - fixed up original patch so that we actually
+       emit the event instead of just creating a Gdk.ButtonEvent object
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=642554
+
+ tests/test_overrides.py |   21 +++++++++++++++++++++
+ 1 files changed, 21 insertions(+), 0 deletions(-)
+
+commit 6366307ba020a40f6dfa22e64fd6345b118fd2e5
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:   Wed Feb 16 09:44:12 2011 +0100
+
+    Skip interfaces when checking for conflicts in the MRO
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=642437
+
+ gi/types.py             |   40 ++++++++++++++++++++++++++++++++++++++++
+ gobject/gobjectmodule.c |    9 +++++++--
+ tests/test_gi.py        |   16 ++++++++++++++++
+ 3 files changed, 63 insertions(+), 2 deletions(-)
+
+commit 14c787541966be8f497905d33d554343dabf8b73
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Feb 23 18:43:27 2011 -0500
+
+    [gi-overrides] Add event methods to all event union members
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=642554
+
+ gi/overrides/Gdk.py |   70
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 70 insertions(+), 0 deletions(-)
+
+commit 7f013383063c1d1e5a95cf4c056ff152d4aa2645
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Feb 23 14:14:16 2011 -0500
+
+    [gi] check to see if object is a member of a union when validating
+    paramaters
+
+    * union members are not subclasses of the union they belong to so
+    if an
+       inteface requires you pass a union but you pass one of its members
+       there will be a type error
+     * this patch checks to see if the type you are passing is a member
+     of the
+       union and passes the checks if it is
+     * this works in python 3 but in python 2 methods do their own
+     isinstance
+       check on the instance parameter (e.g. self) so we need to figure
+       out how to override that for union methods
+       (e.g. Gdk.Event.get_state)
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=642554
+
+ gi/pygi-argument.c |   38 ++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 38 insertions(+), 0 deletions(-)
+
+commit 284e775b6caa86ef6465d17c87ec77376e66931c
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Thu Feb 24 18:46:15 2011 +0100
+
+    [gi] Remove DyanmicModule.load() to _load() to prevent overriding
+    GI attrs.
+
+ gi/importer.py |    2 +-
+ gi/module.py   |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 6d6d4fcf4678b512558c2c0e44c0c2e235c810f4
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Wed Feb 23 12:05:03 2011 +0100
+
+    Test case with John's fix for crash with C arrays and a GError is set.
+
+    I have added a test case, and made a few fixes to John's patch,
+    but the
+    solution is the same his.
+
+    Workaround a bug when freeing C array types
+
+     * This is a hack and there is really no way around it without
+     ripping out
+        the current array handling code which spans between pygi-invoke.c
+        and
+        pygi-argument.c and completely rewriting it.
+      * The is no time before our stable release
+      * This patch trades a segfault for a leak in the very unusual
+      case where
+        an error occures inside an interface that takes one or more C
+        arrays. Since
+        we wrap C arrays in GArrays internally but have to unwrap them
+        to send them
+        to the introspected C function, there is a period of time where
+        an error
+        can occure with the C array in an unknown state (some being true
+        C arrays
+        and others still wrapped in a GArray)
+      * This patch adds a c_arrays_are_wrapped state to signal that it
+      is safe to
+        free them.  However since c_arrays_are_wrapped can only track
+        arrays
+        as a group, not individually, if it is set to FALSE we can
+        not assume
+        that every array is a pure C array, so instead we will simply
+        leak them
+        to avoid incorrectly freeing one and causing a segfault.
+      * This issue is fixed in the invoke rewrite branch as it treats
+      C arrays and
+        GArrays separately, however that branch is not yet ready to be
+        merged and
+        won't be until the next release.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=642708
+
+ gi/pygi-invoke.c |   54
+ ++++++++++++++++++++++++++++++++++++++++++++++++++----
+ tests/test_gi.py |    9 +++++++++
+ 2 files changed, 59 insertions(+), 4 deletions(-)
+
+commit 3534c1d4babefd4ee63e46119b279126058b7a71
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Feb 23 15:11:59 2011 -0500
+
+    [gi-overrides] fix setting rows in treeview to accept None as a value
+
+     * as done in PyGTK None indicates the column should not be set
+
+ gi/overrides/Gtk.py     |    3 +++
+ tests/test_overrides.py |   18 +++++++++++++-----
+ 2 files changed, 16 insertions(+), 5 deletions(-)
+
+commit ecbfaf60914a87f29ff0529614db9b6afca94c82
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Wed Feb 23 14:23:19 2011 +0100
+
+    [gi] Add value_name for enum and flags from introspection
+    "c:identifier" (if attr is available).
+
+ gi/gimodule.c    |   22 ++++++++++++++++++----
+ tests/test_gi.py |   36 ++++++++++++++++++++++++++++++++++++
+ 2 files changed, 54 insertions(+), 4 deletions(-)
+
+commit e5ae620ad772f62cb14ab7c049ba0ce00cc501f2
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Tue Feb 22 21:37:33 2011 +0100
+
+    Don't force loading of DynamicModule until set in sys.modules
+
+    This fixes Tomeu's previous commit, which removed lazy loading.
+    Forcing the loading of a module before it is installed in sys.modules
+    prevents some overrides from being registered (namely Gtk.main_quit).
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=642305
+
+ gi/importer.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 992c0c1096c77bc299a40a34ec30a2ac0c562ed4
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Wed Feb 23 11:40:55 2011 +0100
+
+    Fix flags with multiple names for the same value.
+
+    Flags constructs a dict __flags_values__ and uses it to cache
+    instances. However some flags in Glib such as G_IO_FLAG_MASK and
+    G_IO_FLAG_GET_MASK are aliases for the same int value, and will
+    override each other's place in the dictionary.
+
+    The dict length check is not necessary. It only reduces the number
+    of duplicate instances we keep, because if an instance is not
+    found in the dict, a new one is created anyway.
+
+ gobject/pygflags.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 8bf3f6ed075994eb3e29950670395bcf1b9dc2a0
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Feb 22 15:07:40 2011 -0500
+
+    [gi-demos] add liststore demo
+
+ demos/gtk-demo/demos/Tree View/liststore.py |  205
+ +++++++++++++++++++++++++++
+ 1 files changed, 205 insertions(+), 0 deletions(-)
+
+commit 788fc96771046fc64cede392e748b2d1b6b3aa1c
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Feb 22 14:35:44 2011 -0500
+
+    [gi-demos] run through the demos and remove the FIXMEs that have
+    been fixed
+
+ demos/gtk-demo/demos/appwindow.py     |   18 ++++++------------
+ demos/gtk-demo/demos/assistant.py     |    3 ---
+ demos/gtk-demo/demos/builder.py       |    3 ---
+ demos/gtk-demo/demos/button_box.py    |   10 +++-------
+ demos/gtk-demo/demos/clipboard.py     |    8 ++------
+ demos/gtk-demo/demos/colorselector.py |    2 --
+ demos/gtk-demo/demos/combobox.py      |    4 +---
+ demos/gtk-demo/demos/drawingarea.py   |    3 ---
+ 8 files changed, 12 insertions(+), 39 deletions(-)
+
+commit adf7aec853878681b450c3ef1f89bfe9ba85fec1
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:   Wed Feb 16 11:53:18 2011 +0100
+
+    Load typelibs at import time, add gi.require_version()
+
+    also adds Repository.get_loaded_namespaces()
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=642305
+
+ gi/__init__.py       |   29 ++++++++++++++++++++++++++++-
+ gi/importer.py       |    1 +
+ gi/module.py         |   21 ++++-----------------
+ gi/pygi-repository.c |   23 +++++++++++++++++++++++
+ 4 files changed, 56 insertions(+), 18 deletions(-)
+
+commit 6fe7783b96366f380f9168909932a87e35d994b3
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Feb 21 17:20:57 2011 -0500
+
+    use GValue support to marshal GtkTreeModel values correctly
+
+    * needs patch from https://bugzilla.gnome.org/show_bug.cgi?id=642914
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=642921
+
+ gi/overrides/Gtk.py     |   37 ++++++++++++++++++--
+ tests/test_overrides.py |   87
+ ++++++++++++++++++++++++++++++++++++++++-------
+ 2 files changed, 107 insertions(+), 17 deletions(-)
+
+commit bc4a570bcc0a02029d746fbbcfdf4cc14c37f2ad
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Feb 21 16:14:20 2011 -0500
+
+    [gi] pass raw GValues instead of trying to marshal them
+
+    * Right now GValues are transparent to the user but this leave us no
+       way to describe fundimental types other than those supported
+       directly
+       by python (e.g. int, str, etc)
+     * If an interface is expecting a uint or other GValue type a user
+     can now use
+       the raw GValue interfaces and expect paramaters that take
+       GValues to
+       marshal them correctly e.g.:
+           value = GObject.Value()
+           value.int(GObject.TYPE_UINT)
+           value.set_uint(1234)
+     * The objective here is to not for users to use this API but for
+     overrides
+       to be able to utilize them.  For instance in the TreeModel API
+       we can
+       get the expected type for a column and them create a GValue with
+       the correct
+       type so that he underlying python object is marshalled correctly.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=642914
+
+ gi/pygi-argument.c |   24 ++++++++++++++++++------
+ tests/test_gi.py   |    9 ++++++++-
+ 2 files changed, 26 insertions(+), 7 deletions(-)
+
+commit 428fc90eb12f26ceb7c868879ad05788890d32a3
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Sat Feb 19 19:42:41 2011 -0500
+
+    [gi-demos] add icon view edit and drag-and-drop demo
+
+ demos/gtk-demo/demos/Icon View/iconviewedit.py |  101
+ ++++++++++++++++++++++++
+ 1 files changed, 101 insertions(+), 0 deletions(-)
+
+commit eb0e179bff167303db1c20412f4bc9c8baa94582
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Sat Feb 19 23:11:25 2011 +0100
+
+    [gi] Register GType for non-GType enums and flags at runtime.
+
+    Note: rebuild of gobject-introspection is required for new tests.
+
+    Previously non-GType enums used a separate type implemented in
+    Python, and non-GType flags had no implementation at all. This
+    removes the separate type for enums, and registers a new GType at
+    runtime if there isn't one.
+
+    This allows non-GType enums and flags to use the same Python type
+    as GType enums and flags. This removes duplication of code, and
+    make both kinds behave identically.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=642607
+
+ gi/gimodule.c      |  117
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ gi/module.py       |   24 +++++++----
+ gi/pygi-info.c     |   15 +++++++
+ gi/types.py        |   16 -------
+ gobject/pygflags.c |   13 ++++--
+ tests/test_gi.py   |   35 +++++++++++++++
+ 6 files changed, 191 insertions(+), 29 deletions(-)
+
+commit d5e67257361609036d2bbfa47ea85a6c759b332a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Sat Feb 19 17:26:42 2011 -0500
+
+    [gi-demos] add info bars demo
+
+ demos/gtk-demo/demos/infobars.py |   99
+ ++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 99 insertions(+), 0 deletions(-)
+
+commit 372f480b078d1befb30532a0ebe0ad9c90e78df0
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Sat Feb 19 15:44:52 2011 +0100
+
+    tests/runtests.py: Add missing "import sys"
+
+    master already has this.
+
+ tests/runtests.py |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit c1b35fc49680ad25e996de57e3e020bd43d9186c
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Feb 8 15:38:21 2011 +0100
+
+    [gi] Add Pythonic gdbus method invocation
+
+    Provide a wrapper for Gio.DBusProxy for calling D-Bus methods like
+    on a normal
+    Python object. This will handle the Python object <-> GVariant
+    conversion, and
+    optional keyword arguments for flags, timeout, and a result handler
+    for
+    asynchronous calls.
+
+    Require specifying the input argument signature as the first argument
+    of each
+    method call. This ensures that the types of e. g. integers are
+    always correct,
+    and avoids having to do expensive D-Bus introspection for each call.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=640181
+
+ gi/overrides/Gio.py |   99
+ +++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gdbus.py |  102
+ ++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 199 insertions(+), 2 deletions(-)
+
+commit 2737e1c2c506cd324a0aa2abfdfeb3ad4f08e678
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Fri Feb 18 22:48:59 2011 +0100
+
+    Skip GError out parameters in Python closure.
+
+    Python code should have never have to explicitely return a GError.
+    Once we are able to marshal exceptions the Python code should
+    throw an exception instead. Until then, set GError to NULL, and
+    don't complain if a Python function doesn't return an arg for it.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=642715
+
+ gi/pygi-closure.c |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 93677502c12a3ee123dd565bf1b404ef47ec1c47
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Thu Feb 17 19:46:49 2011 -0500
+
+    [gi-demos] added rotate text demo
+
+    * needs some Pango Attr fixes to be 100% done, See FIXME
+
+ demos/gtk-demo/demos/rotatedtext.py |  196
+ +++++++++++++++++++++++++++++++++++
+ 1 files changed, 196 insertions(+), 0 deletions(-)
+
+commit 8495ab57f49fb507a8004a9cf967d6fe91bb4ef0
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Thu Feb 17 17:25:00 2011 -0500
+
+    [gi-demos] add images demo
+
+     * needs annotation fix from GdkPixbuf for ImageLoader to work
+
+ demos/gtk-demo/demos/images.py |  311
+ ++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 311 insertions(+), 0 deletions(-)
+
+commit 60b9dd8d021e550089f44dc489ffeb77af6976ee
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Thu Feb 17 14:48:24 2011 -0500
+
+    [gi-demos] add pixbuf demo
+
+ demos/gtk-demo/demos/pixbuf.py |  183
+ ++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 183 insertions(+), 0 deletions(-)
+
+commit f57153dd6786858ff2ab79c28227cd021755d693
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Thu Feb 17 14:47:12 2011 -0500
+
+    [gi-demos] remove fixmes from print demo, fixed in pango
+
+ demos/gtk-demo/demos/printing.py |   10 +++-------
+ 1 files changed, 3 insertions(+), 7 deletions(-)
+
+commit b8345be15c7f65e97f6bc148ad6c35ff80ff3870
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Feb 16 19:39:30 2011 -0500
+
+    [gi-demos] add printing demo
+
+    * needs some annotations for pango before it is 100% useful
+
+ demos/gtk-demo/demos/printing.py |  177
+ ++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 177 insertions(+), 0 deletions(-)
+
+commit 123877715145038a5877b8c538a48a1285f1ed54
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Feb 16 17:52:38 2011 -0500
+
+    [gi-overrides] add cursor overrides
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=635947
+
+ gi/overrides/Gdk.py     |   41 +++++++++++++++++++++++++++++++++++++++++
+ tests/test_overrides.py |   23 +++++++++++++++++++++++
+ 2 files changed, 64 insertions(+), 0 deletions(-)
+
+commit 68d72e015997da8d5732527c7ab96dd8c61fa664
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Feb 16 16:18:24 2011 -0500
+
+    [gi-demos] add the links demo
+
+ demos/gtk-demo/demos/links.py |   74
+ +++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 74 insertions(+), 0 deletions(-)
+
+commit 00505a9a5445b85a091650a777a47f632ddc9d6d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Feb 16 15:48:40 2011 -0500
+
+    [gi-demos] add expander demo
+
+ demos/gtk-demo/demos/expander.py |   60
+ ++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 60 insertions(+), 0 deletions(-)
+
+commit ed8710c7aa05cc0c919366536c94bf43955f1b71
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Feb 16 15:14:35 2011 -0500
+
+    [gi-overrides] use pop instead of del and add extra tests for
+    Gtk.Table kwargs
+
+ gi/overrides/Gtk.py     |    6 ++----
+ tests/test_overrides.py |    8 ++++++++
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+commit 888675f85c895a60d4432b992961ec3067da6e20
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Tue Feb 15 20:07:42 2011 +0100
+
+    [tests] Separate processes for GI and static binding tests.
+
+    Importing and using both static gobject bindings and
+    introspection GObject bindings in the same process can cause
+    conflicts with types which otherwise wouldn't be there.
+
+    This patch changes "make check" to call runtests.py twice -- once
+    for each set of tests.
+
+    In the case of a test failure, runtests.py now sets the exit code
+    so that make does not continue. Otherwise you might miss the
+    failures from the first batch of tests in the scrollback.
+
+ tests/Makefile.am |   29 ++++++++++++-----------------
+ tests/runtests.py |    4 +++-
+ 2 files changed, 15 insertions(+), 18 deletions(-)
+
+commit 71b0dd93d524afce9f4a4b0b393c8a16a1f70e2f
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Tue Feb 15 16:26:24 2011 +0100
+
+    [GI] Remove implicit loading of gi module preserve the code path
+    for static bindings.
+
+    Previously type lookups (as well as property accesses and signal
+    connects would trigger an import of the gi module). Now we make
+    those paths fail, and fallback to the old static binding code
+    paths *unless* the gi module is already in sys.modules.
+
+    So if Python code calls:
+    from gi.repository import Gtk
+
+    or even just:
+    import gi
+
+    then everything will work just like it did without this patch. If gi
+    is not explicitly imported, the code skips the introspection code
+    and acts like the old static bindings did.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=642387
+
+ gi/pygi.h |   10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+commit 97e78181813f15f693e650df5a8901bd2fe71541
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Feb 15 14:47:10 2011 -0500
+
+    [gi-demos] add dialogs demo
+
+ demos/gtk-demo/demos/dialogs.py |  153
+ +++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 153 insertions(+), 0 deletions(-)
+
+commit a23a48edafb9d08fec5411b828d1e0c6763e84af
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Feb 15 14:46:41 2011 -0500
+
+    [gi-overrides] fix typo in GtkTable constructor
+
+ gi/overrides/Gtk.py |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit bcccff3b2ad9c8054a4d5462c62cde566587eba6
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Feb 15 13:26:38 2011 -0500
+
+    [gi-demos] keep popup menu from destroying itself by holding a ref
+    in app class
+
+ demos/gtk-demo/demos/clipboard.py |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 9dc0979ba7d35b6ff9bb219a21926c2fd88451c7
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Feb 15 13:25:13 2011 -0500
+
+    [gi-overrides] add a Gtk.Menu override for the popup method
+
+ gi/overrides/Gtk.py |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 317278a3ddf15f1f9da53051295a0b533b1b1a11
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Feb 15 13:24:33 2011 -0500
+
+    [gi-demos] fix the about dialog in appwindow demo
+
+ demos/gtk-demo/demos/appwindow.py |   22 +++++++++-------------
+ 1 files changed, 9 insertions(+), 13 deletions(-)
+
+commit cb2d2aad023789991b20036e22cae5ad3eee9b36
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Feb 15 11:21:13 2011 -0500
+
+    [gi-demos] fix clipboard demo so DnD works
+
+    * menu popups don't work because the API takes a callback without
+    a destroy
+      notify
+
+ demos/gtk-demo/demos/clipboard.py |   20 ++++++++++----------
+ 1 files changed, 10 insertions(+), 10 deletions(-)
+
+commit 5434b7aac323170ea9469afbda520b801462c246
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Tue Feb 15 10:18:53 2011 -0500
+
+    [gi-demos] fix clipboard demo to reflect new API
+
+ demos/gtk-demo/demos/clipboard.py |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit b6c97de9680f3d5d629132415c1f7a9c42e558f8
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Feb 14 18:17:20 2011 -0500
+
+    [gi-demo] Fix color dialog demo to run with new draw, style and
+    color apis
+
+ demos/gtk-demo/demos/colorselector.py |   44
+ ++++++++++++--------------------
+ 1 files changed, 17 insertions(+), 27 deletions(-)
+
+commit 7147bd635fb03439a5f9edbce56c5558d092428c
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Feb 14 17:58:25 2011 -0500
+
+    [gi-demos] fix most of the combobox app
+
+    * Still having some issues with filtering the ComboBoxText widget
+
+ demos/gtk-demo/demos/combobox.py |   17 ++++++++---------
+ 1 files changed, 8 insertions(+), 9 deletions(-)
+
+commit a64b8fe89492ae47172979f1900686455cd1f9a8
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Mon Feb 14 19:36:27 2011 +0100
+
+    Use PyGI type conversion (to fix foreign types) for signal callbacks.
+
+    First attempt at patch to fix foreign types in signal callbacks.
+    Tests are not implemented yet.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=637601
+
+ gi/Makefile.am           |    2 +
+ gi/gimodule.c            |    1 +
+ gi/pygi-argument.c       |   91 +++++++++++++++++
+ gi/pygi-argument.h       |    2 +
+ gi/pygi-private.h        |    1 +
+ gi/pygi-signal-closure.c |  245
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-signal-closure.h |   46 +++++++++
+ gi/pygi.h                |   28 +++++
+ gobject/pygobject.c      |   24 ++++-
+ 9 files changed, 436 insertions(+), 4 deletions(-)
+
+commit 36ddad6af4a579c070171fd0522d7ffd93d5d73e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Feb 14 16:47:03 2011 -0500
+
+    [gi-demos] fix drawingarea app to use the new draw api
+
+ demos/gtk-demo/demos/drawingarea.py |  144
+ ++++++++++++-----------------------
+ 1 files changed, 50 insertions(+), 94 deletions(-)
+
+commit ddde83ebd4dbb179aa5388057a14faf32ece26ae
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Feb 14 16:43:35 2011 -0500
+
+    [gi-overrides] for Gtk 3 alias Gdk.Rectangle to cairo.RectangleInt
+
+    * note this is the introspected gobject-cairo boxed type not the
+    static cairo
+      bindings
+    * we alias this so people do not get confused
+
+ gi/overrides/Gdk.py |    5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 8617d0e2a63771eba04983c7319f18638aa6d81e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Feb 14 15:07:11 2011 -0500
+
+    [gi-overrides] let user set the proper property names in Gtk.Table
+
+    * the old override added a columns and rows parameters to the Table
+    constuctor
+      to be in sync with PyGtk.
+    * The GTK properties are n_columns and n_rows
+    * support both
+
+ gi/overrides/Gtk.py |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 09c0534e4ac673ffdbfb41bc0aa34353be3b88e2
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Feb 14 15:06:38 2011 -0500
+
+    [gi-demos] get appwindow demo working again
+
+ demos/gtk-demo/demos/appwindow.py |   24 ++++--------------------
+ 1 files changed, 4 insertions(+), 20 deletions(-)
+
+commit 1944349cc59ddaf4fd7308ffce10b521c885c88b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Mon Feb 14 15:05:44 2011 -0500
+
+    [gi-demos] fixed use of tree_iter_get
+
+ demos/gtk-demo/gtk-demo.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 29efc5a31c2879cefcf31d1d9bdbab65052d3b24
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Fri Feb 11 11:18:24 2011 -0500
+
+    pre-release version bump
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5dae6386ef74b6334daa3d0baf7c2e43d93a7e40
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Fri Feb 11 11:05:04 2011 -0500
+
+    bump version and edit NEWS for release
+
+ NEWS         |  289
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ configure.ac |    2 +-
+ 2 files changed, 290 insertions(+), 1 deletions(-)
+
+commit e12097a3fc006f435ae01156e55cacd7622a6e06
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Thu Feb 10 16:46:08 2011 -0500
+
+    fix build to correctly use python-config
+
+ autogen.sh        |    3 +++
+ configure.ac      |    6 ------
+ m4/python.m4      |    9 +++++----
+ tests/runtests.py |    1 +
+ 4 files changed, 9 insertions(+), 10 deletions(-)
+
+commit 5ec107f805e32d4183b3c1a015d411992fc46a48
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Feb 9 18:00:34 2011 +0100
+
+    Run gio tests separately when enabled
+
+    As we can't load both gio and gi.repository.Gio at the same time,
+    run the gio
+    tests separately when gio is enabled.
+
+ tests/Makefile.am |   13 ++++++++++++-
+ 1 files changed, 12 insertions(+), 1 deletions(-)
+
+commit 02ac041ba001bdda506f749e90aebc86a414d7c1
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Feb 2 13:33:55 2011 +0100
+
+    Revert "Remove gio static bindings"
+
+    This reverts commit bca5834fc8fa342149e0eec7b396877a2abe6d33.
+
+    We still need the static gio bindings for now.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=638899
+
+ Makefile.am                       |    2 +-
+ configure.ac                      |   22 +-
+ gio/.gitignore                    |    3 +
+ gio/Makefile.am                   |  117 +
+ gio/__init__.py                   |   40 +
+ gio/gappinfo.override             |  213 ++
+ gio/gapplaunchcontext.override    |   99 +
+ gio/gbufferedinputstream.override |   70 +
+ gio/gcancellable.override         |   38 +
+ gio/gdatainputstream.override     |  250 ++
+ gio/gdrive.override               |  347 ++
+ gio/gfile.override                | 2215 +++++++++++
+ gio/gfileattribute.override       |  153 +
+ gio/gfileenumerator.override      |  184 +
+ gio/gfileinfo.override            |  121 +
+ gio/gfileinputstream.override     |   68 +
+ gio/gfileiostream.override        |   68 +
+ gio/gfileoutputstream.override    |   68 +
+ gio/gicon.override                |  310 ++
+ gio/ginputstream.override         |  344 ++
+ gio/gio-types.defs                |  807 ++++
+ gio/gio.defs                      | 7465
+ +++++++++++++++++++++++++++++++++++++
+ gio/gio.override                  |  409 ++
+ gio/giomodule.c                   |  208 +
+ gio/giostream.override            |   68 +
+ gio/gmemoryinputstream.override   |   91 +
+ gio/gmemoryoutputstream.override  |   45 +
+ gio/gmount.override               |  454 +++
+ gio/goutputstream.override        |  292 ++
+ gio/gresolver.override            |  312 ++
+ gio/gsocket.override              |  575 +++
+ gio/gvolume.override              |  237 ++
+ gio/gvolumemonitor.override       |   94 +
+ gio/pygio-utils.c                 |  236 ++
+ gio/pygio-utils.h                 |   49 +
+ gio/unix-types.defs               |   55 +
+ gio/unix.defs                     |  475 +++
+ gio/unix.override                 |   62 +
+ gio/unixmodule.c                  |   52 +
+ tests/Makefile.am                 |    9 +
+ tests/runtests-windows.py         |    3 +
+ tests/test_gcancellable.py        |   15 +
+ tests/test_gicon.py               |  112 +
+ tests/test_gio.py                 | 1138 ++++++
+ tests/test_gresolver.py           |   68 +
+ tests/test_gsocket.py             |  126 +
+ 46 files changed, 18187 insertions(+), 2 deletions(-)
+
+commit a535e4af7c38fd7917d804470e8c46da4c2a86ea
+Author: Steve Frécinaux <code@istique.net>
+Date:   Wed Feb 9 17:32:03 2011 +0100
+
+    Decrease the refcount for GInitiallyUnowned constructors.
+
+    This mimicks the weird legacy pygtk behaviour and makes all the tests
+    pass despite the proper fixes having been reverted.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=641525
+
+ gi/pygi-invoke.c |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 657d113c766c5ff9c5e7285ff5309283333983e4
+Author: Steve Frécinaux <code@istique.net>
+Date:   Wed Feb 9 17:03:30 2011 +0100
+
+    Ensure the sink functions are only ran once.
+
+    This mitigates in a not-so-clean way the leak experienced in pygobject
+    for wrappers created multiple times, without breaking pygtk.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=641525
+
+ gobject/pygobject.c |   23 +++++++++++++++--------
+ 1 files changed, 15 insertions(+), 8 deletions(-)
+
+commit d32c0ecc6cde743047054e65355cbbfbf808d5ce
+Author: Steve Frécinaux <code@istique.net>
+Date:   Wed Feb 9 17:15:41 2011 +0100
+
+    Revert "Fix wrong refcount when calling introspected widget
+    constructors"
+
+    This reverts commit 7bc4122897d9d05172a2bd5b56bded87e2afaec4.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=641525
+
+ gobject/pygobject.c |    4 +---
+ 1 files changed, 1 insertions(+), 3 deletions(-)
+
+commit 4c9715b29f8883e23027cca10157ea96013b0dbc
+Author: Steve Frécinaux <code@istique.net>
+Date:   Wed Feb 9 16:33:42 2011 +0100
+
+    Revert "Fix reference leaks for GInitiallyUnowned objects"
+
+    This reverts commit f0a0b6c2eda89622de2b1e5ebb6a48103ad72a42.
+    The test cases have been kept.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=641525
+
+ gobject/gobjectmodule.c |    2 --
+ gobject/pygobject.c     |   14 +++++++-------
+ 2 files changed, 7 insertions(+), 9 deletions(-)
+
+commit 14c4cf8e6edae893538680964380d543bde4a14d
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Feb 9 11:34:59 2011 +0100
+
+    Run test suite under dbus-launch
+
+    When available, run the test suite in dbus-launch, so that the
+    GDBus tests
+    succeed even when building this in an environment without a running
+    session
+    D-BUS (such as distribution package builds).
+
+ tests/Makefile.am |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 0858f550e2b6f75e3f583f963f5952f5ddae4e0e
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Feb 8 15:46:36 2011 +0100
+
+    Fix test_gdbus.py to be Python3 friendly
+
+    - TestCase.assert_() has been deprecated by assertTrue().
+    - Exceptions don't have a message attribute any more, use str(e)
+
+ tests/test_gdbus.py |   34 +++++++++++++++-------------------
+ 1 files changed, 15 insertions(+), 19 deletions(-)
+
+commit b7f32e4cca0cef201489b55653f96ac64a8f9ab9
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Sat Jan 29 12:20:50 2011 +0100
+
+    [gi] Provide comfortable GSettings API
+
+    Make Gio.Settings behave like a dictionary, with transparent
+    conversion from/to
+    GVariants. Also provide a more comfortable constructor.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=640838
+
+ gi/overrides/Gio.py              |   54 ++++++++++++++++++++++++++++
+ tests/org.gnome.test.gschema.xml |    9 +++++
+ tests/test_overrides.py          |   73
+ ++++++++++++++++++++++++++++++-------
+ 3 files changed, 122 insertions(+), 14 deletions(-)
+
+commit 8dad0eaed60a9de26e9a729a48a1f6bc74be486e
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Fri Feb 4 16:36:07 2011 +0100
+
+    Fix vfunc search bug when using GInterfaces and a do_* method.
+
+    If a class inherits from a GInterface, as well as implements a do_*
+    method (which is not in a super class), all the base interfaces
+    will be searched for an __info__ attribute. GInterface doesn't
+    have one, causing an error on class creation.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=641493
+
+ gi/types.py      |    4 +++-
+ tests/test_gi.py |    8 ++++++++
+ 2 files changed, 11 insertions(+), 1 deletions(-)
+
+commit 2660be1f227be7a53092483bc9d8ead1bd1fb266
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Thu Feb 3 15:31:42 2011 +0100
+
+    [GI] Add tests for Gtk.Widget.drag_* methods.
+
+    Previously all the drag_* methods were accessible as Gtk.drag_*.
+    Now that the (method) attribute has been included for these
+    methods in Gtk+, this test checks that they are included as class
+    methods when using pygobject introspection.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639945
+
+ tests/test_overrides.py |   40 ++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 40 insertions(+), 0 deletions(-)
+
+commit 09acaff29dfaabc77477cffca2c7137f68991e7f
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Wed Feb 2 21:00:48 2011 +0100
+
+    [python 3] use the right syntaxis to raise exceptions
+
+ codegen/argtypes.py    |    8 ++++----
+ codegen/definitions.py |   14 +++++++-------
+ gi/overrides/Gtk.py    |    2 +-
+ 3 files changed, 12 insertions(+), 12 deletions(-)
+
+commit 36094e5982d3e05d5662843b6d401f0974f5235f
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Wed Feb 2 20:50:12 2011 +0100
+
+    [gi] return PYGLIB_MODULE_ERROR_RETURN on error and use pygobject_init
+
+ tests/testhelpermodule.c |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit c913c1789296310c2cf27554ce719d7f6e9c94cd
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Wed Feb 2 20:37:21 2011 +0100
+
+    [gi] return PYGLIB_MODULE_ERROR_RETURN on error
+
+    This is to avoid some warnings when building with python 3
+
+ gi/gimodule.c |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 7bc4122897d9d05172a2bd5b56bded87e2afaec4
+Author: Steve Frécinaux <code@istique.net>
+Date:   Sat Jan 29 00:16:50 2011 +0100
+
+    Fix wrong refcount when calling introspected widget constructors
+
+    Introspected widget constructors, like Gtk.Button.new(), can return
+    objects with a floating reference, which was then reffed by pygobject,
+    resulting in two references, despite the object is not owned by
+    anyone.
+
+    This patch uses ref_sink() when pygobject takes its own reference, to
+    avoid adding that extra reference. Hence we now claim ownership on
+    objects returned by constructors with transfer=none (which is the case
+    for nearly all the widget constructors, despite the floating ref).
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=640868
+
+ gobject/pygobject.c      |    4 +++-
+ tests/test_everything.py |    9 ++++++++-
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+commit afeaaa126f7cd6556fb855ecd0facc174c0f946c
+Author: Simon Schampijer <simon@laptop.org>
+Date:   Wed Jan 19 16:19:46 2011 +0100
+
+    Gdk.Window: Map the standard constructor to the *new* constructor
+
+    Gdk.Window had to be made abstract
+    (see c4a36d875235e0bf1e52dbf2fa14d08bfc8bd4ec in gtk),
+    this override allows using the standard constructor
+
+    This commit adds as well a testcase.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639936
+
+ gi/overrides/Gdk.py     |    6 ++++++
+ tests/test_overrides.py |    8 ++++++++
+ 2 files changed, 14 insertions(+), 0 deletions(-)
+
+commit 858669f92c9907dd70b4966d6a8521ed122225be
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Mon Jan 31 17:38:52 2011 +0100
+
+    Ship tests/org.gnome.test.gschema.xml in dist tarballs
+
+ tests/Makefile.am |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 69207910209ebfe450df616aeb8fa4cc2e7eccf3
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Fri Jan 28 17:14:19 2011 +0100
+
+    [gi] Add GSettings tests
+
+    Ryan Lortie proposed an override for more convenient GSettings access,
+    so let's
+    first make sure that the canonical GLib API works.
+
+ tests/Makefile.am                |    7 +++++--
+ tests/org.gnome.test.gschema.xml |   16 ++++++++++++++++
+ tests/test_overrides.py          |   31 +++++++++++++++++++++++++++++++
+ 3 files changed, 52 insertions(+), 2 deletions(-)
+
+commit 488478a83640d50baee963337fcc870fec76b784
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Fri Jan 28 07:20:26 2011 +0100
+
+    [gi] Provide GtkTextBuffer.insert_with_tags_by_name()
+
+    Provide an actual insert_with_tags_by_name() instead of overloading
+    insert_with_tags() to handle both types. This keeps the overrides
+    consistent
+    with the actual GTK API.
+
+ gi/overrides/Gtk.py     |   19 ++++++++++++++-----
+ tests/test_overrides.py |    4 ++--
+ 2 files changed, 16 insertions(+), 7 deletions(-)
+
+commit dace1a553793fb7fb054b60760f02c9e5cf00b38
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Thu Jan 27 13:37:18 2011 +0100
+
+    [gi] Support tag names in GtkTextBuffer.insert_with_tags()
+
+    Neither insert_with_tags() nor insert_with_tags_by_name() are
+    introspectable
+    due to using varargs. As both are useful, support both cases in
+    the override.
+
+ gi/overrides/Gtk.py     |    5 +++++
+ tests/test_overrides.py |    9 +++++++++
+ 2 files changed, 14 insertions(+), 0 deletions(-)
+
+commit 91d34124b2a5128e93e13c7fee8693d5edc4e9bb
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Thu Jan 27 12:23:18 2011 +0100
+
+    Add MAINTAINERCLEANFILES
+
+    This var behaves like .gitignore and allows us to skip some specific
+    files.
+
+ Makefile.am |   27 +++++++++++++++++++++++++++
+ 1 files changed, 27 insertions(+), 0 deletions(-)
+
+commit 8a98d26981ce68809a21c64cac4962e58c927905
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Thu Jan 27 12:15:30 2011 +0100
+
+    Remove .gitignore files and use git.mk
+
+    git.mk is a script maintained in pango. From time to time we must
+    check if it was updated and update it here.
+
+ .gitignore                |   46 ----------
+ Makefile.am               |    2 +
+ codegen/.gitignore        |    2 -
+ codegen/Makefile.am       |    2 +
+ docs/.gitignore           |    7 --
+ docs/Makefile.am          |    2 +
+ examples/Makefile.am      |    2 +
+ gi/.gitignore             |   40 ---------
+ gi/Makefile.am            |    2 +
+ gi/overrides/Makefile.am  |    2 +
+ gi/repository/Makefile.am |    2 +
+ gi/tests/Makefile.am      |    2 +
+ git.mk                    |  200
+ +++++++++++++++++++++++++++++++++++++++++++++
+ glib/Makefile.am          |    2 +
+ gobject/.gitignore        |    3 -
+ gobject/Makefile.am       |    2 +
+ tests/.gitignore          |    2 -
+ tests/Makefile.am         |    2 +
+ 18 files changed, 222 insertions(+), 100 deletions(-)
+
+commit 331c42b63bc60a3b906fa21e1c0a7c1b9428f347
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Thu Jan 27 12:04:19 2011 +0100
+
+    pygi-convert.sh: Convert Pango.TabAlign.*
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit be1a2959fa0a3d8682e0e8aef389d73dacab0689
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Thu Jan 27 12:02:39 2011 +0100
+
+    pygi-convert.sh: Drop window -> get_window() conversion
+
+    It is doing more harm than good for projects which use things like
+    self.window.
+
+ pygi-convert.sh |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit dd7deb4b658c56857c26b1a278a3d688f2ea6a2a
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Thu Jan 27 11:58:26 2011 +0100
+
+    pygi-convert.sh: Don't convert self.window assignments
+
+ pygi-convert.sh |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 975341a26772966d4afc87a88a6a566d61237fa0
+Author: Steve Frécinaux <code@istique.net>
+Date:   Fri Jan 21 18:41:54 2011 +0100
+
+    Fix leaked python reference in python-defined subclasses
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=640184
+
+ gobject/gobjectmodule.c |    1 +
+ tests/test_gobject.py   |    4 ++++
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit a59e2d58bdb3f31a4f415dbe14b7d9988ac28ce3
+Author: Steve Frécinaux <code@istique.net>
+Date:   Fri Jan 21 15:54:43 2011 +0100
+
+    Add some tests for the number of python refs held at creation time
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=640184
+
+ tests/test_gobject.py |   21 +++++++++++++++++++++
+ 1 files changed, 21 insertions(+), 0 deletions(-)
+
+commit 7d70105eb324ea4b6a58c2d3fb3f2dda36e7ab33
+Author: Steve Frécinaux <code@istique.net>
+Date:   Fri Jan 21 17:24:49 2011 +0100
+
+    Factor out parameter marshalling from construction functions.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=640197
+
+ gobject/gobjectmodule.c     |   35 ++-------------------
+ gobject/pygobject-private.h |    5 +++
+ gobject/pygobject.c         |   71
+ +++++++++++++++++++++++++-----------------
+ 3 files changed, 50 insertions(+), 61 deletions(-)
+
+commit a3e0cfe8924887ecd1e07cedd2cfb999c853ac62
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Jan 26 15:34:24 2011 -0500
+
+    [gi] in python 3 an array of uint8 can be bytes but not string
+
+ tests/test_gi.py |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 843553ea958eddec185bb660851a310dc050a14b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Jan 26 15:30:06 2011 -0500
+
+    [gi] fix Gio.FileEnumerator to reflect the Python 3 iter protocol
+
+ gi/overrides/Gio.py |    6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 6ff357839feb39930a5f3175de3d0ed35f24d3f4
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Jan 26 15:17:03 2011 -0500
+
+    [gi] python 3 fixes
+
+    Patches need to work in Python 3 - here are some of the issues I
+    fixed up.
+    Patch submitters should keep this in mind.  When I note to only
+    use something
+    in tests it means that there is a compat module that is only available
+    to the
+    tests.  Actuall code should either add the workaround to the top
+    of their
+    module or try not to have a distinction between things such as
+    unicode and
+    longs which no longer exist in Python 3
+
+    * use range instead of xrange - loss of performance in Python 2 but
+    Python 3 i
+      treats range similarly to python 2's xrange
+    * use dict.items() instead of dict.iteritems() - same as the xrange
+    issue
+    * callable does not exist in 3.x, use hasattr(obj, '__call__') or
+
+          if sys.version_info > (3, 0):
+              def callable(obj):
+                  return hasattr(obj, '__call__')
+
+    * using unicode in tests is tricky, you can't use u'' even in
+    a versioned
+      conditional as python3's parser chokes on it. Do this in tests
+      (and only i
+      in tests):
+
+          from compathelper import _unicode
+          unicode_string = _unicode('this is a unicode string')
+
+    * exception caching changed in 2.7, instead of except Exception,
+    e we now use
+      except Exception as e.  Do this to be compatible with older
+      versions:
+
+          except Exception:
+              etype, e = sys.exc_info()[:2]
+
+    * Unbound methods with an im_func attribute no longer exits in 3.x.
+      Unbound methods are now just functions so class.method in 3.x is
+      equivalent to class.method.im_func in 2.x.  If you have to go this
+      low level do this:
+
+          func = class1.method
+          if sys.version_info < (3,0):
+              func = func.im_func
+
+    * all numbers are long in 3.x so 42L is invalid in 3.x.  In tests (and
+      only in tests) do this:
+
+          from compathelper import _long
+          l = _long(42)
+
+ gi/overrides/GLib.py    |   16 ++++++++--------
+ gi/types.py             |    5 ++++-
+ tests/compathelper.py   |   19 +++++++++++++++++++
+ tests/test_gdbus.py     |   12 ++++++++----
+ tests/test_gi.py        |   19 ++++++++++++-------
+ tests/test_overrides.py |    8 +++++---
+ 6 files changed, 56 insertions(+), 23 deletions(-)
+
+commit 832d662b9f90f5762bbf28b3cca73f947c1f83ce
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:   Wed Jan 26 14:00:08 2011 -0500
+
+    [gi] fix try/except blocks using depricated raise format
+
+ gi/overrides/GLib.py |    4 ++--
+ gi/overrides/Gdk.py  |    2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit d3e30e240fed6ef1dd40fd29fd13dc2effc6c7b1
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Jan 26 19:03:48 2011 +0100
+
+    [gi] Add docstring to GLib.Variant constructor
+
+ gi/overrides/GLib.py |   11 +++++++++++
+ 1 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 963cd52fec26f7a4fb34414f8ac6662932ede322
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Jan 26 18:45:38 2011 +0100
+
+    [gi] update gdbus test cases for previous GVariant change
+
+ tests/test_gdbus.py |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 27e3a6276ff5f2cdc03ddf69ee80d44c3bf2c094
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Jan 26 18:39:17 2011 +0100
+
+    [gi] Accept only a single object in GLib.Variant constructor
+
+    We previously allowed flat arguments for tuple signatures, e. g.
+
+      GLib.Variant('(ii)', 1, 2)
+
+    However, that's not how GVariant is supposed to work. Remove the
+    special case
+    to handle flat argument lists, and only accept a single value, i. e.
+
+      GLib.Variant('(ii)', (1, 2))
+
+    Note that this breaks the current API, but as it is not used widely
+    yet, let's
+    better fix it now.
+
+    Thanks to Ryan Lortie for pointing this out!
+
+ gi/overrides/GLib.py    |   25 ++++++++++---------------
+ tests/test_overrides.py |   32 +++++++++++++-------------------
+ 2 files changed, 23 insertions(+), 34 deletions(-)
+
+commit b15e8e2c0c933d0f827a70280faf875ac383d81b
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Wed Jan 26 00:40:49 2011 +0100
+
+    Speed up _setup_native_vfuncs()
+
+    This changes _setup_native_vfuncs() to only install native
+    vfunc wrappers from the current class on the current class.
+    Native vfuncs will not be propogated up or down the class
+    hierarchy as this is unnecessary and wastes CPU and memory.
+
+    Since the normal process in python to retrieve a method or
+    attribute recurses to the base classes if an attribute is not
+    found in the subclass, there is no need to setup all base class
+    virtual functions on a subclass.
+
+    This patch removes the recursion in _setup_native_vfuncs()
+    and lets Python find them in the base classes like a normal
+    Python class would work. This significantly increases the speed
+    of any class which is or inherits from a C class which includes
+    virtual methods.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=640629
+
+ gi/types.py      |   26 +++++++++++++-------------
+ tests/test_gi.py |   13 +++++++++++++
+ 2 files changed, 26 insertions(+), 13 deletions(-)
+
+commit 569d42ac2f50fb706ef289ff631db743483f40ee
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Thu Jan 20 16:26:18 2011 +0100
+
+    Speed up class creation: rewrite _setup_vfuncs() to be much more
+    efficient.
+
+    This patch rewrites the _setup_vfuncs() method to remove recursion and
+    make the running time linear in the number of virtual functions to
+    hook up
+    (ie. methods starting with "do_") instead of linear in the number of
+    virtual functions in the base class which could possibly be
+    overridden.
+
+    Since most classes do not override all of the virtual functions in the
+    base class (and many override none), this runs much faster.
+
+    It is possible to not recurse on all base classes because
+    non-interface
+    base classes will have the virtual function installed as an attribute.
+    Thus getattr() can be called, which recurses to the base classes much
+    faster than a custom implementation in Python. If the method cannot be
+    found with getattr(), all interface bases classes are searched
+    manually.
+
+    The function is_function_in_classes() has been deleted. Because of the
+    above changes, it is not used anymore.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=640073
+
+ gi/types.py      |  104
+ +++++++++++++++++++++++++++++++++---------------------
+ tests/test_gi.py |   13 +++++++
+ 2 files changed, 77 insertions(+), 40 deletions(-)
+
+commit 8f4e6536f3c2edf38a45632d1c23eb7c6681c3be
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Mon Jan 24 19:23:19 2011 +0100
+
+    pygi-convert.sh: Convert gtk.UI_MANAGER_*
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 1f473b5164407a178203eb8cc7f3c786e0d0e5c2
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Fri Jan 21 18:41:54 2011 +0100
+
+    pygi-convert.sh: Convert gdk.GRAB_*
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit f5d0b7b9d189f65503c0bf66d8bda4186ca3223a
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Fri Jan 21 16:45:07 2011 +0100
+
+    [gi] set the gtype GValue correctly
+
+ gi/pygi-property.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit ce521011d7f6d7f082aaea76fa05c5af9f6e93f5
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Fri Jan 21 16:20:23 2011 +0100
+
+    [gi] use the right argument type for callback
+
+ gi/pygi-foreign-cairo.c    |    8 ++++----
+ gi/pygi-foreign-gvariant.c |    4 ++--
+ gi/pygi-foreign-gvariant.h |    2 +-
+ gi/pygi-foreign.c          |    2 +-
+ gi/pygi.h                  |    2 +-
+ 5 files changed, 9 insertions(+), 9 deletions(-)
+
+commit a060287d1a6d190acb9d344f08fd5662e3296da5
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Fri Jan 21 11:00:27 2011 +0100
+
+    [gi] Add test cases for GDBus client operations
+
+ tests/Makefile.am   |    1 +
+ tests/test_gdbus.py |   94
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 95 insertions(+), 0 deletions(-)
+
+commit e97e28048efb966ecc1a03277d36cbaa81b8db7d
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Fri Jan 21 09:54:14 2011 +0100
+
+    [gi] Add Variant construction/unpack support for boxed Variants
+
+    Construction uses a GVariantBuilder for now, as the new_variant()
+    constructor
+    currently does not work (see
+    https://bugzilla.gnome.org/show_bug.cgi?id=639952)
+
+ gi/overrides/GLib.py    |   18 +++++++++++++++++-
+ tests/test_overrides.py |   26 ++++++++++++++++++++++++++
+ 2 files changed, 43 insertions(+), 1 deletions(-)
+
+commit 71dd03261fc06b8180c14cd31b54d8e4b200be3a
+Merge: bc29600 bd002c7
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:   Fri Jan 21 09:33:16 2011 +0100
+
+    Merge branch 'windows-setup-fixes'
+
+commit bc29600a2a04c972ceab7ef8d3292e8633977591
+Author: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
+Date:   Thu Jan 20 19:48:23 2011 +0100
+
+    pygi-convert.sh: GdkPixbuf methods
+
+    GNOME bug #639880
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit d1b0fa501cc431baa530d96fb50f4c35590890ac
+Author: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
+Date:   Thu Jan 20 19:45:01 2011 +0100
+
+    pygi-convert.sh: Gdk.COLORSPACE_RGB
+
+    GNOME bug #639880
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 6d8ff4d5bdda5480089543869535cc3ee83da2f5
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Jan 19 11:41:11 2011 +0100
+
+    [gi] Support nested objects and empty sequences in GLib.Variant
+    building
+
+    The GVariant constructor (in the overrides) previously did not
+    support empty
+    arrays/dictionaries or nested structures. Rewrite the VariantCreator
+    class to
+    be fully recursive and determine the element types of
+    arrays/dictionaries.
+
+    This now also allows you to use actual tuples as input values for
+    GVariant
+    tuple types. Taking values from the flat argument list is still
+    supported for
+    convenience, though.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639939
+
+ gi/overrides/GLib.py    |  229
+ +++++++++++++++++++++++++----------------------
+ tests/test_overrides.py |  159 +++++++++++++++++++++++++++++++--
+ 2 files changed, 273 insertions(+), 115 deletions(-)
+
+commit ac095f5435f106e175fa3297cb273e63c85d2809
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:   Thu Jan 20 15:55:45 2011 +0100
+
+    Uncomment test_gi.TestInterfaceClash
+
+ tests/test_gi.py |   22 +++++++++++-----------
+ 1 files changed, 11 insertions(+), 11 deletions(-)
+
+commit f0a0b6c2eda89622de2b1e5ebb6a48103ad72a42
+Author: Steve Frécinaux <code@istique.net>
+Date:   Thu Jan 20 14:14:15 2011 +0100
+
+    Fix reference leaks for GInitiallyUnowned objects
+
+    References were leaked for GInitiallyUnowned objects which got their
+    wrappers created several times, because someone else holds reference
+    on it and it got out of python scope at some point.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639949
+
+ gobject/gobjectmodule.c  |    2 +
+ gobject/pygobject.c      |   14 +++++-----
+ tests/test-floating.c    |   36 ++++++++++++++++++++++++++
+ tests/test-floating.h    |   21 +++++++++++++++
+ tests/test_gobject.py    |   63
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ tests/testhelpermodule.c |   50 ++++++++++++++++++++++++++++++++++++
+ 6 files changed, 179 insertions(+), 7 deletions(-)
+
+commit cae2cf3d4fb049c94389bf8f84d7d97a544d7a3f
+Author: Steve Frécinaux <code@istique.net>
+Date:   Wed Jan 19 16:57:57 2011 +0100
+
+    Add tests for refcount of a GObject owned by a library
+
+    When the object is constructed, its refcount is 2 because the library
+    refs it once. It should remain around until we ask the library to
+    release its reference.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639949
+
+ tests/test-floating.c    |   30 ++++++++++++++++++++++
+ tests/test-floating.h    |   20 +++++++++++++++
+ tests/test_gobject.py    |   62
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ tests/testhelpermodule.c |   51 +++++++++++++++++++++++++++++++++++++
+ 4 files changed, 163 insertions(+), 0 deletions(-)
+
+commit b6737b91938d527872eff1d645a205cacf94e15d
+Author: Steve Frécinaux <code@istique.net>
+Date:   Wed Jan 19 14:52:41 2011 +0100
+
+    Add a test to check for regular object reference count
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639949
+
+ tests/test_gobject.py |    8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 2b0f1ede820414ef1cfd6b37569fcb946d2031fc
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Thu Jan 20 14:15:52 2011 +0100
+
+    [gi] Update TreeView.enable_model_drag_{source,dest} to current GTK
+
+    GTK master now landed a lot of annotation fixes which also correctly
+    marks the
+    array length argument of
+    Gtk.TreeView.enable_model_drag_{source,dest}(). Thus
+    drop the explicit array length argument from the call in the override.
+
+ gi/overrides/Gtk.py |    2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit b59edf4f0f7cab44033f9d704d476e10ee0d0c0a
+Author: Steve Frécinaux <code@istique.net>
+Date:   Wed Jan 19 18:04:10 2011 +0100
+
+    Fix a typo in a private symbol name.
+
+ gobject/gobjectmodule.c |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 6447688e283a8fb22de3ab68cbc06e34ad23d198
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Thu Jan 20 11:49:08 2011 +0100
+
+    pygi-convert.sh: Convert glib.source_remove()
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 84ee8de4bc00a8f901926cc6386d73c12dbd0b0b
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Thu Jan 20 11:42:34 2011 +0100
+
+    Fix typo in previous commit to actually convert glib.GError
+
+ pygi-convert.sh |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b238cb614338f46e6feb7935cca0a55c7a929418
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Thu Jan 20 11:40:14 2011 +0100
+
+    pygi-convert.sh: Move some glib bits which are better handled
+    by gobject
+
+ pygi-convert.sh |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 21c09a7ee294b59abb3eca6f64f13bf5c8a2fa0e
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Wed Jan 19 12:00:02 2011 +0100
+
+    Modify override for Gtk.Adjustment to allow position or keyword
+    arguments in __init__().
+
+    Previously passing no arguments was not working, because the default
+    value for each parameter was None, and GObject.__init__() refuses to
+    allow None for integer properties. This patch does not pass None up
+    to GObject.__init__. Instead it does not pass the parameter at all,
+    and uses the class's default values.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639934
+
+ gi/overrides/Gtk.py     |   14 ++++++++++++--
+ tests/test_overrides.py |   34 +++++++++++++++++++++++++++-------
+ 2 files changed, 39 insertions(+), 9 deletions(-)
+
+commit d465e25297ad6589ff2cd0c00e11e8bd8ffe3f78
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Jan 19 22:52:51 2011 +0100
+
+    [gi] Fix small typo in previous commit
+
+    The GVariant signature of the self test had a trailing 'i'. The
+    current
+    GVariant builder doesn't mind, but the new implementation proposed
+    in bug
+    639939 does.
+
+ tests/test_overrides.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2b8e1d0531dcb8f57dc9f2fddf25970bee3daa90
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Jan 19 20:18:19 2011 +0100
+
+    [gi] Add pythonic iterator and indexing for string GVariants
+
+    This extends commit b1a98083c to also work for strings.
+
+ gi/overrides/GLib.py    |    8 +++++++-
+ tests/test_overrides.py |   13 +++++++++++++
+ 2 files changed, 20 insertions(+), 1 deletions(-)
+
+commit 7c2f48bb6d67ec9a1ee5ac03a5aee34b54c6ebdd
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:   Wed Jan 19 18:09:23 2011 +0100
+
+    Construct structs using default API constructor
+
+    If the struct has something that looks like a default constructor,
+    use it instead of trying to directly allocate it, as it will fail
+    if the struct fields are not exposed.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627444
+
+ gi/pygi-info.c |   37 +++++++++++++++++++++++++++++++++++++
+ gi/types.py    |    7 +++++++
+ 2 files changed, 44 insertions(+), 0 deletions(-)
+
+commit db7300e173388d9557dcd2333781bfaa6b021605
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Jan 19 18:54:39 2011 +0100
+
+    pygi-convert.sh: Migrate Gdk.Cursor constructor, and some cursor names
+
+ pygi-convert.sh |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 4c1d4faddf1c9cb233c484da3eadd8e31c231f70
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Jan 19 18:43:29 2011 +0100
+
+    pygi-convert.sh: Handle .window attributes
+
+    In general, convert them to .get_window(). For some of them, prefer
+    calling the
+    GtkWidget methods instead.
+
+ pygi-convert.sh |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit b1049b947d073fb569ba900a4d5c8519482d831e
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:   Wed Jan 19 17:35:09 2011 +0100
+
+    Also deal with foreign boxed structs
+
+    cairo.Context has been boxed and our tests started failing
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639967
+
+ gi/pygi-argument.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 25b69ae257a12b6dc97ed3f2f7ea54b166ddbba1
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Wed Jan 19 17:45:11 2011 +0100
+
+    [gi] Convert GErrors to GObject.GError exceptions, and throw them
+    upon returning from calling the C function.
+
+    This changes gi to make use of pyglib_error_check() which already
+    exists in pyglib.
+
+    The included tests make use of the other patch attached to this bug,
+    to check that the right exception is thrown from the new function
+    in GIMarshallingTests.
+    two Gtk C functions.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639834
+
+ gi/Makefile.am   |    3 ++-
+ gi/pygi-invoke.c |   12 +++---------
+ tests/test_gi.py |   10 ++++++++++
+ 3 files changed, 15 insertions(+), 10 deletions(-)
+
+commit e6fcafc6179e963cbae7774e7ee50415bde2c523
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Jan 19 17:03:06 2011 +0100
+
+    pygi-convert.sh: Don't convert glib -> GLib for now
+
+    This currently leads to a load of crashes, MemoryErrors, etc, as
+    GLib is not
+    very well introspectable, due to the low-level operations that
+    it performs.
+
+    John Palmieri confirms that using the static "glib" binding is
+    preferred for
+    now, so disable the replacement rules.
+
+ pygi-convert.sh |   19 ++++++++++---------
+ 1 files changed, 10 insertions(+), 9 deletions(-)
+
+commit 167261d556eab0d2e448c7ed28eef540a024ba1d
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:   Wed Jan 19 16:47:08 2011 +0100
+
+    Link libregress.so to GIO_LIBS again
+
+ configure.ac |    5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit d143afa6da4f5b5f47be8df11fa41d7b47ab1794
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Wed Jan 19 16:14:42 2011 +0100
+
+    Fix attributes 2BUTTON_PRESS and 3BUTTON_PRESS of Gdk.EventType.
+
+    This puts an underscore in front of 2BUTTON_PRESS and 3BUTTON_PRESS
+    because in Python attributes starting with a numeral causes a
+    syntax error.
+
+ gi/overrides/Gdk.py |    7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 614b6ca7f45c4acbee088fe74fecf279ed50cc0c
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Wed Jan 19 15:27:33 2011 +0100
+
+    [gi] Fixed typo in exception
+
+ gi/overrides/Gtk.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b2189424f9dd6d3a4a5b9792f0d5843fc27657d1
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Wed Jan 19 15:12:25 2011 +0100
+
+    [gi] Enable handling of Gdk.EventType.2BUTTON_PRESS and 3BUTTON_PRESS
+
+ gi/overrides/Gdk.py |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 5eca5ff2c9509ec96158fe43b29f0fd951243efe
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Wed Jan 19 14:54:57 2011 +0100
+
+    Revert "Fix Pango FontDescription override"
+
+    According to
+    http://library.gnome.org/devel/pango/1.28/pango-Fonts.html#pango-font-description-new
+    the default constructor actually does take no arguments; we should
+    actually fix
+    the MemoryError. Add a test case for this.
+
+    Remove the FIXME though, as pango_font_description_from_string()
+    is not a
+    FontDescription constructor, but a static factory method.
+
+    Thanks to Paolo Borelli for pointing this out!
+
+    This reverts commit 8878c57676091c08e66bc6cbe735d898cb420582.
+
+ gi/overrides/Pango.py   |    5 ++++-
+ tests/test_overrides.py |    5 +++++
+ 2 files changed, 9 insertions(+), 1 deletions(-)
+
+commit 9e7b95b3676a1b502662523a9bd4ebe40ccb4845
+Author: Tony Young <rofflwaffls@gmail.com>
+Date:   Thu Dec 16 23:39:33 2010 +0000
+
+    Python iterator interface support for GFileEnumerator.
+
+ gi/overrides/Gio.py      |   41 +++++++++++++++++++++++++++++++++++++++++
+ gi/overrides/Makefile.am |    1 +
+ tests/test_overrides.py  |   20 ++++++++++++++++++++
+ 3 files changed, 62 insertions(+), 0 deletions(-)
+
+commit bca5834fc8fa342149e0eec7b396877a2abe6d33
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:   Fri Jan 7 12:10:37 2011 +0100
+
+    Remove gio static bindings
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=638899
+
+ Makefile.am                       |    2 +-
+ configure.ac                      |   25 -
+ gio/.gitignore                    |    3 -
+ gio/Makefile.am                   |  117 -
+ gio/__init__.py                   |   40 -
+ gio/gappinfo.override             |  213 --
+ gio/gapplaunchcontext.override    |   99 -
+ gio/gbufferedinputstream.override |   70 -
+ gio/gcancellable.override         |   38 -
+ gio/gdatainputstream.override     |  250 --
+ gio/gdrive.override               |  347 --
+ gio/gfile.override                | 2215 -----------
+ gio/gfileattribute.override       |  153 -
+ gio/gfileenumerator.override      |  184 -
+ gio/gfileinfo.override            |  121 -
+ gio/gfileinputstream.override     |   68 -
+ gio/gfileiostream.override        |   68 -
+ gio/gfileoutputstream.override    |   68 -
+ gio/gicon.override                |  310 --
+ gio/ginputstream.override         |  344 --
+ gio/gio-types.defs                |  807 ----
+ gio/gio.defs                      | 7465
+ -------------------------------------
+ gio/gio.override                  |  409 --
+ gio/giomodule.c                   |  208 -
+ gio/giostream.override            |   68 -
+ gio/gmemoryinputstream.override   |   91 -
+ gio/gmemoryoutputstream.override  |   45 -
+ gio/gmount.override               |  454 ---
+ gio/goutputstream.override        |  292 --
+ gio/gresolver.override            |  312 --
+ gio/gsocket.override              |  575 ---
+ gio/gvolume.override              |  237 --
+ gio/gvolumemonitor.override       |   94 -
+ gio/pygio-utils.c                 |  236 --
+ gio/pygio-utils.h                 |   49 -
+ gio/unix-types.defs               |   55 -
+ gio/unix.defs                     |  475 ---
+ gio/unix.override                 |   62 -
+ gio/unixmodule.c                  |   52 -
+ tests/Makefile.am                 |    9 -
+ tests/runtests-windows.py         |    3 -
+ tests/test_gcancellable.py        |   15 -
+ tests/test_gicon.py               |  112 -
+ tests/test_gio.py                 | 1138 ------
+ tests/test_gresolver.py           |   68 -
+ tests/test_gsocket.py             |  126 -
+ 46 files changed, 1 insertions(+), 18191 deletions(-)
+
+commit 09f7ca7e2378e6679002677ac3f4802f4cc7d9d5
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Wed Jan 19 12:04:15 2011 +0100
+
+    [gi] set length when marshalling guint8 erases
+
+ gi/pygi-argument.c |    1 +
+ tests/test_gi.py   |    4 ++++
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 22eee43e50a150ace80694213fb87be9f0c72f51
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Wed Jan 19 10:27:47 2011 +0100
+
+    Convert Gdk.Pixbuf to GdkPixbuf.Pixbuf
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit a4b210d69c832629894090b7154ae194209b0c60
+Author: Arnaud Charlet <charlet@adacore.com>
+Date:   Tue Jan 18 18:31:29 2011 +0100
+
+    Disable calls to PyGILState_* when threads are disabled
+
+    Since threads may also be disabled in Python too, those symbols
+    may not
+    be resolved.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=374603
+
+ glib/pyglib.c               |   12 ++++++++++++
+ gobject/pygobject-private.h |    6 ++++++
+ 2 files changed, 18 insertions(+), 0 deletions(-)
+
+commit a000627ec3904b9414ce375aec8d144fc0c26248
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Jan 18 18:29:50 2011 +0100
+
+    pygi-convert.sh: Do not comment out set_cell_data_func() calls;
+    these should be ported properly
+
+ pygi-convert.sh |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 99ff4610fb5ece2fc8d2f9eba13e661968adf3f0
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Jan 18 18:26:01 2011 +0100
+
+    pygi-convert.sh: Fix match for adding missing imports
+
+ pygi-convert.sh |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 3aa95011fad67df20370e92bf25236a34d7d08d3
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Jan 18 18:09:30 2011 +0100
+
+    pygi-convert.sh: Fix Gtk.Label handling to be idempotent
+
+    As we are not replacing line by line, but the whole file at once,
+    this is a bit
+    hackish unfortunately. We can't use a match test or a lookahead/behind
+    assertion.
+
+ pygi-convert.sh |    5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 36bc1c17e7d4189059337cc6a73c64edd819ec12
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:   Tue Jan 18 17:29:52 2011 +0100
+
+    Remove trailing whitespace from gi/overrides/Gtk.py
+
+ gi/overrides/Gtk.py |   10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 8878c57676091c08e66bc6cbe735d898cb420582
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Jan 18 16:47:10 2011 +0100
+
+    Fix Pango FontDescription override
+
+    Trying to call __new__() on a record crashes with a MemoryError,
+    so just call
+    the intended static factory method for a None argument as well
+    (which works
+    just fine now).
+
+ gi/overrides/Pango.py |    7 +------
+ 1 files changed, 1 insertions(+), 6 deletions(-)
+
+commit efbbe71634037fa100b17327389b883b259cca54
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Jan 18 16:23:39 2011 +0100
+
+    tests: Respect existing $GI_TYPELIB_PATH
+
+    This allows us to run the test suite against local typelibs.
+
+ tests/Makefile.am |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f56d85a7f39c2088bf9fd50b1b1e5b67c03104d3
+Merge: 84d6142 7d997b6
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Tue Jan 18 13:14:45 2011 +0100
+
+    Merge branch 'value'
+
+commit 7d997b6fe88343776c4d67a9f3437ba0c4122da0
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Tue Jan 18 13:12:36 2011 +0100
+
+    GTK overrides: Do type conversion to column types of ListStore and
+    TreeStore in set_value
+
+ gi/overrides/Gtk.py     |   28 ++++++++++++++++++----------
+ tests/test_overrides.py |   12 +++++++++++-
+ 2 files changed, 29 insertions(+), 11 deletions(-)
+
+commit 84d6142c14a7ebfb7284d3db52e14d3393f93905
+Author: Steve Frécinaux <code@istique.net>
+Date:   Mon Jan 17 18:57:58 2011 +0100
+
+    Always register a new GType when a GObject class is subclassed
+
+    This patch makes the GType <-> python mapping much more predictible,
+    and fixes the bug caused by overriding methods without specifying a
+    __gtype_name__ member in the subclass, and makes type_register useless
+    for real :-)
+
+    It is still possible to provide an explicit __gtype_name__ member
+    in the
+    subclass as it allows having a predictible GType name, which is handy
+    for some of our tests. There is also an explicit special case for
+    overrides because we obviously do not want to register new GTypes for
+    those ones as it would clearly defeat the purpose of overrides.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=543056
+
+ gobject/__init__.py |    6 +++---
+ tests/test_gi.py    |   21 ++-------------------
+ 2 files changed, 5 insertions(+), 22 deletions(-)
+
+commit 30750ccef31e6c864628f418fc00e8c573d29a1b
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:   Tue Jan 18 12:57:13 2011 +0100
+
+    Raise required versions of GLib and GObject-Introspection
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=612126
+
+ configure.ac |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 761e98d32729f5894f4c75a54c65ed11329dc9d5
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Jan 18 12:52:32 2011 +0100
+
+    pygi-convert.sh: Handle keysyms
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit d62cdfa38a675c1daf3bc12d5cd769434eea5dc8
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Jan 18 12:14:09 2011 +0100
+
+    GLib overrides: Add test case for array variant building
+
+ tests/test_overrides.py |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 69a78307f3762e3f54d28d98514cec7d31ff20db
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:   Tue Jan 18 10:21:03 2011 +0100
+
+    Remove cairo.RectangleInt from the foreign module
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639824
+
+ gi/pygi-foreign-cairo.c |   96
+ -----------------------------------------------
+ 1 files changed, 0 insertions(+), 96 deletions(-)
+
+commit 017680c9a5e163021628bf29543598861a3b600a
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:   Tue Jan 18 10:20:25 2011 +0100
+
+    Dont try to guess the transfer if its a boxed
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639823
+
+ gi/pygi-invoke.c |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 771ef76574690eb98926249f38661d741d1ebbb0
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Tue Jan 18 12:02:01 2011 +0100
+
+    The tags can be Empty not None.
+
+ gi/overrides/Gtk.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b1a98083cdc50653e1d7bfb809bdf089f833df3d
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Jan 18 12:01:28 2011 +0100
+
+    Add Pythonic iterators and indexing to GVariant
+
+    Add the usual set of iterators and index accessors to GLib.Variant
+    objects
+    which are containers.
+
+    Add corresponding test cases.
+
+ gi/overrides/GLib.py    |   50 ++++++++++++++++++++++++++++++++++++++++++
+ tests/test_overrides.py |   55
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 105 insertions(+), 0 deletions(-)
+
+commit ecb9f824c503c529d43e585b4cdb4c1c9ab14593
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:   Tue Jan 18 10:48:03 2011 +0100
+
+    Add GLib.Variant.unpack()
+
+    This method decomposes a GLib.Variant into a native Python object,
+    i. e. the
+    counterpart of _VariantCreator. This makes it a lot nicer for
+    application
+    developers to use e. g. return values from gdbus calls.
+
+    Add appropriate test case.
+
+ gi/overrides/GLib.py    |   45
+ +++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_overrides.py |   33 ++++++++++++++++++++++++++++++++-
+ 2 files changed, 77 insertions(+), 1 deletions(-)
+
+commit 31c73dee34a52fd22b5ff3a23adce92cea5ddc3d
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:   Tue Jan 18 10:56:18 2011 +0100
+
+    Add override for gtk_text_buffer_insert_with_tags
+
+ gi/overrides/Gtk.py     |   12 ++++++++++++
+ tests/test_overrides.py |    6 ++++++
+ 2 files changed, 18 insertions(+), 0 deletions(-)
+
+commit fc7d7f7f153d57ff3866b7bfd5e6479d702cc4d9
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:   Mon Jan 17 14:35:14 2011 +0100
+
+    Deduce PYTHON_LIBS in addition to PYTHON_INCLUDES
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620215
+
+ gi/Makefile.am    |    6 ++++--
+ gio/Makefile.am   |    2 +-
+ glib/Makefile.am  |    2 +-
+ m4/python.m4      |    7 +++++--
+ tests/Makefile.am |    2 +-
+ 5 files changed, 12 insertions(+), 7 deletions(-)
+
+commit bceec758b27e6c396d17a79424633b5dc9116f54
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:   Mon Jan 17 14:20:55 2011 +0100
+
+    Kill JD_CHECK_PYTHON_HEADERS
+
+    Use AM_CHECK_PYTHON_HEADERS instead, which is identical.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620215
+
+ configure.ac |    2 +-
+ m4/python.m4 |   31 +------------------------------
+ 2 files changed, 2 insertions(+), 31 deletions(-)
+
+commit e2dea065da94d17a915abe1ce4671b1dc48e02c0
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:   Mon Jan 17 19:09:27 2011 +0100
+
+    Revert "Override Gtk.Box.pack_start and pack_end to set default
+    values to be compliant with pygtk"
+
+    This reverts commit a8c727b9c4195d8085a45661683a18614ae84485.
+
+    Conflicts:
+
+       gi/overrides/Gtk.py
+
+ gi/overrides/Gtk.py |  10 ----------
+ 1 files changed, 0 insertions(+), 10 deletions(-)
+
+commit 4fbae9629adc166627de05bb0946b71485343d69
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Mon Jan 17 19:08:23 2011 +0100
+
+    Revert "Override Gtk.CellLayout.pack_start and pack_end to add
+    default values to be compliant with pygtk"
+
+    This reverts commit 232841148f35684be83a2f47b5b18da4fb74f63a.
+
+ gi/overrides/Gtk.py |  13 ++-----------
+ 1 files changed, 2 insertions(+), 11 deletions(-)
+
+commit c054f0aca67952876b3519bb75ddc62c5517f7cb
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Mon Jan 17 19:08:06 2011 +0100
+
+    Revert "Override Gtk.TreeViewColumn.pack_start, pack_end and
+    set_cell_data_func to add default values to be compliant with pygtk"
+
+    This reverts commit ed7e7a8f22b1481acf78c0c2e4c489dbad72f599.
+
+ gi/overrides/Gtk.py |   9 ---------
+ 1 files changed, 0 insertions(+), 9 deletions(-)
+
+commit 2d9534f347505573da46743b47318e08bf073aef
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:  Mon Jan 17 18:54:10 2011 +0100
+
+    pygi-convert.sh: Handle gtk.combo_box_new_text()
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 914d3a0a29680f4d3aa0e1f8afdd625b017b013a
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Mon Jan 17 16:57:53 2011 +0100
+
+    Override TreeSortable.set_sort_func and set_default_sort_func to
+    add default values to be pygtk compliant
+
+ gi/overrides/Gtk.py |   6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit ed7e7a8f22b1481acf78c0c2e4c489dbad72f599
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Mon Jan 17 16:29:28 2011 +0100
+
+    Override Gtk.TreeViewColumn.pack_start, pack_end and
+    set_cell_data_func to add default values to be compliant with pygtk
+
+ gi/overrides/Gtk.py |   9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 232841148f35684be83a2f47b5b18da4fb74f63a
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Mon Jan 17 16:28:51 2011 +0100
+
+    Override Gtk.CellLayout.pack_start and pack_end to add default values
+    to be compliant with pygtk
+
+ gi/overrides/Gtk.py |  13 +++++++++++--
+ 1 files changed, 11 insertions(+), 2 deletions(-)
+
+commit 1dec12826753756fcadefc8ef8c756fc902c320b
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Mon Jan 17 15:54:32 2011 +0100
+
+    Override Gtk.Paned pack1 and pack2 to add default values to be
+    compliant with pygtk
+
+ gi/overrides/Gtk.py |  10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit a8c727b9c4195d8085a45661683a18614ae84485
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Mon Jan 17 15:46:25 2011 +0100
+
+    Override Gtk.Box.pack_start and pack_end to set default values to
+    be compliant with pygtk
+
+ gi/overrides/Gtk.py |  10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 7cc8ac35bb0d8dbf7d66f014f8cd7ff070b3acb8
+Author: Steve Frécinaux <code@istique.net>
+Date:  Wed Aug 4 00:30:05 2010 +0200
+
+    Handle GObject subclasses in the property helper.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625982
+
+ gobject/propertyhelper.py |   26 +++++++++++++-------------
+ tests/test_properties.py  |   9 +++++++++
+ 2 files changed, 22 insertions(+), 13 deletions(-)
+
+commit 7a0548dbfbdfe481f75315b6bc7824a9f1a8a87b
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:  Mon Jan 17 17:52:15 2011 +0100
+
+    Fix handling of unicode for GtkTreeModels
+
+    The code previously converted an unicode object into unicode, but
+    in Python 2.X
+    models actually have to specify 'str' (GTK expects a gchararray). So
+    encode to
+    UTF-8 instead to get what GTK expects.
+
+    Add corresponding test case.
+
+ gi/overrides/Gtk.py    |    2 +-
+ tests/test_overrides.py |   12 +++++++++++-
+ 2 files changed, 12 insertions(+), 2 deletions(-)
+
+commit 09c21c79fb6063c8451f53d4588363d2be7239f4
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:  Mon Jan 17 16:46:08 2011 +0100
+
+    In IntrospectionModule and DynamicModule classes, make all instance
+    attributes start with an underscore.
+
+    This changes IntrospectionModule.version to _version and
+    DynamicModule.introspection_module to _introspection_module.
+    This is done to mark the attributes as private, and also avoid name
+    collisions with attributes from the typelib.
+    In Gstreamer, there is a function gst_version, which was previously
+    inaccessible because of IntrospectionModule.version overriding it.
+
+ gi/module.py                      |   26 +++++++++++++-------------
+ gi/overrides/GIMarshallingTests.py |   2 +-
+ gi/overrides/GLib.py              |    2 +-
+ gi/overrides/Gdk.py               |   10 +++++-----
+ gi/overrides/Gtk.py               |    2 +-
+ gi/overrides/Pango.py             |    2 +-
+ gi/overrides/__init__.py          |    2 +-
+ tests/test_everything.py          |    2 +-
+ 8 files changed, 24 insertions(+), 24 deletions(-)
+
+commit 2c70beca9e76e4dc253453c556e6985ce59a3dd9
+Author: Laszlo Pandy <lpandy@src.gnome.org>
+Date:  Mon Jan 17 16:17:25 2011 +0100
+
+    Amend previous enum wrapping commit to remove redundant setting of
+    __info__ attribute.
+
+ gi/module.py |    2 +-
+ gi/types.py  |    6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 6fbb6be5a5d0d9cd43e1504b8dda5aa75feb95ca
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:  Mon Jan 17 16:16:45 2011 +0100
+
+    pygi-convert.sh: Handle GdkPixbuf.InterpType
+
+ pygi-convert.sh |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 66a5784f4ab5de5b6d8d51eb4ce869fa26f6a601
+Author: Laszlo Pandy <laszlok2@gmail.com>
+Date:  Mon Jan 17 15:43:34 2011 +0100
+
+    Fix wrapping of enums: Create new Python type for each non-gtype enum.
+
+    Previously non-gtype enums used the same class, which meant they
+    were all the same type.
+    This caused another problem that since they were all the same class,
+    attributes from different enums were available from each other.
+
+    A new test case is created to check for this bug. It requires a new
+    enum from the GIMarshallingTests (updating gobject-introspection
+    will be required).
+
+ gi/module.py    |    2 +-
+ gi/types.py     |    2 ++
+ tests/test_gi.py |   10 ++++++++++
+ 3 files changed, 13 insertions(+), 1 deletions(-)
+
+commit da50d5620a42046d4fc905bb28a0890d73533cb1
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Dec 13 18:03:51 2010 +0100
+
+    Use g_vfunc_info_invoke for chaining up in vfuncs
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=637165
+
+ gi/pygi-info.c   |    4 +-
+ gi/pygi-invoke.c |   72
+ +++++++++++++++++++++++++++++++++++++++++------------
+ gi/pygi-invoke.h |    3 +-
+ gi/types.py     |   28 ++++++++++++++++++++-
+ tests/test_gi.py |    5 ++-
+ 5 files changed, 89 insertions(+), 23 deletions(-)
+
+commit 8ceef79c98a1c2e22ed8ab655ef1169f1763dd23
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Fri Dec 31 18:38:04 2010 +0100
+
+    Move pyglib_{main_context, option_context, option_group}_new into
+    _PyGLib_API
+
+    _PyG{MainContext, OptionContext, and OptionGroup_Type} were not
+    be initialized
+    when used inside the glib module, since pyglib_init is not called.
+
+    pyglib.c is compiled as a stand-alone library loaded by the _glib
+    module that
+    declares the above-mentioned types. Hence, they cannot be accessed
+    by the
+    former. This patch moves the functions that need those symbols
+    into the
+    glib._glib module and exports them to the pyglib library through
+    _PyGLib_API.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=636656
+
+ glib/glibmodule.c      |    5 +++-
+ glib/pyglib-private.h  |    3 ++
+ glib/pyglib.c          |   48
+ ++--------------------------------------------
+ glib/pygmaincontext.c  |   22 +++++++++++++++++++++
+ glib/pygmaincontext.h  |    2 +-
+ glib/pygmainloop.c     |    2 +-
+ glib/pygoptioncontext.c |   21 ++++++++++++++++++++
+ glib/pygoptioncontext.h |    2 +
+ glib/pygoptiongroup.c  |   26 +++++++++++++++++++++++++
+ glib/pygoptiongroup.h  |    2 +
+ glib/pygsource.c       |    2 +-
+ 11 files changed, 86 insertions(+), 49 deletions(-)
+
+commit 17caffe4eeefeaf33a56ececbc6c7454f60b9d76
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:  Mon Jan 17 14:51:26 2011 +0100
+
+    pygi-convert.sh: Handle Gdk.DragAction
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit aa390aa80f06ac83ec89e5c5ee143d21ace97917
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:  Mon Jan 17 14:46:58 2011 +0100
+
+    pygi-convert.sh: Generalize Gtk.Settings migration
+
+    There are other GSettings.get_* functions like get_for_screen().
+
+ pygi-convert.sh |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2e6d5bb49425e6087ca61765ecb72e7a760f2ab2
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:  Mon Jan 17 11:22:46 2011 +0100
+
+    pygi-convert.sh: Don't change the name of "glib" submodules
+
+    This particular affects dbus.mainloop.glib.*
+
+ pygi-convert.sh |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3887b030fc19d25e0cd7b4ed504f4ed23363c3d6
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Jan 16 22:09:56 2011 +0100
+
+    Plug another memory leak
+
+    Do not leak interface info in (g|s)_et_property.
+
+ gi/pygi-property.c |   4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit a4950b4cbb3c7567a8586061bb361adb7d9afb98
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Jan 16 21:43:30 2011 +0100
+
+    Plug a small memory leak.
+
+    Do not leak type_info in find_vfunc_info
+
+ gi/gimodule.c |   10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit d0cbcc45366d40702c69cef207d3c0f361260c02
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Jan 16 12:16:31 2011 +0100
+
+    Override Table.attach() to behave like pygtk
+
+    It is fairly common and even gtk itself still has attach_defaults.
+
+ gi/overrides/Gtk.py    |    3 +++
+ tests/test_overrides.py |    4 ++++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 6409d659326bf3cefdf6051379e8bc2031f16733
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:  Sat Jan 15 11:20:23 2011 -0600
+
+    pygi-convert.sh: Convert Pango.WrapMode
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 6aaa6a38198e84a189ca1e8d26b1871d5b6bb711
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:  Sat Jan 15 11:17:09 2011 -0600
+
+    pygi-convert.sh: Don't change the name of "gtk" submodules
+
+    Some projects have local modules like "myproject.ui.gtk". Avoid
+    changing those,
+    just change module names which start with "gtk" or "gdk".
+
+ pygi-convert.sh |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c36fbf4918c8557a8e274a12004a412da3b22b2c
+Author: Laszlo Pandy <git@laszlopandy.com>
+Date:  Tue Jan 11 21:41:47 2011 +0100
+
+    Fix the __dir__() methods on DynamicModule and IntrospectionModule
+
+    Previously the __dir__() methods did not list all attributes.
+    A simple test case is included. It does not test to see if
+    every attribute is listed, it just tests a few of each kind:
+    - (wrapped) typelib attributes
+    - class attributes and methods
+    - instance attributes
+
+    A set() is used to avoid returning duplicate attributes.
+    The test case checks for this as well.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639229
+
+ gi/module.py            |   28 +++++++++++++++++++++-------
+ tests/test_everything.py |   18 ++++++++++++++++++
+ 2 files changed, 39 insertions(+), 7 deletions(-)
+
+commit 1679e6af3f212e4d4644e048dc3c6177ed3fac6b
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Thu Jan 13 00:02:20 2011 +0100
+
+    pygi-convert.sh: handle ReliefStyle
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit bd002c72675d35b5e60ab773181e7c36c30d2625
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Tue Jan 11 22:21:18 2011 +0100
+
+    setup.py: fix the provides keyword argument
+
+ setup.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 59dac72d0fa8e1d68bbbc13d76c2747f1cb11857
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Tue Jan 11 22:19:18 2011 +0100
+
+    setup.py: use the same spaces-less format for all setup() parameters
+
+ setup.py |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 4992dca9f5cea68d85eb2ed86105c9c6b8311d79
+Author: Laszlo Pandy <laszlok2@gmail.com>
+Date:  Tue Jan 11 19:30:38 2011 +0100
+
+    Add a __repr__() method to DynamicModule.
+
+    This patch adds a __repr__() method to DynamicModule so that modules
+    provide a
+    meaningful string with the typelib path included:
+
+    >>> from gi.repository import Gtk
+    >>> Gtk
+    <gi.module.DynamicModule 'Gtk' from
+    '/home/laszlo/Dev/gnome-jh-install/lib64/girepository-1.0/Gtk-3.0.typelib'>
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639232
+
+ gi/module.py |    9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 2ffaec59e7349c145a0e2a5edba2ffb7d8628369
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Jan 11 19:40:19 2011 +0100
+
+    Go back to using getattr() in DynamicModule.__getattr__
+
+    Breaks marshalling of some types
+
+ gi/module.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 52a298cc0f05ceec96457f17f9a801e9838fb757
+Author: Laszlo Pandy <laszlok2@gmail.com>
+Date:  Tue Jan 11 19:26:50 2011 +0100
+
+    Change __dir__() to report all the attributes that __getattr__
+    supports
+
+    Change DynamicModule.__dir__() to return the local class members as
+    well as the
+    typelib attributes.
+
+    Change DynamicModule.__getattr__() to call
+    IntrospectionModule.__getattr__()
+    directly, so that it won't inadvertently return class attributes from
+    IntrospectionModule.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=639229
+
+ gi/module.py |   10 +++++++---
+ 1 files changed, 7 insertions(+), 3 deletions(-)
+
+commit 202a268db7f98f5a3c525c6e65ec4bff1917257e
+Author: Emilio Pozuelo Monfort <pochu27@gmail.com>
+Date:  Sat Jan 8 02:19:52 2011 +0000
+
+    Bump the minimum gio dependency
+
+    Needed for G_TYPE_CONVERTER_FLAGS and others.
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c3aa36151fdef9ed9884d93114786bbe86387983
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Jan 7 12:58:11 2011 +0100
+
+    Add test for incorrect attributes in Gdk.Event
+
+ tests/test_overrides.py |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 204b45c7e95eb50d9e3843127fb10e13b1b17fee
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Sun Jan 2 19:25:55 2011 +0100
+
+    Don't call getattr again in gi.overrides.Gdk.Event.__getattr__
+
+    __getattr__ is only called when the attribute is not found through
+    the normal
+    mechanism, so getattr must not be called again in __getattr__
+    (which would
+    create an infinite loop).
+
+    Another possibility would be to implement __getattribute__ instead,
+    which is
+    called in place of the normal mechanism. In that case, calling
+    getattr would be
+    needed for normal attributes.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=638523
+
+ gi/overrides/Gdk.py |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 6cf298ca5565d0eb99824f050ff47407e50a5c01
+Author: Mike Gorse <mgorse@novell.com>
+Date:  Fri Jan 7 09:08:31 2011 +0100
+
+    Release allocated array of arguments when handling closures
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=638847
+
+ gi/pygi-closure.c |   3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 1be76d5e006efa24598ff7bf26153660dbe0a890
+Author: Mike Gorse <mgorse@novell.com>
+Date:  Fri Jan 7 09:07:35 2011 +0100
+
+    Release GIValueInfo when checking an enum argument
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=638847
+
+ gi/pygi-argument.c |   1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 8d5a7857876669f56bb03bf618bcfdcc290721c0
+Author: Eitan Isaacson <eitan@monotonous.org>
+Date:  Wed Dec 22 12:34:10 2010 -0800
+
+    Respect different type lengths when assigning out-argument pointers.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=637832
+
+ gi/pygi-closure.c |   66
+ +++++++++++++++++++++++++++++++++++++++++++++--------
+ 1 files changed, 56 insertions(+), 10 deletions(-)
+
+commit f14976ffabec28f6cafe1e37dc81d207a947d4ca
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Dec 28 18:34:25 2010 +0100
+
+    Fix stupid name clash
+
+ gi/module.py |    7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 01b2a193d403beb861eab524300b4f1af63157ce
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Dec 28 13:49:18 2010 +0100
+
+    Add /usr/share to XDG_DATA_DIRS when running the tests
+
+ tests/Makefile.am |   7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit efc186f692f9eac781cc47456be74a3da7f14dcd
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Dec 28 13:25:34 2010 +0100
+
+    Comment out tests that require SRV lookups
+
+ tests/test_gresolver.py |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit d2462cc1ab51d76fb4625c47c3d34de1d5d0dee8
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Dec 28 13:00:16 2010 +0100
+
+    Use suppresion file when running valgrind
+
+ tests/Makefile.am |   2 +-
+ tests/python.supp |  387
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 388 insertions(+), 1 deletions(-)
+
+commit 0ee58113ecbea72784c52de928c041fc8fc88984
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:  Thu Dec 23 00:10:41 2010 +0100
+
+    Fix warnings.
+
+ gi/pygi-argument.c         |   16 +++++++---------
+ gi/pygi-foreign-cairo.c     |  13 ++-----------
+ gio/gfile.override         |    5 ++---
+ glib/pyglib-python-compat.h |   3 +++
+ glib/pyglib.c              |    2 +-
+ glib/pygmainloop.c         |    3 ++-
+ 6 files changed, 17 insertions(+), 25 deletions(-)
+
+commit 78ea84cd91392400ebac5a361ef8793bfe928fd0
+Author: Jesse van den Kieboom <jesse.vandenkieboom@epfl.ch>
+Date:  Sun Dec 19 23:10:57 2010 +0100
+
+    Allow comparing Gtk.TreePath to None
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=637615
+
+ gi/overrides/Gtk.py    |   12 ++++++------
+ tests/test_overrides.py |    6 ++++++
+ 2 files changed, 12 insertions(+), 6 deletions(-)
+
+commit 046cc5915286e042d1040271a90676b77632409e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Dec 16 15:41:10 2010 -0500
+
+    handle unicode objects in properties
+
+    * There are still some cavets in Python 2:
+      - properties are returned as String objects with the unicode
+      code points
+      - you must add # coding=utf-8 to the top of your python file
+      or python
+       will error out if it sees embeded unicode charaters (such as when
+       supporting python 3 and python 2 from the same source)
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620579
+
+ gobject/pygtype.c       |   35 ++++++++++++++++++++++++++---------
+ tests/test_properties.py |   16 ++++++++++++++++
+ 2 files changed, 42 insertions(+), 9 deletions(-)
+
+commit 7aa783d5cd674f34da318f826bd5f4a0e09d24cb
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Tue Dec 14 12:29:54 2010 +0100
+
+    dsextras.py: check if gcc is there when platform is win32 and compiler
+    is mingw32
+
+ dsextras.py |   6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit cebf5f09a6c5018ced64f35e7747fc81b93b823e
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Tue Dec 14 12:29:01 2010 +0100
+
+    dsextras.py: be consistent in how distutils imports are done
+
+ dsextras.py |   6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 35e590d48c78f2e76c47c2b4eaf0f7e8d1ed5c93
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Tue Dec 14 12:25:07 2010 +0100
+
+    dsextras.py: add have_gcc() function
+
+ dsextras.py |   5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 637c2c287cfb0e89365026531c651111f5593ac7
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Tue Dec 14 12:24:41 2010 +0100
+
+    dsextras.py: use distutils.spawn.find_executable for have_pkgconfig()
+
+ dsextras.py |   8 ++------
+ 1 files changed, 2 insertions(+), 6 deletions(-)
+
+commit 020d00bc0ce7b77006b4d4f42d63122d79bcbf89
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Tue Dec 14 12:22:54 2010 +0100
+
+    setup.py: fix another case of use True/False instead of 1/0
+
+ setup.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b03cc9e0d66d8caea3cd6a63db198c43de9267e9
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Mon Dec 13 10:21:52 2010 +0100
+
+    pygi-convert.sh: improve GtkSourceView conversion
+
+ pygi-convert.sh |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit fbc12cd7c09a67de9e28b7b0b28de9dc0e0e3418
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Mon Dec 13 10:27:56 2010 +0100
+
+    pygi-convert.sh: Gtk.DialogFlags conversion
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 73e933d2429aea4d14e15350a538da1c5c3f71eb
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date:  Sun Dec 12 20:38:46 2010 -0500
+
+       Doc Extractor: Print the gtk-doc blocks sorted by function name.
+
+       * codegen/docextract_to_xml.py: Print the xml of the gtk-doc
+       block in
+       alphabetical order according to the identifier (function name)
+       so that
+       the generation of xml files in the C++ bindings is deterministic.
+       Thanks to Krzesimir Nowak for suggesting this in a gtksourceviewmm
+       recent commit.
+
+ codegen/docextract_to_xml.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit db7ffa75b007074cb6b33b547c6d8140da300a3e
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Mon Dec 13 00:17:26 2010 +0100
+
+    pygi-convert.sh: add more Gtk conversions and sort
+
+ pygi-convert.sh |   50 ++++++++++++++++++++++++++------------------------
+ 1 files changed, 26 insertions(+), 24 deletions(-)
+
+commit f4bfe73d0ccedf7f671d3acd6d9e262d5383b733
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Mon Dec 13 00:01:40 2010 +0100
+
+    pygi-convert.sh: convert Atk
+
+ pygi-convert.sh |   12 ++++++++++++
+ 1 files changed, 12 insertions(+), 0 deletions(-)
+
+commit e55ce3667eb1d352bf96f265bf018ffe8aea75f9
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Dec 12 23:48:48 2010 +0100
+
+    pygi-convert.sh: convert a few more Gio types
+
+ pygi-convert.sh |    9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit acc9f84bc6e13d76c6516cefe393d4a4f868aa24
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Dec 12 14:19:00 2010 +0100
+
+    pygi-convert.sh: more GLib conversion
+
+ pygi-convert.sh |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit c903390814bebdc62d530472f6f94feecc59b8b3
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Dec 12 14:00:34 2010 +0100
+
+    pygi-convert.sh: remove two cases handled by overrides
+
+ pygi-convert.sh |    2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+commit d33c987e505ec8ddffa2b8cb5526f05b9b5f62be
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Dec 12 13:38:56 2010 +0100
+
+    Override Gtk.ScrolledWindow constructor
+
+ gi/overrides/Gtk.py    |    7 +++++++
+ tests/test_overrides.py |    7 +++++++
+ 2 files changed, 14 insertions(+), 0 deletions(-)
+
+commit 1c24bb089fcd69e3104ae72a0e7560a8c5a3f05b
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Dec 12 12:32:39 2010 +0100
+
+    pygi-convert.sh: Fix 'find' syntax
+
+ pygi-convert.sh |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f0a1d6b6bb53d0fa2788d8b9027d737b0aef8dfc
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Dec 12 12:29:38 2010 +0100
+
+    pygi-convert.sh: start handling Gio and GLib
+
+ pygi-convert.sh |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 365bf3251af3498dc797a58cce071805451b49b1
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Dec 11 23:05:31 2010 +0100
+
+    pygi-convert.sh: convert Gdk.ScrollDirection.
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit bca603de0f217fb290189a0ea330f82961c46d5d
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Dec 11 15:03:21 2010 +0100
+
+    Override Pango.Layout constructor.
+
+    I must take a Pango.Context argument. Unfortumately the context is
+    not a
+    gobject property so we need to jump through some oops.
+
+ gi/overrides/Pango.py  |   13 +++++++++++++
+ tests/test_overrides.py |    6 ++++++
+ 2 files changed, 19 insertions(+), 0 deletions(-)
+
+commit df233301802e3f7f9ce338cde015ca2a2fc648ab
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Dec 11 14:18:53 2010 +0100
+
+    Remove Pango.FontDescription() conversion.
+
+    It is now properly handled by an override.
+
+ pygi-convert.sh |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit d8abcc9463542af9cd43d71849d0ad4c183b570b
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Fri Dec 10 14:05:20 2010 +0100
+
+    Override GtkAction and GtkRadioAction constructors.
+
+ gi/overrides/Gtk.py    |   20 +++++++++++++++++---
+ tests/test_overrides.py |   18 ++++++++++++++++++
+ 2 files changed, 35 insertions(+), 3 deletions(-)
+
+commit 7924b18a99a0680c04aca46be4b64a7aa507dfe5
+Author: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>
+Date:  Sat Dec 4 22:13:28 2010 +0000
+
+    Override Adjustment constructor to behave like pygtk
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=636486
+
+ gi/overrides/Gtk.py    |    7 +++++++
+ tests/test_overrides.py |    9 +++++++++
+ 2 files changed, 16 insertions(+), 0 deletions(-)
+
+commit e76352dd83c8706e68ad57d00d185da9afea99c4
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Dec 9 13:23:10 2010 -0500
+
+    add secondary_text apis to MessageDialog
+
+ gi/overrides/Gtk.py    |    8 ++++++++
+ tests/test_overrides.py |    8 ++++++++
+ 2 files changed, 16 insertions(+), 0 deletions(-)
+
+commit de682b2d36c362140ab7d43c0743b01ec0865a74
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Dec 8 16:39:27 2010 -0500
+
+    [gi] get rid of some debug prints and fix error messages
+
+ gi/overrides/Gtk.py |   7 +++----
+ 1 files changed, 3 insertions(+), 4 deletions(-)
+
+commit dbb16571803bf51f497768bf80944514f4290ee5
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Wed Dec 8 18:25:15 2010 +0100
+
+    Fix demo for override changes.
+
+ demos/gtk-demo/gtk-demo.py |   5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 2adcd95762944a4e27123093d3c8d080e49be1ea
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Wed Dec 8 18:06:01 2010 +0100
+
+    Override Pango.FontDescription.
+
+ demos/gtk-demo/gtk-demo.py |   2 +-
+ gi/overrides/Makefile.am   |   1 +
+ gi/overrides/Pango.py     |   40
+ ++++++++++++++++++++++++++++++++++++++++
+ tests/test_overrides.py    |   7 +++++++
+ 4 files changed, 49 insertions(+), 1 deletions(-)
+
+commit 769da968c9187414d0420412d8fb8c833d12042a
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Dec 8 17:38:11 2010 +0100
+
+    Stop checking that all vfuncs are implemented
+
+    Because some methods are optionally implementable but g-i won't
+    tell us.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=619606
+
+ gi/gimodule.c   |    4 +++-
+ gi/types.py     |   12 ++----------
+ tests/test_gi.py |   10 ----------
+ 3 files changed, 5 insertions(+), 21 deletions(-)
+
+commit 167a01c46b3fa0b3c8339502c875d32bd2bca974
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Wed Dec 8 17:37:00 2010 +0100
+
+    Fix usage of TreeIter api that is now an override.
+
+ demos/gtk-demo/gtk-demo.py |   6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit d2cfd6e9250d40de7c715ac74e299deddf137683
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Wed Dec 8 17:34:54 2010 +0100
+
+    Fix Gtk.Label(label="Foo")
+
+    Use 'label' as an argument name instead of 'str', otherwise we may
+    end up up with two 'label' in the kwds dict. Besides 'str' is a
+    reserved keyword.
+
+ gi/overrides/Gtk.py |   4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c0c684c9bb4e2bc08d7cb6ac246705e8a3b77656
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Wed Dec 8 14:16:39 2010 +0100
+
+    Fix typo when raising an exception
+
+ gi/types.py |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 88c9a3ad49d9fcf779c3523672d8bf4767910301
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Wed Dec 8 10:46:27 2010 +0100
+
+    pygi-convert.sh: Added more conversions
+
+ pygi-convert.sh |   14 ++++++++++++++
+ 1 files changed, 14 insertions(+), 0 deletions(-)
+
+commit 4d8d96326b2cac91e6d75e6601b92e202d1918ff
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Tue Dec 7 20:39:15 2010 +0100
+
+    Override LinkButton constructor to make 'uri' mandatory
+
+ gi/overrides/Gtk.py    |    7 +++++++
+ tests/test_overrides.py |    6 ++++++
+ 2 files changed, 13 insertions(+), 0 deletions(-)
+
+commit f4f7fb35af1b41598dc050f5df155a01c370a920
+Author: Dmitry Morozov <dmitry.a.morozov@yandex.ru>
+Date:  Sat Dec 4 19:19:19 2010 +0600
+
+    Container should be iterable.
+
+ gi/overrides/Gtk.py    |    9 +++++++++
+ tests/test_overrides.py |    6 +++++-
+ 2 files changed, 14 insertions(+), 1 deletions(-)
+
+commit d2ad05d6d8d53b941e0ad33fcb200f1245a2d308
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Tue Dec 7 14:13:00 2010 +0100
+
+    No need to import Gdk
+
+ gi/overrides/Gtk.py |   1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit b6a40badf0b2b59e690ce818efb03c7c816b8a04
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Tue Dec 7 14:07:53 2010 +0100
+
+    Remove semicolumns
+
+ gi/overrides/Gtk.py |   7 +++----
+ 1 files changed, 3 insertions(+), 4 deletions(-)
+
+commit cdc9c26553bf47ea488676e7bdc5f8ab0a2c906b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Dec 6 16:05:30 2010 -0500
+
+    [gi] make sure Gtk.Button override passes all keywords to parent
+    constructor
+
+ gi/overrides/Gtk.py |   4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit cede81ad65db017e95543d8d35715751aa202fed
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Dec 5 13:31:20 2010 +0100
+
+    Fix cut&paste error in the Label override
+
+ gi/overrides/Gtk.py |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 607c59b74ebbc1e39cb4121c870b689e1888c106
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Dec 4 16:03:27 2010 +0100
+
+    pygi-convert.sh: handle TextWindowType
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit dfeabe0b68938e27da2e65903983b5113dc422f1
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Dec 4 15:49:15 2010 +0100
+
+    Override Label constructor to behave like pygtk
+
+ gi/overrides/Gtk.py    |    7 +++++++
+ tests/test_overrides.py |    4 ++++
+ 2 files changed, 11 insertions(+), 0 deletions(-)
+
+commit da4e045e5abbed2796cc4ed39df35a0dde2de31b
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Dec 4 15:40:35 2010 +0100
+
+    Override GtkTable constructor to behave like pygtk
+
+ gi/overrides/Gtk.py    |    7 +++++++
+ tests/test_overrides.py |   12 ++++++++++++
+ 2 files changed, 19 insertions(+), 0 deletions(-)
+
+commit 81452c23ab1befa59ff375692e582791432796a5
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Dec 4 12:59:43 2010 +0100
+
+    pygi-convert.sh: convert MovementStep
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 4d097eea94258eda0c328711491fd456cbd6741b
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Dec 4 11:57:02 2010 +0100
+
+    Update Gdk overrides to work with latest Gtk+ 3
+
+    For now added consitionals on version == 2.0, but maybe at some
+    point we
+    shuld just clean up the old stuff.
+
+ gi/overrides/Gdk.py |  22 ++++++++++++++++------
+ 1 files changed, 16 insertions(+), 6 deletions(-)
+
+commit cda317195566711d66190145b545e26ed7226172
+Author: Johan Dahlin <johan@gnome.org>
+Date:  Thu Dec 2 23:47:40 2010 -0200
+
+    Gtk: add an override for Gtk.main_quit
+
+    Override gtk.main_quit so that it can be used as a callback
+    to signals, most importantly to the destroy signal of a widget:
+
+       widget.connect('destroy', gtk.main_quit)
+
+    This is compatible with what PyGTK does.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=636336
+
+ gi/overrides/Gtk.py     |    5 ++++-
+ gi/overrides/__init__.py |   27 +++++++++++++++++++++++++--
+ 2 files changed, 29 insertions(+), 3 deletions(-)
+
+commit 82689cbf53d92b1b951a459fe3de0e1d3a91791a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Dec 2 16:27:04 2010 -0500
+
+    [gi] handle subtypes when inserting into tree models
+
+    * Often modules will give back basic types wrapped in a subtype.
+      This is the case with D-Bus where you may want to keep some of the
+      metadata around. More often than not, the developer is just looking
+      to use the basetype.
+
+    * This override checks the column type and handles basic types such as
+      gchararrays, ints, longs, floats and doubles, converting them
+      to their
+      base types before sending them to the generic GI type marshaller.
+
+    * More types may need to be supported but these are the common
+    cases where
+      apps break.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=635172
+
+ gi/overrides/Gtk.py    |   38 ++++++++++++++++++++++++++++++++++++--
+ tests/test_overrides.py |    8 +++++++-
+ 2 files changed, 43 insertions(+), 3 deletions(-)
+
+commit 677490e9402bad7b7c2a832345ef54f7f0c5fc7f
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Fri Dec 3 23:39:50 2010 +0100
+
+    Override TreeSelection.select_path and TreeView.scroll_to_cell
+
+    The "path" argument may also be a string or a tuple
+
+ gi/overrides/Gtk.py    |   10 ++++++++++
+ tests/test_overrides.py |   29 +++++++++++++++++++++++++++++
+ 2 files changed, 39 insertions(+), 0 deletions(-)
+
+commit dacfe618fa244445c979f1a5efa80c1f9a5a4ae9
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Fri Dec 3 23:29:00 2010 +0100
+
+    Override TreePath.__new__
+
+    Instead of having a private _tree_path_from_string it is cleaner to
+    override __new__ and it will be useful for all the api that take a
+    TreePath or a string or a tuple.
+
+ gi/overrides/Gtk.py    |   33 +++++++++++++++------------------
+ tests/test_overrides.py |   18 ++++++++++++++++++
+ 2 files changed, 33 insertions(+), 18 deletions(-)
+
+commit 7a8af9e220ee48aa28f6b025c5dae324b14fe128
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Nov 28 13:02:30 2010 +0100
+
+    Override Container to behave like a sequence
+
+ gi/overrides/Gtk.py    |    6 ++++++
+ tests/test_overrides.py |   11 +++++++++++
+ 2 files changed, 17 insertions(+), 0 deletions(-)
+
+commit 94e8befc935d4a6c7f766e34195e10fc3fb3b93a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Nov 30 16:57:05 2010 -0500
+
+    refactor Jonathan Matthew recurse vfunc patch so it applys and clean
+    up a bit
+
+    * this patch does the recursion using the previous patche's support
+    functions
+
+ gi/types.py |  55
+ +++++++++++++++++++++++++++++++++++++++++++++----------
+ 1 files changed, 45 insertions(+), 10 deletions(-)
+
+commit 9c5aee4f06f92457f9ae987656c0c469f76d0ee8
+Author: Jonathan Matthew <jonathan@d14n.org>
+Date:  Thu Jul 22 23:19:51 2010 +1000
+
+    Recurse up through base classes when setting up vfuncs
+
+    * this patch adds the support methods to do the recursion
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625033
+
+ gi/gimodule.c   |  130
+ +++++++++++++++++++++++++++++++++++++++---------------
+ tests/test_gi.py |   37 +++++++++++++++
+ 2 files changed, 131 insertions(+), 36 deletions(-)
+
+commit 78358e1ab54d02317f397276adee03ecb2187588
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Nov 29 18:29:57 2010 -0500
+
+    add a profiling torture test for when we fix up invoke
+
+ tests/test_everything.py |   67
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 67 insertions(+), 0 deletions(-)
+
+commit 792e679c06df4357843fd310c7953a931172fc99
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Nov 29 16:41:38 2010 -0500
+
+    moved dynamic and base modules outside of gtk-2.0 directory
+
+    * do not move header files yet as they are mostly used by static
+    bindings
+    * do not remove pygtk.pth and pygtk.py files yet - there is a debate
+    on moving
+      these back to pygtk but you might want to import gio static
+      bindings without
+      having to have pygtk installed
+    * I have not tested this with pygtk, committing it so we can find
+    out if it
+      causes any issues with legacy modules and code
+
+ gi/Makefile.am                   |    2 +-
+ gi/overrides/Makefile.am  |   2 +-
+ gi/repository/Makefile.am |   2 +-
+ glib/Makefile.am         |    2 +-
+ gobject/Makefile.am      |    2 +-
+ tests/test_gi.py         |    2 --
+ tests/test_overrides.py   |   3 ---
+ 7 files changed, 5 insertions(+), 10 deletions(-)
+
+commit c587e1ace7429195ac6fd4db03d2f33e2af09838
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Nov 29 15:11:46 2010 -0500
+
+    add test for inout argument count
+
+ tests/test_gi.py |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 5de88b4bcffdafcf8c7c20033cdf95dc690199ce
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Nov 22 19:17:23 2010 -0500
+
+    [gi] add check for UNICHAR
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=623615
+
+ gi/pygi-argument.c      |   27 ++++++++++++++++++++++++++-
+ tests/test_everything.py |   17 +++++++++++++++--
+ 2 files changed, 41 insertions(+), 3 deletions(-)
+
+commit f129b3db2c78d3cce3614993fdd1619fb9eb9c79
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Nov 21 12:16:53 2010 +0100
+
+    Support gunichar
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=623615
+
+ gi/pygi-argument.c      |   60
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-info.c                  |    5 ++++
+ tests/test_everything.py |    5 ++++
+ 3 files changed, 70 insertions(+), 0 deletions(-)
+
+commit fd2c0288eb67823fca1265348a27a9f8f147ae50
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Nov 27 23:01:42 2010 +0100
+
+    pygi-convert.sh: gtk.accel_map -> Gtk.AccelMap._
+
+ pygi-convert.sh |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 13d0ff1d9c129bb458e234b630ebe920b50e2e0f
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Nov 27 22:34:13 2010 +0100
+
+    pygi-convert.sh: handle "from gtk import gdk"
+
+ pygi-convert.sh |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 63a97634031c3d159ad77fdaa1f6341d7656eb07
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Nov 27 22:23:24 2010 +0100
+
+    pygi-convert.sh: add some Pango special cases
+
+ pygi-convert.sh |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 57e42bf4230d1aa20a47e3b0df2e509602333892
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Nov 27 19:51:38 2010 +0100
+
+    Override TextIter (begins|ends|toggles)_tag()
+
+    Make the tag argument optional.
+
+ gi/overrides/Gtk.py    |    9 +++++++++
+ tests/test_overrides.py |   17 +++++++++++++++++
+ 2 files changed, 26 insertions(+), 0 deletions(-)
+
+commit 828b698e47ee819a60d24a772a3cc51ff9cd6601
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Nov 27 19:32:48 2010 +0100
+
+    Override TextBuffer.set_text() to make length optional
+
+ gi/overrides/Gtk.py    |    3 +++
+ tests/test_overrides.py |   11 ++++++++++-
+ 2 files changed, 13 insertions(+), 1 deletions(-)
+
+commit bf55dc862755a57bb1b998702d284fc460e88a30
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Nov 27 16:46:40 2010 +0100
+
+    Override TextBuffer.create_mark()
+
+    Override create_mark to make the left_gravity argument optional
+
+ gi/overrides/Gtk.py    |    3 +++
+ tests/test_overrides.py |    3 +++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 94c0e2f71636d055bdebe3ec378f3d339eea66c9
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sat Nov 27 16:10:33 2010 +0100
+
+    Fix TextBuffer.get_selection_bounds() override
+
+    Fix the override and add unit test
+
+ gi/overrides/Gtk.py    |    8 +++++---
+ tests/test_overrides.py |    7 +++++++
+ 2 files changed, 12 insertions(+), 3 deletions(-)
+
+commit 0cd717e3926276540b9145e58a4a3368136b00de
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Nov 22 18:35:09 2010 -0500
+
+    [gi] fix ActionGroup constructor to allow other keyword properties
+    to be set
+
+ gi/overrides/Gtk.py |   4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 226777cdb70fc72d206664ffd8b6737f7239d23f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Nov 22 18:32:28 2010 -0500
+
+    [gi] require the name parameter when creatin a Gtk.ActionGroup
+
+ gi/overrides/Gtk.py    |    3 +++
+ tests/test_overrides.py |    2 ++
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+
+commit d0049fa9982d13b3553b05569fb0a227e48b6647
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Nov 21 15:20:58 2010 +0100
+
+    Override UIManager.insert_action_group
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=635437
+
+ gi/overrides/Gtk.py    |    3 +++
+ tests/test_overrides.py |   34 +++++++++++++++++++++-------------
+ 2 files changed, 24 insertions(+), 13 deletions(-)
+
+commit e1db544e46aeed984133896af34b671a6a5547df
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Nov 21 23:03:25 2010 +0100
+
+    Override TreeModel.get() to return a tuple
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=635466
+
+ gi/overrides/Gtk.py    |   15 +++++++++++++++
+ tests/test_overrides.py |    6 ++++++
+ 2 files changed, 21 insertions(+), 0 deletions(-)
+
+commit a5e806ad8a8b279402ff7adb1c1cdc04f9f3da76
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Nov 21 21:57:40 2010 +0100
+
+    Make TreeSelection.get_selected_rows compatible with PyGtk
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=635464
+
+ gi/overrides/Gtk.py |   6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 1c537bc67107948c92b51ba6ba749747e84263e2
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Nov 22 15:04:00 2010 -0500
+
+    [gi] switch to using sequences/tuples when marshalling
+    cairo_rectangle_int_t
+
+    * Upstream pycairo didn't want to add a new wrapper for
+    cairo_rectangle_int_t
+    * this works around that issue by using 4 element squences instead
+    which
+      should be accepted by pycairo for any API that takes a rect
+
+ gi/pygi-foreign-cairo.c |   85
+ +++++++++++++++++++++++++++++++++++-----------
+ 1 files changed, 64 insertions(+), 21 deletions(-)
+
+commit 4cede8f12321bed6c3b71813a62c01b61853ba69
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Nov 19 16:46:53 2010 -0500
+
+    [gi] overrides for treeview Drag and Drop
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627367
+
+ gi/overrides/Gdk.py |   7 +++++++
+ gi/overrides/Gtk.py |  25 +++++++++++++++++++++++++
+ 2 files changed, 32 insertions(+), 0 deletions(-)
+
+commit 3fd51bb903724b752f72f49c7cb35652b819791d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Nov 19 16:44:32 2010 -0500
+
+    [gi] when encountering guint8 arrays treat them as byte arrays
+
+    * In Python 2 this means returning a PyString object
+    * In Python 3 we return a PyBytes object
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627367
+
+ gi/pygi-argument.c |  65
+ ++++++++++++++++++++++++++++++++++++++++++---------
+ tests/test_gi.py   |   6 +++-
+ 2 files changed, 57 insertions(+), 14 deletions(-)
+
+commit 7ddb0f7fd8b1b9e8f691c6d42a83cb16c6561d26
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:  Fri Nov 19 18:19:38 2010 +0100
+
+    pygi-convert.sh: Add pynotify -> Notify
+
+ pygi-convert.sh |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit bf03d4db03a7739ac16ddc4e614441557ede554d
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:  Fri Nov 19 09:08:07 2010 +0100
+
+    pygi-convert.sh: Remove sugar specifics, and allow command line
+    file list
+
+    This script is generally useful for converting pygtk2 projects,
+    not just for
+    sugar. Remove the sugar specific bits, since they will just cause
+    errors.
+
+    Also allow the user to specify the files to convert as command line
+    arguments. If not given, all *.py files will be processed.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=635244
+
+ pygi-convert.sh |   25 +++++--------------------
+ 1 files changed, 5 insertions(+), 20 deletions(-)
+
+commit 18f5d229d3a4b9520c1c456be2635c8e36015c12
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date:  Fri Nov 19 09:00:35 2010 +0100
+
+    pygi-convert.sh: Cover Message and Buttons types
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=635244
+
+ pygi-convert.sh |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit ef74273c2043944708515e59a654ebe4944b46ff
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Nov 18 13:54:48 2010 -0500
+
+    [gi] fix actiongroup test since actions are hashed
+
+    * when actions are listed they may not show up in the order they
+    were entered
+      since they reside in an unordered hash internally
+
+ tests/test_overrides.py |    9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+commit 2c25886bf6710568d0646f82dce4770faa44c40d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Nov 17 14:38:09 2010 -0500
+
+    [gi] when converting to UTF-8 accept Python Unicode objects as input
+    (Python 2)
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620579
+
+ gi/pygi-argument.c         |   14 ++++++++++++--
+ glib/pyglib-python-compat.h |   5 +++++
+ tests/test_gi.py           |    3 +++
+ 3 files changed, 20 insertions(+), 2 deletions(-)
+
+commit 8c2d32c8205b971b4353e3d5d2ed1efa6ef0e06c
+Author: Damien Caliste <damien.caliste@cea.fr>
+Date:  Fri Nov 12 10:20:32 2010 +0100
+
+    Correct a bug in the freeing of memory in pygi-invoke.c.
+
+    When a method with inout arguments is called from Python with
+    a wrong number of arguments, the system crashs because of an
+    assertion fail. This patch corrects this behaviour.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=634671
+
+ gi/pygi-invoke.c |   25 ++++++++++++++-----------
+ 1 files changed, 14 insertions(+), 11 deletions(-)
+
+commit d9bab3b185bb59bd29e3c3f6225f3636f58ec45e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Nov 10 14:11:56 2010 -0500
+
+    update news for release
+
+ NEWS |   73
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 73 insertions(+), 0 deletions(-)
+
+commit 1338a95339e21cc02b9df6d10166996c8b97a6bf
+Author: Jonathan Matthew <jonathan@d14n.org>
+Date:  Tue Sep 28 13:44:13 2010 +1000
+
+    Implement richcompare for GIBaseInfo
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625033
+
+ gi/pygi-info.c |   29 +++++++++++++++++++++++++++++
+ 1 files changed, 29 insertions(+), 0 deletions(-)
+
+commit 9ce3edf69824935aeca9e676eaa9782786c22a97
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Nov 9 22:57:41 2010 -0500
+
+    [gi] add the rectangle_int_t forign cairo type
+
+    * the pycairo maintainer is not being responsive so you will need
+    the patch at
+      https://bugs.freedesktop.org/show_bug.cgi?id=31111
+    * added conditionals, if the api doesn't exist in PyCairo we will
+    compile
+      without the forign structs
+
+ gi/pygi-foreign-cairo.c |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 68b8211d8b014cf26ca7e9ab751fb3f61f228290
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Oct 25 18:28:36 2010 -0400
+
+    add a foreign type for cairo_rectangle_int_t and allow it to be
+    caller-allocated
+
+    * this is needed because Gdk and Gtk switched from returning a
+    GdkRectangle
+      to a CairoRectangleInt structure
+    * the patch in https://bugs.freedesktop.org/show_bug.cgi?id=31111
+    is required
+      for pycairo (however there is currently no patch for python 2)
+    * added fix for foreign types to allow them to be caller allocated
+    * in order for a type to be caller allocated it must be able to take
+    a NULL
+      and create an empty struct in foreign_struct_from_arg and it must
+      be able
+      to handle GI_TRANFER_EVERYTHING in foreign_struct_to_arg.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627545
+
+ gi/pygi-foreign-cairo.c |   57
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-invoke.c       |   15 ++++++++++-
+ 2 files changed, 70 insertions(+), 2 deletions(-)
+
+commit ce8b948310220288e9eef904eef4ec8f4e24a376
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Nov 9 22:11:51 2010 -0500
+
+    [gi] add overrides to Gtk.Editable
+
+ gi/overrides/Gtk.py    |   17 +++++++++++++++++
+ tests/test_overrides.py |   12 ++++++++++++
+ 2 files changed, 29 insertions(+), 0 deletions(-)
+
+commit 87dbc716f26cefc0e9427c3d6e8befe8eabd3d1e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Nov 9 21:12:54 2010 -0500
+
+    [gi] handle virtual invokers
+
+    * right now we check to see if there is an method with the same name
+      as the virtual method and assume that is the invoker
+    * some invokers are named different so we now ask the VFuncInfo if
+      the vfunc has an invoker
+    * this is still not completly correct, gi needs to support telling
+      us which vfuncs must be overridden.
+    * this keeps the old way of checking vfuncs while adding the edge case
+      where vfunc is named differently from their invoker
+
+ gi/pygi-info.c |   16 ++++++++++++++++
+ gi/types.py   |    2 +-
+ 2 files changed, 17 insertions(+), 1 deletions(-)
+
+commit 540e9f1f349ba3625e28b7673c92210eb8974098
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Nov 9 12:17:05 2010 -0500
+
+    add overrides for the insert* apis of list_store and tree_store
+
+    * add set_row to tree_model as convinience method for both list and
+    tree stores
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=634423
+
+ gi/overrides/Gtk.py    |   80
+ ++++++++++++++++++++++++++++++++++++----------
+ tests/test_overrides.py |   53 ++++++++++++++++++++++++++++++-
+ 2 files changed, 114 insertions(+), 19 deletions(-)
+
+commit 0bcb58b9541d9ae52e1d96e6239e9dbe0698872a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Nov 5 13:56:12 2010 -0400
+
+    fix dialogs overrides which were relying on broken inheritance
+    behavior
+
+ gi/overrides/Gtk.py |  14 ++++++++++++--
+ 1 files changed, 12 insertions(+), 2 deletions(-)
+
+commit 89c104d17d79d7b935cd76101cba19d49390f7be
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Nov 4 12:00:14 2010 -0400
+
+    Add a overrides registry so we can refrence overrides inside the
+    module
+
+    * Overrides have a reentrancy issue when doing inheritance.  If an
+    override
+      inherits from another override down the stack it won't see the
+      override
+      because the module is not finished loading and will inherit from the
+      non-overriden object instead.  This causes type errors later.
+    * By adding the overrides to a registry outside of the module we
+    can order
+      registration and make the override available as soon as the class
+      is parsed,
+      not when the whole module is parsed.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=633347
+
+ gi/module.py                      |   12 +++++++++-
+ gi/overrides/GIMarshallingTests.py |   2 +-
+ gi/overrides/Gdk.py               |    2 +-
+ gi/overrides/Gtk.py               |    2 +-
+ gi/overrides/__init__.py          |   43
+ ++++++++++++++++++++++++++++++++++++
+ gi/types.py                       |    8 ------
+ tests/test_overrides.py           |   27 ++++++++++++++++++++++
+ 7 files changed, 84 insertions(+), 12 deletions(-)
+
+commit 878b8f630acd2146bee364054acd45cd33eea37a
+Merge: cdacaa9 e317838
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Fri Nov 5 11:40:22 2010 +1300
+
+    Merge remote branch 'dieterv/setup-fixes-for-merge'
+
+commit e317838178fba5f0590fb8bd323f49602d564b53
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Thu Nov 4 11:16:43 2010 +0100
+
+    setup.py: ease maintenance burden for tests installation
+
+ setup.py |   23 +++--------------------
+ 1 files changed, 3 insertions(+), 20 deletions(-)
+
+commit cdacaa9572893796e0f3aa3730d0191911cb29ee
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Nov 3 09:51:09 2010 -0400
+
+    fix inheritence issues in overrides
+
+ gi/overrides/Gtk.py |  79
+ ++++++++++++++++++++++++++-------------------------
+ 1 files changed, 40 insertions(+), 39 deletions(-)
+
+commit 3d5955767d81f45e796ab2af0707533375681774
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 09:38:56 2010 +0100
+
+    tests: add runtests-windows.py script
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ tests/runtests-windows.py |   47
+ +++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 47 insertions(+), 0 deletions(-)
+
+commit 8cb3f2e78161639c568110aad6a807dcf59f3ae8
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 09:35:52 2010 +0100
+
+    pygobject_postinstall.py: remove pygobject-2.0.pc treatment from
+    postinstall as pkg-config on windows figures out the correct prefix
+    at runtime
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ pygobject_postinstall.py |   26 +++-----------------------
+ 1 files changed, 3 insertions(+), 23 deletions(-)
+
+commit 63167574df53eb481cc11b6a097b2bfe7d5747f5
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 09:34:38 2010 +0100
+
+    pygobject_postinstall.py: remove shortcut creation
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ pygobject_postinstall.py |   35 +----------------------------------
+ 1 files changed, 1 insertions(+), 34 deletions(-)
+
+commit f7b12611f94fd8c27fb67a03746c10149ce6e0ef
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 09:31:14 2010 +0100
+
+    setup.py: formatting cleanup, makes things readable
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ setup.py |   56 ++++++++++++++++++++++++++------------------------------
+ 1 files changed, 26 insertions(+), 30 deletions(-)
+
+commit a31b4196fbb4638a245430f2fdeafd7534b1d84d
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 09:28:36 2010 +0100
+
+    setup.py: build and install tests
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ setup.py |   61
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 61 insertions(+), 0 deletions(-)
+
+commit 7c3b0c20b83c05833d73c240690dce3daf43fde8
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 09:26:59 2010 +0100
+
+    setup.py: install documentation when available on build system
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ setup.py |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 78533d851ee1314686f18cfa793613a9cf7d6686
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 09:25:56 2010 +0100
+
+    setup.py: install pygobject-codegen script
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ setup.py |   25 +++++++++++++++++++++++++
+ 1 files changed, 25 insertions(+), 0 deletions(-)
+
+commit ad40688df533dda0b1f7be8ea37c542b8796a26b
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 09:24:45 2010 +0100
+
+    setup.py: install fixxref.py script
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ setup.py |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 21ddfc66e4e18c002a33154eb4ab81170ed71ecc
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 09:23:05 2010 +0100
+
+    setup.py: rearrange constants
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ setup.py |   37 ++++++++++++++++++++-----------------
+ 1 files changed, 20 insertions(+), 17 deletions(-)
+
+commit 7d353d04892de67265bf693f591f37fd393de639
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 09:18:11 2010 +0100
+
+    setup.py: check python version and pkgconig availability before
+    anything else
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ setup.py |   18 ++++++++++--------
+ 1 files changed, 10 insertions(+), 8 deletions(-)
+
+commit 286364ed39953e942e24d5911519bcac2f90975a
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 09:05:59 2010 +0100
+
+    setup.py: simplify sys.platform != 'win32' detection and error
+    reporting
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ setup.py |   29 +++++++++--------------------
+ 1 files changed, 9 insertions(+), 20 deletions(-)
+
+commit 3f70f92904c123e6cc40929c0affd3f75d061828
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 09:02:30 2010 +0100
+
+    setup.py: rearrange imports
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ setup.py |   31 ++++++++++++++++++++++---------
+ 1 files changed, 22 insertions(+), 9 deletions(-)
+
+commit 9aa54b65f729c0f3b0e96ab7ff797f87dad6a455
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 08:58:00 2010 +0100
+
+    README.win32: update build instructions
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ README.win32 |   13 +++++--------
+ 1 files changed, 5 insertions(+), 8 deletions(-)
+
+commit 5a33105f690ba84b2e4bb15d73d3467e92fa06e0
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 07:59:18 2010 +0100
+
+    dsextras.py: formatting cleanup, makes things readable
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ dsextras.py | 148
+ +++++++++++++++++++++++++++++++++++++----------------------
+ 1 files changed, 93 insertions(+), 55 deletions(-)
+
+commit d03503d0412d173acb383926ab3c2d640dad3e3f
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 07:00:40 2010 +0100
+
+    dsextras.py: add ggc4 to MSVC compatible struct packing comment
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ dsextras.py |   4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 8c62968e9f8467e24870b8c4f61112676eef4630
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 06:56:32 2010 +0100
+
+    dsextras.py: use the pkgc_ functions instead of repeating pgk-config
+    incantations all over the place
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ dsextras.py |  15 ++++++---------
+ 1 files changed, 6 insertions(+), 9 deletions(-)
+
+commit b98277afc24886bbda400e0ad360992bffa77b7c
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 06:49:48 2010 +0100
+
+    dsextras.py: add pkgc_get_version and pkgc_get_defs_dir functions
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ dsextras.py |  10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit a565558652ebc3fa49d7aea40d399b06bbe376c4
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 06:45:05 2010 +0100
+
+    dsextras.py: PEP8: Comparisons to singletons like None should always
+    be done with 'is' or 'is not', never the equality operators.
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ dsextras.py |   4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 4b1ff0c7f9953f925d2178069263cca67ca7db02
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 06:44:21 2010 +0100
+
+    dsextras.py: use True/False instead of 1/0
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ dsextras.py |  25 +++++++++++++------------
+ 1 files changed, 13 insertions(+), 12 deletions(-)
+
+commit 819a21cea831c3892040390e9446b78a91d1cbbe
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 06:28:04 2010 +0100
+
+    dsextras.py: rearrange imports
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ dsextras.py |  58
+ +++++++++++++++++++++++++++++++---------------------------
+ 1 files changed, 31 insertions(+), 27 deletions(-)
+
+commit d20edbfdde2819f8d4fee8cb3170c126fcd31d5f
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date:  Wed Nov 3 06:16:21 2010 +0100
+
+    Add distutils generated build/dist directories and eclipse
+    configuration files to .gitignore
+
+    Signed-off-by: Dieter Verfaillie <dieterv@optionexplicit.be>
+
+ .gitignore |   7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 268d6ed2b0b1d266c612da4453b6117d9e14437e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Oct 28 15:32:28 2010 -0400
+
+    [gi] add tests for calling dir on a dynamic module
+
+ tests/test_gi.py |   24 ++++++++++++++++++++++++
+ 1 files changed, 24 insertions(+), 0 deletions(-)
+
+commit f6386a6e0d225c83cdbe1add4c4d3ea51d3ec2f0
+Author: Deepankar Sharma <deepankar.sharma@gmail.com>
+Date:  Wed Oct 27 18:28:11 2010 -0400
+
+    [gi] dir() now works for modules
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625093
+
+ gi/module.py |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 28ed01c34c503cfb4f14fe7af7912060ca70aba6
+Author: Simón Pena <spenap@gmail.com>
+Date:  Mon Sep 20 23:10:14 2010 +0200
+
+    Don't check the inner type when comparing gpointers
+
+    When using pyg_pointer_richcompare to compare two objects,
+    don't check their inner types. As we can't compare their private
+    fields, nor get a proper compare function, we can consider them
+    gpointers and compare them that way.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=629552
+
+ gobject/pygpointer.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1731f89e4b5a20c33976963e12a1f39a21d33fde
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Oct 28 14:21:12 2010 -0400
+
+    Release GIL when calling into C functions
+
+    Author: Daniel P. Berrange <dan@berrange.com>
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=629042
+
+ gi/pygi-invoke.c |   10 +++++++++-
+ 1 files changed, 9 insertions(+), 1 deletions(-)
+
+commit 783e2e351ec7470bda6b441e51f387dd61543c4b
+Author: José Aliste <jaliste@src.gnome.org>
+Date:  Fri Oct 15 14:30:10 2010 -0300
+
+    _gi.Repository : Implement missing info bindings.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=632185
+
+ gi/pygi-info.c |   91
+ +++++++++++++++++++++++++++++++++++++++++++++++--------
+ gi/pygi-info.h |    7 ++++
+ 2 files changed, 84 insertions(+), 14 deletions(-)
+
+commit 2ca897273f52ae38f5e06e72c773a048e199eee5
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Oct 28 13:49:15 2010 -0400
+
+    include Python.h so that PY_VERSION_HEX gets defined
+
+ gi/pygi-foreign-cairo.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 8b28b1d713df33931e255600ab98feda37a8e02a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Oct 28 13:47:34 2010 -0400
+
+    [gi] make overrides work for python 3.x protocols and alias for
+    python 2.x
+
+ gi/overrides/Gtk.py |   9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 3c09710d2f68af9c16ce39fd25656147656a486a
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Sat Oct 23 14:24:24 2010 +0200
+
+    Override Gtk.Widget.translate_coordinates to not return success value
+
+ gi/overrides/Gtk.py |  11 +++++++++++
+ 1 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 9d4443b3de8c327d8645ddde0a7a6dc5b977d7b4
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Sat Oct 23 14:22:36 2010 +0200
+
+    Override Gtk.TreeViewColumn.cell_get_position to not return success
+    value
+
+ gi/overrides/Gtk.py |   5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 6679d39ace06294e98f9d6fc911ed6fb27656010
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Sat Oct 23 14:21:36 2010 +0200
+
+    Override get_path_at_pos and get_dest_row_at_pos of Gtk.TreeView to
+    not return success value
+
+ gi/overrides/Gtk.py |  15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+commit 80b1b266fa68a5c67106871502017166628f71e4
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Sat Oct 23 14:20:38 2010 +0200
+
+    Override Gtk.TreeSortable.get_sort_column_id to not return success
+    value
+
+ gi/overrides/Gtk.py |  12 ++++++++++++
+ 1 files changed, 12 insertions(+), 0 deletions(-)
+
+commit 17cd0fb3a2d2ca0c6109c41727ba0b8c42217cd5
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Sat Oct 23 14:19:20 2010 +0200
+
+    Override forward_search and backward_search of Gtk.TextIter to not
+    return success value
+
+ gi/overrides/Gtk.py |  15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+commit 95c86fa31da3d2fe84db0e2b5bc2a6dc896c9223
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Sat Oct 23 14:18:09 2010 +0200
+
+    Override Gtk.TextBuffer.get_selection_bounds to not return success
+    value
+
+ gi/overrides/Gtk.py |   5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit da6d87460b9392c29d025a7eed9249fb604204bc
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Sat Oct 23 14:17:04 2010 +0200
+
+    Override Gtk.RecentInfo.get_application_info to not return success
+    value
+
+ gi/overrides/Gtk.py |  10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 0ed2e8772bdc405b0d0c7e0b2803e0e141abcb6a
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Sat Oct 23 14:16:21 2010 +0200
+
+    Override Gtk.IMContext.get_surrounding to not return success value
+
+ gi/overrides/Gtk.py |  10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit b85b445f15421209c0b4adf676d7c8218d6437c5
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Sat Oct 23 14:15:24 2010 +0200
+
+    Override get_item_at_pos, get_visible_range, get_dest_item_at_pos
+    of Gtk.IconView to not return success value
+
+ gi/overrides/Gtk.py |  19 +++++++++++++++++++
+ 1 files changed, 19 insertions(+), 0 deletions(-)
+
+commit 684d716192d58c972083e579e909bcd97f8a5025
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Sat Oct 23 14:13:47 2010 +0200
+
+    Override Gtk.Container.get_focus_chain to not return success value
+
+ gi/overrides/Gtk.py |  10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 8ec830c57fafbfe50d9619c6caba3cb95a00d688
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Sat Oct 23 14:12:44 2010 +0200
+
+    Override Gtk.ComboBox.get_active_iter to not return success value
+
+ gi/overrides/Gtk.py |  10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit b483852904468722230903989e3451c7c6a24c0f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Oct 12 12:18:33 2010 -0400
+
+    [gi] make parameter check less strict when dealing with GValue params
+
+    * Some GValue API can store a pointer to a python object for later
+      use but our parameter checking was too strict to allow this
+    * Add pyg_type_from_object_strict API which takes a strict boolean and
+      returns PY_TYPE_OBJECT if no other GType can be found
+    * Since we don't have enough info to genrically check GValue
+    parameters
+      use the less strict type guessing when encountering a GValue param
+    * Other API stays the same and continues to do strict testing
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=622987
+
+ gi/pygi-argument.c         |   17 +++++---------
+ gobject/gobjectmodule.c     |   4 +-
+ gobject/pygobject-private.h |   1 +
+ gobject/pygobject.h        |    2 +
+ gobject/pygtype.c          |   37 ++++++++++++++++++++++++++++---
+ tests/test_gi.py           |    1 -
+ tests/test_overrides.py     |  50
+ +++++++++++++++++++++++++++++++++++++++---
+ 7 files changed, 90 insertions(+), 22 deletions(-)
+
+commit 8c87d622dcc6d76a981edfc5818fe67bb2e114e2
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Fri Oct 22 13:28:31 2010 +1300
+
+    Shortcut removal is not needed on post-uninstall
+
+ pygobject_postinstall.py |   14 ++------------
+ 1 files changed, 2 insertions(+), 12 deletions(-)
+
+commit a3ed97fe6f80548801739fe6b72771b9eb6d93f7
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Thu Oct 21 13:25:35 2010 +1300
+
+    Disable shortcut creation in windows installer
+
+ pygobject_postinstall.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a3d6212b0abccef58f05d454c091936776413d98
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Oct 7 11:43:27 2010 -0400
+
+    overrides for all subclasses of dialog
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=631634
+
+ gi/overrides/Gtk.py    |   94
+ ++++++++++++++++++++++++++++++++++++++++++++---
+ tests/test_overrides.py |   64 +++++++++++++++++++++++++++++++-
+ 2 files changed, 151 insertions(+), 7 deletions(-)
+
+commit a87e3ba64b54e6df0b5b96af47c34e3be790b58f
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Thu Oct 7 19:37:53 2010 +0200
+
+    Make TreeModel behave like in GTK-2.x
+
+    Moved stuff from __getitem__ to get_iter.
+    Added TreePath.__cmp__
+
+    get_iter_from_string throws ValueError.
+    iterchildren() does not return None.
+
+    Adjusted tests to new TreeModel and added TestGtk.test_tree_model
+    method
+
+    Added support for negative row and column indices
+
+    Use rich comparison methods instead of __cmp__
+
+    Added TreeModel.__bool__/__nonzero__
+
+    Raise Error if tree path string is empty
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=631547
+
+ gi/overrides/Gtk.py    |  195
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_overrides.py |  160 +++++++++++++++++++++++++++++++++++++--
+ 2 files changed, 349 insertions(+), 6 deletions(-)
+
+commit acfcc29af727fb67d0dfbbcc7cc14963ef21f1ea
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Sat Oct 16 18:59:25 2010 +1300
+
+    Correctly build GIO on windows
+
+ setup.py |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 33b59fd7437009b6c3ed43412e171d2cc91ee317
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Sat Oct 16 18:17:28 2010 +1300
+
+    Require Python >= 2.6.0 for Windows build
+
+ setup.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 544e0e4de4f5f97b0584eaf72ae8a081eca28ab6
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Sat Oct 16 17:41:01 2010 +1300
+
+    Fix depreciation warning in dsextras.py
+
+ dsextras.py |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 239ff961778e4e1587404d8a70dfbe8630ab0623
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Sat Oct 16 17:34:50 2010 +1300
+
+    Fix build on windows
+
+ gi/pygi-foreign.c |   5 ++++-
+ gi/pygi.h        |    5 ++++-
+ setup.py         |    4 ++--
+ 3 files changed, 10 insertions(+), 4 deletions(-)
+
+commit 9a2f81d63012fef23fdde2b4d903bd69601c07c6
+Author: Michael Culbertson <michael.culbertson@gmail.com>
+Date:  Sat Oct 16 17:08:11 2010 +1300
+
+    Support for GCC4 in Windows distutils build - bug 626548
+
+ dsextras.py |   3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 27367c8dc3a3a31fdd778505b319cd3f4afb9e27
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Fri Oct 15 09:39:02 2010 +1300
+
+    Remove obsolete comments in dsextras.py
+
+ dsextras.py |  11 ++---------
+ 1 files changed, 2 insertions(+), 9 deletions(-)
+
+commit b5f383f854fb8f72677828b029589320c59006d1
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Fri Oct 15 09:21:03 2010 +1300
+
+    Broken dsextras.py pkg-config check error message
+
+       * Fixes bug 631962
+
+ dsextras.py |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e1981da105b574e273ae6500fc6d25caf6af6aae
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Sep 28 15:31:03 2010 -0400
+
+    add compat functions for the deprecated PyCObject api
+
+    * Moved to using the PyCapsule API for python >= 3
+    * PyCObject is removed from Python 3.2
+    * It has also been deprecated in 2.7 but since we use the API in
+    header files
+      which are consumed by static binding modules, appling this for
+      python 2.7
+      causes crashes unless the modules are recompiled, breaking ABI.
+      It is safe
+      to rely on for 2.7 because it will never be removed and there is
+      talk of
+      undeprecating it upstream.
+    * There is no issues with static bindings under python 3 because
+    they are not
+      supported yet and most likely never will be.
+    * Even if PyCObject is brought back in 3.2, PyCapsule is a much
+    safer API
+      which adds a poorman's type check when unboxing.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=630844
+
+ gi/gimodule.c              |    2 +-
+ gi/pygi.h                  |    5 ++++-
+ glib/glibmodule.c          |    2 +-
+ glib/pyglib-python-compat.h |  28 ++++++++++++++++++++++++++++
+ glib/pyglib.c              |    6 +++---
+ glib/pygoptioncontext.c     |   2 +-
+ gobject/gobjectmodule.c     |   2 +-
+ gobject/pygobject.h        |    6 ++++++
+ gobject/pygtype.c          |   10 +++++-----
+ 9 files changed, 50 insertions(+), 13 deletions(-)
+
+commit 03d2e2924e27a9d6cae89e5748f70e0a51be91c6
+Author: Damien Caliste <damien.caliste@cea.fr>
+Date:  Tue Sep 28 12:44:42 2010 +0200
+
+    Add __path__ attributes.
+
+    Add an attribute __path__ to DynamicModule and IntrospectionModule,
+    using the path of the typelib.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=630807
+
+ gi/module.py |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 28f9366c9cb382801bad080864f667c867daa3c7
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date:  Sat Oct 9 17:40:40 2010 +0200
+
+    Override Gtk.TreeSelection.get_selected to not return success value.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=631765
+
+ gi/overrides/Gtk.py |  12 ++++++++++++
+ 1 files changed, 12 insertions(+), 0 deletions(-)
+
+commit f01a7d9e8222663ce52100e061033f2745a5e7af
+Author: Vincent Untz <vuntz@gnome.org>
+Date:  Thu Oct 7 09:42:24 2010 +0200
+
+    Make row optional in Gtk.TreeStore/ListStore.append override
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=631548
+
+ gi/overrides/Gtk.py |  36 ++++++++++++++++++++++--------------
+ 1 files changed, 22 insertions(+), 14 deletions(-)
+
+commit 1e1357f5fa1a034b0b707040d664ac46be6e23f7
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Oct 4 12:50:55 2010 -0400
+
+    Revert "add compat functions for the deprecated PyCObject api"
+
+    This reverts commit f25e763d53e5cdd4de08e90b04aea4b4c4720ac0.
+
+    I ment to commit another patch and ended up comitting both
+
+ gi/gimodule.c              |    2 +-
+ gi/pygi.h                  |    5 +----
+ glib/glibmodule.c          |    2 +-
+ glib/pyglib-python-compat.h |  19 -------------------
+ glib/pyglib.c              |    6 +++---
+ glib/pygoptioncontext.c     |   2 +-
+ gobject/gobjectmodule.c     |   2 +-
+ gobject/pygobject.h        |    6 ------
+ gobject/pygtype.c          |   10 +++++-----
+ 9 files changed, 13 insertions(+), 41 deletions(-)
+
+commit 97774cb149c5b03d5ef82a5af3f19e2ce4d79d0b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Oct 4 12:43:31 2010 -0400
+
+    return NULL instead of -1 which fixes crash when introspection is
+    turned off
+
+    * see https://bugzilla.gnome.org/show_bug.cgi?id=631158
+
+ gi/pygi.h |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f25e763d53e5cdd4de08e90b04aea4b4c4720ac0
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Sep 28 15:31:03 2010 -0400
+
+    add compat functions for the deprecated PyCObject api
+
+    * Moved to using the PyCapsule API for python >= 2.7
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=630844
+
+ gi/gimodule.c              |    2 +-
+ gi/pygi.h                  |    5 ++++-
+ glib/glibmodule.c          |    2 +-
+ glib/pyglib-python-compat.h |  19 +++++++++++++++++++
+ glib/pyglib.c              |    6 +++---
+ glib/pygoptioncontext.c     |   2 +-
+ gobject/gobjectmodule.c     |   2 +-
+ gobject/pygobject.h        |    6 ++++++
+ gobject/pygtype.c          |   10 +++++-----
+ 9 files changed, 41 insertions(+), 13 deletions(-)
+
+commit 80b8ccd450fe4e3ea77b27e58bb63cabc2a2bb2b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Sep 28 15:28:16 2010 -0400
+
+    fix commit 7fe83108 which didn't use the compat functions for
+    string handling
+
+ glib/glibmodule.c |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9562842907a9d94f6adae2c1bb20d6b1f189abda
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Sep 28 13:15:57 2010 -0400
+
+    Python 3 fixes for dsextras and the python.m4 distribution files
+
+ dsextras.py  |   13 +++++++------
+ m4/python.m4 |    4 ++--
+ 2 files changed, 9 insertions(+), 8 deletions(-)
+
+commit 98f69957ee9e3037b0a05a037098e4d2133ca256
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Sep 27 14:01:31 2010 -0400
+
+    post release bump to 2.27.0 unstable
+
+    * update hacking to fill in some holes in the release instructions
+
+ HACKING      |    6 ++++--
+ configure.ac |    2 +-
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+commit fd38010101411e6bc1ca9314657f418de660fa13
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Sep 27 12:03:10 2010 -0400
+
+    update NEWS for release
+
+ NEWS |   93
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 93 insertions(+), 0 deletions(-)
+
+commit 7072d56b6cba13da97a052c75d1ae0c2cc417fd1
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Sun Sep 26 08:37:31 2010 +0200
+
+    Pre-release version bump 2.26.0
+
+ configure.ac |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit a549f429d2ced7a78d5baa5e2f28f6750b4788f2
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Fri Sep 24 22:44:03 2010 +1200
+
+    Wrap g_get_system_{config,data}_dirs ()
+
+       * Also tidy up g_get_{cache,config,data}_dir
+         to share common code
+
+ glib/glibmodule.c |   68
+ +++++++++++++++++++++++++++++++++++++++--------------
+ 1 files changed, 50 insertions(+), 18 deletions(-)
+
+commit 328aca600714bdca89dfdb531c222ee561ede27e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Sep 24 12:16:22 2010 -0400
+
+    fixed make check and make dist
+
+ tests/Makefile.am |   31 ++++++++++++++++++-------------
+ 1 files changed, 18 insertions(+), 13 deletions(-)
+
+commit 27023fd56148dd17b5576c1e81e0fe851d9b8727
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Fri Sep 24 21:20:53 2010 +1200
+
+    Disable GI tests when introspection disabled
+
+ tests/Makefile.am |   2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 7fe831081cdd2e26f5d948326b9f89ea0694e752
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sat Jul 18 19:35:08 2009 +0200
+
+    Wrap g_uri_list_extract_uris. Fixes bug #584431
+
+ glib/glibmodule.c   |  38 ++++++++++++++++++++++++++++++++++++++
+ gobject/__init__.py |   2 +-
+ tests/Makefile.am   |   3 ++-
+ tests/test_uris.py  |  15 +++++++++++++++
+ 4 files changed, 56 insertions(+), 2 deletions(-)
+
+commit d6721a59c294f2471142b8c32de2f647b7084bca
+Author: Paul Bolle <pebolle@tiscali.nl>
+Date:  Thu Sep 23 15:38:40 2010 -0400
+
+    Fix a few uses of TRUE and FALSE in the docs
+
+ docs/reference/pygio-mount.xml                |    5 +++--
+ docs/reference/pyglib-functions.xml   |   18 +++++++++---------
+ docs/reference/pyglib-maincontext.xml |   12 ++++++------
+ docs/reference/pyglib-mainloop.xml    |    6 +++---
+ docs/reference/pygobject-functions.xml |    6 +++---
+ docs/reference/pygobject.xml          |    4 ++--
+ 6 files changed, 26 insertions(+), 25 deletions(-)
+
+commit a08c9fffb4262ae678e17f90bbfb2d5f880cfad0
+Author: Damien Caliste <damien.caliste@cea.fr>
+Date:  Tue Sep 21 17:52:14 2010 +0200
+
+    pygi: always free the invocation_state struct
+
+    In pygi-invoke.c, the invocation_state struct is never freed
+    in case of success. Thus, always call _free_invocation_state()
+    before leaving.
+    Modify _free_invocation_state to avoid double free in case of
+    caller-allocated GValue, once as a released argument in the
+    _process routine and another time in the _free as the special
+    case. So move all argument releasing code from the _process
+    routine to the _free one.
+    Modify the tests for the callback routines to return an integer
+    value as specified in the GIR file.
+
+    Make check is as successful as before (already existing error
+    related to GVariant is still there).
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=630271
+
+ gi/pygi-invoke.c        |   83
+ ++++++++++++++++++++-------------------------
+ tests/test_everything.py |    4 ++-
+ 2 files changed, 40 insertions(+), 47 deletions(-)
+
+commit 9714d765a34e246899f11b6792eea3aecce0b7ec
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Sep 13 16:36:47 2010 +0200
+
+    Start implementing something equivalent to g_variant_new
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=629367
+
+ gi/gimodule.c             |   20 +++++++
+ gi/overrides/GLib.py      |  131
+ +++++++++++++++++++++++++++++++++++++++++--
+ gi/pygi-foreign-gvariant.c |   2 +-
+ tests/test_everything.py   |  16 -----
+ tests/test_overrides.py    |  25 ++++++++
+ 5 files changed, 170 insertions(+), 24 deletions(-)
+
+commit fc45abdd9b55ab63556798ab0f04715be79dba08
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 23 10:49:36 2010 -0400
+
+    fixed typo - missing comma in glib.option module
+
+    * https://bugzilla.gnome.org/show_bug.cgi?id=627449
+
+ glib/option.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4ed100f3183c6325dd04461484e877bb7d4131b1
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Sep 17 12:08:09 2010 -0400
+
+    add checks so we can compile under python 3 by setting PYTHON=python3
+
+    * compile for python 3
+    * disables gio if compiling under python 3.x
+    * runs only pertinant tests
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ configure.ac     |   32 +++++++++++++++++++++++++++++---
+ tests/Makefile.am |   35 ++++++++++++++++++++---------------
+ tests/runtests.py |   4 ++++
+ 3 files changed, 53 insertions(+), 18 deletions(-)
+
+commit 269ff8564eeb597dc06c27e293354b7ff7a71a82
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Sep 17 15:50:47 2010 +0200
+
+    Rename static methods as functions
+
+    In recent gobject-introspection releases, static methods have been
+    removed and placed as functions in the namespace level. In a future
+    releases it's planned to become static methods again but for now
+    let's fix the tests.
+
+ tests/test_gi.py |   14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 2da8da589644d6125101210712defb1272a8abb1
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 13:52:14 2010 -0400
+
+    fix a couple of compiler warnings
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=629199
+
+ gi/pygi-argument.c     |    4 ++--
+ gi/pygi-struct.c       |    2 +-
+ gobject/gobjectmodule.c |    2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 6769a4704f0876ac3baacd4da03ff16d9f0906be
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 13:55:17 2010 -0400
+
+    remove unused code
+
+    * we use richcompare now
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=629198
+
+ gobject/pygtype.c |   9 ---------
+ 1 files changed, 0 insertions(+), 9 deletions(-)
+
+commit 98f54f9d33996baeaa8c8c1240310f5396d03a1d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Sep 14 14:10:49 2010 -0400
+
+    Check the type of the instance object
+
+    * in python 2 methods were added to classes as unbound methods and
+    they would
+      check the instance type to make sure it was correct
+    * in python 3 for perfomance reasons methods are added to classes
+    as simple
+      functions which treat the instance as an untyped argument so
+      no checks
+      are made.
+    * this patch adds a type check so that the correct errors are
+    thrown in
+      python 3 (python 2 this just adds another layer of redundancy should
+      something change with type checking in the future)
+    * since GI handles regular args and the instance arg slightly
+    differently
+      we had to split out the interface checks in
+      _pygi_g_type_info_check_object
+      in order to not duplicate code
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/pygi-argument.c |  182
+ +++++++++++++++++++++++++++------------------------
+ gi/pygi-argument.h |   2 +
+ gi/pygi-invoke.c   |  14 ++++
+ 3 files changed, 112 insertions(+), 86 deletions(-)
+
+commit 5d79498d38b147b66ae72c1481e397160491e8d6
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Sep 15 10:26:20 2010 -0400
+
+    include the correct pycairo version
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/pygi-foreign-cairo.c |    6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit b855562e5c0019cd7e4982fe00c467ede9e3926d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 22:16:58 2010 -0400
+
+    Use PyMapping_Keys to determine if an object is a dict (py3k fix)
+
+    * in Py3k PyMapping_Check returns true for sequences such as strings
+      and lists.  Since we need to get the keys anyway, and it returns
+      NULL if this is not a dict, this is a much better test, even in
+      Py2
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/pygi-argument.c |  10 +++-------
+ 1 files changed, 3 insertions(+), 7 deletions(-)
+
+commit 0e72e28c6c5502c7db5103cf1299c9f0e6689fdd
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 18:44:11 2010 -0400
+
+    fix handling of UINT64 and INT64 arguments in py3k
+
+    * decode to the right sized C long
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/pygi-argument.c |  20 ++++++++++++--------
+ 1 files changed, 12 insertions(+), 8 deletions(-)
+
+commit d5666d99a1c0396b7da0cb14f9f4ff8892da7e2e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 17:35:10 2010 -0400
+
+    properly handle ulongs properties in py3k
+
+    * If this is a PyLong object pull use AsUnsignedLong
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gobject/pygtype.c |   31 +++++++++++++++++--------------
+ 1 files changed, 17 insertions(+), 14 deletions(-)
+
+commit 3d431c7dd0de97db10cb0c00c39d9c1837bed2f2
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Sep 17 12:14:56 2010 +0200
+
+    Specify encoding of tests/test_gi.py
+
+ tests/test_gi.py |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit a808bdabb9fa6f4a9b9ce42e1cce05fb37403f0f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 13:24:30 2010 -0400
+
+    use actual unicode in the tests on py3k, not the byte representation
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ tests/test_gi.py |    6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 928f4485041d80d0c36ff2daeae4bcd09bd0bde4
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 12:45:21 2010 -0400
+
+    s/METH_KEYWORDS/METH_VARARGS|METH_KEYWORDS/ when defining object
+    methods
+
+    * in Py3k the METH_KEYWORDS flag by itself is invalid.  A method
+    must be defined
+      with both the METH_VARARGS and METH_KEYWORDS flags.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ glib/pygiochannel.c |  30 +++++++++++++++---------------
+ glib/pygsource.c    |   4 ++--
+ gobject/pygobject.c |   2 +-
+ 3 files changed, 18 insertions(+), 18 deletions(-)
+
+commit b5ee20afa4399c7689fbec8939fa20b927eeb782
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 08:04:40 2010 -0400
+
+    fix subclassing PyLong by calling __new__ correctly
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ glib/pygspawn.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit a499b2f0d622b671bd154544f66b73f1278e66ed
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 07:56:44 2010 -0400
+
+    minor py3k fixups for python modules
+
+    * add _basestring and _bytes and _callable wrappers
+    * use items instead of iteritems and range instead of xrange
+
+    fix py3k modules
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/overrides/Gtk.py |  24 ++++++++++++++++--------
+ glib/option.py      |  16 ++++++++++++----
+ 2 files changed, 28 insertions(+), 12 deletions(-)
+
+commit dec9001d26c97949e7b3578086cb35e98075c047
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Sep 9 07:36:04 2010 -0400
+
+    minor fixes in tests for py3k compat
+
+    * add a _bytes wrapper for API that expects bytes in py3k but str
+    in py2
+    * fix some more exception handling using sys.exc_info()[:2]
+    * use range instead of xrange, items instead of iteritems since py3k
+      dropped support for the different ways of accessing iterators
+      - this is less efficient in py2 but we plan to target py3k as the
+       primary platform
+    * use list(dict.items()) since py3k only returns iterables which
+    are not
+      indexable
+    * missed some _long wrapping
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ tests/compathelper.py   |   18 ++++++++++++++++++
+ tests/test_everything.py |    5 +++--
+ tests/test_mainloop.py   |    3 ++-
+ tests/test_option.py    |    6 ++++--
+ tests/test_overrides.py  |    4 ++--
+ tests/test_properties.py |    6 +++---
+ 6 files changed, 32 insertions(+), 10 deletions(-)
+
+commit 09a0daeedf49eaf376c1288be5743b57fbc76d51
+Author: Colin Walters <walters@verbum.org>
+Date:  Thu Sep 9 16:25:51 2010 -0400
+
+    compilation: Fix syntax error
+
+ gi/pygi-info.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9f7afd6d5afd8c1a5f36bf1295814757b71c8cbc
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Sep 9 22:17:00 2010 +0200
+
+    Add missing file
+
+ gi/overrides/GLib.py |   48
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 48 insertions(+), 0 deletions(-)
+
+commit 306b792ac97a458ddee59fb86d66453495117f3e
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jul 22 13:48:51 2010 +0100
+
+    Add override for GLib.Variant.new_tuple
+
+    * gi/gimodule.c: Add _wrap_pyg_variant_new_tuple
+    * gi/overrides/GLib.py: Override Variant.new_tuple and
+    Variant.get_string
+    * gi/pygi-type.[hc]: split _pygi_type_import_by_name out from
+      _pygi_type_import_by_gi_info
+    * gi/types.py: Never override gobject.TYPE_NONE
+    * tests/test_everything.py: Add tests for GVariant tuples
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625050
+
+ gi/gimodule.c           |   38 ++++++++++++++++++++++++++++++++++++++
+ gi/overrides/Makefile.am |    1 +
+ gi/pygi-type.c                  |   15 +++++++++------
+ gi/pygi-type.h                  |    2 ++
+ gi/types.py             |    1 +
+ tests/test_everything.py |    9 +++++++++
+ 6 files changed, 60 insertions(+), 6 deletions(-)
+
+commit 22e53aa2ed9cf6173a877b0af6928d5ab8da2f4f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Sep 8 13:08:48 2010 -0400
+
+    fix for changes in the gi test libraries
+
+ tests/test_everything.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 246877074617b0e9c3b2ba2a5395a73e0ed9cd5d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Sep 8 13:08:07 2010 -0400
+
+    Gtk.DialogFlags.NO_SEPARATOR has been removed in Gtk 3.0
+
+ gi/overrides/Gtk.py |  10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+commit f92fc48e7e2ec50996e994ccb7d08a61e7374f22
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Sep 8 12:35:09 2010 -0400
+
+    no need to offset arg positions when is_method is true
+
+    * The old GI libraries required we offset arg positions for the
+    missing
+      self argument.  The new library fixes this so we don't have
+      to offset
+      anymore.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=629087
+
+ gi/pygi-callbacks.c |   5 +----
+ 1 files changed, 1 insertions(+), 4 deletions(-)
+
+commit 8c517de2d278bdef641c72b8f2919a3924290ec1
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Aug 20 14:54:35 2010 +0200
+
+    gi: Add support for more property types
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627494
+
+ gi/pygi-property.c      |  156
+ +++++++++++++++++++++++++++++++++++-----------
+ tests/test_everything.py |   34 ++++++++++
+ 2 files changed, 154 insertions(+), 36 deletions(-)
+
+commit 6d183d1fff55d54569ba3e1f90a10284df74fd40
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Sep 3 12:04:16 2010 -0400
+
+    use PyObject_SetAttrString, not PyDict_SetItemString when setting
+    __gtype__
+
+    * When registering a gtype wrapper we used to set tp_dict
+    directly. This works
+      in python 2 but python 3 seems to handle attributes in a slightly
+      different
+      way where the tp_dict and attr get out of sync.  By setting the attr
+      directly we avoid this issue.
+    * Note that there are many more places where we set __gtype__
+    using tp_dict
+      however for objects which are not instantiated yet we have to
+      set tp_dict
+      directly.
+    * Since this one change fixes a lot of failed tests, for now we
+    ignore the
+      other places where we set __gtype__.  If we run into more issues
+      dealing
+      with __gtype__ we can take a closer look later.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627878
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gobject/gobjectmodule.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b7bf4269682a3335f5e0a52b46fa721af134d09a
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Sep 1 11:03:40 2010 +0200
+
+    Rename GArgument to GIArgument
+
+ gi/pygi-argument.c        |   52
+ ++++++++++++++++++++++----------------------
+ gi/pygi-argument.h        |   10 ++++----
+ gi/pygi-closure.c         |   34 ++++++++++++++--------------
+ gi/pygi-foreign-cairo.c    |   8 +++---
+ gi/pygi-foreign-gvariant.c |   4 +-
+ gi/pygi-foreign-gvariant.h |   4 +-
+ gi/pygi-foreign.c         |   12 +++++-----
+ gi/pygi-foreign.h         |    8 +++---
+ gi/pygi-info.c                    |    8 +++---
+ gi/pygi-invoke.c          |   28 +++++++++++-----------
+ gi/pygi-property.c        |    4 +-
+ gi/pygi.h                 |   16 ++++++------
+ 12 files changed, 94 insertions(+), 94 deletions(-)
+
+commit 7197f85c9be2b03636639ac909ca2c3170653509
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Aug 18 10:29:19 2010 -0400
+
+    fix up tests so they run in py3k
+
+    * add a compat helper that should only be used by tests
+    * fix long notation to use the compat helper instead
+    * add parens to print statements
+    * use compatable try/except pattern
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gobject/propertyhelper.py |   16 +++++++++++-----
+ tests/compathelper.py    |   32 ++++++++++++++++++++++++++++++++
+ tests/test_option.py     |    7 ++++++-
+ tests/test_properties.py  |   24 ++++++++++++++----------
+ tests/test_signal.py     |   14 +++++++-------
+ tests/test_source.py     |    4 ++--
+ 6 files changed, 72 insertions(+), 25 deletions(-)
+
+commit 720e614acdbcf734d4bcccc403e639b5a5bcae24
+Author: Colin Walters <walters@verbum.org>
+Date:  Fri Aug 20 10:58:48 2010 -0400
+
+    tests: Port to new introspection tests
+
+    Everything is renamed "Regress", and both it and GIMarshallingTests
+    are now in source form, so we compile them.
+
+    The scanner now adds "static methods" to objects, structs, and unions,
+    so update the test code to use those.
+
+    In the tests, remove broken (inout) cases - the person writing these
+    tests misunderstood the semantics of (inout).  It's not acceptable for
+    a C API to mutate e.g. a GSList* passed in, or unref an object.
+
+    The invocation code needed to be updated for this - remove some
+    broken hacks.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627878
+
+ configure.ac            |    5 +-
+ gi/pygi-argument.c      |    9 +--
+ gi/pygi-invoke.c        |  147
+ +++++----------------------------------------
+ tests/Makefile.am       |   42 ++++++++++++-
+ tests/test_everything.py |    6 +-
+ tests/test_gi.py        |  151
+ +++++++++-------------------------------------
+ 6 files changed, 93 insertions(+), 267 deletions(-)
+
+commit f6c4d9e58c8f05cb2d82e158c9eb8480308565bd
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Aug 20 10:43:58 2010 -0400
+
+    we need to specify tp_hash since we overide tp_richcompare
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gobject/pygenum.c  |   1 +
+ gobject/pygflags.c |   1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+commit c03e6b482548aee99362356807c804f8834fad2b
+Author: John Ehresman <jpe@wingware.com>
+Date:  Thu Apr 15 17:11:30 2010 -0400
+
+    working enum/flags/pid subclasses of long
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ glib/pygspawn.c    |   7 +++--
+ gobject/pygenum.c  |  61 ++++++++++++++++++++++++------------------
+ gobject/pygflags.c |  76
+ ++++++++++++++++++++++------------------------------
+ 3 files changed, 71 insertions(+), 73 deletions(-)
+
+commit 0db676fd2296750a46ba0fb069e472da06ecc53a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Aug 18 11:03:32 2010 -0400
+
+    make vfuncs work in py3k
+
+    * methods now export __func__ instead of im_func for getting the
+    function
+      out of a method closure
+    * however classes no longer return unbound methods in py3k and instead
+      return the actual function
+    * in python 2 we use im_func when getting the function from the
+    vfunc closure
+    * in py3k we simply assign vfunc to the function
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/types.py |  12 ++++++++----
+ 1 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 286dcd0c6455961d818ac7f05f80f82435abc1dc
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Aug 17 15:43:42 2010 -0400
+
+    make cairo module compile in py3k
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/Makefile.am                 |    2 +-
+ gi/pygi-foreign-cairo.c |   17 +++++++----------
+ 2 files changed, 8 insertions(+), 11 deletions(-)
+
+commit bda58ec34fc443fe1108afc8532bec50f6fd0b44
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Aug 17 02:33:45 2010 -0400
+
+    fix exceptions so they work in python 3.x
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/module.py |    2 +-
+ gi/types.py  |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 427a3c8053feca35ccd746575760ac8a0ed50a12
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Aug 17 02:24:44 2010 -0400
+
+    make the gi module compile under 3.x
+
+    * include the compat macros
+    * use GLIB_MODULE_START/END to define module
+    * add PyInit__gi to the exported symbols
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/Makefile.am |    2 +-
+ gi/gimodule.c |   24 +++++++++---------------
+ 2 files changed, 10 insertions(+), 16 deletions(-)
+
+commit 1dee5dcd2b1747b4a4af438c0443d7930e4802db
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Aug 17 02:14:14 2010 -0400
+
+    fix up testshelper module so it compiles in python 3.x
+
+    * include the compat header
+    * fix up PyInts to be PYGLIB_Long
+    * Use PYGLIB_DEFINE_TYPE macros to define module objects
+    * Use PYGLIB_MODULE_START/END to define modules
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ tests/Makefile.am       |    2 +-
+ tests/testhelpermodule.c |  221
+ ++++++----------------------------------------
+ 2 files changed, 28 insertions(+), 195 deletions(-)
+
+commit 1ff83a2ccb7301c8f675913f1c4f6118ea50b9c7
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Aug 16 21:14:27 2010 -0400
+
+    convert to using PYGLIB_DEFINE_TYPE for module objects
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/pygi-boxed.c      |   43 ++-----------
+ gi/pygi-info.c       |  171
+ ++++++++++++++++++++------------------------------
+ gi/pygi-repository.c |   39 ++---------
+ gi/pygi-struct.c     |   45 ++-----------
+ 4 files changed, 88 insertions(+), 210 deletions(-)
+
+commit 1efa2b12913b194d433c17014bc1077271a6ca32
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Aug 16 13:51:05 2010 -0400
+
+    some more p3k PyString and PyInt eradication in GI
+
+    * add the glib dir to the includes list in the build
+    * make sure we include the compat macros
+    * add GLIB_PyBytes_FromString to compat macros
+    * add GLIB_PyNumber_Long to compat macros
+    * use RichCompare instead of Compare
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/Makefile.am                     |    2 +-
+ gi/pygi-argument.c         |   96
+ ++++++++++++++++++++++++++-----------------
+ gi/pygi-boxed.c            |    1 +
+ gi/pygi-info.c                     |   13 ++++--
+ gi/pygi-private.h          |   23 ++++++++++
+ gi/pygi-repository.c       |    8 ++-
+ gi/pygi-struct.c           |    1 +
+ glib/pyglib-python-compat.h |   6 +++
+ 8 files changed, 103 insertions(+), 47 deletions(-)
+
+commit 6b902c66200c1684513a9ef31bdef3f2ff64e4fa
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Aug 20 09:28:57 2010 +0200
+
+    pyglib: Fix typo (Leo Singer)
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627408
+
+ glib/option.py |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 3cefffecc1317b6ad77a5ed936bfb990d16bf9d3
+Author: Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+Date:  Thu Aug 19 18:45:05 2010 -0300
+
+    Add defines for size_t and ssize_t conversion functions
+
+    These missing defines cause the resulting module to have unresolved
+    symbols, rendering it unusable.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627440
+
+ glib/pyglib-python-compat.h |   2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit d45c7031876f355e15409f00f3e50e77d18f8f4b
+Author: Colin Walters <walters@verbum.org>
+Date:  Thu Aug 19 17:50:35 2010 -0400
+
+    pyglib: Fix a compiler warning
+
+ glib/pyglib.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 0fe6828ddce187ac1897a1f02ca1c5480796d5b9
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Aug 18 20:36:51 2010 +0200
+
+    Don't force gtk 2.0
+
+ pygi-convert.sh |   11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+commit ac59c18a4f2bfff47c862b763aaf1d1cf136a4f5
+Author: Steve Frécinaux <code@istique.net>
+Date:  Tue Aug 17 14:49:30 2010 +0200
+
+    Fix some ref leaks in hook_up_vfunc_implementation()
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=627143
+
+ gi/gimodule.c |    9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 18ee0db673c2fa42244ab85950bbf4840edb674b
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Aug 12 12:16:31 2010 -0400
+
+    handle strings correctly in gio
+
+ gio/gappinfo.override |    5 +++++
+ gio/pygio-utils.c     |   42 +++++++++++++++++++++++++++++++++++-------
+ 2 files changed, 40 insertions(+), 7 deletions(-)
+
+commit 45ab0c03110c911b47519941dfd753326891b5e0
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Aug 11 16:13:59 2010 -0400
+
+    make giomodule compile under py3k
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gio/giomodule.c |  153
+ ++++++++++++++++++++++++++++---------------------------
+ 1 files changed, 78 insertions(+), 75 deletions(-)
+
+commit c52f8ed3ae8cb66a03b5695e980770c3f467f755
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Aug 11 16:04:48 2010 -0400
+
+    for py3k we need to do some more processing to get bytes from a
+    unicode string
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ gi/pygi-argument.c |  31 +++++++++++++++++++++++++++----
+ 1 files changed, 27 insertions(+), 4 deletions(-)
+
+commit de9eae4dfcce856a42cc5c569a5b9683c28d0eeb
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Aug 11 15:03:55 2010 -0400
+
+    use Bytes instead of Unicode when reading io
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ glib/pygiochannel.c |  30 ++++++++++++++++++++++++------
+ 1 files changed, 24 insertions(+), 6 deletions(-)
+
+commit 5824ff98175b749dbcfa72d24b994230b6e05377
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Aug 9 15:16:51 2010 -0400
+
+    prefix compat macros with PYGLIB
+
+    * refactor from John Ehresman <jpe@wingware.com> py3k branch
+    * fix up some extranious PyString calls
+    * remove duplicate macros from pyglib.h that are in
+    pyglib-python-compat.h
+    * pygobject.h can't import pyglib-python-compat.h so add codepaths
+      for both Py3k and legacy code instead of using macros
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ glib/glibmodule.c          |   48 +++++-----
+ glib/pygiochannel.c        |   46 +++++-----
+ glib/pyglib-python-compat.h | 153 +++++++++++++++++++++++-------
+ glib/pyglib.c              |   22 ++--
+ glib/pyglib.h              |   14 ---
+ glib/pygoptioncontext.c     |   4 +-
+ glib/pygsource.c           |   16 ++--
+ glib/pygspawn.c            |   32 +++---
+ gobject/gobjectmodule.c     | 216
+ +++++++++++++++++++++---------------------
+ gobject/pygboxed.c         |    2 +-
+ gobject/pygenum.c          |   84 +++++++++---------
+ gobject/pygflags.c         |  122 ++++++++++++------------
+ gobject/pygobject-private.h |  12 +-
+ gobject/pygobject.c        |   46 +++++-----
+ gobject/pygobject.h        |   23 +++++
+ gobject/pygparamspec.c      |  24 +++---
+ gobject/pygpointer.c       |    2 +-
+ gobject/pygtype.c          |  170 +++++++++++++++++-----------------
+ 18 files changed, 563 insertions(+), 473 deletions(-)
+
+commit 231e934cc01d061e81bb60d35127a133cd0e1793
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Aug 16 10:14:04 2010 +0200
+
+    Gtk.Button unit tests
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=622606
+
+ tests/test_overrides.py |   10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit f07cfde377e42686c6b80f56cac62338ee333e61
+Author: Johan Dahlin <johan@gnome.org>
+Date:  Mon Aug 16 10:08:38 2010 +0200
+
+    [Gtk] Add overrides for Button
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=622606
+
+ gi/overrides/Gtk.py |  13 +++++++++++++
+ 1 files changed, 13 insertions(+), 0 deletions(-)
+
+commit 65a06a7216163c7e65b32c5b5f3388faa7fda5d6
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Thu Aug 12 16:18:58 2010 +0200
+
+    Make Cairo an optional dependency
+
+    Add the --enable-cairo configure argument.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616732
+
+ configure.ac  |   15 ++++++++++++---
+ gi/Makefile.am |   20 ++++++++++++--------
+ 2 files changed, 24 insertions(+), 11 deletions(-)
+
+commit b83507263231d9bf47f6c8450583e3d03f0a3b5b
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Aug 16 09:55:35 2010 +0200
+
+    Don't import again PyGObject (John Ralls)
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=626996
+
+ gi/pygi.h |   1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 0dc3656070f496431829c6e8441ca17129c569f8
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Aug 9 16:11:55 2010 -0400
+
+    move to using richcompare slot instead of compare
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=615872
+
+ glib/pygiochannel.c    |   18 +++++++---
+ glib/pyglib.c          |   85
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ glib/pyglib.h          |    3 ++
+ glib/pygmaincontext.c  |   17 ++++++---
+ glib/pygmainloop.c     |   17 ++++++---
+ glib/pygoptioncontext.c |   18 ++++++----
+ glib/pygoptiongroup.c  |   22 +++++++-----
+ gobject/pygboxed.c     |   18 +++++++---
+ gobject/pygobject.c    |   44 +++++++++++++++++-------
+ gobject/pygparamspec.c  |   19 +++++++---
+ gobject/pygpointer.c   |   17 ++++++---
+ gobject/pygtype.c      |   26 +++++++++++---
+ 12 files changed, 233 insertions(+), 71 deletions(-)
+
+commit b426e531dc53d4b50e572a2da19733479635e662
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Thu Aug 12 18:09:33 2010 +0200
+
+    Replace autogen.sh by a newer version
+
+    It pulls automake 1.10 or 1.11.
+    Greatly inspired from GLib's.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625661
+
+ autogen.sh |  506
+ +++++++-----------------------------------------------------
+ 1 files changed, 58 insertions(+), 448 deletions(-)
+
+commit 769645e00d6d055a4cd802454dbfc1bbfcbee691
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Thu Aug 12 14:11:55 2010 +0200
+
+    Fix some warnings
+
+    pyglib.c: In function â€˜pyglib_gerror_exception_check’:
+    pyglib.c:362: warning: format not a string literal and no format
+    arguments
+    pyglib.c:371: warning: format not a string literal and no format
+    arguments
+
+    gio.override: In function 'pygio_notify_allocate_buffer':
+    gio.override:144:13: warning: format '%d' expects type 'int', but
+    argument 3
+    has type 'gsize'
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625437
+
+ gio/gio.override |    2 +-
+ glib/pyglib.c   |    4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit e4c4cccb588b258dbcd21702e6cddcfe9ebe4ffc
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Thu Aug 12 11:09:37 2010 +0200
+
+    Fix caller-allocates emergency free.
+
+    In the state, args, args[i], arg_infos[i], and arg_type_infos[i]
+    must not be
+    NULL in order to be able caller-allocates. This patch adds those
+    conditions.
+
+    Moreover, the interface info needs to be freed afterwards.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=626684
+
+ gi/pygi-invoke.c |    9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+commit 0ab967ca40ddcffc2834d4e656bb2010c6b9bdda
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Thu Aug 12 10:46:17 2010 +0200
+
+    Remove useless checks.
+
+    No need to check for state->arg_infos, state->arg_type_infos, and
+    state->args_is_auxiliary to be NULL, they are always allocated.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=626684
+
+ gi/pygi-invoke.c |   14 +++-----------
+ 1 files changed, 3 insertions(+), 11 deletions(-)
+
+commit e17be9cd288fee5d7cb174d9d577eb9279044c67
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Aug 10 17:40:16 2010 +0200
+
+    Call valgrind with G_SLICE=always-malloc G_DEBUG=gc-friendly
+
+ tests/Makefile.am |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 8be59c37dd57acc51875c7189ca09d728b729013
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:  Wed Aug 4 13:43:17 2010 +0200
+
+    Fix some warnings.
+
+ gi/pygi-argument.c |   2 --
+ gi/pygi-invoke.c   |   2 +-
+ gi/pygi-struct.c   |   1 -
+ 3 files changed, 1 insertions(+), 4 deletions(-)
+
+commit 529eca6054e9a7e2267f1529e317c2373932762f
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Fri Jul 30 22:39:40 2010 +0200
+
+    Add myself as a maintainer
+
+ MAINTAINERS |   4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit caac75a6ed6f671b37e38a78e71b87906a00ac1b
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Jul 30 14:14:16 2010 +0200
+
+    Properly allocate boxed structs that are (caller-allocates)
+
+    * gi/pygi-boxed.[hc]: Refactor out the allocation of boxed structs
+    * gi/pygi-invoke.c: Don't use g_malloc0 for boxed structs that
+      are (caller-allocates)
+    * tests/test_overrides.py: Split the TreeView tests
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625653
+
+ gi/pygi-boxed.c        |   50
+ +++++++++++++++++++++++++++++++----------------
+ gi/pygi-boxed.h        |   10 +++++---
+ gi/pygi-invoke.c       |   16 +++++---------
+ tests/test_overrides.py |   39 +++++++++++++++++------------------
+ 4 files changed, 64 insertions(+), 51 deletions(-)
+
+commit 99c7322898c00a576c7319ea0a7c808446253133
+Author: Toms Baugis <toms.baugis@gmail.com>
+Date:  Fri Jul 30 15:44:21 2010 +0200
+
+    override gdk.Event to return attribute from the proper event object
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620593
+
+ gi/overrides/Gdk.py    |   48
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-invoke.c       |    4 ---
+ tests/test_overrides.py |   10 +++++++++
+ 3 files changed, 58 insertions(+), 4 deletions(-)
+
+commit 55814e722c2ae11310f346790c9221e4fad92b50
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Jul 30 06:30:48 2010 -0400
+
+    check if z# needs an int or Py_ssize_t
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625438
+
+ gio/gio.override |    5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 477315465d0a6d84b51e146e86e254873bc564ff
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Jul 30 06:43:06 2010 -0400
+
+    make sure we parse parameters to python object vars not glib vars
+
+    * py_flags was already set up but due to a typo &flags was being
+    passed
+      instead
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625438
+
+ gio/gfile.override |   8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit faa7d4eece7ddb698725098970c2478a3b45c4d5
+Author: Paul Bolle <pebolle@tiscali.nl>
+Date:  Fri Jul 30 10:56:01 2010 +0200
+
+    Make an example and a demo work out of the box
+
+    cairo-demo.py and gtk-demo.py need the two (kind of) magic lines
+    regarding pygtk to work out of the box. So add those.
+
+    Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625638
+
+ demos/gtk-demo/gtk-demo.py |   2 ++
+ examples/cairo-demo.py     |   2 ++
+ 2 files changed, 4 insertions(+), 0 deletions(-)
+
+commit c9da5782e6c633d9af43ee85075e9ee65db09780
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Jul 9 13:14:42 2010 -0400
+
+    make sure caller allocated structs are freed when they go out of scope
+
+    * Move struct transfer checks from pygi-arguments to pygi-invoke
+    * add better warning if an unknown struct is fully transfered
+    * only free GValues we create in the invoke cleanup.  All other
+    structs
+      get cleaned up when they go out of scope in python
+    * Fixes issues with caller allocated treeiters getting freed to early
+    * this is a fix to crashes in the current test suite when API's
+    returning
+      TreeIters were annotated as out caller-allocates so no new tests
+      are needed
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=623969
+
+ gi/pygi-argument.c |  13 +++++--------
+ gi/pygi-invoke.c   |  46 ++++++++++++++++++++++++++++++++++++++++------
+ 2 files changed, 45 insertions(+), 14 deletions(-)
+
+commit e0a85305cd107aae5902e524afd074cd8c329927
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Jul 30 10:35:33 2010 +0200
+
+    Revert "override gdk.Event to return attribute from the proper
+    event object."
+
+    Pushed by mistake, we still need testcases
+
+    This reverts commit e7bb3954880568884ca66e7751ede689dc2f24f6.
+
+ gi/overrides/Gdk.py |  44 --------------------------------------------
+ 1 files changed, 0 insertions(+), 44 deletions(-)
+
+commit 61ffb8d6d08fcfe638f71ea97ceac3a366e5536d
+Author: Paul Bolle <pebolle@tiscali.nl>
+Date:  Thu Jul 29 22:55:28 2010 +0200
+
+    PyGI: properly quit cairo-demo
+
+    Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625619
+
+ examples/cairo-demo.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e7bb3954880568884ca66e7751ede689dc2f24f6
+Author: Toms Baugis <toms.baugis@gmail.com>
+Date:  Tue Jul 27 21:37:16 2010 +0200
+
+    override gdk.Event to return attribute from the proper event object.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620593
+
+ gi/overrides/Gdk.py |  44 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 44 insertions(+), 0 deletions(-)
+
+commit 0a9f1da052fd33dcef81d0e267fc7972f02c7888
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Wed Jul 28 14:56:00 2010 +0200
+
+    Clean and improve the test infrastructure
+
+    To run select tests, use for instance:
+    % make check TEST_NAMES='test_everything test_gi.TestConstant'
+
+    It works with check.gdb and check.valgrind too.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625488
+
+ Makefile.am               |    5 ---
+ tests/Makefile.am         |   65
+ ++++++++++++++++++++-----------------------
+ tests/common.py           |   47 -------------------------------
+ tests/runtests.py         |   43 +++++++++++------------------
+ tests/test_gcancellable.py |   4 +-
+ tests/test_gi.py          |    3 --
+ tests/test_gicon.py       |    3 +-
+ tests/test_gio.py         |    3 +-
+ tests/test_gobject.py     |    3 +-
+ tests/test_gresolver.py    |   4 +-
+ tests/test_gsocket.py     |    4 ++-
+ tests/test_interface.py    |   6 +++-
+ tests/test_mainloop.py     |  11 +++-----
+ tests/test_signal.py      |    4 ++-
+ tests/test_source.py      |    4 +-
+ tests/test_subprocess.py   |   5 +---
+ tests/test_thread.py      |    5 +++-
+ tests/test_unknown.py     |    5 +++-
+ 18 files changed, 82 insertions(+), 142 deletions(-)
+
+commit 82f4cb5ebf5d992493b7a2f74cfd5f175e19eb76
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jul 29 12:34:19 2010 +0200
+
+    Add some more transformations to pygi-convert.sh
+
+ pygi-convert.sh |   37 +++++++++++++++++++++++++++++--------
+ 1 files changed, 29 insertions(+), 8 deletions(-)
+
+commit de519adcd21947a0aef7932cdecb78cef200c85e
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Jul 28 14:42:36 2010 +0200
+
+    Adapt to API changes: g_irepository_enumerate_versions
+
+ gi/importer.py       |    2 +-
+ gi/pygi-repository.c |   12 ++++++------
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 01cd9abb43f93f9a57a5a05b6dc9560614e666e3
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Jul 28 12:26:48 2010 +0200
+
+    Add GValue<->GArgument marshalling for some more types
+
+ gi/pygi-property.c |  37 ++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 36 insertions(+), 1 deletions(-)
+
+commit ddffa70c3ee0e837070f390632bc692430f79171
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Jul 28 11:10:42 2010 +0200
+
+    Chain up with the non-introspection implementation for properties
+    if needed
+
+ gobject/pygobject.c |   7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 045433a1f8167205dc8eae613dcb8835d02c8916
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Jul 28 10:59:49 2010 +0200
+
+    Improve error reporting for missing attributes in introspection
+    modules
+
+ gi/module.py |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 6655a79b2f13fe417aefdf6aebab0f2d6162ba00
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Jul 27 21:52:49 2010 +0200
+
+    Implement getting and setting properties using introspection
+    information.
+
+    This allows us to use information not present in GObject such as
+    transfer and element types.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620808
+
+ gi/Makefile.am                  |    2 +
+ gi/gimodule.c           |    2 +
+ gi/pygi-argument.c      |    2 +
+ gi/pygi-private.h       |    1 +
+ gi/pygi-property.c      |  226
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-property.h      |   39 ++++++++
+ gi/pygi.h               |   41 +++++++++
+ gobject/pygobject.c     |    9 ++
+ tests/test_everything.py |   19 ++++
+ 9 files changed, 341 insertions(+), 0 deletions(-)
+
+commit 85f4572b3ffbfa364ebb2e470eab759edc557b36
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Jul 27 21:32:41 2010 +0200
+
+    Readd Gdk.Rectangle override for Gtk-2.0
+
+ gi/overrides/Gdk.py |  19 +++++++++++++++++++
+ 1 files changed, 19 insertions(+), 0 deletions(-)
+
+commit 2082ee35e2a33f52bf1e8ec49cb4a43398e91989
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Jul 27 18:25:27 2010 +0200
+
+    Allow specifying a version when loading a typelib
+
+    * gi/importer.py: Defer loading the typelib until first usage.
+    * gi/module.py: Load the typelib in IntrospectionModule().
+    * gi/overrides/*.py: Adapt to API change.
+    * gi/pygi-repository.c: Add wrappers for g_irepository_enumerate and
+      g_irepository_get_version.
+
+ gi/importer.py                            |   26 +++++----------
+ gi/module.py                      |   58
+ +++++++++++++++++++++++------------
+ gi/overrides/GIMarshallingTests.py |   2 +-
+ gi/overrides/Gdk.py               |    2 +-
+ gi/overrides/Gtk.py               |    2 +-
+ gi/pygi-repository.c              |   56
+ ++++++++++++++++++++++++++++++++++-
+ 6 files changed, 105 insertions(+), 41 deletions(-)
+
+commit 6d7ed6c322234c240b1063a1dfaadd17157432a9
+Author: Jonathan Matthew <jonathan@d14n.org>
+Date:  Tue Jul 13 20:27:28 2010 +1000
+
+    treat GFreeFunc as equivalent to GDestroyNotify when scanning
+    callbacks
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=624232
+
+ gi/pygi-callbacks.c |   3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 7e9cbd5601ad548b78d106bac1a1576d33b91c65
+Author: Simon van der Linden <svdlinden@gnome.org>
+Date:  Mon Jul 26 17:00:23 2010 +0200
+
+    Don't use == to compare doubles, use <= and =>.
+
+    This avoids inequality due to small precisions difference.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625326
+
+ tests/testhelpermodule.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5ca2a41f16f4a5fcc3ab4d00bec46b077c7eb384
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jul 8 11:36:12 2010 +0200
+
+    Allow passing ints as enum args
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=622584
+
+ gi/pygi-argument.c |  23 +++++++++++++++++++++--
+ tests/test_gi.py   |   6 ++++--
+ 2 files changed, 25 insertions(+), 4 deletions(-)
+
+commit 890c3233f8a9f884b045a294bf0122bb3afcd54a
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Sun Jul 25 17:30:40 2010 +0100
+
+    Make error message less ambiguous
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=625095
+
+ gi/pygi-callbacks.c |   3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 1162e436273ff8e9e4e24bd8ba74615fd4624753
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Jun 24 10:07:12 2010 -0400
+
+    fix passing in type names as a GType and add gtype unit tests
+
+    * a simple call to pyg_type_from_object covers all the bases
+    * added unit tests to check for correct GType value passing
+    * fixed up tree override tests to also check different ways of
+    passing GTypes
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=622605
+
+ gi/pygi-argument.c      |    8 +-------
+ tests/test_everything.py |   27 +++++++++++++++++++++++++++
+ tests/test_overrides.py  |    6 ++----
+ 3 files changed, 30 insertions(+), 11 deletions(-)
+
+commit 8becd32fc042445d62b885bac12dac326b2dc1fa
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jul 26 11:54:47 2010 +0200
+
+    Increase a bit verbosity of tests so people know which test failed
+
+ tests/runtests.py |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3b3c63514f311592e6769a373d37a2bde7ea6b38
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jul 15 15:17:53 2010 +0200
+
+    Actually add the files for GVariant foreign structs
+
+ gi/pygi-foreign-gvariant.c |  63
+ ++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-foreign-gvariant.h |  41 ++++++++++++++++++++++++++++
+ 2 files changed, 104 insertions(+), 0 deletions(-)
+
+commit e65275bc57f345c111eb12a6b4476ff1ddc3bc24
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jul 15 13:31:33 2010 +0200
+
+    Add foreign struct support for GVariant
+
+     * gi/pygi-invoke.c: Wrap foreign structs returned by constructors
+     * gi/pygi-foreign.c: Register foreign support for GVariant
+     * gi/pygi-struct.c: properly release foreign structs
+     * gi/pygi-argument.c, gi/pygi-foreign-cairo.c, gi/pygi.h: Adapt to
+     API changes
+     * tests/test_everything.py: Add basic tests for GVariant
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=619501
+
+ gi/Makefile.am                  |    2 +
+ gi/pygi-argument.c      |    2 +-
+ gi/pygi-foreign-cairo.c  |   16 +++---
+ gi/pygi-foreign.c       |  107
+ ++++++++++++++++++++++++++++-----------------
+ gi/pygi-foreign.h       |    7 +--
+ gi/pygi-invoke.c        |   18 ++++----
+ gi/pygi-struct.c        |   10 ++++-
+ gi/pygi.h               |    9 ++--
+ tests/test_everything.py |    8 +++
+ 9 files changed, 110 insertions(+), 69 deletions(-)
+
+commit 3b3bd4da3fbc993fa7f7cfb46ed4e67671c94cc0
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jul 12 11:19:06 2010 +0200
+
+    Add HACKING to MANIFEST.in
+
+ MANIFEST.in |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 40bf08ff001b119c7daf709197005ef6480216c5
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jul 12 11:18:04 2010 +0200
+
+    Add HACKING file with instructions for releasing
+
+ HACKING |   14 ++++++++++++++
+ 1 files changed, 14 insertions(+), 0 deletions(-)
+
+commit 3b9dffe7cc3820dfb84fd968fc604899601c5dc4
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jul 12 11:09:58 2010 +0200
+
+    Post release version bump to 2.21.6
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 42a5a0897b38156ae010c396ea254abf502f35de
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jul 12 11:00:29 2010 +0200
+
+    Update NEWS and release PyGObject-2.21.5
+
+ NEWS |   17 +++++++++++++++++
+ 1 files changed, 17 insertions(+), 0 deletions(-)
+
+commit 5857f25c1c6e25b79e6134558bd7151bc6c30ef7
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jul 12 11:00:20 2010 +0200
+
+    Pre-release version bump to 2.21.5
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e500adc3ac19ef6f436809e5a8828ac7e8db28f6
+Author: Florian Müllner <florian.muellner@gmail.com>
+Date:  Sat Jul 10 22:35:13 2010 +0200
+
+    Shut up some compiler warnings
+
+    Remove unused variables, make sure variables are properly initialized.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=624066
+
+ gi/pygi-callbacks.c |   1 -
+ gi/pygi-closure.c   |   2 +-
+ gi/pygi-invoke.c    |   1 -
+ 3 files changed, 1 insertions(+), 3 deletions(-)
+
+commit 2efa18afbcc2fac1c90958535b2f80e6e730ee56
+Author: =?UTF-8?q?Florian=20M=C3=BCllner?= <florian.muellner@gmail.com>
+Date:  Mon Jul 12 10:31:42 2010 +0200
+
+    Adjust to API break in GObject-Introspection
+
+    As of commit 5cb925b20, many type_tags for standard C types have
+    been removed - namely machine-dependent integer types and derived
+    types (size_t, time_t).
+
+    Most removals are just synonyms of other types, so their removal
+    should not have too much impact, with the exception of time_t,
+    which was translated to a native datetime object before.
+
+    Also remove time_t tests (Tomeu Vizoso).
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=624065
+
+ configure.ac      |    2 +-
+ gi/importer.py     |   7 ++-
+ gi/pygi-argument.c |  146
+ ----------------------------------------------------
+ gi/pygi-closure.c  |  10 ----
+ gi/pygi-info.c     |  37 -------------
+ tests/test_gi.py   |  21 --------
+ 6 files changed, 5 insertions(+), 218 deletions(-)
+
+commit 27a417c71f8c122e46c7472663bb25c17413f103
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Jul 8 16:01:25 2010 -0400
+
+    pass in the demo app so demos can use utility methods like requesting
+    file paths
+
+ demos/gtk-demo/demos/Entry/entry_buffer.py    |    2 +-
+ demos/gtk-demo/demos/Entry/entry_completion.py |    2 +-
+ demos/gtk-demo/demos/appwindow.py             |   13 +++++++++++--
+ demos/gtk-demo/demos/assistant.py             |    2 +-
+ demos/gtk-demo/demos/builder.py               |   14 ++++++++++----
+ demos/gtk-demo/demos/button_box.py            |    2 +-
+ demos/gtk-demo/demos/clipboard.py             |    8 +-------
+ demos/gtk-demo/demos/colorselector.py         |    2 +-
+ demos/gtk-demo/demos/combobox.py              |    8 +++++---
+ demos/gtk-demo/demos/drawingarea.py           |    2 +-
+ demos/gtk-demo/demos/test.py                  |    2 +-
+ demos/gtk-demo/gtk-demo.py                    |    6 +++---
+ 12 files changed, 37 insertions(+), 26 deletions(-)
+
+commit e7daae919c2c6ae35d3927f0006252aacd49ea86
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Jul 8 15:38:07 2010 -0400
+
+    demo fixes to keep up with Gtk+
+
+    * treeiter changes to reflect caller-allocate annotations
+    * fix some flag handling
+    * use get_indicies_with_depth instead of get_indices for paths
+
+ demos/gtk-demo/demos/appwindow.py |   10 +++++++---
+ demos/gtk-demo/demos/combobox.py  |   24 ++++++++++++------------
+ demos/gtk-demo/gtk-demo.py       |   13 +++++--------
+ 3 files changed, 24 insertions(+), 23 deletions(-)
+
+commit 3d9fd6391710cc33058394d6821e4d4e11f09b22
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Jul 8 12:54:43 2010 -0400
+
+    override test fixes for new GTK+ annotations
+
+ tests/test_overrides.py |   23 +++++++++++++----------
+ 1 files changed, 13 insertions(+), 10 deletions(-)
+
+commit 7a400f8139b70ddfe7c949035e0851689951c647
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:  Thu Jul 8 12:42:25 2010 +0200
+
+    Fix warning.
+
+ gi/pygi-argument.c |   4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 39fd0a85a3de06b1b877d1125f91036409886373
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Jul 7 15:48:36 2010 -0400
+
+    fix up treeiter usage due to caller-allocates annotations in gtk+
+
+    * we still don't pass tests because the caller-allocates code path
+    does not
+      handle the case where the parameter is followed by a regular
+      in parameter
+
+ gi/overrides/Gtk.py    |    7 +++----
+ tests/test_overrides.py |   21 +++++++++++----------
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+commit 4d970b75dc5c75c1bec04cb2954c9985b476070c
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Jul 6 17:50:10 2010 -0400
+
+    add entry completion demo
+
+ demos/gtk-demo/demos/Entry/entry_completion.py |   87
+ ++++++++++++++++++++++++
+ 1 files changed, 87 insertions(+), 0 deletions(-)
+
+commit f3531eaa1bfa4e01651d35cd587384d30a398ba8
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Jul 6 17:49:18 2010 -0400
+
+    string changes
+
+ demos/gtk-demo/demos/Entry/entry_buffer.py |   4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit baf1e9bb550c7bf45e2ac0b70ba29c434ef1ccc6
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Jul 6 17:27:04 2010 -0400
+
+    add the Entry demo directory and the entry_buffer demo
+
+ demos/gtk-demo/demos/Entry/entry_buffer.py |  73
+ ++++++++++++++++++++++++++++
+ 1 files changed, 73 insertions(+), 0 deletions(-)
+
+commit f2b1d222120f055bec9339cca55c9cc90f538c00
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Jul 6 17:26:03 2010 -0400
+
+    fix loading of demo modules to support sub modules
+
+ demos/gtk-demo/gtk-demo.py |   9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 4f9390fb1892b13ab2ea00ed66c5000a40f09029
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Jul 6 15:56:34 2010 -0400
+
+    add the ability to have demos in sub catagories
+
+ demos/gtk-demo/gtk-demo.py |  76
+ +++++++++++++++++++++++++++++++-------------
+ 1 files changed, 54 insertions(+), 22 deletions(-)
+
+commit dc2249a3ecf339008351316217191d0551ccc588
+Author: Jose Aliste <jaliste@src.gnome.org>
+Date:  Mon Jul 5 14:36:59 2010 -0400
+
+    Add  __name__ to DynamicModule class.
+
+    Fixes bug #623486.
+
+ gi/module.py |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 2357bca8d14539894b6bd0acfdc18d30b4bb4db6
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:  Mon Jul 5 16:11:07 2010 +0200
+
+    Do not override GdkRectangle.
+
+    This class was lately removed from gtk+ 3, so there is no need
+    to override
+    it anymore.
+
+ gi/overrides/Gdk.py |  19 -------------------
+ 1 files changed, 0 insertions(+), 19 deletions(-)
+
+commit daca09dc2c2306d4fa82a68bbdd147d4b170a1e7
+Author: Philip Withnall <philip.withnall@collabora.co.uk>
+Date:  Tue Jun 29 16:37:36 2010 +0100
+
+    Add override for TreeModel implementing __len__()
+
+    Closes: bgo#622882
+
+ gi/overrides/Gtk.py    |   11 +++++++++--
+ tests/test_overrides.py |    5 +++++
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+commit bb8adb7f02f0c5494df2cb6e535e44d23902e8f5
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Jun 29 11:27:13 2010 +0200
+
+    Update NEWS and release PyGObject-2.21.4
+
+ NEWS |   27 +++++++++++++++++++++++++--
+ 1 files changed, 25 insertions(+), 2 deletions(-)
+
+commit 2d473ee17be4671244bb4a2a0953a21ccf2a0df6
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Jun 29 10:55:03 2010 +0200
+
+    Remove files from the makefiles
+
+ gi/Makefile.am      |   4 +---
+ gobject/Makefile.am |   3 +--
+ 2 files changed, 2 insertions(+), 5 deletions(-)
+
+commit 89827314fd183eac07443c8e9d275ca9d4ce59df
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Jun 29 10:27:39 2010 +0200
+
+    Build the cairo shim as a python module so the _gi module stops
+    linking to it
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=623021
+
+ configure.ac           |    2 +
+ gi/Makefile.am                 |   38 +++++++++-----
+ gi/gimodule.c          |    8 +---
+ gi/pygi-argument.c     |   10 +---
+ gi/pygi-foreign-cairo.c |   56 ++++++++++++++++-----
+ gi/pygi-foreign-cairo.h |   55 ---------------------
+ gi/pygi-foreign.c      |  125
+ ++++++++++++++++++++++++++++-------------------
+ gi/pygi-foreign.h      |   31 +++++------
+ gi/pygi.h              |   40 +++++++++++++--
+ 9 files changed, 196 insertions(+), 169 deletions(-)
+
+commit a6a90551311bc64f037cbd442e13f70c30060871
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jun 28 14:20:43 2010 +0200
+
+    Remove pygi-external.h
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=623021
+
+ gi/gimodule.c          |    8 +++---
+ gi/pygi-type.c                 |    4 +-
+ gi/pygi-type.h                 |    2 +-
+ gi/pygi.h              |   54 +++++++++++++++----------------------
+ gobject/Makefile.am    |    6 ++++
+ gobject/pygboxed.c     |    2 +-
+ gobject/pygenum.c      |    2 +-
+ gobject/pygflags.c     |    2 +-
+ gobject/pygi-external.h |   67
+ -----------------------------------------------
+ gobject/pygobject.c    |    2 +-
+ gobject/pygpointer.c   |    2 +-
+ 11 files changed, 40 insertions(+), 111 deletions(-)
+
+commit 8b3a3baacb45cb3f9112f7597607602fa89c6634
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Jun 25 13:54:57 2010 +0200
+
+    Revert "correctly handle floating objects in gtk"
+
+    This reverts commit 60fdf4b8f738dd0f5c190bc18ddf010032d3c5ca.
+
+    Conflicts:
+
+       gi/gimodule.c
+       tests/test_everything.py
+
+ gi/gimodule.c           |   13 -------------
+ tests/test_everything.py |    3 ++-
+ 2 files changed, 2 insertions(+), 14 deletions(-)
+
+commit 0f2a09d7eae63abb71723b7cd8fb290dcba33426
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Jun 25 13:49:04 2010 +0200
+
+    Make valgrind happy again
+
+    * gi/pygi-argument.c, gi/pygi-info.c: Zero two GArgument instances.
+    * gi/pygi-invoke.c: workaround bgo#622711 and zero invocation_state.
+
+ gi/pygi-argument.c |   1 +
+ gi/pygi-info.c     |   2 ++
+ gi/pygi-invoke.c   |   8 ++++++--
+ 3 files changed, 9 insertions(+), 2 deletions(-)
+
+commit 63afe55906c8637e913783e65b82b540b81bed65
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Jun 24 16:13:37 2010 -0400
+
+    add drawing area demo
+
+ demos/gtk-demo/demos/drawingarea.py | 249
+ +++++++++++++++++++++++++++++++++++
+ 1 files changed, 249 insertions(+), 0 deletions(-)
+
+commit 8bba5f842393a284367cdd15f3d32a8c7745516a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Jun 24 14:11:00 2010 -0400
+
+    sort the demo list
+
+ demos/gtk-demo/gtk-demo.py |   2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit b9da82742701ed276b01dee39626cd71cbef8556
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Jun 24 13:56:18 2010 -0400
+
+    rename iter to treeiter so we aren't using a python reserved word
+
+ demos/gtk-demo/gtk-demo.py |  12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit c93935621f2fb1ff5e8c424ae884bd684ea68e50
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Jun 24 13:47:54 2010 -0400
+
+    Fixup for change in buffer API
+
+    * Part of buffer API dealing with TextIter now marked (out
+    caller-allocates)
+
+ demos/gtk-demo/gtk-demo.py |  10 ++++------
+ 1 files changed, 4 insertions(+), 6 deletions(-)
+
+commit 8d9516a593a515290109401a9db7aa259b5aa35c
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Jun 23 17:04:33 2010 -0400
+
+    add ListStore, TreeStore and TreeViewColumn APIs
+
+    * this is enough to support the gtk-demo.py shell
+    * TreeStore and ListStore allow passing in as an argument list
+      of either python or GLib types to the constructor as a description
+      of the columns in the model
+    * TreeStore and ListStore override the append method, allowing
+      the application developer to send in a list of column values
+      for one row in the model.  Unlike the append in C which
+      just returns an iter that you can then add data to,
+      this append actualy appends data in one step
+    * TreeViewColumn overrides the constructor to allow the adding
+      of attributes and a cell renderer when constructing the
+      column
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620405
+
+ gi/overrides/Gtk.py    |   59 ++++++++++++++++++++++++++++++++++++++++
+ tests/test_overrides.py |   69
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 128 insertions(+), 0 deletions(-)
+
+commit c305fbeb7bdb44623d5198f4a8f0a374d529fdf4
+Author: Johan Dahlin <johan@gnome.org>
+Date:  Wed Jun 23 14:34:28 2010 -0300
+
+    [gi] Add -I../gobject to cflags
+
+    Since we're no longer pulling in pygobject cflags,
+    add this to be able to include pygobject.h
+
+ gi/Makefile.am |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 53a093198851e3ba5abd1f6c3314737decd401d8
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date:  Wed Jun 23 18:09:19 2010 +0200
+
+    Add unit test for add_actions user data.
+
+ tests/test_overrides.py |   20 +++++++++++++++-----
+ 1 files changed, 15 insertions(+), 5 deletions(-)
+
+commit 7f829af620cba768de619dd9f228d5d2ebf7fee4
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Wed Jun 23 18:06:46 2010 +0200
+
+    Pass user_data param when adding actions
+
+ gi/overrides/Gtk.py |  12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 8f537ccd62f41ebe0db3853e2ae08080666f598f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Jun 23 12:02:04 2010 -0400
+
+    add an exception type to the try/except block
+
+    * we should always specify what exception types we are expecting
+
+ gi/overrides/Gtk.py |   6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit f140a8ebf59347162b67b550bd6f62d2eafad29a
+Author: Johan Dahlin <johan@gnome.org>
+Date:  Wed Jun 23 12:31:51 2010 -0300
+
+    Avoid duplicating required versions
+
+    Avoid duplicating the version of all required packages.
+    Also remove cyclic dependency of pygobject
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=622503
+
+ configure.ac |    9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+commit e8bd25355fbe7de38a28b7a0583167a2c0ffc31f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Jun 22 15:03:08 2010 -0400
+
+    return PyList instead of PyTuple for array, return empty list for
+    NULL arrays
+
+    * returns an empty list when a NULL array (empty array) is encountered
+    * fix tests to check for lists instead of tuples or None
+    * test the ability to send in both None and empty list for arrays
+    and lists
+
+ gi/pygi-argument.c      |    7 ++--
+ tests/test_everything.py |    5 ++-
+ tests/test_gi.py        |   84
+ +++++++++++++++++++++++-----------------------
+ 3 files changed, 49 insertions(+), 47 deletions(-)
+
+commit f312e6a49505eca07815146cfbdb0e48e5b3b8a8
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Jun 23 15:42:29 2010 +0200
+
+    Fix 'make distcheck'
+
+     * Makefile.am: put the tests dir to the end
+     * g*/Makefile.am: build the .so when running make check
+     * tests/Makefile.am: Don't pass the src dir to runtests.py and
+       remove (hopefully) unneeded cruft.
+     * tests/common.py: Don't add the src dir to the python path
+     * tests/runtests.py: Don't pass the src dir to common.py
+
+ Makefile.am        |    4 +++-
+ gi/Makefile.am      |   1 +
+ gio/Makefile.am     |   1 +
+ glib/Makefile.am    |   2 +-
+ gobject/Makefile.am |   1 +
+ tests/Makefile.am   |  17 ++---------------
+ tests/common.py     |   3 +--
+ tests/runtests.py   |  12 +++++-------
+ 8 files changed, 15 insertions(+), 26 deletions(-)
+
+commit 5f82e7d2909cbbbecbf5dbee2342f516c0d1f371
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Jun 23 13:59:14 2010 +0200
+
+    Allow building pygobject without introspection support by providing
+    --disable-introspection to configure.
+
+ Makefile.am            |    6 +++++-
+ configure.ac           |   15 ++++++++-------
+ gobject/pygi-external.h |    4 ++--
+ tests/Makefile.am      |    8 ++++++--
+ tests/runtests.py      |   21 +++++++--------------
+ 5 files changed, 28 insertions(+), 26 deletions(-)
+
+commit cc3ea77318ee572673d2a044deca9001366b0f08
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Jun 23 12:26:51 2010 +0200
+
+    Make sure that sys.argv is a list and not a sequence.
+
+    Because Python's optparse will try to do things on it that can
+    only be done with list.
+
+ gi/overrides/Gtk.py |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3d72b8248cc534a689dee5679a729b2fba56c528
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Jun 23 12:26:02 2010 +0200
+
+    Force loading the GObject typelib so we have available the wrappers
+    for base classes such as GInitiallyUnowned.
+
+ gi/__init__.py |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit c7c94ef349c30597f2f10d90f74718d678ec7add
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Jun 22 14:45:48 2010 -0400
+
+    we shouldn't g_array_free NULL pointers
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=622425
+
+ gi/pygi-info.c |    5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit fb1ee243493616d7a7e4f6924c574db39f5a423d
+Merge: acf7b43 5f9cb91
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed Jun 23 12:53:05 2010 +0200
+
+    Merge branch 'pygi'
+
+commit 5f9cb91c2b3851056d5e2d7ff1401d4ce2be7c1f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Jun 22 15:39:46 2010 -0400
+
+    remove unneeded TextIter creation in the tests
+
+ tests/test_overrides.py |    3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+commit 53c355d2cc0894e7f551e9b4eb719b89188a978e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Jun 21 11:42:12 2010 -0400
+
+    add override for TextBuffer
+
+    * TextBuffer.create_tag takes vargs which we can't bind yet so
+    change it
+      to except a keyword list of properties
+    * override the insert* methods so the developer does not have to
+    enter a length
+      - lengths are already encapsulated by a string in Python
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620583
+
+ gi/overrides/Gtk.py    |   51
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_overrides.py |   25 +++++++++++++++++++++++
+ 2 files changed, 76 insertions(+), 0 deletions(-)
+
+commit 1d89a88b212c7411ad28e74eda80ae751de92e50
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Jun 22 12:46:39 2010 -0400
+
+    fix up some build issues
+
+    * configure.ac: moved AM_PROG_CC_C_O below AM_PROG_CC_STDC because
+    autoconf
+      was complaining that AM_PROG_CC_STDC can't come after AM_PROC_CC_C_0
+    * tests/Makefile.am: fix check-local target to use EXEC_NAME so
+    targets like
+      make check.gdb work
+
+ configure.ac     |    2 +-
+ tests/Makefile.am |   2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 4fe0d94c219deb69a2309693202309c53a0e5e69
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Jun 22 11:50:30 2010 -0400
+
+    make the overrides file git friendly by appending to __all__ after
+    each override
+
+    * modifying the __all__ line for each override would confuse git as
+      each override needs to get seperate approval before comitting.
+      Because of
+      this commits would not always go in in the same order as they
+      are created.
+      Also different people working on the same file would start from
+      different
+      commit states.  This caused conflicts when patches were merged.
+    * instead of modifying a single hard coded list we now append to
+    the list
+      after each override.  This creates distinct blocks of changed text
+      which will not conflict
+
+ gi/overrides/GIMarshallingTests.py |  10 ++++------
+ gi/overrides/Gdk.py               |    8 ++++----
+ gi/overrides/Gtk.py               |    7 +++++--
+ 3 files changed, 13 insertions(+), 12 deletions(-)
+
+commit 49321b934603e1ec69fb04082c63902970907d2b
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Sun Jun 20 13:27:34 2010 +0200
+
+    Override Dialog constructor and add_buttons method
+
+ gi/overrides/Gtk.py    |   46
+ +++++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_overrides.py |   16 ++++++++++++++++
+ 2 files changed, 61 insertions(+), 1 deletions(-)
+
+commit acf7b43a41ce814f0c57ce609a090826f04771db
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jun 21 18:17:38 2010 +0200
+
+    Post release version bump to 2.21.4
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a7fa8b80406227a06cf18f8675dbc1f471283829
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jun 21 18:10:32 2010 +0200
+
+    Update NEWS and release PyGObject-2.21.3
+
+ NEWS |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 79acac7b86ec52cd3681d94d7f116314c3f00167
+Author: Ludovic L'Hours <ludovic.lhours@gmail.com>
+Date:  Tue Jul 21 16:28:34 2009 +0200
+
+    Proper handling of null-ok in virtual methods
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=589253
+
+ codegen/codegen.py       |    2 ++
+ codegen/reversewrapper.py |   18 +++++++++++++++---
+ 2 files changed, 17 insertions(+), 3 deletions(-)
+
+commit 259a4b08f009aa01451caed20dbb6e68b402da2a
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jun 21 17:34:54 2010 +0200
+
+    Add *~ and *.orig to .gitignore
+
+ .gitignore |   5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+commit 00a85f6a844714d1715e2f67431747d1a4cdacb1
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jun 21 17:33:56 2010 +0200
+
+    Fall back to use the floating references API in glib if there isn't
+    a sinkfunc defined.
+
+    * tests/*: Add ref counting tests for floating objects
+    * gobject/gobjectmodule.c, gobject/pygobject.c: Fall back to
+    g_object_ref_sink
+      or g_object_ref if there isn't a sinkfunc defined. Make sure that
+      pygobject_sink gets called only once per GObject instance.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=583909
+
+ gobject/gobjectmodule.c  |    2 -
+ gobject/pygobject.c     |   50 +++++++++++++--------
+ gobject/pygobject.h     |    1 +
+ tests/Makefile.am       |    2 +
+ tests/test-floating.c   |   95 ++++++++++++++++++++++++++++++++++++++++
+ tests/test-floating.h   |   60 +++++++++++++++++++++++++
+ tests/test_gobject.py   |   19 ++++++++-
+ tests/testhelpermodule.c |  109
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ 8 files changed, 315 insertions(+), 23 deletions(-)
+
+commit e71238a699ae783fd1a59c8a76e3555d8066cf82
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon Jun 21 13:06:13 2010 +0200
+
+    Revert "Drop sinkfuncs."
+
+    This reverts commit 04627488220b4f2a16e11f8982af7866fea9f7eb.
+
+ gobject/gobjectmodule.c |    3 ++-
+ gobject/pygobject.c    |   42 ++++++++++++++++++++++++++++++++++--------
+ gobject/pygobject.h    |    1 -
+ 3 files changed, 36 insertions(+), 10 deletions(-)
+
+commit b2661054d6bde673484eab472e69ca021124528d
+Author: Johan Dahlin <johan@gnome.org>
+Date:  Sun Jun 20 11:09:57 2010 -0300
+
+    Merge back pygi
+
+    For reasons outlined at:
+    http://mail.gnome.org/archives/python-hackers-list/2010-June/msg00009.html
+
+ Makefile.am                                       |   14 +-
+ configure.ac                                      |   29 +-
+ demos/gtk-demo/demos/appwindow.py                 |  411 +++++
+ demos/gtk-demo/demos/assistant.py                 |  134 ++
+ demos/gtk-demo/demos/builder.py                   |   57 +
+ demos/gtk-demo/demos/button_box.py                |  121 ++
+ demos/gtk-demo/demos/clipboard.py                 |  238 +++
+ demos/gtk-demo/demos/colorselector.py             |  121 ++
+ demos/gtk-demo/demos/combobox.py                  |  282 ++++
+ demos/gtk-demo/demos/data/alphatest.png           |  Bin 0 ->
+ 26529 bytes
+ demos/gtk-demo/demos/data/apple-red.png           |  Bin 0 -> 3545 bytes
+ demos/gtk-demo/demos/data/background.jpg          |  Bin 0 ->
+ 22219 bytes
+ demos/gtk-demo/demos/data/demo.ui                 |  258 ++++
+ demos/gtk-demo/demos/data/floppybuddy.gif         |  Bin 0 -> 5216 bytes
+ demos/gtk-demo/demos/data/gnome-applets.png       |  Bin 0 -> 3090 bytes
+ demos/gtk-demo/demos/data/gnome-calendar.png      |  Bin 0 -> 2755 bytes
+ demos/gtk-demo/demos/data/gnome-foot.png          |  Bin 0 -> 2916 bytes
+ demos/gtk-demo/demos/data/gnome-fs-directory.png   |  Bin 0 -> 2044 bytes
+ demos/gtk-demo/demos/data/gnome-fs-regular.png     |  Bin 0 -> 1795 bytes
+ demos/gtk-demo/demos/data/gnome-gimp.png          |  Bin 0 -> 3410 bytes
+ demos/gtk-demo/demos/data/gnome-gmush.png         |  Bin 0 -> 3244 bytes
+ demos/gtk-demo/demos/data/gnome-gsame.png         |  Bin 0 -> 4263 bytes
+ demos/gtk-demo/demos/data/gnu-keys.png                    |  Bin 0 -> 3852 bytes
+ demos/gtk-demo/demos/data/gtk-logo-rgb.gif        |  Bin 0 -> 6427 bytes
+ demos/gtk-demo/demos/test.py                      |   14 +
+ demos/gtk-demo/gtk-demo.py                        |  266 ++++
+ examples/Makefile.am                              |    2 +-
+ examples/cairo-demo.py                                    |  121 ++
+ gi/Makefile.am                                            |    4 +-
+ gi/demos/gtk-demo/demos/appwindow.py              |  411 -----
+ gi/demos/gtk-demo/demos/assistant.py              |  134 --
+ gi/demos/gtk-demo/demos/builder.py                |   57 -
+ gi/demos/gtk-demo/demos/button_box.py             |  121 --
+ gi/demos/gtk-demo/demos/clipboard.py              |  238 ---
+ gi/demos/gtk-demo/demos/colorselector.py          |  121 --
+ gi/demos/gtk-demo/demos/combobox.py               |  282 ----
+ gi/demos/gtk-demo/demos/data/alphatest.png        |  Bin 26529 ->
+ 0 bytes
+ gi/demos/gtk-demo/demos/data/apple-red.png        |  Bin 3545 -> 0 bytes
+ gi/demos/gtk-demo/demos/data/background.jpg       |  Bin 22219 ->
+ 0 bytes
+ gi/demos/gtk-demo/demos/data/demo.ui              |  258 ----
+ gi/demos/gtk-demo/demos/data/floppybuddy.gif      |  Bin 5216 -> 0 bytes
+ gi/demos/gtk-demo/demos/data/gnome-applets.png     |  Bin 3090 -> 0 bytes
+ gi/demos/gtk-demo/demos/data/gnome-calendar.png    |  Bin 2755 -> 0 bytes
+ gi/demos/gtk-demo/demos/data/gnome-foot.png       |  Bin 2916 -> 0 bytes
+ .../gtk-demo/demos/data/gnome-fs-directory.png     |  Bin 2044 -> 0 bytes
+ gi/demos/gtk-demo/demos/data/gnome-fs-regular.png  |  Bin 1795 -> 0 bytes
+ gi/demos/gtk-demo/demos/data/gnome-gimp.png       |  Bin 3410 -> 0 bytes
+ gi/demos/gtk-demo/demos/data/gnome-gmush.png      |  Bin 3244 -> 0 bytes
+ gi/demos/gtk-demo/demos/data/gnome-gsame.png      |  Bin 4263 -> 0 bytes
+ gi/demos/gtk-demo/demos/data/gnu-keys.png         |  Bin 3852 -> 0 bytes
+ gi/demos/gtk-demo/demos/data/gtk-logo-rgb.gif     |  Bin 6427 -> 0 bytes
+ gi/demos/gtk-demo/demos/test.py                   |   14 -
+ gi/demos/gtk-demo/gtk-demo.py                     |  266 ----
+ gi/examples/Makefile.am                           |    2 -
+ gi/examples/cairo-demo.py                         |  121 --
+ gi/tests/test_everything.py                       |  270 ----
+ gi/tests/test_gi.py                               | 1624
+ --------------------
+ gi/tests/test_overrides.py                        |  132 --
+ pygi-Makefile.am                                  |   28 -
+ pygi-configure.ac                                 |   60 -
+ pygi.doap                                         |   34 -
+ pygobject.doap                                            |   16 +-
+ tests/Makefile.am                                 |   23 +-
+ tests/test_everything.py                          |  270 ++++
+ tests/test_gi.py                                  | 1624
+ ++++++++++++++++++++
+ tests/test_overrides.py                           |  132 ++
+ 66 files changed, 4124 insertions(+), 4186 deletions(-)
+
+commit 597bd64319d7966045b5b8613ca6fc85668c3f56
+Merge: ec8d148 fa91dfd
+Author: Johan Dahlin <johan@gnome.org>
+Date:  Sun Jun 20 10:53:46 2010 -0300
+
+    Merge branch 'pygi-merge'
+
+commit fa91dfd3ec79ecd03c9fb59b9363eab4a5b3ff2b
+Author: Johan Dahlin <johan@gnome.org>
+Date:  Sun Jun 20 10:53:36 2010 -0300
+
+    Prepare pygi move
+
+ .gitignore                                        |   40 -
+ HACKING                                           |   26 -
+ Makefile.am                                       |   28 -
+ autogen.sh                                        |  166 --
+ configure.ac                                      |   60 -
+ demos/gtk-demo/demos/appwindow.py                 |  411 -----
+ demos/gtk-demo/demos/assistant.py                 |  134 --
+ demos/gtk-demo/demos/builder.py                   |   57 -
+ demos/gtk-demo/demos/button_box.py                |  121 --
+ demos/gtk-demo/demos/clipboard.py                 |  238 ---
+ demos/gtk-demo/demos/colorselector.py             |  121 --
+ demos/gtk-demo/demos/combobox.py                  |  282 ----
+ demos/gtk-demo/demos/data/alphatest.png           |  Bin 26529 ->
+ 0 bytes
+ demos/gtk-demo/demos/data/apple-red.png           |  Bin 3545 -> 0 bytes
+ demos/gtk-demo/demos/data/background.jpg          |  Bin 22219 ->
+ 0 bytes
+ demos/gtk-demo/demos/data/demo.ui                 |  258 ----
+ demos/gtk-demo/demos/data/floppybuddy.gif         |  Bin 5216 -> 0 bytes
+ demos/gtk-demo/demos/data/gnome-applets.png       |  Bin 3090 -> 0 bytes
+ demos/gtk-demo/demos/data/gnome-calendar.png      |  Bin 2755 -> 0 bytes
+ demos/gtk-demo/demos/data/gnome-foot.png          |  Bin 2916 -> 0 bytes
+ demos/gtk-demo/demos/data/gnome-fs-directory.png   |  Bin 2044 -> 0 bytes
+ demos/gtk-demo/demos/data/gnome-fs-regular.png     |  Bin 1795 -> 0 bytes
+ demos/gtk-demo/demos/data/gnome-gimp.png          |  Bin 3410 -> 0 bytes
+ demos/gtk-demo/demos/data/gnome-gmush.png         |  Bin 3244 -> 0 bytes
+ demos/gtk-demo/demos/data/gnome-gsame.png         |  Bin 4263 -> 0 bytes
+ demos/gtk-demo/demos/data/gnu-keys.png                    |  Bin 3852 -> 0 bytes
+ demos/gtk-demo/demos/data/gtk-logo-rgb.gif        |  Bin 6427 -> 0 bytes
+ demos/gtk-demo/demos/test.py                      |   14 -
+ demos/gtk-demo/gtk-demo.py                        |  266 ----
+ examples/Makefile.am                              |    2 -
+ examples/cairo-demo.py                                    |  121 --
+ gi/.gitignore                                     |   40 +
+ gi/HACKING                                        |   26 +
+ gi/demos/gtk-demo/demos/appwindow.py              |  411 +++++
+ gi/demos/gtk-demo/demos/assistant.py              |  134 ++
+ gi/demos/gtk-demo/demos/builder.py                |   57 +
+ gi/demos/gtk-demo/demos/button_box.py             |  121 ++
+ gi/demos/gtk-demo/demos/clipboard.py              |  238 +++
+ gi/demos/gtk-demo/demos/colorselector.py          |  121 ++
+ gi/demos/gtk-demo/demos/combobox.py               |  282 ++++
+ gi/demos/gtk-demo/demos/data/alphatest.png        |  Bin 0 ->
+ 26529 bytes
+ gi/demos/gtk-demo/demos/data/apple-red.png        |  Bin 0 -> 3545 bytes
+ gi/demos/gtk-demo/demos/data/background.jpg       |  Bin 0 ->
+ 22219 bytes
+ gi/demos/gtk-demo/demos/data/demo.ui              |  258 ++++
+ gi/demos/gtk-demo/demos/data/floppybuddy.gif      |  Bin 0 -> 5216 bytes
+ gi/demos/gtk-demo/demos/data/gnome-applets.png     |  Bin 0 -> 3090 bytes
+ gi/demos/gtk-demo/demos/data/gnome-calendar.png    |  Bin 0 -> 2755 bytes
+ gi/demos/gtk-demo/demos/data/gnome-foot.png       |  Bin 0 -> 2916 bytes
+ .../gtk-demo/demos/data/gnome-fs-directory.png     |  Bin 0 -> 2044 bytes
+ gi/demos/gtk-demo/demos/data/gnome-fs-regular.png  |  Bin 0 -> 1795 bytes
+ gi/demos/gtk-demo/demos/data/gnome-gimp.png       |  Bin 0 -> 3410 bytes
+ gi/demos/gtk-demo/demos/data/gnome-gmush.png      |  Bin 0 -> 3244 bytes
+ gi/demos/gtk-demo/demos/data/gnome-gsame.png      |  Bin 0 -> 4263 bytes
+ gi/demos/gtk-demo/demos/data/gnu-keys.png         |  Bin 0 -> 3852 bytes
+ gi/demos/gtk-demo/demos/data/gtk-logo-rgb.gif     |  Bin 0 -> 6427 bytes
+ gi/demos/gtk-demo/demos/test.py                   |   14 +
+ gi/demos/gtk-demo/gtk-demo.py                     |  266 ++++
+ gi/examples/Makefile.am                           |    2 +
+ gi/examples/cairo-demo.py                         |  121 ++
+ gi/tests/Makefile.am                              |   22 +
+ gi/tests/runtests.py                              |   21 +
+ gi/tests/test_everything.py                       |  270 ++++
+ gi/tests/test_gi.py                               | 1624
+ ++++++++++++++++++++
+ gi/tests/test_overrides.py                        |  132 ++
+ pygi-Makefile.am                                  |   28 +
+ pygi-configure.ac                                 |   60 +
+ tests/Makefile.am                                 |   22 -
+ tests/runtests.py                                 |   21 -
+ tests/test_everything.py                          |  270 ----
+ tests/test_gi.py                                  | 1624
+ --------------------
+ tests/test_overrides.py                           |  132 --
+ 71 files changed, 4248 insertions(+), 4414 deletions(-)
+
+commit ec8d148eccbb3714093f21b595ea77ae4c7c3bce
+Author: Johan Dahlin <johan@gnome.org>
+Date:  Sun Jun 20 10:49:55 2010 -0300
+
+    [giounix] Make it possible to compile on glib 2.20
+
+ gio/unix.override |   2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 606018a2c551d890fc2bb987d99683f777598bda
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Jun 7 16:32:29 2010 -0400
+
+    Don't free transfer full struct pointers because we can't do it safely
+
+    * Most libraries which are sending back structs as transfer-full
+      are either annotated incorrectly or should be sending boxed types
+    * It is much better to throw a warning and leak memory than it is to
+      call free on an unknown struct pointer.  Doing so may cause
+      a double free
+    * Specific case is gdk_atom_intern where a GdkAtom is not actually
+    a pointer
+      but an integer stuffed into a pointer type
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620898
+
+ gi/pygi-argument.c |   9 ++++++++-
+ gi/pygi-invoke.c   |  11 +++++++++--
+ 2 files changed, 17 insertions(+), 3 deletions(-)
+
+commit 433ee2aa029a1482961f478252a06492bd3498e6
+Author: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
+Date:  Tue Jun 15 11:42:28 2010 +0200
+
+    Release the lock when potentially invoking Python code.
+
+    * gobject/pygobject.c: Release GIL lock when retrieving properties
+    and when clearing a PyGObject.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=530935
+
+ gobject/pygobject.c |  11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+commit aa1e82c7eb87620bd73e1edb486f5b9e0d49aa96
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Jun 14 18:36:57 2010 -0400
+
+    add combobox example
+
+ demos/gtk-demo/demos/combobox.py |  282
+ ++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 282 insertions(+), 0 deletions(-)
+
+commit a8668694da59c2dd959c875f13337e64ca22f7e9
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Jun 14 13:43:53 2010 -0400
+
+    fix leak in the allow None callbacks patch
+
+ gi/pygi-callbacks.c |   4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 729072e73d65e7fd5b5197ebe5a8c53a449d0ec0
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Jun 7 17:12:09 2010 -0400
+
+    Allow passing None for callbacks which are annotated allow-none
+
+    * Many callbacks are optional parameters yet we were asserting on
+      Py_None
+    * We now check to see if allow_none is set when setting up callbacks,
+      if it is set and py_function == Py_None, we set the closure to NULL
+      and return
+    * pygi-invoke.c now checks to see if the closure == NULL when setting
+      arguments
+    * if it is NULL there is no reason to set the the destroy notify
+    handler
+      so we skip that too
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620906
+
+ gi/pygi-callbacks.c     |    7 +++++++
+ gi/pygi-invoke.c        |   14 +++++++++++---
+ tests/test_everything.py |    4 ++++
+ 3 files changed, 22 insertions(+), 3 deletions(-)
+
+commit a3eb5c7de5836c37aa7ae01dbe98996ec2632c17
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Mon Jun 14 19:06:45 2010 +0200
+
+    Fix to match latest gtk annotations
+
+ demos/gtk-demo/demos/appwindow.py |   3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 6306dd73cc74aa9202569eac0eaaa5f825c8dc59
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Jun 8 15:03:49 2010 -0400
+
+    fix variable member names in Gdk.Color override
+
+    * override was using r, g, and b for the red, green, blue components
+    but
+      the struct specifies red, green, blue so we need to use those names
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=621007
+
+ gi/overrides/Gdk.py    |   10 +++++-----
+ tests/test_overrides.py |    6 +++---
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+commit d182630e1128fef6f1c2aea28ccd8da4bddd2c8f
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jun 10 20:23:13 2010 +0200
+
+    Post release version bump to 2.21.3
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c4e64d5d264593051b9a3131e4985a58e8e76f8b
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jun 10 20:21:13 2010 +0200
+
+    Update NEWS and release PyGObject-2.21.2
+
+ NEWS |   26 ++++++++++++++++++++++++++
+ 1 files changed, 26 insertions(+), 0 deletions(-)
+
+commit e0fe844d5fe8f7e26316f197444fd4143ed36adf
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jun 10 20:09:07 2010 +0200
+
+    Remove deleted files from the Makefile.
+
+          test_conversion.py
+          test_enum.py
+          test_gtype.py
+          test_subtype.py
+
+ tests/Makefile.am |   4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+commit 495a301cb81c5e914bcef905999265604faa27fc
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jun 10 19:39:09 2010 +0200
+
+    Add myself to the maintainers list in the README
+
+ README |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 04627488220b4f2a16e11f8982af7866fea9f7eb
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Thu Jun 10 19:24:31 2010 +0200
+
+    Drop sinkfuncs.
+
+       * use g_object methods to sink floating refs instead of allowing
+         custom sink functions to be registered
+       * we now sink inside of pygobject_new_full to handle cases where
+         a library creates its own gobject via g_object_new and just
+         needs a python wrapper
+         - a previous patch had done the sink when creating the gobject,
+           since it needs to call pygobject_new_full to wrap the object,
+           this patch handles both cases (e.g. pygobject created object
+           and externally created gobject)
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=583909
+
+ gobject/gobjectmodule.c |    3 +--
+ gobject/pygobject.c    |   42 ++++++++----------------------------------
+ gobject/pygobject.h    |    1 +
+ 3 files changed, 10 insertions(+), 36 deletions(-)
+
+commit 07df124dc06cf506634e95d08397f50a2d07fce2
+Author: Steve Frécinaux <code@istique.net>
+Date:  Mon Jun 7 09:47:23 2010 +0200
+
+    Make the "wrong argument count" exception more explicit.
+
+    Previously we had messages like this one:
+    TypeError: takes exactly 2 argument(s) (1 given)
+
+    With this patch, they become like this:
+    TypeError: get_end_iter() takes exactly 2 argument(s) (1 given)
+
+    It makes things much easier to debug when there are several pygi calls
+    on the same line.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620804
+
+ gi/pygi-invoke.c        |    3 ++-
+ tests/test_everything.py |    6 ++++++
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+commit b435319fe830a909cc4d414533b3b66574931e24
+Author: Steve Frécinaux <code@istique.net>
+Date:  Mon Jun 7 09:54:06 2010 +0200
+
+    Use bash explicitely in the pre-commit hook.
+
+    The "builtin" command is not available in all sh flavours, so the
+    pre-commit hook is going to fail if you use dash or others instead of
+    bash as your default 'sh' alias.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620805
+
+ pre-commit.hook |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e9ee2916494eb7654004925c1ee1e94f99b14f1a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Jun 8 16:55:26 2010 -0400
+
+    colorselector demo
+
+ demos/gtk-demo/demos/colorselector.py |  121
+ +++++++++++++++++++++++++++++++++
+ 1 files changed, 121 insertions(+), 0 deletions(-)
+
+commit ec598128de9e90dccab662ed2f5511c8d659e156
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Jun 8 15:48:33 2010 +0200
+
+    Update PyGObject dependency to 2.21.1
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 87774a17bd607724a56e18c2eb1ac71b04b7079d
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Jun 8 10:40:39 2010 +0200
+
+    Add myself to maintainers
+
+ MAINTAINERS   |    4 ++++
+ pygobject.doap |    7 +++++++
+ 2 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 46c91a11d448e5e11d142d3362aff1483226bca4
+Author: Colin Walters <walters@verbum.org>
+Date:  Wed May 5 13:54:27 2010 -0400
+
+    Clear error if we failed the import
+
+    Otherwise we leave the exception set which causes bizarre problems
+    later in unrelated code.
+
+    https://bugzilla.redhat.com/show_bug.cgi?id=569885
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=617796
+
+ gobject/pygi-external.h |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit c1c41576d053cc1cdd8366d8cd1e59fff1c3a9c6
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Jun 7 17:19:30 2010 -0400
+
+    fix some typos and add a link to a patch which fixes a FIXME
+
+ demos/gtk-demo/demos/clipboard.py |   7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit e7fabb5024d94a3166766e5fca740741bc50380a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon Jun 7 16:21:42 2010 -0400
+
+    clipboard demo
+
+ demos/gtk-demo/demos/clipboard.py |  235
+ +++++++++++++++++++++++++++++++++++++
+ 1 files changed, 235 insertions(+), 0 deletions(-)
+
+commit e0f1dce5ec58d071759f886697501da6eeea549d
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Sun Jun 6 13:27:46 2010 -0400
+
+    set is_fully_bound to false
+
+ demos/gtk-demo/demos/button_box.py |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 986db1c73746d3a8ad7d8d5141c7eed194e7b948
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Sat Jun 5 23:53:36 2010 -0400
+
+    new button box demo
+
+ demos/gtk-demo/demos/button_box.py |  121
+ ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 121 insertions(+), 0 deletions(-)
+
+commit e9f5f8a829121e59367bae690442150f144946ad
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Sat Jun 5 23:26:03 2010 -0400
+
+    set is_fully_bound to True fro builder example
+
+ demos/gtk-demo/demos/builder.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d9968c3a4dea1d4a73a9376009cf486c80ea3da6
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Sat Jun 5 23:24:36 2010 -0400
+
+    fix up formatting in demos
+
+ demos/gtk-demo/demos/appwindow.py |   16 ++++++++--------
+ demos/gtk-demo/demos/assistant.py |   24 ++++++++++++------------
+ demos/gtk-demo/demos/builder.py   |   2 +-
+ 3 files changed, 21 insertions(+), 21 deletions(-)
+
+commit ffca02536bafb55e8c3bce31cd992365207429f6
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Sat Jun 5 14:54:47 2010 -0400
+
+    add the builder demo
+
+ demos/gtk-demo/demos/builder.py |   57
+ +++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 57 insertions(+), 0 deletions(-)
+
+commit a96dbafdf562a2ac6bde4df27919d3628689dbdb
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Jun 4 17:48:24 2010 -0400
+
+    add assistant demo
+
+ demos/gtk-demo/demos/assistant.py |  134
+ +++++++++++++++++++++++++++++++++++++
+ 1 files changed, 134 insertions(+), 0 deletions(-)
+
+commit 7e1b8cf32f33d45603aaec76afb0d14be84ffd94
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Jun 4 16:56:46 2010 -0400
+
+    add formatting rules and copyright notice
+
+ demos/gtk-demo/demos/appwindow.py |   19 +++++++++++++++++++
+ 1 files changed, 19 insertions(+), 0 deletions(-)
+
+commit 03b99692b81631d397ab62dcd263341465bcee88
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Jun 4 16:26:54 2010 -0400
+
+    add the gtk-demo app along with a couple of demos
+
+    * note there are still a couple of patches in bugzilla that are
+    needed for this
+      to run correctly:
+       - http://bugzilla-attachments.gnome.org/attachment.cgi?id=162682
+       - http://bugzilla-attachments.gnome.org/attachment.cgi?id=162764
+
+ demos/gtk-demo/demos/appwindow.py               |  393
+ ++++++++++++++++++++++
+ demos/gtk-demo/demos/data/alphatest.png         |  Bin 0 -> 26529 bytes
+ demos/gtk-demo/demos/data/apple-red.png         |  Bin 0 -> 3545 bytes
+ demos/gtk-demo/demos/data/background.jpg        |  Bin 0 -> 22219 bytes
+ demos/gtk-demo/demos/data/demo.ui               |  258 ++++++++++++++
+ demos/gtk-demo/demos/data/floppybuddy.gif       |  Bin 0 -> 5216 bytes
+ demos/gtk-demo/demos/data/gnome-applets.png     |  Bin 0 -> 3090 bytes
+ demos/gtk-demo/demos/data/gnome-calendar.png    |  Bin 0 -> 2755 bytes
+ demos/gtk-demo/demos/data/gnome-foot.png        |  Bin 0 -> 2916 bytes
+ demos/gtk-demo/demos/data/gnome-fs-directory.png |  Bin 0 -> 2044 bytes
+ demos/gtk-demo/demos/data/gnome-fs-regular.png   |  Bin 0 -> 1795 bytes
+ demos/gtk-demo/demos/data/gnome-gimp.png        |  Bin 0 -> 3410 bytes
+ demos/gtk-demo/demos/data/gnome-gmush.png       |  Bin 0 -> 3244 bytes
+ demos/gtk-demo/demos/data/gnome-gsame.png       |  Bin 0 -> 4263 bytes
+ demos/gtk-demo/demos/data/gnu-keys.png                  |  Bin 0 -> 3852 bytes
+ demos/gtk-demo/demos/data/gtk-logo-rgb.gif      |  Bin 0 -> 6427 bytes
+ demos/gtk-demo/demos/test.py                    |   14 +
+ demos/gtk-demo/gtk-demo.py                      |  266 +++++++++++++++
+ 18 files changed, 931 insertions(+), 0 deletions(-)
+
+commit b3b1f029d8d16cf9bd74160009808147d07e3b3f
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Jun 4 11:25:08 2010 +0200
+
+    Update gobject-introspection dependency to 0.6.14
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 45c4e46ae93bd83a0e3f3550df6c64ce96bbedb4
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Jun 4 11:23:41 2010 +0200
+
+    Post-release version bump to 0.6.1
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7a94270dac48b67aabc7dbad156cf1180db9cb5e
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Fri Jun 4 08:29:42 2010 +0200
+
+    Pre-release version bump 0.6.0
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1e42ee6eb25a07a5201f24ffeac18d298a98477e
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri May 28 10:03:11 2010 -0400
+
+    support for caller-allocates annotations for structs
+
+    * out caller-allocates parameters expect an already constructed
+    structure
+      to be passed in by reference.  It is then modified and the caller
+      uses the
+      modified value.  We support this by using only one level of pointer
+      indirection.
+    * Only structs are considered to be caller-allocates parameters
+    even if
+      they are marked as such by GI.  This is because the GI scanner
+      isn't smart
+      enough to correctly guess 100% of the time
+    * GValues are a special case of a caller-allocates parameter when
+    cleaning
+      up (e.g. g_value_unset is called).  GValues make no sense in
+      a scripting
+      language.  Developers should never deal with them.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620406
+
+ gi/pygi-invoke.c        |   73
+ +++++++++++++++++++++++++++++++++++++++++++--
+ tests/test_everything.py |   28 +++++++++++++++++
+ 2 files changed, 97 insertions(+), 4 deletions(-)
+
+commit c3f467e0ae99aa78c2fdb91b973a272d2fe970bd
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Jun 2 14:14:16 2010 -0400
+
+    don't import gobject directly in the tests
+
+    * use from gi.repository import GObject
+
+ tests/test_overrides.py |    5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+commit 46b5133fea4cd5db57a360b3cbe9ee923e27560c
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue Jun 1 14:28:57 2010 +0200
+
+    Wrap C arrays in structs as GArrays before converting to Python
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=620247
+
+ gi/pygi-info.c   |   11 +++++++++++
+ tests/test_gi.py |   17 +++++++++++++++++
+ 2 files changed, 28 insertions(+), 0 deletions(-)
+
+commit 5f0f9a9c9145a129a063b041424c3109a24d9ead
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed May 26 13:20:27 2010 +0200
+
+    Install pre-commit hook that checks the code changes for style
+    conformance
+
+ autogen.sh     |    7 +++++++
+ pre-commit.hook |   39 +++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 46 insertions(+), 0 deletions(-)
+
+commit 1319da5b7f483e48a90b0b7489f77236ba26f479
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Wed May 26 12:19:17 2010 +0200
+
+    Apply consistent whitespace formatting with:
+
+    astyle -p -d -c -S -U -M60
+
+    This won't affect git blame nor git diff if the switch -w is used.
+
+ gi/gimodule.c          |  138 ++++----
+ gi/pygi-argument.c     |  960
+ +++++++++++++++++++++++-----------------------
+ gi/pygi-boxed.c        |  108 +++---
+ gi/pygi-callbacks.c    |  154 ++++----
+ gi/pygi-callbacks.h    |    8 +-
+ gi/pygi-closure.c      |  270 +++++++-------
+ gi/pygi-closure.h      |   18 +-
+ gi/pygi-foreign-cairo.c |   36 +-
+ gi/pygi-foreign-cairo.h |   36 +-
+ gi/pygi-foreign.c      |   54 ++--
+ gi/pygi-foreign.h      |   10 +-
+ gi/pygi-info.c                 |  646 ++++++++++++++++----------------
+ gi/pygi-invoke.c       |  380 ++++++++++----------
+ gi/pygi-repository.c   |  114 +++---
+ gi/pygi-struct.c       |   88 +++---
+ gi/pygi-type.c                 |   32 +-
+ gi/pygi.h              |   20 +-
+ gi/pygobject-external.h |   14 +-
+ 18 files changed, 1544 insertions(+), 1542 deletions(-)
+
+commit 6156f15cb15b4c20e975527227135d49207c520a
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue May 25 14:08:51 2010 +0200
+
+    Prepend gi.repository to the __module__ attribute of wrapper classes.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=619597
+
+ gi/module.py    |    4 ++--
+ tests/test_gi.py |    4 +++-
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 097b92983b7a322c58fecb1e691ba6ddf5035548
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Tue May 25 14:17:13 2010 +0200
+
+    Correctly identify at creation time:
+
+    * if the class is defined in python -> hook up vfuncs
+    * if the class wraps a type from a .typelib -> set atributes
+    * else (GLocalFile) -> do nothing
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=619604
+
+ gi/types.py |  15 +++++++++++----
+ 1 files changed, 11 insertions(+), 4 deletions(-)
+
+commit 686e10fcdb108af9758eb025a3447813c3513a93
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Thu Apr 29 10:55:13 2010 +0200
+
+    Dont complain if another base has implemented the method
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=617153
+
+ gi/types.py |   3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 9f34d120845d936b04546a5cea599ec67e9181a7
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon May 24 16:16:50 2010 -0400
+
+    fix up Builder override, add new override methods, and add unit tests
+
+    * check for flags when connecting signals now that we get gi
+    GObject types
+    * override the add_from_string and add_objects_from string overrides
+    so
+      that you don't have to pass in the length of the buffer
+    * add test that loads objects from strings and connects them to
+    signals
+
+ gi/overrides/Gtk.py    |   19 +++++++++++-
+ tests/test_overrides.py |   72
+ +++++++++++++++++++++++++++++++++++++++++++++--
+ 2 files changed, 86 insertions(+), 5 deletions(-)
+
+commit 1561d2977691f1cb8684f183a2e274c47960d931
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Mon May 24 18:48:10 2010 +0200
+
+    Improve handling of subclasses without __gtype_name__
+
+    Gives a better message at type registration.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616849
+
+ gi/gimodule.c   |    9 +++++++++
+ tests/test_gi.py |   13 ++++++++++++-
+ 2 files changed, 21 insertions(+), 1 deletions(-)
+
+commit c9d44d4d46c3da3a445000b1db592baa9c378a92
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Fri Apr 30 18:17:50 2010 +0200
+
+    Add support for GArray args
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=617054
+
+ gi/pygi-invoke.c |   11 +++++++----
+ tests/test_gi.py |   50
+ ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 57 insertions(+), 4 deletions(-)
+
+commit c171579ee22681e1ee4ad33441c89f1053bdc3d1
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon May 24 11:48:16 2010 -0400
+
+    check refcounting of callback userdata in unit tests
+
+ tests/test_everything.py |   18 ++++++++++++++++++
+ 1 files changed, 18 insertions(+), 0 deletions(-)
+
+commit 8eb809468fe3e1f8e4f92bd7f25d96f9cf802cd4
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Sat May 22 15:12:37 2010 +0200
+
+    Add support for out args in callbacks
+
+    This patch refactors argument marshalling for closures in
+    preparation for more complete support.
+
+    Also fixes a bug in the memory management of user_data args.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=617780
+
+ gi/pygi-closure.c |  335
+ +++++++++++++++++++++++++++++++++++++++++------------
+ tests/test_gi.py  |   4 +
+ 2 files changed, 263 insertions(+), 76 deletions(-)
+
+commit 0df0c956bb2476392c9d81f0a243a7e84c067166
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+Date:  Sun May 23 10:59:27 2010 +0200
+
+    If None is passed to an interface which takes an object, convert it to
+    NULL
+
+     * without this patch PyGI treats the None object as a PyGObject
+     and ends up
+    extracting garbage data causing a crash
+     * None's equivalent in C is NULL so we must provide a special case
+     where we
+    marshal the None as NULL
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=617880
+
+ gi/pygi-argument.c      |    5 +++++
+ tests/test_everything.py |    6 ++++++
+ 2 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 60fdf4b8f738dd0f5c190bc18ddf010032d3c5ca
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Sat May 22 14:06:37 2010 +0200
+
+    correctly handle floating objects in gtk
+
+    * this is a stopgap so we work with older pygobject libraries
+    * there is a patch at
+    https://bugzilla.gnome.org/show_bug.cgi?id=583909
+      which adds the correct fix to pygobject
+    * once pygobject accepts the above patch this patch does not need to
+      be reverted because pygobject_register_sinkfunc becomes a noop
+    * add tests (Tomeu)
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=619007
+
+ gi/gimodule.c           |   12 ++++++++++++
+ tests/test_everything.py |    3 +++
+ 2 files changed, 15 insertions(+), 0 deletions(-)
+
+commit 4b369f8aca980fc6a582094d6648f40fe4af5e9f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Sat May 22 13:21:30 2010 +0200
+
+    Return an empty list when a NULL GList and GSList is returned
+
+    * In GTK a GList * and GSList set to NULL is equivilant to empty
+    list. All
+      GTK list methods can take a NULL and treat it as an empty list. e.g.
+      g_list_length(NULL) returns 0
+    * PyGtk consitently returns empty list when a NULL is returned for
+    GList or
+      GSList return
+    * Many PyGtk apps do this:
+       for i in range(len(obj.get_list())):
+           ...
+    * If we were to continue to return None, they would have to add
+    a check
+      which is needlessly verbose and isn't very "pythonic"
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=619232
+
+ gi/pygi-argument.c      |    6 ------
+ tests/test_everything.py |    4 ++--
+ 2 files changed, 2 insertions(+), 8 deletions(-)
+
+commit 71a2148b00dfdda99e0d961ae39b901608724e59
+Author: Steve Frécinaux <code@istique.net>
+Date:  Fri May 21 19:05:03 2010 +0200
+
+    Fix warning in configure.
+
+    The warning is caused by the use of the construction 'CFLAGS+=' in a
+    sh version that doesn't understand it (in this case, 'dash').
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=619311
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit aa0357e468eb91e0f3707346e9b32f312fbf51d3
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Thu Apr 29 13:06:15 2010 +0200
+
+    GTypeInterface cannot be unrefed
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=617159
+
+ gi/gimodule.c |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit ab1aaff108d23aabd28c3634edfb67236eb55460
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Sat May 22 13:09:48 2010 +0200
+
+    fix NULL array unit tests and fix crasher when sending None as
+    an array
+
+    * Unit tests were wrong given the annotation for
+    test_array_int_null_in and
+      test_array_int_null_out:
+
+      /**
+       * test_array_int_null_in:
+       * @arr: (array length=len) (allow-none):
+       * @len: length
+       */
+
+     -- and --
+
+      /**
+       * test_array_int_null_out:
+       * @arr: (out) (array length=len) (allow-none):
+       * @len: (out) : length
+       */
+
+      The (array length=len) annotation meant we don't pass in or
+      receive the len argument as this is handled under the hood
+      (Python's representation of an array, the list type, encapsulates
+       the length inside the type)
+
+    * Fixing up the tests revealed a latent crasher bug when passing
+    None to an
+      interface that accepts an array. The fix was to check for NULL
+      and set
+      the length argument to 0 when invoking the bound method.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=619235
+
+ gi/pygi-invoke.c        |    6 +++++-
+ tests/test_everything.py |    4 ++--
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+commit e928ea9b1df9d87314ff8e93479530e26be9bd87
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri May 14 14:57:27 2010 -0400
+
+    don't error out on methods with callbacks as return type
+
+    * Right now we just throw an error which means API's like
+      gtk_about_dialog_set_url_hook aren't able to be called,
+    * this allows us to call such APIs while printing a warning, in
+    most cases
+      API such as this doesn't need to be used anymore and is a result of
+      early GTK development
+
+ gi/pygi-argument.c |  14 +++++++++++---
+ 1 files changed, 11 insertions(+), 3 deletions(-)
+
+commit d963007aab123f4e53a944a66a935db2d22907c2
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Mon May 17 11:54:34 2010 -0400
+
+    reset sys.argv to the return value of Gtk.init_check
+
+    * applications which check command line arguments will error out if it
+      encounters a GTK command line switch such as --g-fatal-warnings.
+    * The Gtk.init* API reads these switches and returns a new argv with
+    the GTK
+      switches stripped out
+    * In C argv is modified in place but in Python we must set sys.argv
+    to the
+      new modified argument list
+    * fixes https://bugzilla.gnome.org/show_bug.cgi?id=618889
+
+ gi/overrides/Gtk.py |   1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 897420ed97cc4a7b8a806894df5e76ed72617614
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed May 12 14:25:32 2010 -0400
+
+    add GtkUIManager and GtkActionGroup overrides
+
+    * fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=618476
+
+ gi/overrides/Gtk.py    |  167
+ ++++++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_overrides.py |   45 +++++++++++++
+ 2 files changed, 211 insertions(+), 1 deletions(-)
+
+commit 865939d29c1e9d69dbe6b9cf89477b5516dbff1f
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Thu May 13 01:02:24 2010 -0400
+
+    Bump version for development to 0.5.2 (hopefully 0.6)
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2674a9546b0246d4a75d71cf1708df77dc0173f9
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Wed May 5 15:54:39 2010 +0200
+
+    Fix overrides.Gdk.Color.__new__ args
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=617757
+
+ gi/overrides/Gdk.py    |    2 +-
+ tests/Makefile.am      |    3 ++-
+ tests/test_overrides.py |   22 ++++++++++++++++++++++
+ 3 files changed, 25 insertions(+), 2 deletions(-)
+
+commit c20b9f632a35bada1320ccc10fb7d5b2c06b9a88
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Thu Apr 29 14:55:33 2010 -0400
+
+    wrap GObject module so we can go through GI when requesting attrs
+
+    * This gives us the best of both worlds.
+      - We remain backwards compatable with pygobject by checking for
+      existing
+       attrs in the gobject module
+      - If an attr does not exist we use the GI mechanism to look it up
+      so that
+       things like flags look the same whether exported from GObject, Gtk
+       or any GI managed library
+
+    * add DynamicGObjectModule tests and make tests use the new module
+      - change import gobject to from gi.repository import GObject
+
+ gi/importer.py                  |    6 +-
+ gi/module.py            |   30 +++++++++++++++
+ tests/test_everything.py |    6 +-
+ tests/test_gi.py        |   93
+ +++++++++++++++++++++++++---------------------
+ 4 files changed, 87 insertions(+), 48 deletions(-)
+
+commit 64324a4c629432b2e688299b6edbfd5da4439a2a
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Fri Apr 30 14:11:55 2010 -0400
+
+    override Gdk.Drawable to add cairo_create convinience method
+
+ gi/overrides/Gdk.py |   7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 17fa1289b1e2ed841dd5de09a2ec7c25d401886e
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Mon May 3 19:13:46 2010 +0200
+
+    Fix passing callbacks as constructor args
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=617551
+
+ gi/pygi-callbacks.c     |    3 ++-
+ gi/pygi-callbacks.h     |    1 +
+ gi/pygi-invoke.c        |    7 +++++--
+ tests/test_everything.py |   21 +++++++++++++++++++++
+ 4 files changed, 29 insertions(+), 3 deletions(-)
+
+commit f9fff978d56ddf2c012b906169ae16abb7fdc2a5
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Wed May 5 08:06:03 2010 +0200
+
+    Avoid freeing garbage
+
+ gi/pygi-invoke.c |    6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 5e20c018ae09a936f5ff140df5d1c133c98e98ba
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Thu Apr 29 13:09:03 2010 +0200
+
+    Only hookup vfunc implementations for locally-defined methods
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=617160
+
+ gi/types.py     |   10 +++++++++-
+ tests/test_gi.py |   10 ++++++++++
+ 2 files changed, 19 insertions(+), 1 deletions(-)
+
+commit 3e61e7d4450a2bb133c7f3862e0962a35339ce8d
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Mon May 3 18:35:13 2010 +0200
+
+    Fix passing GDestroyNotify
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=617542
+
+ gi/pygi-invoke.c        |    3 ++-
+ tests/test_everything.py |   10 ++++++++++
+ 2 files changed, 12 insertions(+), 1 deletions(-)
+
+commit 9669acd0fad193013ef3505ae231588307f9834c
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Mon May 3 12:23:58 2010 +0200
+
+    Move invocation code to its own file
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=617107
+
+ gi/Makefile.am    |   2 +
+ gi/pygi-info.c    |  884
+ ---------------------------------------------------
+ gi/pygi-invoke.c  |  909
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-invoke.h  |   37 +++
+ gi/pygi-private.h |   1 +
+ 5 files changed, 949 insertions(+), 884 deletions(-)
+
+commit 9b923a68dfde06fc2df6321b3f1e53f1c57b3666
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Tue Apr 27 19:13:08 2010 -0400
+
+    Add the Gtk.Builder override
+
+ gi/overrides/Gtk.py |  37 ++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 36 insertions(+), 1 deletions(-)
+
+commit 9fc6783406b8263ebd67ceae2730b4e86689b43e
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Fri Apr 30 15:00:52 2010 +0200
+
+    Fix GAsyncReadyCallback
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616236
+
+ gi/pygi-closure.c       |    8 +++++++-
+ tests/test_everything.py |   16 ++++++++++++++++
+ 2 files changed, 23 insertions(+), 1 deletions(-)
+
+commit 5657ccaaec09e2a3194ea2e9a923724bcc66759e
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Thu Apr 29 18:32:50 2010 +0200
+
+    Add override for Gdk.Color
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=617162
+
+ gi/overrides/Gdk.py |  20 +++++++++++++++++++-
+ 1 files changed, 19 insertions(+), 1 deletions(-)
+
+commit 4410abd589a2f64cfbd7bbcb4013fae9e4aa734f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Apr 28 13:19:48 2010 -0400
+
+    make __all__ be a list of strings, fix override mechanism to use
+    it correctly
+
+    * before we were adding classes to the __all__ module property but
+      the convention is to use the name of the class
+    * simplified the check to just check the name against __all__
+      instead of trying to get the class and then checking the class
+      against None as well as in __all__
+    * went through all the overrides and made __all__ be a list of strings
+
+ gi/module.py                      |    9 ++++-----
+ gi/overrides/GIMarshallingTests.py |   2 +-
+ gi/overrides/Gdk.py               |    2 +-
+ 3 files changed, 6 insertions(+), 7 deletions(-)
+
+commit 64fa8f936bad9a90628df446e690d67d947a0a22
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Mon Apr 26 11:41:06 2010 +0200
+
+    One more step at refactoring _wrap_g_function_info_invoke
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616357
+
+ gi/pygi-callbacks.c |  22 +-
+ gi/pygi-callbacks.h |   4 +-
+ gi/pygi-info.c      | 582
+ +++++++++++++++++++++++++++++----------------------
+ 3 files changed, 346 insertions(+), 262 deletions(-)
+
+commit 7fc5528273edae5ecdd5d8bdf0e5b898eec7a624
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Tue Apr 20 23:23:38 2010 -0400
+
+    Step 1 of refactoring _wrap_g_function_info_invoke
+
+    Original patch by David Malcom <dmalcolm@redhat.com>
+
+    This patch bitrots *REALLY* fast.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616357
+
+ gi/pygi-info.c |  417
+ +++++++++++++++++++++++++++++---------------------------
+ 1 files changed, 214 insertions(+), 203 deletions(-)
+
+commit 1d9c6b6d76a3e27f66e6f0cfc7b16c5191e4fc22
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Tue Apr 27 10:24:35 2010 +0200
+
+    Dont force subclasses to implement all virtual methods of their bases
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616674
+
+ gi/types.py     |    4 ++--
+ tests/test_gi.py |   15 +++++++++++++++
+ 2 files changed, 17 insertions(+), 2 deletions(-)
+
+commit 8a0c48f4dd512797e5cf132f8ec6fb6d4d1e7aaa
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Sun Apr 25 15:09:08 2010 -0400
+
+    Correct the reference counting of userdata in closure handling
+
+    Without this we lose references on every call and eventually end up
+    free'ing objects
+    while they are still in use.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616786
+
+ gi/pygi-closure.c       |    3 +++
+ tests/test_everything.py |   13 +++++++++++++
+ 2 files changed, 16 insertions(+), 0 deletions(-)
+
+commit 2b12049306bf57513c43d08017185468bf897a4a
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Tue Apr 20 22:57:14 2010 -0400
+
+    Change SCOPE_TYPE_INVALID handling to be a more verbose error.
+
+    (Previous commit did not include the proper error message. I blame
+    git-bz)
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616356
+
+ gi/pygi-closure.c |   4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 8240320d0b67074ce91bdf7aadcf5951c5a8c45a
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Tue Apr 20 23:53:57 2010 -0400
+
+    Force out arguments to be initialized as NULL.  Comes with a test.
+
+    This fix was motivated by a real world library which had a transfer
+    full
+    utf8 out argument which sometimes was not set.  We would leave
+    the pointer
+    dangling and try and free it at the end of invoke() and crash.
+    Library refused
+    to change their behavior so we're forced to take care of it on
+    our end.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616043
+
+ gi/pygi-info.c   |    1 +
+ tests/test_gi.py |    3 +++
+ 2 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 10e558ca283cdd06725bb0d24b5071ccbecc7d13
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Tue Apr 20 22:57:14 2010 -0400
+
+    Change SCOPE_TYPE_INVALID handling to be a warning and not an error
+
+    Be slightly nicer to library maintainers.  It really isn't a fatal
+    condition
+    if we don't have a proper scope type, better to leave a good code
+    comment
+    and a warning than to cause their code to segv.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616356
+
+ gi/pygi-closure.c |   3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit d3b5fae9d609dbcd83deb0fa9102b24faf76787c
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Tue Apr 20 22:43:20 2010 -0400
+
+    Refactor implementation of scope call to allow for multiple calls
+    during lifetime of function invocation.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616343
+
+ gi/pygi-closure.c       |   10 +++++-----
+ gi/pygi-info.c                  |    9 +++++++--
+ tests/test_everything.py |    9 +++++++++
+ 3 files changed, 21 insertions(+), 7 deletions(-)
+
+commit 3ba666b7ab9c393963922c272e7d87bff50a93f9
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sat Jan 2 16:31:55 2010 +0100
+
+    Add basic support for unions
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=603598
+
+ gi/module.py      |    3 +-
+ gi/pygi-argument.c |  24 +++----------
+ gi/pygi-boxed.c    |  18 +++++++++-
+ gi/pygi-info.c     |  94
+ +++++++++++++++++++++++++++++++++++++++++++++++-----
+ gi/pygi-info.h     |   1 +
+ tests/test_gi.py   |  56 +++++++++++++++++++++++++++++++
+ 6 files changed, 165 insertions(+), 31 deletions(-)
+
+commit af9e4e086d160fe7fb24758ed81753e784b198a8
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Fri Jan 22 22:16:32 2010 +0100
+
+    Bump required GLib version to 2.22
+
+    Since PyGObject now depends on GLib 2.22.4, there is no need to
+    keep PyGI
+    backward-compatible.
+
+ configure.ac     |    2 +-
+ gi/pygi-private.h |   20 --------------------
+ 2 files changed, 1 insertions(+), 21 deletions(-)
+
+commit c0f40de5648e2ebc556c449342a0025ffce2e33b
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sun Apr 18 11:50:14 2010 -0400
+
+    Refactor get_* methods in the *Info wrappers
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616108
+
+ gi/pygi-info.c |  360
+ ++++++++++++++++++++++++++------------------------------
+ 1 files changed, 168 insertions(+), 192 deletions(-)
+
+commit 24bb89f1310dc2fc8ee6ddaf945342ebf80055cd
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Tue Apr 20 15:12:47 2010 +0200
+
+    Print any error messages raised inside _pygi_closure_handle
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616279
+
+ gi/pygi-closure.c |   9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+commit d1ba23cdd05686ea721425f233371d573a2e9cce
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Thu Apr 22 19:57:17 2010 +0200
+
+    Rename variable with a very generic name
+
+ gi/module.py |   28 ++++++++++++++--------------
+ 1 files changed, 14 insertions(+), 14 deletions(-)
+
+commit 391640b30ede50af3667b1019edb72bd79f2c68c
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Thu Apr 22 19:53:06 2010 +0200
+
+    Add support for enums without GType
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616520
+
+ gi/module.py      |    6 +++++-
+ gi/pygi-argument.c |  22 +++++++++++++++++++++-
+ gi/types.py       |   14 ++++++++++++++
+ tests/test_gi.py   |  30 ++++++++++++++++++++++++++++--
+ 4 files changed, 68 insertions(+), 4 deletions(-)
+
+commit 89704f60ddae0c81f1383d86491ef2785590a353
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Tue Apr 20 22:20:42 2010 -0400
+
+    Bump version during development to 0.5.1
+
+    This follows what is, according to Colin Walters,
+    standard versioning practice.  During development the
+    version in your config is the *next* version you will release,
+    not the version after.  Thus after a release you make a new commit
+    bumping to the next development version.
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e203dc7c8f524c16aa52e15758dc3a2b09fbac75
+Author: John Ehresman <jpe@wingware.com>
+Date:  Tue Apr 20 20:40:02 2010 -0400
+
+    Added missing , to keyword list of gio.GFile.set_attribute
+
+ gio/gresolver.override |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0b222f01ac9ceea1d127083623ad532ecc75bf7e
+Author: John Ehresman <jpe@wingware.com>
+Date:  Tue Apr 20 20:37:12 2010 -0400
+
+    Fix arg conversion in gio.GFile.set_attribute
+
+ gio/gfile.override |  232
+ ++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 227 insertions(+), 5 deletions(-)
+
+commit a579ccc8bea90937bf970be3d461e2b650b0c7d6
+Author: John Ehresman <jpe@wingware.com>
+Date:  Tue Apr 20 20:01:53 2010 -0400
+
+    Set constants under python 2.5 or before
+
+ gobject/gobjectmodule.c |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 11fa39a861abf679e01b5f0da97be93ae0adf0f0
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date:  Sun Apr 18 20:22:21 2010 -0400
+
+       Doc Extractor: Use replacements that make sense for &...;
+       expressions.
+
+       * codegen/docextract_to_xml.py: Use &#35; and &#160; respectively
+       for
+       &num; (#) and &nbsp;.  These are interpreted correctly in XML
+       and will
+       not make the parsing crash.
+
+ codegen/docextract_to_xml.py |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 8dbc2cb016acef7b364804cd9bc8f0b1da37e84b
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Sun Apr 18 14:32:06 2010 -0400
+
+    Bump version for release 0.5.0
+
+ HACKING      |    7 +++++++
+ configure.ac |    4 ++--
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+commit 3293c91d90c5c497b45e42a527d7f79f7435823e
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sun Apr 18 14:28:13 2010 -0400
+
+    One more missing file...
+
+ examples/Makefile.am |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 1dc575af19fe985cc3fa3ec0cf18aeab1f43c16d
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sun Apr 18 14:18:44 2010 -0400
+
+    Add more stuff to the tarballs
+
+ Makefile.am  |    8 +++++++-
+ configure.ac |    1 +
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+commit 8a9bb04755057e934b7f46c917af6ef281a2fedd
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sun Apr 18 13:48:45 2010 -0400
+
+    Add one more missing file to tarballs
+
+ gi/overrides/Makefile.am          |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 979e01852fc7f830ee91093accdc387fa535075f
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sun Apr 18 13:45:29 2010 -0400
+
+    Add missing file to tarballs
+
+ tests/Makefile.am |   1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 8b70faa7a9a32b9ea8862f28a503e38f496cfd89
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sun Apr 18 13:11:11 2010 -0400
+
+    Implement vfuncs.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=602736
+
+ gi/gimodule.c      |   89
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-argument.c  |   1 +
+ gi/pygi-callbacks.c |   3 +-
+ gi/pygi-closure.c   |   4 +-
+ gi/pygi-closure.h   |   2 +-
+ gi/pygi-info.c      |  86
+ ++++++++++++++++++++++++++++++++++++++++++++++++-
+ gi/pygi-info.h      |   1 +
+ gi/types.py        |   44 +++++++++++++++++--------
+ tests/test_gi.py    |  18 ++++++++++
+ 9 files changed, 227 insertions(+), 21 deletions(-)
+
+commit e239faacb4798fe2d166233ca1a19a843a6225e3
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Sun Apr 18 11:59:06 2010 -0400
+
+    Fix a typo in pygi-callbacks.c header
+
+ gi/pygi-callbacks.c |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 79aa416ae8632b123da61d79fb820d9e2704209c
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Sat Apr 17 12:00:05 2010 -0400
+
+    Implement nullable argument support, including tests
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=616035
+
+ gi/pygi-argument.c      |   43
+ +++++++++++++++++++++++++++++++++++++------
+ gi/pygi-argument.h      |    3 ++-
+ gi/pygi-info.c                  |   19 +++++++++++++------
+ tests/test_everything.py |   28 ++++++++++++++++++++++++++++
+ 4 files changed, 80 insertions(+), 13 deletions(-)
+
+commit 7d533b8893bc4a8a82fd9708278fa1dce5d3551e
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Sat Apr 17 12:56:19 2010 -0400
+
+    Move some tests from test_gi to test_everything
+
+ tests/test_everything.py |   60
+ ++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gi.py        |   62
+ +---------------------------------------------
+ 2 files changed, 61 insertions(+), 61 deletions(-)
+
+commit a90298cc9e6c0f336f887a71d80b1efd07ec2811
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sun Apr 18 10:44:35 2010 -0400
+
+    Update to latest version of the pygi-convert.sh script
+
+ pygi-convert.sh |  193
+ +++++++++++++++++++++++++++++++++++++++----------------
+ 1 files changed, 137 insertions(+), 56 deletions(-)
+
+commit 34a39318c674737c6d64f2430456daef86ba1626
+Author: Colin Walters <walters@verbum.org>
+Date:  Sun Apr 18 10:40:44 2010 -0400
+
+    Add Tomeu's prototype script for converting pygtk to pygi
+
+ pygi-convert.sh |   71
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 71 insertions(+), 0 deletions(-)
+
+commit a3afdb5fd33de0bf11d63857a245a8f5edec242c
+Author: Olav Vitters <olav@vitters.nl>
+Date:  Sun Apr 18 13:01:58 2010 +0200
+
+    Fix doap file
+
+ pygi.doap |   4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 0de73d0bba79f92af22f43693f3575c596712416
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Sat Apr 17 16:01:31 2010 -0400
+
+    Add Zach Goldberg as a pygi maintainer
+
+ pygi.doap |   5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit a0e22e36e8cf0c1e0da3c0ec48c821fdb5a07ccd
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sat Apr 17 11:47:54 2010 -0400
+
+    Require PyCairo
+
+ configure.ac |    7 +------
+ 1 files changed, 1 insertions(+), 6 deletions(-)
+
+commit 2778f8a1bf6379a46beec6546c8efcb0fec2d7ad
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sat Apr 17 11:40:14 2010 -0400
+
+    Add examples/cairo-demo.py
+
+ examples/cairo-demo.py |  121
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 121 insertions(+), 0 deletions(-)
+
+commit 610dd1eec87fab5c8c3badb4d104cba74477c745
+Author: Zach Goldberg <zach@zachgoldberg.com>
+Date:  Sat Apr 17 09:17:14 2010 -0400
+
+    Implementation callback support with scoping and basic argument
+    support.
+
+    This patch was originally written by
+    Zach Goldberg <zach@zachgoldberg.com> with modifications and
+    review by Simon van der Linden <svdlinden@src.gnome.org> and
+    Colin Walters <walters@verbum.org>.
+
+    This impementation enforces the assumption that any one function
+    signature can only have one (callback, userdata, destronotify) tuple.
+    This allows us to move callback creation into the actual function
+    invoke pipeline and also to keep just one destroy notify callback
+    around, vastly simplifying the code.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=603095
+
+ configure.ac       |    2 +
+ gi/Makefile.am      |   4 +
+ gi/pygi-argument.c  |  12 ++-
+ gi/pygi-callbacks.c | 216
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-callbacks.h |  47 +++++++++++
+ gi/pygi-closure.c   | 205
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-closure.h   |  57 ++++++++++++++
+ gi/pygi-info.c      |  49 +++++++++++-
+ gi/pygi-private.h   |   2 +
+ tests/test_gi.py    |  64 +++++++++++++++-
+ 10 files changed, 648 insertions(+), 10 deletions(-)
+
+commit a34cb9f0038a6c89e5e6c5f7761d48a5a833044f
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sat Apr 17 10:54:45 2010 -0400
+
+    Add support for foreign structs
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=603712
+
+ configure.ac            |    6 ++
+ gi/Makefile.am                  |   10 +++-
+ gi/gimodule.c           |    7 +++
+ gi/pygi-argument.c      |   27 +++++++++-
+ gi/pygi-foreign-cairo.c  |  103 ++++++++++++++++++++++++++++++++++++++
+ gi/pygi-foreign-cairo.h  |   55 ++++++++++++++++++++
+ gi/pygi-foreign.c       |  123
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-foreign.h       |   52 +++++++++++++++++++
+ gi/pygi-private.h       |    1 +
+ tests/test_everything.py |   48 ++++++++++++++++++
+ 10 files changed, 428 insertions(+), 4 deletions(-)
+
+commit e73b6f6fe8b5f23a2a390ae0a6bbced593ded155
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Fri Apr 16 14:35:13 2010 -0400
+
+    Allow creating structs with pointers
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=603537
+
+ gi/pygi-struct.c |    6 ------
+ tests/test_gi.py |    3 ++-
+ 2 files changed, 2 insertions(+), 7 deletions(-)
+
+commit fc9ff02e53aacf9e77625c70985e99813544912a
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Fri Apr 16 10:40:40 2010 -0400
+
+    Add gdb and valgrind variants for the tests
+
+ HACKING          |   19 +++++++++++++++++++
+ Makefile.am      |   12 ++++++++++++
+ tests/Makefile.am |   14 +++++++++++++-
+ 3 files changed, 44 insertions(+), 1 deletions(-)
+
+commit 695ac7bc5c60371a32538d690c7a15509f3c9637
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Fri Apr 16 14:36:11 2010 +1200
+
+    Add build docs for windows
+
+ Makefile.am  |    1 +
+ README.win32 |   24 ++++++++++++++++++++++++
+ 2 files changed, 25 insertions(+), 0 deletions(-)
+
+commit e580da87f0b2fd36cb5d8008fb2fb0c3b01f456a
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Thu Apr 15 13:40:39 2010 +1200
+
+    Setup.py cosmetic tidy
+
+     * Remove local doc install, point to website instead
+     * link to versioned docs
+
+ pygobject_postinstall.py |   43
+ ++++++++++++++++++++++++++-----------------
+ setup.py                |   39 ++++++++++++++-------------------------
+ 2 files changed, 40 insertions(+), 42 deletions(-)
+
+commit 69ecd506c83ddf180c6cc9a2a8dc753a02543959
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Sat Jul 25 14:12:30 2009 +1200
+
+    Fix crash when importing gio
+
+    Only seems to be necessary on windows, but
+    no harm on linux as multiple calls to init
+    are OK
+
+ gio/giomodule.c |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 5d159a13d89587cba189a0ca3203ac003e2f1f2b
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Thu Apr 15 22:52:48 2010 +1200
+
+    Bug 589671 - Dont use generate-constants
+
+    This breaks the build using distutils, and it is
+    largely unneeded. Just add the G_XXX constants
+    to the module directly
+
+ gobject/Makefile.am         |   16 +--------
+ gobject/constants.py        |   83
+ ++++++++++++++++++++++++++++++++++++++++++
+ gobject/constants.py.in      |   50 -------------------------
+ gobject/generate-constants.c |   44 ----------------------
+ gobject/gobjectmodule.c      |   35 ++++++++++++++++++
+ setup.py                    |    2 +-
+ tests/runtests.py           |    3 +-
+ 7 files changed, 121 insertions(+), 112 deletions(-)
+
+commit 6d7a3ab9ce352692d0faccbf106974d264fa953d
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Thu Apr 15 22:49:17 2010 +1200
+
+    Bug 589671 - Fix setup.py for windows build
+
+    * Building pyglib as a static private library
+    * Update to include new defs
+    * Modernise setup.py and add more util functions
+      to dsextras
+
+ dsextras.py |  32 ++++++++++++++++--
+ setup.py    | 102
+ ++++++++++++++++++++++++++++++++++++++++++++++++++--------
+ 2 files changed, 116 insertions(+), 18 deletions(-)
+
+commit d11ef47072acae5801ce25c68d1289e425eb9fc2
+Author: John Stowers <john.stowers@gmail.com>
+Date:  Thu Apr 15 22:48:28 2010 +1200
+
+    Include pygsource.h
+
+ glib/pygiochannel.c |   1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit c5f6af4844c74354abc508d17969d9d45153acf2
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Thu Apr 15 14:25:59 2010 -0400
+
+    Add metadata to the .doap file
+
+ pygi.doap |   3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 81796cb77cbe6b9598a652bd63c047af93e747ee
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date:  Wed Apr 14 12:01:43 2010 -0400
+
+    override that wasn't checked in - fixes some test cases
+
+ gi/overrides/GIMarshallingTests.py |  69
+ ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 69 insertions(+), 0 deletions(-)
+
+commit de5d2ea1584b01af809346316c7fbd4955a9db1d
+Author: Colin Walters <walters@verbum.org>
+Date:  Wed Apr 14 10:06:07 2010 -0400
+
+    [Makefile.am] Clean up CFLAGS handling, don't override all: target
+
+    First, we should move the CFLAGS into AM_CFLAGS, otherwise the
+    per-target CFLAGS forces Automake to prefix object files, which
+    is unnecessary since we only have one target.
+
+    More importantly, avoid overriding the all: target here; that's
+    owned by Automake. Use all-local instead to append things to
+    the end of the normal build.
+
+ gi/Makefile.am |   15 +++++++++------
+ 1 files changed, 9 insertions(+), 6 deletions(-)
+
+commit 5a47e96e3f580c973e6880dafa747f54c144c760
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Tue Apr 13 19:15:49 2010 -0400
+
+    Use GIMarshallingTests (old TestGI) in gobject-introspection
+
+ gi/overrides/TestGI.py |   69 --
+ tests/Makefile.am     |   40 -
+ tests/libtestgi.c     | 2924
+ ------------------------------------------------
+ tests/libtestgi.h     |  628 -----------
+ tests/test_gi.py      |  832 +++++++-------
+ 5 files changed, 416 insertions(+), 4077 deletions(-)
+
+commit 681832c3cd040433a488a400693b68f213bf7078
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date:  Tue Apr 13 13:33:12 2010 -0400
+
+       codegen/docextract_to_xml.py: One more &...; replacement (&nbsp;).
+
+       * codegen/docextract_to_xml.py: Replace &nbsp; which also causes
+       errors with a regular space.
+
+ codegen/docextract_to_xml.py |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit bd4e7f2459e34957aaae59b9be807d6dff5ec1eb
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date:  Tue Apr 13 12:28:10 2010 -0400
+
+       codegen/docextract_to_xml.py: Replace some &..; that cause errors.
+
+       * codegen/docextract_to_xml.py (escape_text): Replace some &..;
+       expressions that cause errors with more appropriate output.
+
+ codegen/docextract_to_xml.py |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit f00b9ce91fc9c3aabd4af4132fc112d9e415e12e
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date:  Sun Apr 11 17:46:40 2010 -0400
+
+       codegen/docextract_to_xml.py: Handle C++ multi-line comments.
+
+       * codegen/docextract_to_xml.py (escape_text): Translate '/*'
+       and '*/'
+       in text to '/ *' and '* /' respectively so that comment errors
+       don't
+       show up when the descriptions that include C++ code with C++
+       multi-line comments are used in Doxygen blocks.
+
+ codegen/docextract_to_xml.py |    9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+commit a2fcdecbb5e109da5568084d7acb2332af83b6f5
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date:  Sun Apr 11 16:15:01 2010 -0400
+
+       codegen/docextract.py: Stop final section processing on first
+       match.
+
+       * codegen/docextract.py (process_final_sections): Modify the final
+       section pattern matching for loop to stop on first match so
+       that it
+       doesn't match both a colon return ('Returns: ...') and a no colon
+       return ('Returns ...') which leads to annotation extraction
+       errors.
+
+ codegen/docextract.py |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 825fd305f03b726665edca34963978ce27448182
+Author: José Alburquerque <jaalburqu@svn.gnome.org>
+Date:  Sun Apr 11 15:45:09 2010 -0400
+
+       Update doc extraction tool to handle GObjectIntrospection
+       annotations.
+
+       * codegen/docextract.py (FunctionDoc): Renamed class to GtkDoc.
+       (GtkDoc::annotations): Added a list field to store annotations
+       which
+       are 2-tuples of (name, value).
+       (GtkDoc::ret): Modified field to store the return description
+       along
+       with a list of annotations as described above.
+       (GtkDoc::params): Now holds a list of 3-tupples: name,
+       description and
+       annotations (as described above).
+       (GtkDoc::block_type): Add a field to tell if the comment block
+       is a
+       function block, signal block or property block.
+       (GtkDoc::set_type):
+       (GtkDoc::get_type): Add methods for setting/getting the block
+       type.
+       (GtkDoc::add_param): Modified to also accept a list of
+       annotations to
+       be added with the parameter.
+       (GtkDoc::add_annotation):
+       (GtkDoc::get_annotations): Added methods to add/get annotations
+       for
+       the comment block.
+       (GtkDoc::append_description): Renamed to append_to_description().
+       (GtkDoc::get_param_description): Removed unused method.
+       (GtkDoc::get_description): Added method to get block description.
+       (GtkDoc::add_return): Added method to add a return accepting
+       the first
+       line of the description and its annotations.
+       (GtkDoc::append_return): Renamed to append_to_return().
+       (Regular expressions):
+        - Made the names of the variables un-abbreviated.
+
+        - Added 'since', 'deprecated' and 'rename to' regular
+        expressions.
+
+        - Modified the return matching regular expression so that
+        it doesn't
+          match descriptions that begin with 'Returns ...'.
+          This improves
+          the docs of many function.
+
+        - Added signal and property comment block identifier matching
+        regular
+          expressions in case those are useful.
+
+       - Modified existing identifier matching regular expressions
+       (function,
+         signal, and property regular expressions) to properly parse
+         annotations.  Also added a regular expression for extracting
+         annotations from the parameter and return descriptions.
+
+       - Refined the function name matching regular expression to
+       only accept
+         identifiers that begin with a lowercase letter.  This eliminates
+         'SECTION:' matches.
+
+       - Finally, grouped commonly related expressions like
+       return_pattern,
+         since_pattern, etc.  into groups (in lists) so that matching
+         those
+         sections can be done using loops.
+
+       (Parsing algorithm): Modified the algorithm to use a functional
+       approach to parsing.  Extra methods like skip_to_comment() and
+       processs_params() have been added and used in the parse_file()
+       function to now process the comment blocks.
+       (parse_dir): Added file processing output to stderr.
+       * codegen/docextract_to_xml.py (usage): Added function to
+       print out
+       the usage.
+       (print_annotations): Added function to print the given list of
+       annotations.
+       (options): Added --with-signals (-i), with-properties (-p) and
+       --with-annotation (-a) to the existing --source-dir (-s) option.
+
+       (algorithm): Now prints annotations, if specified.  Also, prints
+       signals and properties correctly (using names like
+       Class::signal-one
+       for signals and Classs:property) with xml such as <signal
+       name="...">...</signal>.  The return xml is slightly modified with
+       annotations but this would only be exhibited if annotation xml is
+       requested.
+
+ codegen/docextract.py       |  439
+ +++++++++++++++++++++++++++++++++---------
+ codegen/docextract_to_xml.py |   87 ++++++--
+ 2 files changed, 414 insertions(+), 112 deletions(-)
+
+commit 9fef1acb42cd900d4a814a7378f60bc189121785
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Fri Apr 9 13:47:03 2010 +0200
+
+    Always create the .so link
+
+ gi/Makefile.am |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e9f7fd414e94595e40eb1ba0fc471ca69136d82f
+Author: Paul Bolle <pebolle@tiscali.nl>
+Date:  Thu Apr 8 11:52:25 2010 +0200
+
+    Docs: replace gio.IO_ERROR_* with gio.ERROR_*
+
+    Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
+
+ docs/reference/pygio-file.xml       |   58
+ +++++++++++++++++-----------------
+ docs/reference/pygio-inputstream.xml |   22 ++++++------
+ docs/reference/pygio-mount.xml       |   10 +++---
+ 3 files changed, 45 insertions(+), 45 deletions(-)
+
+commit 4cbd9941c5705970a9f7a429e236e1203d3155a1
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Apr 5 18:10:42 2010 +0200
+
+    Bug 613341 - pygobject tests seem to require pygtk causing a circular
+    dependencies problem
+
+    move tests that require pygtk to pygtk itself
+
+ tests/test_conversion.py |   83 -------------
+ tests/test_enum.py      |  234 -------------------------------------
+ tests/test_gtype.py     |  112 ------------------
+ tests/test_subtype.py   |  289
+ ----------------------------------------------
+ 4 files changed, 0 insertions(+), 718 deletions(-)
+
+commit ef0ceb266a45715ece58642fb0042e3376416755
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Wed Feb 3 20:33:03 2010 +0100
+
+    Add modelines and copyright information to overrides modules
+
+ gi/overrides/Gdk.py   |   21 +++++++++++++++++++++
+ gi/overrides/Gtk.py   |   21 +++++++++++++++++++++
+ gi/overrides/TestGI.py |   20 ++++++++++++++++++++
+ 3 files changed, 62 insertions(+), 0 deletions(-)
+
+commit 5106523a4b8378997a1e6cb0488398aa73e7d9d5
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Wed Feb 3 20:29:55 2010 +0100
+
+    Fix and complete overrides tests
+
+    Those tests were missing in the last commit
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=602830
+
+ gi/overrides/TestGI.py |   49
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gi.py      |    8 ++++++-
+ 2 files changed, 56 insertions(+), 1 deletions(-)
+
+commit 23fc0f615d87994acafd9d39e92dd92b587fc2eb
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Thu Jan 21 17:30:51 2010 +0100
+
+    Don't raise an error in _pygi_import if pygi support is disabled
+
+    http://bugzilla.gnome.org/show_bug.cgi?id=607674
+
+ gobject/pygboxed.c     |    6 +-----
+ gobject/pygi-external.h |    1 -
+ gobject/pygobject.c    |    6 +-----
+ gobject/pygpointer.c   |    6 +-----
+ 4 files changed, 3 insertions(+), 16 deletions(-)
+
+commit aefac8c5f64bf059dd6652f8a843d17b34fa0854
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Fri Jan 22 22:22:37 2010 +0100
+
+    Remove support for pointers to basic types as input-only argument
+    and return value
+
+    There is no reason for an API to use such things, and
+    g_function_info_invoke
+    broke such features.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=607759
+
+ gi/pygi-argument.c |  586 ++++------------------------------------------
+ gi/pygi-argument.h |   1 -
+ gi/pygi-info.c     |   8 +-
+ tests/libtestgi.c  |  660
+ ----------------------------------------------------
+ tests/libtestgi.h  |  86 -------
+ tests/test_gi.py   |  144 ------------
+ 6 files changed, 47 insertions(+), 1438 deletions(-)
+
+commit eaf7cb8ebb7e34f9493ac83b2f04af4dcf45f40f
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Fri Jan 22 13:41:21 2010 +0100
+
+    Restore the overrides support
+
+    Add a ModuleProxy in front of the DynamicModule when an overrides
+    module is
+    present. There is no need for an overrides module to be a class;
+    it can just be a module.
+
+    Add an override decorator to override the wrapper of a registered
+    type.
+
+    Adapt Gdk and Gtk accordingly.
+
+    Add tests.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=602830
+
+ gi/importer.py      |  40 +++++++-------------
+ gi/module.py       |   43 ++++++++++++++-------
+ gi/overrides/Gdk.py |  42 +++++++++++++-------
+ gi/overrides/Gtk.py |  16 +++----
+ gi/types.py        |    6 +++
+ tests/libtestgi.c   | 105
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/libtestgi.h   |  49 ++++++++++++++++++++++++
+ tests/test_gi.py    |  36 +++++++++++++++++
+ 8 files changed, 273 insertions(+), 64 deletions(-)
+
+commit 289d641775d1ea52d2a5379126b70b7fcee46683
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sun Jan 10 21:01:59 2010 +0100
+
+    Initialize PyGPollFD_Type.fd_obj to NULL
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=606582
+
+ gio/gcancellable.override |   1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit b11cf2595987c1f0fc4ffd834f07c98b92aa2355
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Fri Jan 8 21:10:28 2010 +0100
+
+    Initialize struct fields to 0 when allocating
+
+ gi/pygi-struct.c |    2 +-
+ tests/test_gi.py |    5 +++++
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit b4189be2b2d3c350fdf33e27309bee5a72e4f72a
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Fri Jan 8 20:33:44 2010 +0100
+
+    Don't set a default constructor for structures.
+
+    Update tests accordingly.
+
+    The reason for this change is that setting __new__ in the metaclass
+    doesn't let
+    one overrides it afterwards, in a subclass (in my experience, at
+    least, even
+    though it seems weird).
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=603536
+
+ gi/types.py      |   35 +++++++----------------------------
+ tests/libtestgi.c |   33 ---------------------------------
+ tests/libtestgi.h |   7 -------
+ tests/test_gi.py  |   21 ++++++++++-----------
+ 4 files changed, 17 insertions(+), 79 deletions(-)
+
+commit 4db68b958ea11bd2c3a88067cae03fd6bdd1d24b
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Tue Jan 5 13:36:44 2010 +0100
+
+    Suppress compilation warnings
+
+ gi/pygi-argument.c     |    3 ++-
+ gi/pygi-boxed.c        |    2 --
+ gi/pygobject-external.h |    2 +-
+ 3 files changed, 3 insertions(+), 4 deletions(-)
+
+commit 4e2efa91d101bf755739e1cca8eee41eb0ad20fd
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Jan 4 08:35:14 2010 +0100
+
+    Bug 605937 - pygobject: Makefile.am sets $TMPDIR, disrupting distcc
+
+    Committed a patch from Kevin Pyle
+
+ Makefile.am |  27 +++++++++++++--------------
+ 1 files changed, 13 insertions(+), 14 deletions(-)
+
+commit 8ddcbca0e98e0b0c082170a2b2b6cfcbd7864b40
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Fri Dec 11 22:24:30 2009 +0100
+
+    sys.path must be modified after pygtk is imported
+
+    Otherwise, sys.path is overridden by pygtk and gi.repository is
+    loaded from the
+    system's default site-package directory.
+
+ tests/runtests.py |   1 -
+ tests/test_gi.py  |   3 +++
+ 2 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 284a1e1c0143c95d3007cf58e6c248b5d11fb4d1
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sun Jan 3 11:02:57 2010 +0100
+
+    Wrap gio.Cancellable.make_pollfd() and add a test
+
+ gio/Makefile.am           |    1 +
+ gio/gcancellable.override  |  37 +++++++++++++++++++++++++++++++++++++
+ gio/gio.override          |    3 +++
+ tests/test_gcancellable.py |  15 +++++++++++++++
+ 4 files changed, 56 insertions(+), 0 deletions(-)
+
+commit 82d7bcbf37200ee2ef5892dd12bebd2f39965c56
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat Jan 2 23:15:56 2010 +0100
+
+    Make cancellable an optional parameter in many methods
+
+ gio/gio.defs |  102
+ +++++++++++++++++++++++++++++-----------------------------
+ 1 files changed, 51 insertions(+), 51 deletions(-)
+
+commit 49a078cd22d55dc33a03ecfda235d63955edc741
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat Jan 2 23:15:21 2010 +0100
+
+    Post release version bump to 2.21.2
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4f9f1f43ab4e2cfb204ffa0e257a34cfd95d84e2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat Jan 2 22:58:36 2010 +0100
+
+    Update NEWS and release PyGObject-2.21.1
+
+ NEWS |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 55 insertions(+), 0 deletions(-)
+
+commit c1f34be73bd186d7b4682dfef133da2c4229d213
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 20:25:35 2010 +0100
+
+    Wrap gio.Volume.eject_with_operation()
+
+ gio/gvolume.override |   54
+ ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 54 insertions(+), 0 deletions(-)
+
+commit 9b76fbff6f6897aaf26ed4644c1f19efc2826917
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 20:22:21 2010 +0100
+
+    gio.Mount.unmount_with_operation() fix a copy/paste leftover
+
+ gio/gmount.override |   4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 6f459786dd641cd49d81eba403d940620f961cab
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 20:21:05 2010 +0100
+
+    Wrap gio.Mount.eject_with_operation()
+
+ gio/gmount.override |  54
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 54 insertions(+), 0 deletions(-)
+
+commit d4b5d1b4839364e5676eb2da28f1d21db7e2552d
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 20:15:38 2010 +0100
+
+    Wrap gio.Mount.unmount_mountable_with_operation()
+
+ gio/gmount.override |  54
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 54 insertions(+), 0 deletions(-)
+
+commit e919d47c2430451b436cec955e9b99237f97028c
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 18:22:46 2010 +0100
+
+    Wrap File.unmount_mountable_with_operation()
+
+ gio/gfile.override |  54
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 54 insertions(+), 0 deletions(-)
+
+commit 5a614df9c5507d67f240462f7bf71b4cd411addf
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 18:14:11 2010 +0100
+
+    Wrap gio.File.stop_mountable()
+
+ gio/gfile.override |  52
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 52 insertions(+), 0 deletions(-)
+
+commit 6af506647f36f2b825bc6556df5ee57fa7721906
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 18:10:49 2010 +0100
+
+    Wrap gio.File.start_mountable()
+
+ gio/gfile.override |  52
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 52 insertions(+), 0 deletions(-)
+
+commit e700efc839fc0b651fc9794a1611190bffa80263
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 18:02:46 2010 +0100
+
+    Wrap gio.File.replace_readwrite_async()
+
+ gio/gfile.override |  55
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 55 insertions(+), 0 deletions(-)
+
+commit 92662f129fc728258fd5e34f53dcb081e3715017
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 17:00:26 2010 +0100
+
+    Wrap gio.File.poll_mountable()
+
+ gio/gfile.override |  41 +++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 41 insertions(+), 0 deletions(-)
+
+commit 99902b786500948c3278779841e4db54223b9256
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 16:56:26 2010 +0100
+
+    Wrap gio.File.open_readwrite_async()
+
+ gio/gfile.override |  44 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 44 insertions(+), 0 deletions(-)
+
+commit 8cff5d53183ae81364ac74a34a1d52e55e082eb4
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 16:50:15 2010 +0100
+
+    Wrap gio.File.eject_mountable_with_operation()
+
+ gio/gfile.override |  54
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 54 insertions(+), 0 deletions(-)
+
+commit ca436fe7785fd24b0f0e65f2f8c9fa6478277682
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 13:30:24 2010 +0100
+
+    Wrap gio.File.create_readwrite_async() and add a test
+
+ gio/gfile.override |  51
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gio.py  |  24 ++++++++++++++++++++++++
+ 2 files changed, 75 insertions(+), 0 deletions(-)
+
+commit f72c5e451dfaeb01b3c3d9243fed2732d3620462
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 13:20:11 2010 +0100
+
+    Wrap gio.Drive.stop()
+
+ gio/gdrive.override |  52
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 52 insertions(+), 0 deletions(-)
+
+commit 29043bade408338cefa13fb4b0c875aabd3ef05e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 13:00:42 2010 +0100
+
+    Wrap gio.Drive.start()
+
+ gio/gdrive.override |  52
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 52 insertions(+), 0 deletions(-)
+
+commit dff374287bbecc8af782bbc726fad86c6c867754
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 12:45:29 2010 +0100
+
+    Add more remainders on missing methods of gio.Socket and related types
+
+ gio/gsocket.override |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit b8c7e996498bd72df551011af85ff05ef7335b4f
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 12:41:08 2010 +0100
+
+    Wrap gio.SocketListener.accept_socket_async|finish() and add a test
+
+ gio/gsocket.override  |   86
+ +++++++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gsocket.py |   24 +++++++++++++
+ 2 files changed, 108 insertions(+), 2 deletions(-)
+
+commit a5ae2d5ba3db34967fe07a3cc97b75df2793988c
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 12:28:53 2010 +0100
+
+    Wrap gio.SocketListener.accept_finish() and add a test
+
+ gio/gsocket.override  |   44 ++++++++++++++++++++++++++++++++++++++++++--
+ tests/test_gsocket.py |   24 ++++++++++++++++++++++++
+ 2 files changed, 66 insertions(+), 2 deletions(-)
+
+commit a5ab26cc1bb3e9dd57e2fdb26ef5c02e8066d097
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 11:19:34 2010 +0100
+
+    Wrap gio.SocketListener.accept_async()
+
+ gio/gsocket.override |   42 ++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 42 insertions(+), 0 deletions(-)
+
+commit c9496b29ef9ef232020a4044577d2947353953a5
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jan 1 11:14:35 2010 +0100
+
+    Wrap gio.SocketListener.accept_socket() and add a test
+
+ gio/gsocket.override  |   48
+ +++++++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gsocket.py |   13 +++++++++++++
+ 2 files changed, 60 insertions(+), 1 deletions(-)
+
+commit 1aa5e301c49f11e1c5ef58de44b4b03f714d1a70
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Thu Dec 31 16:35:18 2009 +0100
+
+    Wrap gio.SocketListener.accept() and add a test
+
+ gio/gsocket.override  |   46
+ +++++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gsocket.py |   13 +++++++++++++
+ 2 files changed, 58 insertions(+), 1 deletions(-)
+
+commit aaedcf166c78baf5449ef59d0ade4a29077fedc7
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Thu Dec 31 16:25:33 2009 +0100
+
+    Make cancellable optional in gio.SocketClient.connect_to_host()
+
+ gio/gio.defs |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3829d7667b19126fb74562b28d271e616b154c99
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Thu Dec 31 15:25:10 2009 +0100
+
+    Wrap gio.SocketListener.add_address() and add a test
+
+ gio/gsocket.override  |   57
+ ++++++++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gsocket.py |    9 +++++++
+ 2 files changed, 65 insertions(+), 1 deletions(-)
+
+commit 5bec72f34ea75bc56158cae5c39d61a2a4e7e601
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Thu Dec 31 10:19:47 2009 +0100
+
+    Add more remainders on missing methods of gio.Socket and related types
+
+ gio/gsocket.override |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit b08b20f2b1a57bcbf400d6fe8e87cf052bdb719d
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Thu Dec 31 10:16:18 2009 +0100
+
+    Wrap gio.SocketClient.connect_to_service_async()
+
+ gio/gsocket.override |   47
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 47 insertions(+), 0 deletions(-)
+
+commit 116ea1bfe32946e67aa54eb8dc7b977e57f254c2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Thu Dec 31 10:10:43 2009 +0100
+
+    Wrap gio.SocketClient.connect_to_host_async()
+
+ gio/gsocket.override |   48
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 48 insertions(+), 0 deletions(-)
+
+commit 9c930910505d5b9001b8cec17ff98fadeaa799e2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Thu Dec 31 09:59:46 2009 +0100
+
+    Wrap gio.SocketClient.connect_async()
+
+ gio/gsocket.override |   45 +++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 45 insertions(+), 0 deletions(-)
+
+commit dff024256295c15e49888ad9d5fef74a7746edd7
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Wed Dec 30 23:44:25 2009 +0100
+
+    Wrap gio.SocketAddressEnumerator.next_async() and add a test
+
+ gio/gsocket.override  |   42 ++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gsocket.py |   16 ++++++++++++++++
+ 2 files changed, 58 insertions(+), 0 deletions(-)
+
+commit e2330bd0d6cbc49b0ecb27b30e3b0593935ce229
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Wed Dec 30 23:43:14 2009 +0100
+
+    Add a missing object gio.InetSocketAddress new in GIO 2.22
+
+ gio/gio-types.defs |   7 +++++++
+ gio/gio.defs      |   31 +++++++++++++++++++++++++++++++
+ 2 files changed, 38 insertions(+), 0 deletions(-)
+
+commit 6040b33467ea381c6cb02f6a5efc0745fa8fa47b
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Wed Dec 30 22:54:47 2009 +0100
+
+    Make cancellable optional for gio.SocketAddressEnumerator.next()
+
+ gio/gio.defs |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit b19f59790b9de943d69b6c5e483928e0443c3d20
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Wed Dec 30 22:17:44 2009 +0100
+
+    Add a remainder of the Socket methods that needs manual wrapping still
+
+ gio/gsocket.override |    5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 771a7c3fdef7b2e98e509293a8376a81c1282286
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Wed Dec 30 17:20:35 2009 +0100
+
+    Wrap gio.Socket.condition_wait() and add a test
+
+ gio/gsocket.override  |   27 +++++++++++++++++++++++++++
+ tests/test_gsocket.py |    6 +++++-
+ 2 files changed, 32 insertions(+), 1 deletions(-)
+
+commit 50960656815b0897a5ebe5f011537b8dcbdc857e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Wed Dec 30 16:21:49 2009 +0100
+
+    Wrap gio.Socket.condition_check() and add a test
+
+ gio/Makefile.am       |    1 +
+ gio/gio.override      |    1 +
+ gio/gsocket.override  |   41 +++++++++++++++++++++++++++++++++++++++++
+ tests/test_gsocket.py |   21 +++++++++++++++++++++
+ 4 files changed, 64 insertions(+), 0 deletions(-)
+
+commit de7a359e81792ae8573ac944455ea289985449ed
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Wed Dec 30 14:07:52 2009 +0100
+
+    Wrap gio.Resolver.lookup_service_finish() and add a test
+
+ gio/gresolver.override  |   37 +++++++++++++++++++++++++++++++++++++
+ tests/test_gresolver.py |   13 +++++++++++++
+ 2 files changed, 50 insertions(+), 0 deletions(-)
+
+commit 308421789ce849040d645077c41c80b6e2e65e83
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Wed Dec 30 14:00:22 2009 +0100
+
+    Wrap gio.Resolver.lookup_service_async()
+
+ gio/gresolver.override |   48
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 48 insertions(+), 0 deletions(-)
+
+commit 9d56ce775f56fff1b1ef3c75843c0583e39f75c3
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Wed Dec 30 11:11:32 2009 +0100
+
+    Wrap gio.Resolver.lookup_service() and add a test
+
+ gio/gresolver.override  |   42 ++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gresolver.py |    5 +++++
+ 2 files changed, 47 insertions(+), 0 deletions(-)
+
+commit 7fc71f490494dae73a5264869a97a9d30814930e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Dec 29 22:12:50 2009 +0100
+
+    Wrap gio.Resolver.lookup_by_address_async() and add a test
+
+ gio/gresolver.override  |   46
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gresolver.py |   14 ++++++++++++++
+ 2 files changed, 60 insertions(+), 0 deletions(-)
+
+commit c91656dbe56f07d3ebbad5113467c22427cf212a
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Dec 29 21:41:30 2009 +0100
+
+    Wrap gio.Resolver.lookup_by_name_finish() and add a test
+
+ gio/gresolver.override  |   82
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gresolver.py |   16 ++++++++-
+ 2 files changed, 96 insertions(+), 2 deletions(-)
+
+commit 45b477342fa1c2435917c6d97745ad57665c4734
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Dec 29 17:15:44 2009 +0100
+
+    Wrap gio.Drive.eject_with_data()
+
+ gio/gdrive.override |  54
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 54 insertions(+), 0 deletions(-)
+
+commit 635227480f9659a1f91ab1ec12536d3ed012a976
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Dec 29 17:06:52 2009 +0100
+
+    Deprecate old gio.Drive methods
+
+ gio/gdrive.override |   7 ++++++-
+ gio/gio.defs       |    1 +
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+commit 3c0cbc95af29b1e192ed4b5963e96e39c70b349c
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Dec 29 13:51:54 2009 +0100
+
+    Small fix in the header
+
+ gio/gdrive.override |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7589128515b79d836365247dc876538c6352da23
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Dec 29 12:40:50 2009 +0100
+
+    Wrap gio.Resolver.lookup_by_name() and add a couple of tests
+
+ gio/Makefile.am        |    1 +
+ gio/gio.override       |    1 +
+ gio/gresolver.override  |   57
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gresolver.py |   21 +++++++++++++++++
+ 4 files changed, 80 insertions(+), 0 deletions(-)
+
+commit 604d2bf220b1fefa415baaedbdb2882dbaf9e07e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Dec 29 12:39:13 2009 +0100
+
+    Make cancellable an optional parameter in
+    gio.Resolver.lookup_by_address()
+
+ gio/gio.defs |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 00029145f4cd10759b37b38fb9f72435bf26b28b
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Dec 29 10:15:14 2009 +0100
+
+    Strip g_ prefix for many other functions
+
+ gio/gio.defs |   94
+ +++++++++++++++++++++++++++++-----------------------------
+ 1 files changed, 47 insertions(+), 47 deletions(-)
+
+commit 56d5dfc4fd862e32c19f944a0feb7a00a9154f06
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Dec 29 10:12:53 2009 +0100
+
+    Strip g_prefix from InetAddress functions
+
+ gio/gio.defs |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 1d360301d51a587a36a59f5d62e354484bbd2b31
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Dec 29 10:03:59 2009 +0100
+
+    Fix function name gio.resolver_get_default()
+
+    Strip the g_ prefix from function name
+
+ gio/gio.defs |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 0fe00109c4f6fc27cbaae9b0a24ecfac71355d2f
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Dec 29 09:54:05 2009 +0100
+
+    Wrap gio.FileIOStream.query_info_async() and add a test
+
+ gio/Makefile.am           |    1 +
+ gio/gfileiostream.override |  68
+ ++++++++++++++++++++++++++++++++++++++++++++
+ gio/gio.override          |    1 +
+ tests/test_gio.py         |   18 +++++++++++
+ 4 files changed, 88 insertions(+), 0 deletions(-)
+
+commit 86783c695f3641b9491962e8f95a4dcb91f4017c
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Tue Dec 29 13:08:29 2009 +0100
+
+    Register enums and flags in PyGI if needed
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=603534
+
+ gobject/pygenum.c  |  20 ++++++++++++++------
+ gobject/pygflags.c |  19 +++++++++++++------
+ 2 files changed, 27 insertions(+), 12 deletions(-)
+
+commit b90c01cff5ff5cb2796182f2ffd7b5248eaeed6a
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Dec 28 22:41:54 2009 +0100
+
+    Wrap GIOStream.close_async() and add a test
+
+ gio/Makefile.am       |    1 +
+ gio/gio.override      |    1 +
+ gio/giostream.override |   68
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_gio.py     |   21 +++++++++++++++
+ 4 files changed, 91 insertions(+), 0 deletions(-)
+
+commit 0bff01bcee73a0e0d18342331136119c4e8bf151
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Dec 28 22:39:09 2009 +0100
+
+    Make cancellable an optional parameter in GFile.create_readwrite()
+
+ gio/gio.defs |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1cabd733cde269ce3164834933f4a226673ecb0b
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Dec 28 21:39:50 2009 +0100
+
+    Remove a duplicate entry in gio.defs
+
+ gio/gio.defs |    9 ---------
+ 1 files changed, 0 insertions(+), 9 deletions(-)
+
+commit 9ac372ad0bcfdec4bb1c96bc152246542a59a9b1
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Dec 28 21:37:49 2009 +0100
+
+    Wrap gio.FileInfo.set_modification_time and add a test
+
+ gio/gfileinfo.override |   33 ++++++++++++++++++++++++++++++++-
+ tests/test_gio.py     |    7 ++++++-
+ 2 files changed, 38 insertions(+), 2 deletions(-)
+
+commit 7bc2673f92138b1804d8eba091942d14d8884f90
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Dec 28 18:28:03 2009 +0100
+
+    Wrap gio.EmblemedIcon.get_emblems() and add a test
+
+ gio/gicon.override  |  14 ++++++++++++++
+ tests/test_gicon.py |   7 +++++++
+ 2 files changed, 21 insertions(+), 0 deletions(-)
+
+commit 3d5056ad766d6856d8d6459fe9b377de2f0fd172
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat Dec 26 22:27:48 2009 +0100
+
+    Update Enums and Flags with new API
+
+ gio/gio-types.defs |  153
+ ++++++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 files changed, 149 insertions(+), 4 deletions(-)
+
+commit 62a9d660a4a2d5fab1d57c6c96c984ff02d25ccd
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Dec 25 18:06:39 2009 +0100
+
+    Post release version bump to 2.21.1
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2bd92cba5b028f0f78c35ecb34e648e95248f9d3
+Author: Bastian Winkler <buz@netbuz.org>
+Date:  Fri Aug 14 15:10:26 2009 +0200
+
+    Fix handling of uchar in pyg_value_from_pyobject
+
+    Set the value by g_value_set_uchar and allow to use integer types
+    from python.
+
+ gobject/pygtype.c |   15 +++++++++++----
+ 1 files changed, 11 insertions(+), 4 deletions(-)
+
+commit 828d0f042b59ea0319f33a23803c179af34ef2f1
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Tue Dec 22 18:05:47 2009 +0100
+
+    Add Gtk.keysyms to overrides
+
+ gi/overrides/Gtk.py     |    2 +
+ gi/overrides/Makefile.am |    1 +
+ gi/overrides/keysyms.py  | 1499
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 1502 insertions(+), 0 deletions(-)
+
+commit 24fa1224ff00b9da177e0bfaa1e14e1b899e4976
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Wed Nov 25 10:33:56 2009 +0100
+
+    The array field 'length' starts to count from the C arg list, so
+    need to decrement when it's a method
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=602640
+
+ gi/pygi-argument.c |  11 ++++++++-
+ gi/pygi-argument.h |   3 +-
+ gi/pygi-info.c     |  14 ++++++++++-
+ tests/libtestgi.c  |  60
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/libtestgi.h  |   4 +++
+ tests/test_gi.py   |  15 +++++++++++++
+ 6 files changed, 103 insertions(+), 4 deletions(-)
+
+commit 867536c6734e606d045760837ed22583da06566e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Dec 18 10:50:09 2009 +0100
+
+    Update NEWS and README, release pygobject 2.21.0
+
+ NEWS  |   18 ++++++++++++++++++
+ README |    6 +++---
+ 2 files changed, 21 insertions(+), 3 deletions(-)
+
+commit f50fbd24fa61863aaefa4ae1e12e0b314ecd43ae
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Dec 18 10:31:48 2009 +0100
+
+    Add pygi-external.h into Makefile SOURCES
+
+ gobject/Makefile.am |   3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 108c03b78f04b4bcfe066a6cb4d941e172bd32fe
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Dec 18 01:20:34 2009 +0100
+
+    Bug 598435 - No wrapping for g_find_program_in_path ()
+
+ glib/glibmodule.c |   20 ++++++++++++++++++++
+ 1 files changed, 20 insertions(+), 0 deletions(-)
+
+commit d3d5cb3a4a2c2cb2bd0c2571304d59e19bc08452
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Thu Dec 17 21:54:36 2009 +0100
+
+    Wrap new API added in GIO-UNIX 2.22
+
+ gio/unix-types.defs |  22 ++++++++++
+ gio/unix.defs      |  115
+ ++++++++++++++++++++++++++++++++++++++++++++++++++-
+ gio/unix.override   |   8 ++++
+ 3 files changed, 144 insertions(+), 1 deletions(-)
+
+commit c87c8a81947a68507e8f3bcaf8e0e969b3e5331b
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Thu Dec 17 21:52:11 2009 +0100
+
+    Bump required glib version to 2.22.4
+
+    I've committed a patch to glib which will be released in the stable
+    branch.
+    Without the patch the unix module will fail, so I'm forced to bump.
+
+ configure.ac |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit b630c8d4b1e55938dac89729768c4a877b305215
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Thu Dec 17 02:24:45 2009 +0100
+
+    Properly define Connectable as interface type and not object type
+
+ gio/gio-types.defs |  12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+commit e955b931b07113c7432f7a85f882f69f12d263ad
+Author: Anderson Lizardo <anderson.lizardo@openbossa.org>
+Date:  Mon Nov 30 22:01:25 2009 +0100
+
+    Depend on GLib 2.20 rather than 2.22
+
+    Backport g_array_get_element_size.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=603411
+
+ configure.ac     |    2 +-
+ gi/pygi-private.h |   19 +++++++++++++++++++
+ 2 files changed, 20 insertions(+), 1 deletions(-)
+
+commit 542fdf6da4ad8f2d28d0d50152bd93cb4d8ee39a
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sat Nov 28 18:48:19 2009 +0000
+
+    Use the limit constants from glib and interpret G_MAXUINT32 as
+    PyLong_FromLongLong
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=602384
+
+ gi/pygi-argument.c |  14 +++++++-------
+ tests/test_gi.py   |  18 +++++++++---------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+commit 38e89942d29f2a1dba47ab4a8d5edc84322707cd
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Mon Nov 30 00:10:56 2009 +0100
+
+    Suppress warnings about format conversion
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=603355
+
+ gobject/generate-constants.c |   32 ++++++++++++++++----------------
+ 1 files changed, 16 insertions(+), 16 deletions(-)
+
+commit cfa7d005487e17e8f7c1ceb14282d3a5baadb736
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Sat Nov 28 00:22:21 2009 +0100
+
+    Remove global checks for pointers and move them in type cases that
+    need them
+
+ gi/pygi-argument.c |  516
+ ++++++++++++++++++++++++++++++++++++++++++----------
+ gi/pygi-info.c     |  333 +++++++++++++++++----------------
+ 2 files changed, 596 insertions(+), 253 deletions(-)
+
+commit d1ae73f3cf7cebdb74c9ec56b08928a2a53b9de6
+Author: Johan Dahlin <johan@gnome.org>
+Date:  Mon Nov 23 15:58:17 2009 -0200
+
+    Pythonify. Avoid ; and () around if statements
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=602830
+
+ gi/types.py |   8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit a8660621679c629fc81320a8ddf5bf2c7ee1f177
+Author: Johan Dahlin <johan@gnome.org>
+Date:  Tue Nov 24 10:36:18 2009 -0200
+
+    Remove trailing whitespace
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=602830
+
+ gi/module.py |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 66c34805223af9e63c7d61f21a3dbd7505a8f256
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Mon Nov 30 10:03:34 2009 +0000
+
+    Set a default constructor for boxed structs that don't have one
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=602735
+
+ gi/Makefile.am     |   2 +
+ gi/gimodule.c     |    1 +
+ gi/module.py      |    2 +-
+ gi/pygi-argument.c |  14 ++++-
+ gi/pygi-boxed.c    |  184
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ gi/pygi-boxed.h    |  40 +++++++++++
+ gi/pygi-info.c     |   2 +-
+ gi/pygi-private.h  |   1 +
+ gi/pygi.h         |    6 ++
+ gi/types.py       |   18 -----
+ tests/libtestgi.c  |  72 ++++++++++----------
+ tests/libtestgi.h  |  18 +++---
+ tests/test_gi.py   |  47 ++++++++------
+ 13 files changed, 321 insertions(+), 86 deletions(-)
+
+commit e7e2fccae36c28c7e9f288fcd4c90a001140e307
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Mon Nov 30 10:53:57 2009 +0000
+
+    Revert "Use the limit constants from glib and interpret G_MAXUINT32
+    as PyLong_FromLongLong"
+
+    This reverts commit 05a2ed55f3e5d2620de8b3b6b0d99e928ef3b041.
+
+ gi/pygi-argument.c |  14 +++++++-------
+ tests/test_gi.py   |  18 +++++++++---------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+commit 05a2ed55f3e5d2620de8b3b6b0d99e928ef3b041
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sat Nov 28 18:48:19 2009 +0000
+
+    Use the limit constants from glib and interpret G_MAXUINT32 as
+    PyLong_FromLongLong
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=602384
+
+ gi/pygi-argument.c |  14 +++++++-------
+ tests/test_gi.py   |  18 +++++++++---------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+commit e24d155dd7b4a5b9c25c054137d1370c369d3192
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sat Nov 28 18:45:54 2009 +0000
+
+    Add the missing limit constants from glibconfig.h
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=603244
+
+ gobject/generate-constants.c |   17 ++++++++++++++++-
+ 1 files changed, 16 insertions(+), 1 deletions(-)
+
+commit 3a295cb7ffaaaf29c71b8833cf0ee5ec7ceaa909
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat Nov 28 18:48:49 2009 +0100
+
+    Fix bad name when rebuilding the unix source module
+
+ gio/Makefile.am |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit a8cbb6fb72dbe6630d1265b18095c9a96f496b86
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat Nov 28 18:47:26 2009 +0100
+
+    Wrap new API added in GIO 2.22
+
+ gio/gio-types.defs |  138 +++
+ gio/gio.defs      | 2444
+ +++++++++++++++++++++++++++++++++++++++++++++++-----
+ 2 files changed, 2360 insertions(+), 222 deletions(-)
+
+commit 96f6c638709636d7e2ddf560b877879691da3314
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sat Nov 28 11:03:51 2009 +0000
+
+    A few tests about interfaces
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=601181
+
+ tests/libtestgi.c |   23 +++++++++++++++++++++++
+ tests/libtestgi.h |   16 ++++++++++++++++
+ tests/test_gi.py  |   21 +++++++++++++++++++++
+ 3 files changed, 60 insertions(+), 0 deletions(-)
+
+commit 076ba3156c13375a75983cef7a409c8c8afea119
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Thu Nov 26 23:50:54 2009 +0100
+
+    Fix members initialization in metaclasses
+
+    In metaclasses, the test for the name of the class was wrong, since it
+    prevented one to create a subclass with the same name (especially
+    annoying for
+    overrides). Now, if a GType is available from the info, the fact
+    that it
+    doesn't have any wrapper yet means that the metaclass is creating
+    the base
+    class, which will be registerd just after its creation. This is
+    true for
+    objects, and for structures registered as boxed or pointer too.
+
+    This patch includes a test for basic subclassing in Python. It
+    notably tests
+    that methods don't get overridden by the metaclass.
+
+ gi/types.py     |    5 +++--
+ tests/test_gi.py |   19 +++++++++++++++++++
+ 2 files changed, 22 insertions(+), 2 deletions(-)
+
+commit ac80e64c9f7d257865aa820753e52d56cf2871c8
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Fri Nov 27 12:06:59 2009 +0000
+
+    Structs in arrays are not marshalled correctly
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=602709
+
+ gi/pygi-argument.c |  29 ++++++++++++++++++++++++-----
+ tests/libtestgi.c  |  23 ++++++++++++++++++++++-
+ tests/libtestgi.h  |   7 +++++--
+ tests/test_gi.py   |   8 ++++++++
+ 4 files changed, 59 insertions(+), 8 deletions(-)
+
+commit 4a373b8ad6ec137e911b92a3e745e0fd76541292
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Wed Nov 25 16:53:55 2009 +0100
+
+    Use the right variable when looking up in sys.modules
+
+ gi/importer.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit fc3dca018e85aee34ade79d104ebd8cdd1dd5968
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Tue Nov 24 15:52:47 2009 +0100
+
+    Accept 0 as a valid value for flag and enum arguments
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=602638
+
+ gi/pygi-argument.c |  19 ++++++++++++++++++-
+ tests/libtestgi.c  |   6 ++++++
+ tests/libtestgi.h  |   1 +
+ tests/test_gi.py   |   1 +
+ 4 files changed, 26 insertions(+), 1 deletions(-)
+
+commit 33081c29a1c2fdec2b8bfe17ae0a72b8db7a8d84
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Tue Nov 24 13:10:11 2009 +0100
+
+    Add stuff to .gitignore
+
+ .gitignore |   7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 5c010fe673d9bd01c27c8d7d312064665275888c
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Mon Nov 23 22:39:12 2009 +0100
+
+    Remove the girepository module
+
+ Makefile.am                       |    2 +-
+ configure.ac                      |   17 -
+ girepository/Makefile.am          |   54 --
+ girepository/__init__.py          |   24 -
+ girepository/bank-argument.c      |  379 ------------
+ girepository/bank-info.c          | 1194
+ ------------------------------------
+ girepository/bank-repository.c     |  236 -------
+ girepository/bank.c               |  155 -----
+ girepository/bank.h               |   80 ---
+ girepository/btypes.py                    |  300 ---------
+ girepository/importer.py          |   51 --
+ girepository/module.py                    |  224 -------
+ girepository/overrides/Gdk.py     |   14 -
+ girepository/overrides/Gtk.py     |    8 -
+ girepository/repository.py        |   51 --
+ tests/test_girepository.py        |  386 ------------
+ 16 files changed, 1 insertions(+), 3174 deletions(-)
+
+commit a644edf0515c26ed027522891ccf02aceac764e8
+Author: Johan Dahlin <johan@gnome.org>
+Date:  Mon Nov 23 15:32:16 2009 -0200
+
+    Create overridden modules in two passes
+
+    This patch splits overridden module creation into two passes. The
+    first pass
+    creates the auto-generated module normally before the overridden
+    module is
+    attempted to be imported. The second pass imports the overridden
+    module and
+    replaces the auto-generated module with the overridden. This is
+    necessary
+    for the overridden modules to be able to access the auto-generated
+    ones.
+
+ gi/importer.py |   34 +++++++++++++++++++++-------------
+ 1 files changed, 21 insertions(+), 13 deletions(-)
+
+commit fad89e12a744b57e6348968f351d25d167de8248
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sun Nov 22 17:56:20 2009 +0100
+
+    Add support for Any arguments
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=601253
+
+ gi/pygi-argument.c |  20 ++++++++++++--------
+ tests/libtestgi.c  |   5 +++++
+ tests/libtestgi.h  |   5 +++++
+ tests/test_gi.py   |   5 +++++
+ 4 files changed, 27 insertions(+), 8 deletions(-)
+
+commit 1dc62a998dd8d2a0a397f8309011a8d79cb56034
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sun Nov 22 17:25:04 2009 +0100
+
+    Register interfaces
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=601181
+
+ gi/gimodule.c |   33 +++++++++++++++++++++++++++++++++
+ gi/types.py   |    5 ++++-
+ 2 files changed, 37 insertions(+), 1 deletions(-)
+
+commit d67d5afb5115c1d8294415b2e1a82af2c737ba17
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Sun Nov 22 18:23:02 2009 +0200
+
+    Ignore one more file.
+
+ .gitignore |   1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 408b2186aea58a41ec26b9d0ca29ecd42df5ef7e
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Sun Nov 22 18:22:23 2009 +0200
+
+    Fix wrong minimum checking in float properties
+
+    Bug #587637.  Test the fix.
+
+ gobject/propertyhelper.py |   5 +++--
+ tests/test_properties.py  |   6 ++++++
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+commit 6ccf58afcf58e118903ced0135f0fe69b00e09ad
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Mon Oct 26 18:06:06 2009 +0000
+
+    Treat GI_INFO_TYPE_INTERFACE same as GI_INFO_TYPE_OBJECT
+
+ gi/pygi-argument.c |   3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit e6f730d6e1431e36bd5f6b503a1038617f8d1e7d
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Sat Nov 14 21:42:43 2009 +0100
+
+    Import pygtk properly to avoid failure on some setups
+
+ tests/test_gi.py |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit e604a89e9dc1a79687ef5fb94af7a2182be07dfb
+Author: Alex Dedul <rotmer@gmail.com>
+Date:  Sat Nov 14 21:39:15 2009 +0100
+
+    Search for python-config-${VERSION} when python${VERSION}-config is
+    not found
+
+    On Gentoo, notably, the config tool is named python-config-${VERSION},
+    while on
+    Fedora and Ubuntu, it is named python${VERSION}-config.
+
+    Signed-off-by: Simon van der Linden <svdlinden@src.gnome.org>
+
+ configure.ac |    7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+commit 4a887cfabb326cb99dc65073d592c03f59e2f141
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Sat Nov 14 21:36:19 2009 +0100
+
+    Fix silent rules setup
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 602afea88c338a38327cd84e08703c5daa384ec6
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Tue Nov 10 22:32:33 2009 +0200
+
+    Move threads_init() function from 'gobject' to 'glib'
+
+    Retain in original place for backward compatibility, but remove it
+    from the docs.
+
+ docs/reference/pygobject-functions.xml |   36
+ ++++++-------------------------
+ glib/glibmodule.c                     |   16 ++++++++++++++
+ 2 files changed, 23 insertions(+), 29 deletions(-)
+
+commit 734755912fff11332dc0e96317b7d6b7c4014e6a
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Mon Nov 9 22:44:12 2009 +0100
+
+    Remove PyGObject patches since they've been merged to master
+
+ ...pytype-aware-of-the-interface-enum-flags-.patch |  78 --------
+ patches/0002-Fix-girpository-build-setup.patch     |  186
+ ------------------
+ ...capabilities-to-import-wrappers-from-pygi.patch |  200
+ --------------------
+ ...ances-by-calling-tp_alloc-rather-than-PyO.patch |  29 ---
+ 4 files changed, 0 insertions(+), 493 deletions(-)
+
+commit 6a69288941e65312fe82649ec72d2f21b2dc618f
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Sat Nov 7 23:42:07 2009 +0100
+
+    Create instances by calling tp_alloc rather than PyObject_NEW
+
+    PyObject_NEW calls a generic allocator and should only be called by
+    tp_new, knowing
+    that the type's free function agrees. In pyg_boxed_new, we may
+    allocate
+    PyGBoxed subtypes, so the subtype's allocation function must be
+    called instead.
+
+ gobject/pygboxed.c |   3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 000f7c36e667c6e078e3370769ea868e56a1b4ee
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Sat Nov 7 16:43:35 2009 +0100
+
+    Add capabilities to import wrappers from pygi
+
+    At instance creation for boxed and pointers, at lookup for objects,
+    when the gtype has no wrapper yet, a wrapper may be imported from
+    pygi.
+
+    The feature is turned on at configure time by --enable-pygi.
+
+    Because we couldn't create a circular build dependency, PyGI's import
+    function and
+    API definition had to be copied in this tree.
+
+ configure.ac           |    8 +++++
+ gobject/pygboxed.c     |   10 +++++++
+ gobject/pygi-external.h |   66
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ gobject/pygobject.c    |   10 +++++++
+ gobject/pygpointer.c   |   11 ++++++++
+ 5 files changed, 105 insertions(+), 0 deletions(-)
+
+commit fdfbc90dbc9e305646b62d73de506b5e0e99cc91
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Sun Nov 8 20:03:58 2009 +0100
+
+    Update PyGObject patches
+
+    A file, pygi-external.h, was missing in patch #3.
+
+ ...capabilities-to-import-wrappers-from-pygi.patch |  74
+ ++++++++++++++++++--
+ ...ances-by-calling-tp_alloc-rather-than-PyO.patch |   2 +-
+ 2 files changed, 69 insertions(+), 7 deletions(-)
+
+commit 8f53ca8a72f9958711765281dd5c5bdfb7042d7d
+Author: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date:  Sun Nov 8 16:52:18 2009 +0100
+
+    Add myself to pygi.doap
+
+ pygi.doap |   5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 6f50d5102aec9288e1851f12e9d232b9c141d524
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Sun Nov 8 15:40:51 2009 +0100
+
+    Add a doap file
+
+ pygi.doap |   17 +++++++++++++++++
+ 1 files changed, 17 insertions(+), 0 deletions(-)
+
+commit ce673b9027868e6add4eeb438bc707eb40bfd046
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Sun Nov 8 13:06:54 2009 +0100
+
+    Add PyGObject patches
+
+ ...pytype-aware-of-the-interface-enum-flags-.patch |  78 ++++++++
+ patches/0002-Fix-girpository-build-setup.patch     |  186
+ ++++++++++++++++++++
+ ...capabilities-to-import-wrappers-from-pygi.patch |  138 +++++++++++++++
+ ...ances-by-calling-tp_alloc-rather-than-PyO.patch |  29 +++
+ 4 files changed, 431 insertions(+), 0 deletions(-)
+
+commit b24fd9633cabe1d95cde173a04e9a49833b06a26
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Sun Nov 8 12:35:08 2009 +0100
+
+    Initial import
+
+ .gitignore               |   33 +
+ Makefile.am              |   10 +
+ autogen.sh               |  159 +++
+ configure.ac             |   53 +
+ gi/Makefile.am                   |   50 +
+ gi/__init__.py                   |   24 +
+ gi/gimodule.c            |  144 ++
+ gi/importer.py                   |   89 ++
+ gi/module.py             |  167 +++
+ gi/overrides/Gdk.py      |   21 +
+ gi/overrides/Gtk.py      |   13 +
+ gi/overrides/Makefile.am  |   10 +
+ gi/pygi-argument.c       | 1976 ++++++++++++++++++++++++++
+ gi/pygi-argument.h       |   65 +
+ gi/pygi-info.c                   | 2093 ++++++++++++++++++++++++++++
+ gi/pygi-info.h                   |   64 +
+ gi/pygi-private.h        |   55 +
+ gi/pygi-repository.c     |  238 ++++
+ gi/pygi-repository.h     |   39 +
+ gi/pygi-struct.c         |  175 +++
+ gi/pygi-struct.h         |   40 +
+ gi/pygi-type.c                   |   96 ++
+ gi/pygi-type.h                   |   43 +
+ gi/pygi.h                |   99 ++
+ gi/pygobject-external.h   |   83 ++
+ gi/repository/Makefile.am |   8 +
+ gi/repository/__init__.py |   30 +
+ gi/types.py              |  163 +++
+ tests/Makefile.am        |   48 +
+ tests/libtestgi.c        | 3397
+ +++++++++++++++++++++++++++++++++++++++++++++
+ tests/libtestgi.h        |  643 +++++++++
+ tests/runtests.py        |   22 +
+ tests/test_gi.py         | 1416 +++++++++++++++++++
+ 33 files changed, 11566 insertions(+), 0 deletions(-)
+
+commit bfd3100a580b8bea9db25b8bb7443fb8c3dbe1cc
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Sat Nov 7 13:23:53 2009 +0100
+
+    Fix girpository build setup
+
+ configure.ac            |   21 ++++++----
+ girepository/Makefile.am |   13 +++---
+ m4/introspection.m4     |   92
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 111 insertions(+), 15 deletions(-)
+
+commit 421c03b1c5b69f90c778663df901b45ca3ee8ba5
+Author: Simon van der Linden <svdlinden@src.gnome.org>
+Date:  Fri Nov 6 19:17:36 2009 +0100
+
+    Make GType.pytype aware of the interface, enum, flags, pointer and
+    boxed wrappers
+
+ gobject/pygtype.c |   39 +++++++++++++++++++++++++++++++++------
+ 1 files changed, 33 insertions(+), 6 deletions(-)
+
+commit a9c168c58cc6a449b51653417bf3f58bdd41457c
+Author: Philippe Normad <phil@base-art.net>
+Date:  Wed Oct 21 18:01:16 2009 +0200
+
+    pygmainloop: fix use of PySignal_WakeUpFD API for nested loops
+
+    Fixes bug #481569
+
+ glib/pygmainloop.c |  95
+ +++++++++++++++++++++++++++------------------------
+ 1 files changed, 50 insertions(+), 45 deletions(-)
+
+commit c6a5750379354c12e2599b3c73b4f9a23fd39114
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Sep 25 20:12:21 2009 +0200
+
+    Post release version bump to 2.21.0
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 33920eb013628a5e22b7b32403fb965ae3210f47
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Wed Sep 23 21:52:04 2009 +0200
+
+    Update NEWS and release 2.20.0
+
+ NEWS |    6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 66b12f7d2f54143ea80b4f8aec863b26800363d6
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Wed Sep 23 21:51:43 2009 +0200
+
+    Bump version to 2.20.0
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 7bf87338a026ac82f908aa5fddf2bfea2daf6617
+Author: Brian Cameron <Brian.Cameron@sun.com>
+Date:  Wed Sep 23 12:11:50 2009 -0500
+
+    Updated uninstalled.pc file so that it contains the right paths for
+    defsdir files and codegen files.  See bug #596023.
+
+ pygobject-2.0-uninstalled.pc.in |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit d042402b7c649b2bed7f20038eb82518ec7cc9b3
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Tue Sep 22 22:02:27 2009 +0300
+
+    Plug reference leak of GSource in pyg_main_loop_init()
+
+    Bug #579406, second change.
+
+ glib/pygmainloop.c |   1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 640be8109d066e85ed77c810830a5f73c750415b
+Author: Frédéric Péters <fpeters@0d.be>
+Date:  Sun Aug 30 16:46:02 2009 +0200
+
+    Specify programming language in .devhelp file
+
+    This add a new language attribute (hardcoded to python) in the
+    .devhelp
+    file that is produced when using ref-html-style.xsl.
+
+ docs/xsl/devhelp.xsl |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit c888b5ca722fcad6a03de585606c677c2969ebd6
+Author: Paolo Borelli <pborelli@gnome.org>
+Date:  Thu Aug 13 21:32:07 2009 +0200
+
+    Allow to use automake 1.11
+
+ autogen.sh |  13 +++++++------
+ 1 files changed, 7 insertions(+), 6 deletions(-)
+
+commit 30deaba4bd1e199aab75cb346ee9237237807fbd
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Aug 11 22:19:50 2009 +0200
+
+    Update README
+
+ README |   10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+commit af165d350d0d1bb493be5140bf84376d3da1e4d8
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Aug 11 22:16:52 2009 +0200
+
+    Update AUTHORS
+
+ AUTHORS |    8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 5f9f87f276b97964b525a501d8584ea8b4d8bfd2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Aug 11 22:11:43 2009 +0200
+
+    Add myself and Paul as maintainers
+
+ MAINTAINERS   |    8 ++++++++
+ pygobject.doap |   14 ++++++++++++++
+ 2 files changed, 22 insertions(+), 0 deletions(-)
+
+commit 3bfae47fbcb5523d91fb2d1ed7ea347eeddd1775
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Aug 11 20:52:44 2009 +0200
+
+    Update NEWS release 2.19.0
+
+ NEWS |   29 +++++++++++++++++++++++++++++
+ 1 files changed, 29 insertions(+), 0 deletions(-)
+
+commit e82a1841f31ad54dd50569d0d45290713409e0bf
+Author: John Finlay <finlay@moeraki.com>
+Date:  Tue Aug 11 00:04:31 2009 -0700
+
+    Add macros to help with Python list to/from GList/GSList conversions.
+
+ gobject/pygobject.h | 242
+ ++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 241 insertions(+), 1 deletions(-)
+
+commit f1fad96da2c531fbd3218923baa4fe806a2942d4
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat Aug 8 21:37:54 2009 +0200
+
+    Bug 590063 â€“ GFileInfo.list_attributes should accept None/NULL
+
+ gio/gfileinfo.override |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b7907cf6ff6ccf8d38b5206f09f5c864c205e5de
+Author: Johan Dahlin <johan@gnome.org>
+Date:  Fri Jul 24 14:30:37 2009 -0300
+
+    Remove myself as a maintainer
+
+ MAINTAINERS   |    4 ----
+ pygobject.doap |    7 -------
+ 2 files changed, 0 insertions(+), 11 deletions(-)
+
+commit be6eb21320b4688bcfcd8cbea33f7be29a76f2a2
+Author: John Finlay <finlay@moeraki.com>
+Date:  Wed Jul 8 15:47:44 2009 -0700
+
+           * codegen/defsgen.py (clean_patterns): Strip out Windows
+           DLL API macros.
+
+ codegen/defsgen.py |   6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 2214cad3529979e29342a7e1fdc2915b90ce9c10
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Jun 23 21:18:23 2009 +0200
+
+    Fix the gio.unix namespace in docs
+
+ docs/Makefile.am                         |    2 ++
+ docs/reference/pygio-classes.xml         |    2 --
+ docs/reference/pygio-unixinputstream.xml  |   26
+ +++++++++++++-------------
+ docs/reference/pygio-unixoutputstream.xml |   26
+ +++++++++++++-------------
+ docs/reference/pygiounix-classes.xml     |   13 +++++++++++++
+ docs/reference/pygobject-ref.xml         |    1 +
+ 6 files changed, 42 insertions(+), 28 deletions(-)
+
+commit c0acaedfe7f4e488a490e07e3184f0709e1fadc2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Jun 22 23:13:36 2009 +0200
+
+    Add docs for gio functions (mostly for content types)
+
+ docs/Makefile.am                  |    2 +
+ docs/reference/pygio-classes.xml   |   1 +
+ docs/reference/pygio-functions.xml |  395
+ ++++++++++++++++++++++++++++++++++++
+ 3 files changed, 398 insertions(+), 0 deletions(-)
+
+commit ebddee47fb7f3e06f9e0a7a14b9532d5cf8a3881
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sun Jun 21 18:35:56 2009 +0200
+
+    Add docs for gio.Unix[In|Out]putStream classes
+
+ docs/Makefile.am                         |    4 +
+ docs/reference/pygio-classes.xml         |    2 +
+ docs/reference/pygio-unixinputstream.xml  |  202
+ +++++++++++++++++++++++++++++
+ docs/reference/pygio-unixoutputstream.xml |  202
+ +++++++++++++++++++++++++++++
+ 4 files changed, 410 insertions(+), 0 deletions(-)
+
+commit 5b71e58117c85634d95d08449eb54079b246e5be
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Sun Jun 21 16:50:03 2009 +0300
+
+    Document that many functions got moved gobject -> glib
+
+ docs/reference/pygobject-functions.xml |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit b270dc43f2cef5260b0bbc71356fd8e6a2b7f754
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat Jun 20 19:23:25 2009 +0200
+
+    Add docs for class gio.DataOutputStream
+
+ docs/Makefile.am                         |    2 +
+ docs/reference/pygio-classes.xml         |    1 +
+ docs/reference/pygio-dataoutputstream.xml |  504
+ +++++++++++++++++++++++++++++
+ 3 files changed, 507 insertions(+), 0 deletions(-)
+
+commit 549313fc4886fa3deb31761de6f5400708165d86
+Author: Murray Cumming <murrayc@murrayc.com>
+Date:  Thu Jun 18 18:48:37 2009 +0200
+
+    Allow h2def.py to work when there are tabs or multiple spaces after
+    the struct keyword.
+
+ codegen/h2def.py |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 5c36ef20dca8cd1793f2d3e88949675299097f40
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Jun 15 23:02:34 2009 +0200
+
+    Add dpcs for class gio.DataInputStream
+
+ docs/Makefile.am                        |    2 +
+ docs/reference/pygio-classes.xml        |    1 +
+ docs/reference/pygio-constants.xml      |   66 +++
+ docs/reference/pygio-datainputstream.xml |  799
+ ++++++++++++++++++++++++++++++
+ 4 files changed, 868 insertions(+), 0 deletions(-)
+
+commit a8b36c343c6850af929c1d5a930f923831b4e637
+Author: Theppitak Karoonboonyanan <thep@linux.thai.net>
+Date:  Mon Jun 15 23:25:01 2009 +0300
+
+    Fix build when builddir is not the same as srcdir
+
+    Bug #585817.
+
+ girepository/Makefile.am |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9d9ae97b8a49836ec1f3b8d6529bafe1cc06d4d7
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Mon Jun 15 23:19:47 2009 +0300
+
+    Make gio.Emblem constructor new-style
+
+    Add optional 'origin' parameter.  Expand gio.Emblem documentation and
+    mark gio.emblem_new_with_origin as sort-of-deprecated.
+
+ docs/reference/pygio-emblem.xml |   51
+ +++++++++++++++++++++++++++++++++++++-
+ gio/gio.defs                   |    5 ++-
+ 2 files changed, 52 insertions(+), 4 deletions(-)
+
+commit 268e1681fd5b46e6412d3a8db84f3f1cb02fdbde
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat Jun 13 14:44:47 2009 +0200
+
+    Add docs for gio.BufferedOutputStream class
+
+ docs/Makefile.am                             |   96 +++++-----
+ docs/reference/pygio-bufferedoutputstream.xml |  275
+ +++++++++++++++++++++++++
+ docs/reference/pygio-classes.xml             |    1 +
+ 3 files changed, 325 insertions(+), 47 deletions(-)
+
+commit a6e25aaa7c8f27d62f2917b06728d7ccfcd46416
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat Jun 13 14:38:34 2009 +0200
+
+    Fix gio.BufferedInputStream docs
+
+    Added the constructor reference and fixed a typo in properties header
+
+ docs/reference/pygio-bufferedinputstream.xml |   34
+ ++++++++++++++++++++++++-
+ 1 files changed, 32 insertions(+), 2 deletions(-)
+
+commit a9b13b60a5aad726d7d7dd7fdc5153b1561fb591
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat Jun 13 01:25:06 2009 +0200
+
+    Add docs for gio.BufferedInputStream
+
+ docs/Makefile.am                            |    2 +
+ docs/reference/pygio-bufferedinputstream.xml |  431
+ ++++++++++++++++++++++++++
+ docs/reference/pygio-classes.xml            |    1 +
+ 3 files changed, 434 insertions(+), 0 deletions(-)
+
+commit 7766daa59b0e2b85413cee368bf2ebd2afe198e1
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Sun May 31 18:25:47 2009 +0300
+
+    Cleanup GIO overrides to use Python function/method names
+
+    Also move several gio.Mount overrides over from 'gio.override' to
+    existing 'gmount.override'.  Part of bug #584289.
+
+ gio/gfile.override          |   20 ++--
+ gio/gfileenumerator.override |    6 +-
+ gio/ginputstream.override    |    2 +-
+ gio/gio.override            |  204
+ ------------------------------------------
+ gio/gmount.override         |  204
+ ++++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 218 insertions(+), 218 deletions(-)
+
+commit 07e9c18dc092f6546230168b6b69c1b3454e120a
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Sun May 31 18:56:55 2009 +0300
+
+    Make codegen report errors using Python function/method names
+
+    Part of bug #584289.
+
+ codegen/codegen.py    |    9 +++++----
+ codegen/definitions.py |   10 +++++++++-
+ 2 files changed, 14 insertions(+), 5 deletions(-)
+
+commit 235fde85d015382f2ba38b21968e82b3ac0b6612
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri Jun 12 00:12:17 2009 +0200
+
+    Fix object type in gio.BufferedInputStream_fill_async
+
+ gio/gbufferedinputstream.override |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 407b0e909056f15960e6a4e549896d786ce0a0b2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Jun 9 00:08:21 2009 +0200
+
+    Wrap gio.BufferedInputStream.fill_async
+
+    Wrap the method gio.BufferedInputStream.fill_async and add a test
+
+ gio/Makefile.am                  |    1 +
+ gio/gbufferedinputstream.override |   70
+ +++++++++++++++++++++++++++++++++++++
+ gio/gio.override                 |    1 +
+ tests/test_gio.py                |   25 +++++++++++++
+ 4 files changed, 97 insertions(+), 0 deletions(-)
+
+commit b7c96b41b287685fe57504e0add3a6f16e649975
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Jun 8 15:42:40 2009 +0200
+
+    Add gio.BufferedOutputStream which was forgotten in the types
+    definition
+
+ gio/gio-types.defs |   7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+commit 3666f75af4ef2c8e038116aee5afada59d59f689
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Jun 8 14:20:02 2009 +0200
+
+    Add docs for gio.MemoryOutputStream
+
+ docs/Makefile.am                           |    2 +
+ docs/reference/pygio-classes.xml           |    1 +
+ docs/reference/pygio-memoryoutputstream.xml | 175
+ +++++++++++++++++++++++++++
+ 3 files changed, 178 insertions(+), 0 deletions(-)
+
+commit 6eb5e3988cbddb4afb3d5747364d6eb80370bb78
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Jun 8 13:30:15 2009 +0200
+
+    Split overrides for gio.MemoryOutputStream
+
+ gio/Makefile.am                 |    1 +
+ gio/gio.override                |    1 +
+ gio/gmemoryoutputstream.override |   45
+ ++++++++++++++++++++++++++++++++++++++
+ gio/goutputstream.override      |   24 --------------------
+ 4 files changed, 47 insertions(+), 24 deletions(-)
+
+commit dfbdf23633a772e78b47b0e7b0c3e3b87855d9ff
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Jun 8 11:45:11 2009 +0200
+
+    Wrap gio.memory_input_stream_new_from_data
+
+    Add the wrapper for gio.memory_input_stream_new_from_data including
+    docs and a test.
+
+ docs/Makefile.am                          |    4 +-
+ docs/reference/pygio-classes.xml          |    1 +
+ docs/reference/pygio-memoryinputstream.xml |  151
+ ++++++++++++++++++++++++++++
+ gio/Makefile.am                           |    1 +
+ gio/ginputstream.override                 |   34 ------
+ gio/gio.override                          |    1 +
+ gio/gmemoryinputstream.override           |   91 +++++++++++++++++
+ tests/test_gio.py                         |    4 +
+ 8 files changed, 252 insertions(+), 35 deletions(-)
+
+commit fcc3cb0e167789746a1a9db0cba54ea7a97c7259
+Author: Simon van der Linden <simon.vanderlinden@student.uclouvain.be>
+Date:  Mon Jun 8 19:15:24 2009 +0200
+
+    Fixes whitespaces style issues with girepository.
+
+ girepository/Makefile.am      |    2 +-
+ girepository/bank-repository.c |   67
+ +++++++++++++++++++--------------------
+ girepository/bank.h           |    2 +-
+ girepository/btypes.py                |    6 ++--
+ girepository/module.py                |    2 +-
+ 5 files changed, 39 insertions(+), 40 deletions(-)
+
+commit fb4b2c8cdad2853e6bfe9526529e3a3ab052c5e0
+Author: Simon van der Linden <simon.vanderlinden@student.uclouvain.be>
+Date:  Fri Jun 5 19:03:59 2009 +0200
+
+    Removes the header but the modeline in test_girepository.py.
+
+ tests/test_girepository.py |  26 +-------------------------
+ 1 files changed, 1 insertions(+), 25 deletions(-)
+
+commit abe4828f52c7eb3a08f5b592e7ced1e97a58ef5c
+Author: Simon van der Linden <simon.vanderlinden@student.uclouvain.be>
+Date:  Wed Jun 3 10:47:58 2009 +0200
+
+    Adds overrides modules from PyBank.
+
+ girepository/Makefile.am          |    3 +++
+ girepository/importer.py          |    3 +--
+ girepository/overrides/Gdk.py     |   14 ++++++++++++++
+ girepository/overrides/Gtk.py     |    8 ++++++++
+ 4 files changed, 26 insertions(+), 2 deletions(-)
+
+commit c12964e6a3354d8063355225c94e6d21d621e08b
+Author: Simon van der Linden <simon.vanderlinden@student.uclouvain.be>
+Date:  Tue Jun 2 23:40:41 2009 +0200
+
+    Disables the tests that fail in tests/test_girepository.py.
+
+ tests/test_girepository.py |  242
+ +++++++++++++++++++++++++++++++++-----------
+ 1 files changed, 182 insertions(+), 60 deletions(-)
+
+commit a4469a3f7d32a25156bae5e7aef9ec4ae5f6e140
+Author: Simon van der Linden <simon.vanderlinden@student.uclouvain.be>
+Date:  Tue Jun 2 23:03:26 2009 +0200
+
+    Imports test_girepository.py from former PyBank's
+    everything_unittest.py.
+
+ tests/test_girepository.py |  288
+ ++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 288 insertions(+), 0 deletions(-)
+
+commit e4f2a5ef8734cf40cf8345d442612db1f6c62d5a
+Author: Simon van der Linden <simon.vanderlinden@student.uclouvain.be>
+Date:  Thu May 28 17:45:11 2009 +0200
+
+    Introduces the girepository module from the former PyBank.
+
+ INSTALL                       |   69 ++-
+ Makefile.am                   |    2 +-
+ configure.ac                  |   12 +
+ girepository/Makefile.am      |   52 ++
+ girepository/__init__.py      |   24 +
+ girepository/bank-argument.c  |  379 +++++++++++++
+ girepository/bank-info.c      | 1194
+ ++++++++++++++++++++++++++++++++++++++++
+ girepository/bank-repository.c |  237 ++++++++
+ girepository/bank.c           |  155 ++++++
+ girepository/bank.h           |   80 +++
+ girepository/btypes.py                |  300 ++++++++++
+ girepository/importer.py      |   52 ++
+ girepository/module.py                |  224 ++++++++
+ girepository/repository.py    |   51 ++
+ 14 files changed, 2799 insertions(+), 32 deletions(-)
+
+commit f5ab5046fe9b67ec5e8fc64679e1a3d01787af7e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Jun 2 18:28:22 2009 +0200
+
+    Fix the docs for gio.FilterOutputStream
+
+ docs/reference/pygio-filteroutputstream.xml |   6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit fded60d8376fc45d19bf6cd8be6b927cc3f2e8c6
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Jun 2 18:27:00 2009 +0200
+
+    Add gio.FilterOutputStream docs
+
+ docs/Makefile.am                           |    2 +
+ docs/reference/pygio-classes.xml           |    1 +
+ docs/reference/pygio-filteroutputstream.xml | 152
+ +++++++++++++++++++++++++++
+ 3 files changed, 155 insertions(+), 0 deletions(-)
+
+commit e2c31f916967229b6547e68013628ce0082cf875
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Jun 2 13:29:59 2009 +0200
+
+    Add gio.FilterInputStream docs
+
+ docs/Makefile.am                          |    2 +
+ docs/reference/pygio-classes.xml          |    1 +
+ docs/reference/pygio-filterinputstream.xml |  152
+ ++++++++++++++++++++++++++++
+ 3 files changed, 155 insertions(+), 0 deletions(-)
+
+commit 49a467eee445bc75554db0374006722ac075194b
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Jun 2 11:33:20 2009 +0200
+
+    Add API appeared in 2.20 but not marked as such in gio docs
+
+ gio/gio.defs |   30 ++++++++++++++++++++++++++++++
+ 1 files changed, 30 insertions(+), 0 deletions(-)
+
+commit 180c157f2a20b7d2dd9af05bfb5f515fd23870a0
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Jun 2 10:41:26 2009 +0200
+
+    Wrap gio.FileOutputStream.query_info_async
+
+    Add the wrapper for gio.FileOutputStream.query_info_async
+    including docs and a test.
+
+ docs/Makefile.am                         |    2 +
+ docs/reference/pygio-classes.xml         |    1 +
+ docs/reference/pygio-fileoutputstream.xml |  257
+ +++++++++++++++++++++++++++++
+ gio/Makefile.am                          |    3 +-
+ gio/gfileoutputstream.override                   |   68 ++++++++
+ gio/gio.override                         |    1 +
+ tests/test_gio.py                        |   27 +++
+ 7 files changed, 358 insertions(+), 1 deletions(-)
+
+commit 4673577d1f6c3d54423808dd575987092fb05ad2
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue Jun 2 10:17:41 2009 +0200
+
+    Fix gio.FileInputStream docs
+
+    Add implemented interface section and remove a method description
+
+ docs/reference/pygio-fileinputstream.xml |   25 +++++++++----------------
+ 1 files changed, 9 insertions(+), 16 deletions(-)
+
+commit 1e1cad02879d514745b5233658654cbe944530a5
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Jun 1 22:54:26 2009 +0200
+
+    Fix the method name
+
+ gio/gfileinputstream.override |   14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit f605811afe8c91f121e89b6f9ec28c70b62f4110
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon Jun 1 22:40:56 2009 +0200
+
+    Wrap gio.FileInputStream.query_async
+
+    Add the wrapper for gio.FileInputStream.query_async including docs and
+    a test.
+
+ docs/Makefile.am                        |    2 +
+ docs/reference/pygio-classes.xml        |    1 +
+ docs/reference/pygio-fileinputstream.xml |  221
+ ++++++++++++++++++++++++++++++
+ gio/Makefile.am                         |    1 +
+ gio/gfileinputstream.override           |   68 +++++++++
+ gio/gio.override                        |    1 +
+ tests/test_gio.py                       |   27 ++++
+ 7 files changed, 321 insertions(+), 0 deletions(-)
+
+commit 08623e54a426377c1504b5c364aabae5a17f8ad8
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Sun May 31 17:43:16 2009 +0300
+
+    Install executable codegen parts with executing permissions
+
+    Also add shebang where it was missing.  Bug #583979.
+
+ codegen/Makefile.am     |   23 ++++++++++++-----------
+ codegen/code-coverage.py |    2 ++
+ codegen/codegen.py      |    2 ++
+ codegen/defsconvert.py   |    2 ++
+ 4 files changed, 18 insertions(+), 11 deletions(-)
+
+commit 833d4da202bcfcb01a414f8aec4b751ec8e1ccb2
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Sat May 30 16:57:49 2009 +0300
+
+    Wrap gio.DataInputStream.read_line_async and read_until_async
+
+    Wrap the functions and their corresponding *_finish() functions.
+    Create 'gdatainputstream.override' for these and move two existing
+    functions there.  Add unit tests.  Re-enable synchronous read_line
+    unit test and adjust it for new official GIO behavior.  Bug #584285.
+
+ gio/Makefile.am              |    1 +
+ gio/gdatainputstream.override |  250
+ +++++++++++++++++++++++++++++++++++++++++
+ gio/ginputstream.override     |   65 -----------
+ gio/gio.defs                 |    4 +-
+ gio/gio.override             |    1 +
+ tests/test_gio.py            |   51 ++++++++-
+ 6 files changed, 300 insertions(+), 72 deletions(-)
+
+commit 2cb569c0ced49f9ed5ca83292d5f15c837066688
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Sat May 30 17:24:15 2009 +0300
+
+    Fix gio.OutputStream.splice_async
+
+    Bug #584290.
+
+ gio/goutputstream.override |   8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+commit e43fa429f6b4019a432acb481bbc07c8201cc46d
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Wed May 27 21:19:27 2009 +0300
+
+    Code maintenance: ignore one more file created by unit tests
+
+ tests/.gitignore |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 76e9dc74ac706a9207f9d31f887d6e38df2a678f
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon May 25 20:20:38 2009 +0200
+
+    Update the docs with new 2.20 API
+
+ docs/reference/pygio-appinfo.xml |  115 ++++++++++++++++++++++++++++
+ docs/reference/pygio-icon.xml   |   99 +++++++++++++++++++++++-
+ docs/reference/pygio-mount.xml   |  156
+ ++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 367 insertions(+), 3 deletions(-)
+
+commit 8e40d71ac23deb7d91789486ee8cad440a6be1dd
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon May 25 01:33:08 2009 +0200
+
+    Add gio 2.20 API
+
+    add the new API added in gio 2.20, some needs to be wrapped manually
+
+ gio/gio.defs  |  106
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ gio/unix.defs |   48 +++++++++++++++++++++----
+ 2 files changed, 146 insertions(+), 8 deletions(-)
+
+commit 0d08df42514fba6abc896814abfee0d2d083c29e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon May 25 00:14:21 2009 +0200
+
+    Post release version bump 2.19.0
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit edfb09e3de7baf294b3beba84b4ecb94e1f16764
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sun May 24 23:56:29 2009 +0200
+
+    Update NEWS, release 2.18.0
+
+ NEWS        |   14 ++++++++++++++
+ configure.ac |    4 ++--
+ 2 files changed, 16 insertions(+), 2 deletions(-)
+
+commit e0648ea435e0b309cdd5bb0ebe56d4534efd26e4
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sun May 24 22:18:40 2009 +0200
+
+    Add documentation for the gio.OutputStream class
+
+    The docs for this class are not completed, missing methods
+    descriptions.
+    The index is complete though, it will be completed once all the
+    classes
+    are in place so we can ship a (almost) complete reference.
+
+ docs/Makefile.am                     |    2 +
+ docs/reference/pygio-classes.xml      |    3 +-
+ docs/reference/pygio-outputstream.xml |  140
+ +++++++++++++++++++++++++++++++++
+ 3 files changed, 144 insertions(+), 1 deletions(-)
+
+commit 11524cdf6472d9115a812ce431f6767aec5627bc
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sun May 24 22:12:04 2009 +0200
+
+    Wrap gio.OutputStream.splice_async()
+
+    wrap gio.OutputStream.splice_async() and add a test.
+
+ gio/goutputstream.override |  58
+ +++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gio.py         |   20 +++++++++++++++
+ 2 files changed, 77 insertions(+), 1 deletions(-)
+
+commit 82ad6b8c8ea4d6694126f5e0e67b826717e38f19
+Author: Emilio Pozuelo Monfort <pochu@ubuntu.com>
+Date:  Sun May 24 22:55:16 2009 +0300
+
+    Add Python version into installed libpyglib name
+
+    Do this now, while no-one (as far as we know) links to the library
+    besides PyGObject itself.  Bug #550235.
+
+ configure.ac       |    2 ++
+ gio/Makefile.am     |   2 +-
+ glib/Makefile.am    |  10 +++++-----
+ gobject/Makefile.am |   2 +-
+ 4 files changed, 9 insertions(+), 7 deletions(-)
+
+commit 59da8cd24ea390b6c983995833ec6b0e5d028b35
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sun May 24 11:44:24 2009 +0200
+
+    Wrap gio.OutputStream.flush_async()
+
+    wrap gio.OutputStream.flush_async() and add a test.
+
+ gio/goutputstream.override |  47
+ +++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gio.py         |   11 ++++++++++
+ 2 files changed, 57 insertions(+), 1 deletions(-)
+
+commit 84ab6178ed0033f69932df5bc73c86bdff80c953
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sun May 17 17:29:37 2009 +0200
+
+    Add documentation for the gio.FileMonitor class
+
+    The docs for this class are not completed, missing methods
+    descriptions.
+    The index is complete though, it will be completed once all the
+    classes
+    are in place so we can ship a (almost) complete reference.
+
+ docs/Makefile.am                    |    2 +
+ docs/reference/pygio-classes.xml     |    1 +
+ docs/reference/pygio-filemonitor.xml |  128
+ ++++++++++++++++++++++++++++++++++
+ 3 files changed, 131 insertions(+), 0 deletions(-)
+
+commit 629496a5617d30e4dfa494b05a62c85a6af77b9a
+Author: Josselin Mouette <joss@malsain.org>
+Date:  Sun May 17 18:03:44 2009 +0300
+
+    Use 'Requires.private' for libffi in '.pc' files
+
+    Correction for patch in bug #550231.
+
+ pygobject-2.0-uninstalled.pc.in |    3 ++-
+ pygobject-2.0.pc.in            |    3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 90cd8b7c4a25cd2ecb751f8337b401c98538272b
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Wed May 13 21:54:39 2009 +0200
+
+    Add wrapper for gio.FileAttributeMatcher
+
+    added a boxed type for gio.FileAttributeMatcher which has been
+    forgotten while
+    wrapping the gio API. This should probably be done in gio itself.
+
+ gio/gfileinfo.override |   24 ++++++++++++++++++++++--
+ gio/gio-types.defs    |    7 +++++++
+ gio/gio.override      |    2 ++
+ 3 files changed, 31 insertions(+), 2 deletions(-)
+
+commit e707447d9313f2f2ecba395cfe3682d5a5e859f4
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Wed May 13 22:06:25 2009 +0300
+
+    Mark relevant glib.IOChannel methods as METH_NOARGS
+
+    Additionally fix glib.IOChannel.set_close_on_unref: was marked
+    METH_NOARGS but actually accepted arguments.  Fixes bug #582427.
+
+ glib/pygiochannel.c |  83
+ ++++++++++++--------------------------------------
+ 1 files changed, 20 insertions(+), 63 deletions(-)
+
+commit 002915e5f458fec5a89766a54e8119a70a80caa7
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Tue May 12 20:37:24 2009 +0200
+
+    Add documentation for the gio.FileInfo class
+
+    The docs for this class are not completed, missing methods
+    descriptions.
+    The index is complete though, it will be completed once all the
+    classes
+    are in place so we can ship a (almost) complete reference.
+
+ docs/Makefile.am                 |    2 +
+ docs/reference/pygio-classes.xml  |   1 +
+ docs/reference/pygio-fileinfo.xml |  346
+ +++++++++++++++++++++++++++++++++++++
+ 3 files changed, 349 insertions(+), 0 deletions(-)
+
+commit 8cd25c871609580425c6c4c9e5bc6ec8d40862a1
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Sat May 9 16:46:04 2009 +0300
+
+    Retire hand-written ChangeLog; autocreate from Git history
+
+    Basically copied over from GLib source tree.
+
+ ChangeLog         | 3606
+ ---------------------------------------------------
+ ChangeLog.pre-2.18 | 3608
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Makefile.am       |   32 +
+ 3 files changed, 3640 insertions(+), 3606 deletions(-)
+
+commit 23556bdbcf9cf06db866901fb822dd78a9043648
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat May 9 00:03:05 2009 +0200
+
+    Fix a bug in InputStream.skip_async
+
+    use the count argument instead of buffer_size which is always zero
+
+ gio/ginputstream.override |   3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit ed6b06315c17441b41c001d38537c904b8fe18de
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat May 9 00:02:33 2009 +0200
+
+    Add docs for the gio.InputStream class
+
+ docs/Makefile.am                    |    2 +
+ docs/reference/pygio-classes.xml     |    1 +
+ docs/reference/pygio-inputstream.xml |  730
+ ++++++++++++++++++++++++++++++++++
+ 3 files changed, 733 insertions(+), 0 deletions(-)
+
+commit d58322b84d47da7905f95b43e9e0daf9f7c4b507
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Mon May 4 23:40:28 2009 +0200
+
+    Wrap gio.InputStream.skip_async()
+
+    wrap gio.InputStream.skip_async() and add a test.
+
+ gio/ginputstream.override |   50
+ ++++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gio.py        |   20 ++++++++++++++++++
+ 2 files changed, 69 insertions(+), 1 deletions(-)
+
+commit 2311187824d1b48a996ee2620fd3c9a63e3edd66
+Author: Siavash Safi <siavash@siavashs.org>
+Date:  Mon May 4 15:46:49 2009 +0430
+
+    Add -n --namespace option and the code to remove
+    dll API in headers, Added documentation
+
+    Patch from bug #579275
+
+ ChangeLog       |    8 +++
+ codegen/h2def.py |  133
+ ++++++++++++++++++++++++++++++++++++++++++++----------
+ 2 files changed, 117 insertions(+), 24 deletions(-)
+
+commit 442ec5bb997bb7dab55baeea6e54e79d3ce0d3c1
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Sat May 2 23:54:52 2009 +0300
+
+    Properly mark glib.get_user_special_dir() as a keywords method
+
+    Fixes bug #581082.
+
+ glib/glibmodule.c |   2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f466dca880cc6ea68b9fe236943eea7a07d33520
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sun May 3 11:03:25 2009 +0200
+
+    Add docs for the gio.LoadableIcon class
+
+ docs/Makefile.am                     |    2 +
+ docs/reference/pygio-classes.xml      |    1 +
+ docs/reference/pygio-loadableicon.xml |  198
+ +++++++++++++++++++++++++++++++++
+ 3 files changed, 201 insertions(+), 0 deletions(-)
+
+commit eab4ebf7f6c82580b61205f34e1cfe535aeada60
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sun May 3 01:21:55 2009 +0200
+
+    Add docs for the gio.ThemedIcon class
+
+ docs/Makefile.am                   |    2 +
+ docs/reference/pygio-classes.xml    |   1 +
+ docs/reference/pygio-themedicon.xml | 204
+ +++++++++++++++++++++++++++++++++++
+ 3 files changed, 207 insertions(+), 0 deletions(-)
+
+commit 22d7de8b620055f14b30f9c3c99160c8b4ebe672
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Sat May 2 12:25:19 2009 +0200
+
+    post release version bump to 2.17.1
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 282ac3c76e1e3513bd76f819f320ec56aba15d9e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri May 1 23:40:31 2009 +0200
+
+    Fix the class title
+
+ docs/reference/pygio-mountoperation.xml |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit d8b70dec1e5c09b73ae277f4f5b246315841fb8e
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Fri May 1 22:24:33 2009 +0200
+
+    Add docs for the gio.MountOperation class
+
+ docs/Makefile.am                       |    2 +
+ docs/reference/pygio-classes.xml       |    1 +
+ docs/reference/pygio-constants.xml     |  107 +++++
+ docs/reference/pygio-mountoperation.xml |  726
+ +++++++++++++++++++++++++++++++
+ 4 files changed, 836 insertions(+), 0 deletions(-)
+
+commit fceea8e843e880f0469e454df23141e7dd2bc0cf
+Author: Gian Mario Tagliaretti <gianmt@gnome.org>
+Date:  Thu Apr 30 22:13:06 2009 +0200
+
+    Update NEWS, release 2.17.0
+
+ NEWS |   93
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 93 insertions(+), 0 deletions(-)
+
+commit 47389217d1a65a8e3f404d486c508cf5d3164756
+Author: Paul Pogonyshev <pogonyshev@gmx.net>
+Date:  Thu Apr 30 22:47:19 2009 +0300
+
+    Fix memory leak in gio.File.query_info_async()
+
+    After the recent patch it would leak exception data if old argument
+    order was used.  Properly decref the objects.
+
+ gio/gfile.override |   4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/ChangeLog.pre-2.18 b/ChangeLog.pre-2.18
new file mode 100644 (file)
index 0000000..2fb8ef4
--- /dev/null
@@ -0,0 +1,3608 @@
+=== ChangeLog discontinued ===
+
+2009-05-04  Siavash Safi  <siavash@siavashs.org>
+
+       Bug 579275 â€“ Patch which removes dll api in headers and adds
+       a namespace option
+
+       * codegen/h2def.py: Add -n --namespace option and the code to remove
+       dll API in headers, Added documentation
+
+2009-04-17  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 568499 â€“ CellRendererPixbuf stock-size property has wrong type
+
+       * gobject/pygtype.c (pyg_enum_get_value): Also accept long
+       integers.
+
+2009-04-15  Götz Waschk  <waschk@mandriva.org>
+
+       Bug 550231 â€“ missing dep on libffi in pygobject-2.0.pc
+
+       * configure.ac: Define `LIBFFI_PC' subst.
+
+       * pygobject-2.0.pc.in:
+       * pygobject-2.0-uninstalled.pc.in: Use it.
+
+2009-04-15  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 555613 â€“ gio.VolumeMonitor segfaults
+
+       * gio/gvolumemonitor.override (_wrap_g_volume_monitor_tp_new): New
+       function, return the singleton object.
+
+2009-04-14  James Westby  <jw+debian@jameswestby.net>
+
+       Bug 573753 â€“ DeprecationWarning under python 2.6
+
+       * codegen/definitions.py (ReturnType.__init__): Don't pass
+       'type_name' argument to super __init__.
+
+2009-04-14  Krzesimir Nowak  <krnowak@svn.gnome.org>
+
+       Bug 576566 â€“ several scripts from codegen directory are not
+       distributed
+
+       * codegen/Makefile.am (codegen_PYTHON): List several missing
+       scripts.
+
+2009-04-14  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfile.override: (_wrap_g_file_copy_async) change argument order
+       to keep it consistent with the other methods.
+
+2009-04-13  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 578870 â€“ memory leak in gio.File.copy_async
+
+       * gio/gio.override (PyGIONotify): Add 'slaves' field.
+       (pygio_notify_new_slave): New function.
+       (pygio_notify_reference_callback): Recurse for slaves, if any.
+       (pygio_notify_free): Likewise.
+
+       * gio/gfile.override (file_progress_callback_marshal): Use new
+       chaining functionality to avoid leaking the second PyGIONotify
+       structure.  Rename 'callback' as 'progress_callback' for clarity.
+
+2009-04-12  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gio.defs: (g_file_monitor) should accept None
+       for cancellable and set the default flag to G_FILE_MONITOR_NONE.
+
+2009-04-09  Jonathan Matthew  <jonathan@d14n.org>
+
+       Bug 575781 â€“ pyg_notify_free needs to ensure it has GIL before calling
+       Py_XDECREF
+
+       * gio/gio.override:  Ensure we're holding the GIL before potentially
+       destroying the callback and data.
+
+2009-04-05  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfile.override:
+       (_wrap_g_file_set_display_name_async) Wrap new GFile method.
+       
+       * tests/test_gio.py: Test the above methods.
+
+2009-04-05  Tristan Hill  <stan@saticed.me.uk>
+
+       reviewed by: Gustavo J. A. M. Carneiro.
+
+       * glib/pygoptioncontext.c (pyg_option_get_context): Add a
+       semi-private method to return the option context C object from an
+       option context wrapper.  Used in gnome-python for fixing Bug
+       #507174.
+
+2009-04-05  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/pygtype.c (pyg_value_from_pyobject): Bug 577999 â€“
+       converting a negative long Python value to a GUINT64 GValue
+       doesn't error out as it should.
+
+2009-04-04  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfile.override:
+       (_wrap_g_file_set_attributes_async)
+       (_wrap_g_file_set_attributes_finish) Wrap new GFile methods.
+       
+       * tests/test_gio.py: Test the above methods.
+
+2009-03-31  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfile.override:
+       (_wrap_g_file_query_filesystem_info_async) Fix a typo.
+
+2009-03-31  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfile.override:
+       (_wrap_g_file_query_filesystem_info_async) Wrap new GFile method.
+
+2009-03-31  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gio.defs: Add missing g_file_query_filesystem_info_async and
+       g_file_query_filesystem_info_finish
+
+2009-03-30  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfile.override: (_wrap_g_file_mount_mountable)
+       Swap kwargs names to reflect the code.
+
+2009-03-30  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfile.override: (_wrap_g_file_mount_enclosing_volume)
+       Swap kwargs names to reflect the code.
+
+2009-03-30  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfile.override:
+       (_wrap_g_file_find_enclosing_mount_async) Wrap new GFile method.
+
+2009-03-30  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfile.override:
+       (_wrap_g_file_eject_mountable) Wrap new GFile method.
+
+2009-03-30  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfile.override: (_wrap_g_file_copy) revert previous commit.
+
+2009-03-30  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfile.override: (_wrap_g_file_copy) callback cannot be optional.
+
+2009-03-29  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gvolume.override: (_wrap_g_volume_mount) should accept None
+       for mount_operation.
+
+2009-03-29  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gvolume.override: Swap kwargs names to reflect the code.
+
+2009-03-29  Tobias Mueller  <tobiasmue@gnome.org>
+
+       * ltihooks.py:
+       * pygtk.py:
+       * COPYING:
+       * gobject/pygparamspec.h:
+       * gobject/pygpointer.c:
+       * gobject/ffi-marshaller.h:
+       * gobject/pygtype.c:
+       * gobject/__init__.py:
+       * gobject/pygpointer.h:
+       * gobject/pygtype.h:
+       * gobject/pygflags.c:
+       * gobject/pyginterface.c:
+       * gobject/pygflags.h:
+       * gobject/pygboxed.c:
+       * gobject/gobjectmodule.c:
+       * gobject/pygenum.c:
+       * gobject/pyginterface.h:
+       * gobject/pygboxed.h:
+       * gobject/pygobject.c:
+       * gobject/constants.py.in:
+       * gobject/pygenum.h:
+       * gobject/propertyhelper.py:
+       * gobject/pygparamspec.c:
+       * gobject/ffi-marshaller.c:
+       * glib/pygmainloop.c:
+       * glib/pygoptioncontext.h:
+       * glib/pygmainloop.h:
+       * glib/pyglib-private.h:
+       * glib/__init__.py:
+       * glib/pygoptiongroup.c:
+       * glib/pygspawn.c:
+       * glib/pygmaincontext.c:
+       * glib/pygoptiongroup.h:
+       * glib/pygspawn.h:
+       * glib/pygmaincontext.h:
+       * glib/option.py:
+       * glib/pygsource.c:
+       * glib/glibmodule.c:
+       * glib/pygiochannel.h:
+       * glib/pygsource.h:
+       * glib/pyglib.c:
+       * glib/pyglib.h:
+       * glib/pyglib-python-compat.h:
+       * glib/pygoptioncontext.c:
+       * gio/gfileinfo.override:
+       * gio/gappinfo.override:
+       * gio/__init__.py:
+       * gio/gfileattribute.override:
+       * gio/gvolume.override:
+       * gio/gio.override:
+       * gio/ginputstream.override:
+       * gio/goutputstream.override:
+       * gio/unix.override:
+       * gio/gfile.override:
+       * gio/gvolumemonitor.override:
+       * gio/gapplaunchcontext.override:
+       * gio/giomodule.c:
+       * gio/gfileenumerator.override:
+       * gio/pygio-utils.c:
+       * gio/unixmodule.c:
+       * gio/pygio-utils.h:
+       * gio/gicon.override:
+       Update the address of the FSF, by replacing old bits of the address 
+       with new ones.
+       Fixes bug 577134
+
+2009-03-29  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gio.defs: Add g_volume_should_automount
+
+2009-03-28  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/pygio-utils.[hc]: (strv_to_pylist) (pylist_to_strv) add a couple
+       of convinence functions to convert from/to a python list and an array
+       of strings.
+
+       * gio/Makefile.am
+       * gio/gdrive.override:
+       * gio/gio.override: Strip GDrive overrides and
+       wrap g_drive_enumerate_identifiers
+       
+       * tests/test_gio.py:
+       * gio/gvolume.override: wrap g_volume_enumerate_identifiers
+
+       * gio/gio.defs: add missing g_drive_get_identifier and
+       g_drive_enumerate_identifiers
+
+2009-03-22  Mark Lee  <marklee@svn.gnome.org>
+
+       Bug 559001 â€“ Allow setting pytype wrapper class
+
+       initial patch by: John Ehresman  <jpe@wingware.com>
+
+       * gobject/pygtype.c (_wrap_g_type_wrapper__set_pytype): New function.
+
+       * tests/test_gtype.py (GTypeTest.assertPyType),
+       (GTypeTest.setInvalidPyType), (GTypeTest.testPyType),
+       (GTypeTest.testInvalidPyType): Two new testcases to test the above,
+       with accompanying helper methods.
+
+2009-03-22  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gio.defs: Add g_file_enumerator_get_container, new in 2.18
+
+2009-03-22  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfileenumerator.override (_wrap_g_file_enumerator_close_async)
+       wrap new method.
+
+       * tests/test_gio.py (TestGFileEnumerator.testCloseFilesAsync):
+       Test the above.
+
+2009-03-09  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * docs/reference/Changelog: Create a dedicated Changelog for the docs
+       and move the latest entries in there.
+
+2009-02-20  James Henstridge  <james@jamesh.id.au>
+
+       * ltihooks.py: pull in changes from pygtk (updating license header
+       from GPL to LGPL).
+
+2009-02-18  Andre Klapper  <a9016009@gmx.de>
+
+       * gobject/pygobject.h:
+       Change comment to avoid false positives when grep'ing for 
+       deprecated gtk functions
+
+2009-02-17  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+       * gio/gfile.override, gio/gio.defs, gio/gio.override: Bug 556250
+       again.  I screwed up and gave misinformation about how to fix it.
+       It must be pyg_begin/end_allow_threads, pyg_block/unblock_threads
+       is only to be used for async callbacks.
+
+2009-02-10  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       Bug 556250 â€“ non-async functions don't release python locks before
+       calling blocking C functions
+
+       * gio/gio.override:
+       * gio/gfile.override:
+       * gio/gio.defs: release the thread lock.
+
+2009-02-10  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gio.defs:
+       * gio/gio-types.defs:
+       * gio/unix.defs: Add 2.18 gio API.
+
+2009-02-08  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       Bug 568427 â€“ "gio.Error: Too many open files" without too many
+       open files
+       
+       * gobject/pygtype.c (_wrap_g_type_wrapper__get_name):
+       * gobject/gobjectmodule.c (get_type_name_for_class):
+       * gobject/pygobject.c (build_parameter_list), (PyGProps_length):
+       * gio/gfileinfo.override (_wrap_g_file_info_list_attributes):
+       * gio/gio.override (_wrap_g_content_type_guess):
+       * gio/gfile.override (_wrap__file_init), (_wrap_g_file_load_contents)
+       (_wrap_g_file_load_contents_finish): Remove some memory leaks.
+       
+       * gio/gio.defs: add (caller-owns-return #t) all over the place to
+       prevent memory leaks.
+       
+       patch contributed by Paul Pogonyshev, Paolo Borelli and
+       Gian Mario Tagliaretti.
+
+2009-02-06  Murray Cumming  <murrayc@murrayc.com>
+
+       * codegen/h2def.py DefsWriter::write_enum_defs(): Prevent an exception 
+       when the prefix is empty.
+
+2009-01-29  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 569350 â€“ Inconsistent use of tabs and spaces in pygtk.py
+
+       * pygtk.py: Replace all tabs with spaces.
+
+2009-01-29  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 567792 â€“ gio.InputStream.read_async can cause memory
+       corruption
+
+       * gio/gio.override (py_decref_callback): Remove (unused now).
+       (pygio_notify_allocate_buffer, pygio_notify_attach_to_result)
+       (pygio_notify_get_attached): New functions.
+       (async_result_callback_marshal): Attach to the result object if
+       asked and then don't free self.  Fix reference leak (spotted by
+       Gustavo).
+
+       * gio/ginputstream.override (async_result_callback_marshal_read):
+       Remove.  Use new attachment functionality in
+       async_result_callback_marshal() instead.
+       (_wrap_g_input_stream_read_async): Use the new functions (also
+       those mentioned in the cleanup log below).
+       (_wrap_g_input_stream_read_finish): Use the new functions.
+
+2009-01-27  Daniel Elstner  <danielk@openismus.com>
+
+       * codegen/docextract_to_xml.py (escape_text): Do not escape the
+       ampersand "&" in entity references (bug #568485).  Replace some
+       unusual entity references in the output with their literal values.
+
+2009-01-14  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 566571 â€“ gtk.Buildable interface method override is not
+       recognized
+
+       * gobject/gobjectmodule.c (pyg_type_add_interfaces): New function,
+       break out code repetition out of pyg_type_register().
+
+       * tests/test_subtype.py
+       (TestSubType.test_gtk_buildable_virtual_method): New test
+       case (inactive).
+
+2009-01-14  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 566706 â€“ cleanup GIO overrides
+
+       * gio/gio.override (pygio_notify_new)
+       (pygio_notify_using_optional_callback)
+       (pygio_notify_callback_is_valid_full)
+       (pygio_notify_callback_is_valid)
+       (pygio_notify_reference_callback): New functions.
+       (pygio_notify_free): Rename from pygio_free_notify() and extend.
+       (async_result_callback_marshal): Warn if new `referenced' field is
+       not set (programming error).
+       (_wrap_g_drive_eject, _wrap_g_drive_poll_for_media)
+       (_wrap_g_mount_unmount, _wrap_g_mount_eject)
+       (_wrap_g_mount_remount): Lots of cleanup: use new functions
+       instead of repeating code, unify and fix error handling.
+
+       * gio/gfile.override (_wrap_g_file_read_async)
+       (_wrap_g_file_load_contents_async)
+       (_wrap_g_file_enumerate_children_async)
+       (_wrap_g_file_mount_mountable, _wrap_g_file_unmount_mountable)
+       (_wrap_g_file_mount_enclosing_volume, _wrap_g_file_copy)
+       (_wrap_g_file_copy_async, _wrap_g_file_move)
+       (_wrap_g_file_append_to_async, _wrap_g_file_create_async)
+       (_wrap_g_file_replace_async, _wrap_g_file_query_info_async)
+       (_wrap_g_file_replace_contents_async): Similar cleanup.
+
+       * gio/gfileenumerator.override
+       (_wrap_g_file_enumerator_next_files_async): Similar cleanup.
+
+       * gio/gicon.override (_wrap_g_loadable_icon_load_async): Similar
+       cleanup.
+
+       * gio/ginputstream.override (_wrap_g_input_stream_close_async):
+       Similar cleanup.
+
+       * gio/goutputstream.override (_wrap_g_output_stream_write_async)
+       (_wrap_g_output_stream_close_async): Similar cleanup.
+
+       * gio/gvolume.override (_wrap_g_volume_mount)
+       (_wrap_g_volume_eject): Similar cleanup.
+
+       * tests/test_gio.py (TestFile.test_copy_async): Fix the test.
+
+2009-01-09  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/gobjectmodule.c (pyg_type_register): Add a comment
+       explaining why the two for loops for registering interfaces.
+
+2009-01-07  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 566744 â€“ _wrap_g_input_stream_read_async() argument parsing
+       has incorrect keyword args
+
+       * gio/ginputstream.override (_wrap_g_input_stream_read_async): Fix
+       keyword list to be in sync with positional arguments.
+
+2009-01-06  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       Bug 566737 â€“ Bad -I ordering can break build
+
+       * Makefile.am:
+       * gobject/Makefile.am:
+       * gio/Makefile.am:
+       * tests/Makefile.am:
+       Commit a patch from [dmacks at netspace dot org]
+
+2009-01-04  Mads Chr. Olesen  <gnome-bugzilla@shiyee.dk>
+
+       * gio/gio.defs (gio.File.copy_async, gio.File.copy_finish): Define
+       methods.
+
+       * gio/gfile.override (_wrap_g_file_copy_async): New function.
+
+       * tests/test_gio.py (TestFile.test_copy_async): Test the methods.
+
+2009-01-04  PrzemysÅ‚aw Grzegorczyk  <pgrzegorczyk@gmail.com>
+
+       Bug 563714 â€“ GNOME Goal: Clean up GLib and GTK+ includes
+
+       * gobject/generate-constants.c:
+       * glib/pygspawn.c: Only include toplevel <glib.h>.
+
+2009-01-04  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 564018 â€“ pygobject libtool-2.2 patch
+
+       * configure.ac: Apply the patch provided by Cygwin Ports
+       maintainer.
+
+2009-01-04  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * configure.ac: Branch, bump version to 2.17.0.
+
+=== 2.16.0 ===
+2008-12-24  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 547119 â€“ gobject.timeout_add_seconds() not found in docs
+
+       * docs/reference/pyglib-functions.xml (glib.timeout_add_seconds):
+       Describe.
+
+2008-12-21  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 564102 â€“ _wrap_g_output_stream_write_async not adding a
+       reference to the buffer passed
+
+       * gio/gio.override (pygio_notify_copy_buffer): New function.
+       (pygio_free_notify): Free new `buffer' field if it is set.
+
+       * gio/goutputstream.override (_wrap_g_output_stream_write_async):
+       Copy the buffer with new pygio_notify_copy_buffer() and use the
+       copy for g_output_stream_write_async() call.
+
+       * gio/gfile.override (_wrap_g_file_replace_contents_async): Same
+       as for _wrap_g_output_stream_write_async().
+
+2008-12-03  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * glib/pyglib.c (pyglib_error_check): Test if `domain' is not-null
+       before using it (avoids segfaults, see bug #561826).
+
+2008-10-31  John Finlay  <finlay@moeraki.com>
+
+       * codegen/__init__.py (__all__): Add defsgen to __all__ list.
+
+       * codegen/h2def.py (find_enum_defs): Strip out # directives from
+       enum defintions.
+       (clean_func): Change ' * G_CONST_RETURN * ' to '** '
+
+       * codegen/Makefile.am (codegen_PYTHON): Add defsgen.py
+
+       * codegen/defsgen.py (typecode): Use the passed in prefix as a
+       hint when creating a typecode.
+       (split_prefix,write_enum_defs,_write_obj_helper): Add function to
+       use passed in prefix as a hint when splitting an object name into
+       module and name.
+
+       * codegen/h2def.py (DefsWriter.write_enum_defs): Make sure the
+       prefix ends with a _ i.e. really handle the GDK_FONT_FONT,
+       GDK_FONT_FONTSET case.
+
+2008-09-12  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/goutputstream.override
+       (g_output_stream_write_all): use gsize instead of gssize.
+
+2008-09-10  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 530935 â€“ pygobject_set_properties doesnt release the GIL
+
+       * gobject/pygobject.c (pygobject_set_properties): Reuse
+       set_property_from_pspec() which release GIL for us.  Also make
+       sure that g_object_thaw_notify() is called even after error.
+
+2008-09-09  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 549517 â€“ add __repr__ to gio.Drive, gio.Mount and gio.Volume
+
+       * gio/gio.override (_wrap_g_drive_tp_repr, _wrap_g_mount_tp_repr):
+       New functions.
+
+       * gio/gvolume.override (_wrap_g_volume_tp_repr): New function.
+
+2008-09-09  Loïc Minier  <lool@dooz.org>
+
+       Bug 551227 â€“ Missing AC_CONFIG_MACRO_DIR([m4])
+
+       * configure.ac: Add AC_CONFIG_MACRO_DIR.
+
+2008-09-08  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 551056 â€“ make codegen not import when corresponding argument
+       types are not registered
+
+       * codegen/override.py (import_pat): Add support for optional 'for'
+       clause.
+       (Overrides.__parse_override): Handle it.
+
+       * codegen/codegen.py (SourceWriter.write_imports)
+       (SourceWriter.write_object_imports): Adapt for changes in
+       get_imports() return value.
+       (is_registered_object): New function.
+
+2008-09-07  Frederic Peters  <fpeters@0d.be>
+
+       * gio/gfile.override (_wrap_g_file_load_contents)
+       (_wrap_g_file_load_contents_finish): Fix typos breaking
+       compilation (bug #551212).
+
+2008-09-07  Jonathan Matthew  <jonathan@d14n.org>
+
+       Bug 551059 â€“ GFile load_contents methods chop data at first \0
+
+       * gio/gfile.override:
+       Use 's#' (length specified) rather than 's' when constructing
+       result values in load_contents and load_contents_finish.
+
+2008-09-03  Johan Dahlin  <johan@gnome.org>
+
+       * configure.ac:
+       Post release version bump
+
+=== 2.15.4 ===
+2008-09-03  Johan Dahlin  <johan@gnome.org>
+
+       * NEWS: Update
+
+2008-09-03  Loïc Minier  <lool@dooz.org>
+
+       * gobject/pygpointer.c: (pyg_register_pointer):
+       Fix typo (s/&type/type) introduced in r886 causing weird crashes on
+       x86-64; bug #550463.
+
+2008-09-01  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * codegen/argtypes.py: add G_TYPE_CLOSURE boxed type in codegen.
+
+2008-08-31  Johan Dahlin  <johan@gnome.org>
+
+       * configure.ac:
+       Post release version bump
+
+=== 2.15.3 ===
+2008-08-31  Johan Dahlin  <johan@gnome.org>
+
+       * NEWS: Update
+
+2008-08-30  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+       * glib/pyglib.h: * gobject/pygobject.c: Fix memory problems
+       reported by valgrind due to invalid tp_basicsize in
+       PyGPropsDescr_Type.  Closes #549945.
+
+2008-08-28  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 549191 â€“ Constructor of gtk.TreeView raises TypeError when
+       model is None
+
+       * gobject/pygtype.c (pyg_value_from_pyobject): Handle None in
+       G_TYPE_INTERFACE branch.
+
+2008-08-28  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 549351 â€“ an unitialized variable in PyGLib
+
+       * glib/pygmainloop.c (pyg_main_loop_init): Initialize
+       `is_running'.
+
+2008-08-28  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 547633 â€“ cannot create new threads when pygtk is used
+
+       * glib/pyglib.c (_pyglib_notify_on_enabling_threads): New
+       function.
+       (pyglib_enable_threads): Invoke all callbacks added with new
+       _pyglib_notify_on_enabling_threads().
+
+       * gobject/gobjectmodule.c (pyg_note_threads_enabled): New
+       function (callback for new _pyglib_notify_on_enabling_threads()).
+       (PYGLIB_MODULE_START): Initialize
+       'pygobject_api_functions.threads_enabled' and also watch for
+       thread being enabled later on.
+
+2008-08-28  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 547088 â€“ wrap g_content_types_get_registered()
+
+       * gio/gio.override (_wrap_g_drive_get_volumes): Fix refleak.
+       (_wrap_g_content_types_get_registered): New function.
+
+       * gio/gfileenumerator.override (_wrap_g_file_enumerator_next_files_finish):
+       Fix refleak.
+
+       * gio/gvolumemonitor.override (_wrap_g_volume_monitor_get_connected_drives):
+       Fix refleak.
+       (_wrap_g_volume_monitor_get_volumes): Likewise.
+       (_wrap_g_volume_monitor_get_mounts): Likewise.
+
+2008-08-28  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 547494 â€“ gio.InputStream.read() looks broken
+
+       * gio/gio.defs (gio.InputStream.read_part): Rename from read(),
+       document.
+       (gio.InputStream.read): Rename from read_all(), document.
+       (gio.OutputStream.write_part): Rename from write(), document.
+       (gio.OutputStream.write): Rename from write_all(), document.
+
+       * gio/ginputstream.override (_wrap_g_input_stream_read): Fix
+       several bugs.
+       (_wrap_g_input_stream_read_all): New function.
+
+       * gio/goutputstream.override (_wrap_g_output_stream_write_all):
+       New function.
+
+       * tests/test_gio.py (TestInputStream.testRead): Add more tests.
+       (TestInputStream.test_read_part): New test.
+       (TestInputStream._read_in_loop): New helper method.
+       (TestOutputStream.test_write_part): New test.
+
+2008-08-16  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * gio/gfile.override (_wrap_g_file_enumerate_children_async): Fix
+       keywords getting out of sync with actual argument order.
+
+2008-08-13  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 547495 â€“ wrap four important asynchronous methods in gio.Drive
+       and gio.Mount
+
+       * gio/gio.defs (gio.Drive.eject, gio.Drive.poll_for_media)
+       (gio.Mount.remount): Document.
+
+       * gio/gio.override (_wrap_g_drive_eject)
+       (_wrap_g_drive_poll_for_media, _wrap_g_mount_eject)
+       (_wrap_g_mount_remount): New functions.
+
+2008-08-12  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 547484 â€“ wrap gio.DataInputStream.read_line and ...read_until
+
+       * tests/test_gio.py (TestDataInputStream): New test case.
+
+       * gio/gio.defs (gio.DataInputStream.read_line)
+       (gio.DataInputStream.read_until): Document.
+
+       * gio/ginputstream.override (_wrap_g_data_input_stream_read_line)
+       (_wrap_g_data_input_stream_read_until): New functions.
+
+2008-08-12  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 547354 â€“ wrap a few memory stream methods
+
+       * gio/ginputstream.override (_wrap_g_memory_input_stream_add_data):
+       New function.
+
+       * gio/gio.defs (gio.MemoryOutputStream.get_contents): Rename from
+       get_data() to avoid name clash.
+
+       * gio/goutputstream.override (_wrap_g_memory_output_stream_new)
+       (_wrap_g_memory_output_stream_get_data): New functions.
+
+       * tests/test_gio.py (TestMemoryInputStream)
+       (TestMemoryOutputStream): New test cases.
+
+2008-08-12  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * gio/gio.override: Ignore `g_io_module*' and `g_io_scheduler_*'.
+
+2008-08-11  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 540376 â€“ No TypeError raised when type is None
+
+       * gobject/gobjectmodule.c (pyg_signal_new): Add check on second
+       argument type.
+
+       * tests/test_signal.py (TestSignalCreation): New test case.
+
+2008-08-11  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 547104 â€“ improve type wrapper creation
+
+       * gio/gappinfo.override (_wrap_g_app_info_tp_richcompare)
+       (_wrap_g_app_info_tp_repr): New functions.
+
+       * tests/test_gio.py (TestAppInfo.test_eq): New test.
+
+2008-08-11  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 547104 â€“ improve type wrapper creation
+
+       * gobject/pygobject.c (pygobject_register_class): Use new
+       pygobject_inherit_slots() to propagate custom slots in normal
+       types too.
+       (pygobject_inherit_slots): New function, break out of
+       pygobject_new_with_interfaces() and rewrite a bit.
+       (pygobject_find_slot_for): Add new argument that can forbid
+       overriding non-NULL slots.
+
+       * gio/gicon.override (pygio_do_icon_richcompare): Remove, the code
+       is now directly in _wrap_g_icon_tp_richcompare().
+       (_wrap_g_file_icon_tp_richcompare, _wrap_g_file_icon_tp_hash)
+       (_wrap_g_themed_icon_tp_richcompare, _wrap_g_themed_icon_tp_hash):
+       Remove, duplicating code in this way is not needed anymore.
+
+2008-08-10  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 546120 â€“ make gio.File more Pythonic
+
+       * gio/gfile.override (_wrap_g_file_tp_richcompare)
+       (_wrap_g_file_tp_hash, _wrap_g_file_tp_repr): New functions.
+
+       * tests/test_gio.py (TestFile.test_eq, TestFile.test_hash): New
+       tests.
+
+2008-08-10  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 547104 â€“ improve runtime type wrapper creation
+
+       * gobject/pygobject.c (pygobject_new_with_interfaces): Use new
+       pygobject_find_slot_for() for `tp_richcompare', `tp_compare`,
+       `tp_hash', `tp_iter', `tp_repr', `tp_str' and `tp_print'.
+       (pygobject_find_slot_for): New static function.
+
+2008-08-10  Jonathan Matthew  <jonathan@d14n.org>
+
+       Bug 547134 â€“ fix docstring line length
+
+       * gio/gio.defs:
+       Fix docstring line lengths so they don't wrap across lines in an 80
+       column terminal.
+
+2008-08-10  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gio.defs:
+       Add GFile.query_default_handler which was missing from the defs.
+
+2008-08-10  Jonathan Matthew  <jonathan@d14n.org>
+
+       Bug 547067 â€“ add File.replace_contents, replace_contents_async,
+       replace_contents_finish.
+
+       * gio/gfile.override:
+       * gio/gio.defs:
+       * tests/test_gio.py:
+       Add overrides, docs, and tests for File.replace_contents,
+       replace_contents_async, and replace_contents_finish.
+
+2008-08-09  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * tests/test_gicon.py (TestThemedIcon.test_constructor): Fix to
+       not use `use_default_fallbacks' property (it's new).
+
+2008-08-09  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 546135 â€“ GIcon and implementations improvements
+
+       * gio/gio.defs (g_file_icon_new): Change from method of gio.File
+       to constructor of gio.FileIcon.
+
+       * tests/test_gicon.py (TestIcon.test_eq, Test_Eq.test_hash)
+       (TestLoadableIcon.setUp): Adapt accordingly.
+       (TestFileIcon): New test case.
+
+2008-08-09  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 546591 â€“ File.copy progress_callback does not work
+
+       * gio/gfile.override (file_progress_callback_marshal): Use
+       PyObject_CallFunction() instead of PyEval_CallFunction().  Use "K"
+       instead of "k" (the latter is not correct for 32-bit platforms).
+       Don't free 'notify' here.
+       (_wrap_g_file_copy): Free 'notify'.
+       (_wrap_g_file_move): Likewise.
+
+       * gio/gio.override (pygio_free_notify): New function.
+       (async_result_callback_marshal): Use it.
+
+       * tests/test_gio.py (TestFile.test_copy_progress.progress): New
+       test.
+
+2008-08-09  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 546135 â€“ GIcon and implementations improvements
+
+       * gio/gio.defs (gio.LoadableIcon.load)
+       (gio.LoadableIcon.load_async, gio.LoadableIcon.load_finish):
+       Document.
+
+       * gio/Makefile.am:
+       * gio/gicon.override: New file: parts of 'gio.override', three
+       methods of gio.LoadableIcon and gio.ThemedIcon constructor.
+
+       * gio/gio.override: Move over all icon-related overrides to
+       'gicon.override'.
+
+       * tests/Makefile.am:
+       * tests/test_gicon.py: New file: parts of 'test_gio.py' and
+       several new gio.Icon tests.
+
+       * tests/test_gio.py (TestThemedIcon): Move over to
+       'test_gicon.py'.
+
+2008-08-07  Jonathan Matthew  <jonathan@d14n.org>
+
+       Bug 546734 â€“ Missing Py_INCREFs for some file async methods
+
+       * gio/gfile.override:
+       Increment refcounts on callbacks and callback data for
+       append_to_async, create_async, replace_async, query_info_async and
+       load_contents_async as for all other async methods.
+
+2008-08-06  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gfile.override:
+       * gio/gio.defs:
+       Move the progress callback for move/copy so it's consistent with
+       the documentation and positional arguments. Update documentation as well
+
+2008-08-06  Johan Dahlin  <johan@gnome.org>
+
+       * glib/pyglib.c (pyglib_enable_threads):
+       * gobject/gobjectmodule.c (pyg_threads_init),
+       (pygobject_enable_threads):
+       Add a pygobject_enable_threads wrapper around pyglib_threads_enable
+       and return 0/-1 which existing gobject based applications expect.
+
+2008-08-06  Johan Dahlin  <johan@gnome.org>
+
+       * glib/pyglib.c (pyglib_init):
+       return in case of error instead of trying to access the internal
+       types.
+
+2008-08-06  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * gio/gio.override: Add 'pygio_do_icon_richcompare' prototype to
+       header.
+       (_wrap_g_file_icon_tp_repr, _wrap_g_themed_icon_tp_repr): Fix
+       return value type in signature.
+
+2008-08-05  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       Bug 546135 â€“ GIcon and implementations improvements
+
+       * gio/gio-types.defs (FileIcon): New 'define-object'.
+
+       * gio/gio.override (pygio_do_icon_richcompare)
+       (_wrap_g_icon_tp_richcompare, _wrap_g_icon_tp_hash)
+       (_wrap_g_file_icon_tp_richcompare, _wrap_g_file_icon_tp_hash)
+       (_wrap_g_file_icon_tp_repr, _wrap_g_themed_icon_tp_richcompare)
+       (_wrap_g_themed_icon_tp_hash, _wrap_g_themed_icon_tp_repr): New
+       functions.
+
+2008-08-03  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       Bug 546046 â€“ Wrap GFile.replace_async and query_info_async
+
+       * tests/test_gio.py:
+       * gio/gfile.override:
+       * gio/gio.defs:
+       Wrap GFile.replace_async and query_info_async with docs and test.
+
+2008-08-03  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * glib/pyglib.h:
+       * glib/pyglib.c (pyglib_enable_threads): Change return value from
+       'gboolean' to 'int' and changed semantics to Pythonic: restores
+       backwards compatibility.
+
+       * gobject/gobjectmodule.c (pyg_threads_init): Treat return value
+       accordingly (bug #544946).
+
+2008-08-02  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       Bug 546020 â€“ Wrap GFile.create_async
+
+       * tests/test_gio.py:
+       * gio/gfile.override:
+       * gio/gio.defs:
+       Wrap GFile.create_async with docs and test
+
+2008-08-02  Johan Dahlin  <johan@gnome.org>
+
+       * codegen/docgen.py:
+       Remove SGML support, require python 2.4, modernize,
+       PEP-8ify. Make it run on gio.
+
+       * codegen/definitions.py:
+       Make property iterable
+
+       * gio/gio.defs:
+       Include the gio-types.defs file.
+
+2008-08-02  Johan Dahlin  <johan@gnome.org>
+
+       * glib/glibmodule.c (pyglib_set_prgname):
+       * glib/pygoptioncontext.c (pyg_option_context_init),
+       (pyg_option_context_set_help_enabled),
+       (pyg_option_context_set_ignore_unknown_options),
+       (pyg_option_context_set_main_group),
+       (pyg_option_context_add_group):
+       * glib/pygoptiongroup.c (arg_func), (pyg_option_group_add_entries),
+       (pyg_option_group_set_translation_domain),
+       (pyg_option_group_compare), (pyglib_option_group_register_types):
+       Fix compilation warnings, clean up style and indentation.
+
+2008-08-02  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       Bug 545959 â€“ Wrap GFile.append_to_async
+
+       * tests/test_gio.py:
+       * gio/gfile.override:
+       * gio/gio.defs:
+       Wrap GFile.append_to_async with docs and test
+
+2008-08-02  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gfileinfo.override:
+       * gio/gio.override:
+       * glib/glibmodule.c (pyglib_get_current_time):
+       * glib/pyglib.c (pyglib_float_from_timeval):
+       * glib/pyglib.h:
+       Add pyglib_float_from_timeval and use it
+
+2008-08-02  Johan Dahlin  <johan@gnome.org>
+
+       * docs/Makefile.am:
+       * docs/reference/pyglib-constants.xml:
+       * docs/reference/pyglib-functions.xml:
+       * docs/reference/pyglib-maincontext.xml:
+       * docs/reference/pyglib-mainloop.xml:
+       * docs/reference/pygobject-classes.xml:
+       * docs/reference/pygobject-constants.xml:
+       * docs/reference/pygobject-functions.xml:
+       * docs/reference/pygobject-maincontext.xml:
+       * docs/reference/pygobject-mainloop.xml:
+       Separate the glib and gobject bindings in the manual.
+
+2008-08-02  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       Bug 545920 â€“ Wrap GFile.query_writable_namespaces
+
+       * tests/test_gio.py:
+       * gio/gfile.override:
+       * gio/gio.defs:
+       Wrap GFile.query_writable_namespaces with docs and test
+
+2008-08-02  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gio.defs:
+       * gio/gfile.override:
+       * tests/test_gio.py:
+       Wrap gio.File.move
+
+2008-08-02  Johan Dahlin  <johan@gnome.org>
+
+       * gio/Makefile.am:
+       * gio/gfile.override:
+       * gio/gio.defs:
+       * gio/gio.override:
+       * gio/gvolume.override:
+       Wrap gio.Volume.mount and gio.Volume.eject
+
+2008-08-01  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gio.defs:
+       Add docstring for gio.FileInfo.list_attributes
+
+2008-08-01  Johan Dahlin  <johan@gnome.org>
+
+       Bug 545861 â€“ g_file_info_get_modification_time is missing
+       * gio/gfileinfo.override:
+       * gio/gio.defs:
+       * tests/test_gio.py:
+       Wrap, add test and documentation
+
+2008-08-01  Johan Dahlin  <johan@gnome.org>
+
+       Bug 545846 â€“ g_vfs_get_supported_uri_schemes is missing
+
+       * gio/gio.defs:
+       * gio/gio.override:
+       * tests/test_gio.py:
+       Wrap, add test and documentation
+
+2008-08-01  Johan Dahlin  <johan@gnome.org>
+
+       * glib/glibmodule.c (pyglib_set_application_name):
+       Use %r instead of %s, this is not python!
+
+2008-07-31  Johan Dahlin  <johan@gnome.org>
+
+       * glib/glibmodule.c (pyglib_set_prgname)
+       (pyglib_set_application_name): Use METH_O instead of METH_VARARGS.
+       (_glib_functions): Add doc strings for idle_add, timeout_add,
+       timeout_add_seconds, io_add_watch, child_watch_add, source_remove,
+       main_depth and main_context_default.
+
+2008-07-29  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * tests/test_gio.py:
+       * gio/gfileattribute.override:
+       * gio/gio.override:
+       * gio/gio.defs:
+       * gio/gfile.override:
+       * gio/Makefile.am: Wrap new object gio.FileAttributeInfo,
+       g_file_set_attribute and g_file_query_settable_attributes methods.
+
+2008-07-29  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/unix-types.defs: Wrap gio.unix.DesktopAppInfo
+
+       * gio/gappinfo.override:
+       * gio/gio.override:
+       * gio/gio.defs:
+       * gio/gapplaunchcontext.override:
+       * gio/Makefile.am: Wrap g_app_info_launch_uris,
+       g_app_info_launch, g_app_launch_context_get_display and
+       g_app_launch_context_get_startup_notify_id
+
+       * gio/pygio-utils.c:
+       * gio/pygio-utils.h: Add a couple of useful function to reduce the
+       code in wrapped methods.
+
+2008-07-29  Johan Dahlin  <johan@gnome.org>
+
+       * examples/gio/downloader.py:
+       * gio/giomodule.c (init_gio):
+       Add gio.FILE_ATTRIBUTE_* constants and update the examples to use them.
+
+2008-07-29  Johan Dahlin  <johan@gnome.org>
+
+       * examples/gio/downloader.py:
+       Add a new example
+
+       * gio/ginputstream.override:
+       Use a string internally instead of a PyStringObject when
+       in read_async. Create a new python string in finish and
+       honor the number of bytes read.
+
+2008-07-28  Johan Dahlin  <johan@gnome.org>
+
+       * glib/pyglib-python-compat.h:
+       * gobject/pygobject-private.h:
+       Move all compatibility into the same place, fixes build
+       on python 2.4.
+
+2008-07-27  Johan Dahlin  <johan@gnome.org>
+
+       * glib/option.py:
+       Remove tabs. Use sys.exc_info()[1] to fetch the exception value
+
+       * gobject/__init__.py:
+       * gobject/propertyhelper.py:
+       Import gobject._gobject instead of just gobject.
+
+       * gobject/Makefile.am:
+       * gobject/constants.py.in:
+       * gobject/generate-constants.c (main):
+       Don't add long suffix if python >= 3.0
+
+2008-07-27  Johan Dahlin  <johan@gnome.org>
+
+       * glib/pyglib-python-compat.h:
+       * gobject/gobjectmodule.c (pyg_object_new),
+       (pyg__install_metaclass):
+       * gobject/pygboxed.c (pyg_boxed_dealloc), (pyg_boxed_init),
+       (pyg_register_boxed):
+       * gobject/pygenum.c (pyg_enum_reduce):
+       * gobject/pyginterface.c (pyg_interface_init),
+       (pyg_register_interface):
+       * gobject/pygobject.c (pygobject_get_inst_data),
+       (pygobject_register_class), (pygobject_new_with_interfaces),
+       (pygobject_dealloc), (pygobject_repr), (pygobject_emit),
+       (pygobject_chain_from_overridden), (pygobject_weak_ref_notify):
+       * gobject/pygparamspec.c (pygobject_paramspec_register_types):
+       * gobject/pygpointer.c (pyg_pointer_dealloc), (pyg_pointer_init),
+       (pyg_register_pointer):
+       * gobject/pygtype.c (pyg_type_from_object),
+       (pyg_value_array_from_pyobject), (pyg_value_from_pyobject),
+       (pyg_object_descr_doc_get):
+       Use the Py_TYPE macro everywhere.
+
+2008-07-27  Johan Dahlin  <johan@gnome.org>
+
+       * glib/pyglib-python-compat.h:
+       Add a Py_TYPE macro for accessing ob_type.
+       * glib/glibmodule.c (pyglib_register_constants):
+       * gobject/gobjectmodule.c (pygobject__g_instance_init),
+       (pyg_integer_richcompare):
+       * gobject/pygenum.c (pyg_enum_repr), (pyg_enum_from_gtype),
+       (pyg_enum_add), (pyg_enum_get_value_name),
+       (pyg_enum_get_value_nick):
+       * gobject/pygflags.c (pyg_flags_repr), (pyg_flags_from_gtype),
+       (pyg_flags_add), (pyg_flags_and), (pyg_flags_or), (pyg_flags_xor),
+       (pyg_flags_get_first_value_name), (pyg_flags_get_first_value_nick),
+       (pyg_flags_get_value_names), (pyg_flags_get_value_nicks):
+       Use Py_TYPE and PyLong macros to access struct fields
+
+2008-07-27  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/gobjectmodule.c (pyg_param_spec_from_object),
+       (add_properties), (pyg_signal_new), (pyg_signal_list_ids),
+       (pyg_signal_lookup), (pyg_signal_query):
+       * gobject/pygenum.c (pyg_enum_richcompare), (pyg_enum_new),
+       (pyg_enum_from_gtype), (pyg_enum_add), (pyg_enum_reduce),
+       (pygobject_enum_register_types):
+       * gobject/pygflags.c (pyg_flags_richcompare), (pyg_flags_new),
+       (pyg_flags_from_gtype), (pyg_flags_add), (pyg_flags_and),
+       (pyg_flags_or), (pyg_flags_xor), (pygobject_flags_register_types):
+       * gobject/pygobject-private.h:
+       * gobject/pygobject.c (pygobject_disconnect_by_func),
+       (pygobject_handler_block_by_func),
+       (pygobject_handler_unblock_by_func), (pygobject_get_refcount):
+       * gobject/pygparamspec.c (pyg_param_spec_getattr):
+       * gobject/pygtype.c (_wrap_g_type_wrapper__get_depth),
+       (pyg_type_from_object), (pyg_enum_get_value),
+       (pyg_flags_get_value), (pyg_value_from_pyobject),
+       (pyg_value_as_pyobject):
+       Use _PyLong macros.
+
+2008-07-27  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/pygboxed.c (pygobject_boxed_register_types):
+       * gobject/pygenum.c (pygobject_enum_register_types):
+       * gobject/pygflags.c (pygobject_flags_register_types):
+       * gobject/pygobject.c (pygobject_object_register_types):
+       * gobject/pygparamspec.c (pygobject_paramspec_register_types):
+       * gobject/pygpointer.c (pygobject_pointer_register_types):
+       * gobject/pygtype.c (pygobject_type_register_types):
+       Use PYGLIB_DEFINE_TYPE macro and move struct field initialization
+       to the registration methods.
+
+2008-07-27  Johan Dahlin  <johan@gnome.org>
+
+       * glib/pyglib-python-compat.h:
+       Add _PyUnicode_Type macro
+
+       * gobject/gobjectmodule.c (pyg_type_name), (pyg_type_from_name),
+       (_pyg_signal_accumulator), (add_signals), (add_properties),
+       (get_type_name_for_class), (pyg_signal_list_names),
+       (pyg_signal_name), (pyg_signal_query), (pyg_object_new),
+       (pyg_add_emission_hook), (pyg_remove_emission_hook):
+       * gobject/pygboxed.c (pyg_boxed_repr):
+       * gobject/pygenum.c (pyg_enum_repr), (pyg_enum_add),
+       (pyg_enum_get_value_name), (pyg_enum_get_value_nick):
+       * gobject/pygflags.c (pyg_flags_repr), (pyg_flags_add),
+       (pyg_flags_get_first_value_name), (pyg_flags_get_first_value_nick),
+       (pyg_flags_get_value_names), (pyg_flags_get_value_nicks):
+       * gobject/pygobject.c (build_parameter_list), (PyGProps_getattro),
+       (PyGProps_setattro), (pygobject_register_class), (pygobject_repr),
+       (pygobject_init), (pygobject_get_properties),
+       (pygobject_set_properties), (pygobject_connect),
+       (pygobject_connect_after), (pygobject_connect_object),
+       (pygobject_connect_object_after), (pygobject_emit),
+       (pygobject_stop_emission), (pygobject_disconnect_by_func),
+       (pygobject_handler_block_by_func),
+       (pygobject_handler_unblock_by_func),
+       (pygobject_object_register_types):
+       * gobject/pygparamspec.c (pyg_param_spec_repr),
+       (pyg_param_spec_getattr):
+       * gobject/pygpointer.c (pyg_pointer_repr):
+       * gobject/pygtype.c (pyg_type_wrapper_repr),
+       (_wrap_g_type_wrapper__get_name), (pyg_type_from_object),
+       (pyg_enum_get_value), (pyg_flags_get_value),
+       (pyg_value_from_pyobject), (pyg_value_as_pyobject),
+       (object_doc_descr_get), (_pyg_strv_from_gvalue),
+       (_pyg_strv_to_gvalue):
+
+       Use _PyUnicode_* macros in the gobject module
+
+2008-07-27  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/Makefile.am:
+       * gobject/gobjectmodule.c (PYGLIB_MODULE_START):
+       * gobject/pygobject-private.h:
+       Use glib macros to define the module, update export regexp.
+
+2008-07-27  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/Makefile.am:
+       * gobject/gobjectmodule.c (init_gobject):
+       * gobject/pygboxed.c (pygobject_boxed_register_types):
+       * gobject/pygboxed.h:
+       * gobject/pygenum.c (pygobject_enum_register_types):
+       * gobject/pygenum.h:
+       * gobject/pygflags.c (pygobject_flags_register_types):
+       * gobject/pygflags.h:
+       * gobject/pygpointer.c (pygobject_pointer_register_types):
+       * gobject/pygpointer.h:
+       Split out quark and type registration to the respective
+       implementation source files, add headers.
+
+2008-07-27  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/Makefile.am:
+       * gobject/gobjectmodule.c (pygobject_register_api),
+       (pygobject_register_constants), (pygobject_register_features),
+       (pygobject_register_version_tuples), (pygobject_register_warnings),
+       (init_gobject):
+       * gobject/pygobject-private.h:
+       * gobject/pygobject.c (pyobject_copy), (pyobject_free),
+       (pygobject_object_register_types):
+       * gobject/pygtype.c (_pyg_strv_from_gvalue), (_pyg_strv_to_gvalue),
+       (pygobject_type_register_types):
+       * gobject/pygtype.h:
+       Move off a bit more to separate functions, cleaning up the init_glib
+       a bit more.
+
+2008-07-27  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/Makefile.am:
+       * gobject/gobjectmodule.c (init_gobject):
+       * gobject/pygobject-private.h:
+       * gobject/pygobject.c:
+       * gobject/pygparamspec.c (pygobject_paramspec_register_types):
+       * gobject/pygparamspec.h:
+       * gobject/pygtype.c:
+       Move paramspec registration to a separate file, add a header
+       for the internal API.
+
+2008-07-27  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * gobject/pygtype.c (pyg_enum_get_value): Issue warning if 'obj'
+       is a PyGEnum of wrong type, i.e. not matching 'enum_type' (bug
+       #503771).
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       reviewed by: <delete if not using a buddy>
+
+       * glib/pyglib-python-compat.h:
+       * glib/pyglib.h:
+       Make a few macros public
+
+       * gobject/Makefile.am:
+       * gobject/gobjectmodule.c (init_gobject):
+       * gobject/pyginterface.c (pyg_interface_init),
+       (pyg_interface_free), (pyg_register_interface),
+       (pyg_register_interface_info), (pyg_lookup_interface_info),
+       (pygobject_interface_register_types):
+       * gobject/pyginterface.h:
+       * gobject/pygobject-private.h:
+       * gobject/pygobject.c:
+       Move GInterface wrapper into its own file
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * glib/Makefile.am:
+       Also export PyInit_glib
+       * glib/__init__.py:
+       import glib._glib instead of just _glib
+       * glib/pyglib-python-compat.h:
+       * glib/pygoptioncontext.c (pyg_option_context_parse):
+       * glib/pygsource.c (source_repr), (pyg_source_attach),
+       (pyg_source_get_priority), (pyg_source_set_priority),
+       (pyg_source_get_id), (pyg_source_prepare), (pyg_poll_fd_repr):
+       * glib/pygspawn.c (pyg_pid_close), (pyg_pid_free), (pyg_pid_new),
+       (pyglib_spawn_async), (pyglib_spawn_register_types):
+       Go over the rest and replace missing symbols on python3.
+       the glib module successfully compiles and runs now.
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * glib/pygiochannel.c (py_io_channel_shutdown),
+       (py_io_channel_set_buffer_size), (py_io_channel_get_buffer_size),
+       (py_io_channel_set_buffered), (py_io_channel_get_buffered),
+       (py_io_channel_set_encoding), (py_io_channel_get_encoding),
+       (py_io_channel_read_chars), (py_io_channel_write_chars),
+       (py_io_channel_write_lines), (py_io_channel_flush),
+       (py_io_channel_set_flags), (py_io_channel_get_flags),
+       (py_io_channel_get_buffer_condition),
+       (py_io_channel_set_close_on_unref), (py_io_channel_add_watch),
+       (py_io_channel_win32_poll), (py_io_channel_win32_make_pollfd),
+       (py_io_channel_read_line), (py_io_channel_read_lines),
+       (py_io_channel_seek), (py_io_channel_init):
+       * glib/pyglib.c (pyglib_gerror_exception_check):
+       * glib/pygoptioncontext.c (pyg_option_context_init):
+       * glib/pygoptiongroup.c (check_if_owned):
+       * glib/pygsource.c (pyg_idle_init), (pyg_timeout_init),
+       (pyg_poll_fd_init):
+       gobject -> glib
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * glib/pygmaincontext.c (pyglib_maincontext_register_types):
+       * glib/pygmainloop.c (pyg_main_loop_init),
+       (pyglib_mainloop_register_types):
+       * glib/pygoptioncontext.c (pyg_option_context_set_main_group),
+       (pyglib_option_context_register_types):
+       * glib/pygoptiongroup.c (pyglib_option_group_register_types):
+       * glib/pygspawn.c (pyglib_spawn_register_types):
+       Convert the pid/mainloop/maincontext/optiongroup/optioncontext.
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * glib/pygsource.c (pyglib_source_register_types):
+       Convert the source objects to use macros, saves ~150 lines of code!
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * glib/glibmodule.c (get_handler_priority), (pyglib_idle_add),
+       (pyglib_timeout_add), (pyglib_timeout_add_seconds),
+       (pyglib_io_add_watch), (pyglib_child_watch_add),
+       (pyglib_markup_escape_text), (pyglib_main_depth),
+       (pyglib_filename_from_utf8), (pyglib_get_application_name),
+       (pyglib_get_prgname), (PYGLIB_MODULE_START):
+       * glib/pygiochannel.c (py_io_channel_next),
+       (py_io_channel_shutdown), (py_io_channel_get_buffer_size),
+       (py_io_channel_get_buffered), (py_io_channel_get_encoding),
+       (py_io_channel_read_chars), (py_io_channel_write_chars),
+       (py_io_channel_write_lines), (py_io_channel_flush),
+       (py_io_channel_set_flags), (py_io_channel_get_flags),
+       (py_io_channel_get_buffer_condition), (py_io_channel_win32_poll),
+       (py_io_channel_read_line), (py_io_channel_read_lines),
+       (py_io_channel_seek), (pyglib_iochannel_register_types):
+       * glib/pyglib-private.h:
+       * glib/pyglib-python-compat.h:
+       * glib/pyglib.c (pyglib_init), (pyglib_error_check),
+       (pyglib_gerror_exception_check),
+       (pyglib_register_exception_for_domain):
+       Add macros for supporting additional python versions.
+       Start using them for the glib module. Tested on python 2.5 and 3.0.
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * configure.ac:
+       * m4/python.m4:
+       Add macros which are compatible with python > 2.6.
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * configure.ac:
+       Post release version bump
+
+=== 2.15.2 ===
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * NEWS: Update
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/Makefile.am (_gobject_la_SOURCES): Build fix, remove
+       extra \
+
+       * examples/gio/directory-async.py:
+       * gio/Makefile.am:
+       * gio/giomodule.c (init_gio):
+       * glib/pyglib.c (pyglib_error_check),
+       (pyglib_register_exception_for_domain):
+       * glib/pyglib.h:
+       * tests/test_gio.py:
+       Add a new API for registering exceptions for a GError domain.
+       Register a new exception for G_IO_ERROR, update tests
+       and examples to use the new exception.
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * glib/pygoptioncontext.c (pyg_option_context_set_main_group),
+       (pyg_option_context_add_group):
+       Send in a PyObject instead of a PyGOptionGroup object.
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * glib/Makefile.am:
+       * glib/glibmodule.c (pyglib_register_constants), (init_glib):
+       * glib/option.py:
+       * glib/pyglib.c (pyglib_init),
+       (pyglib_option_group_transfer_group), (pyglib_option_group_new),
+       (pyglib_option_context_new):
+       * glib/pyglib.h:
+       * glib/pygoptioncontext.c (pyg_option_context_parse),
+       (pyg_option_context_set_main_group),
+       (pyg_option_context_add_group),
+       (pyglib_option_context_register_types):
+       * glib/pygoptioncontext.h:
+       * glib/pygoptiongroup.c (arg_func),
+       (pyglib_option_group_register_types):
+       * glib/pygoptiongroup.h:
+       * gobject/Makefile.am:
+       * gobject/__init__.py:
+       * gobject/gobjectmodule.c (init_gobject):
+       * gobject/option.py:
+       * gobject/pygobject-private.h:
+       * gobject/pygoptioncontext.c:
+       * gobject/pygoptiongroup.c:
+       Move option over from gobject to glib.
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * tests/common.py:
+       * tests/test_conversion.py:
+       * tests/test_enum.py:
+       * tests/test_interface.py:
+       * tests/test_option.py:
+       * tests/test_source.py:
+       * tests/test_subprocess.py:
+       * tests/test_subtype.py:
+       * tests/test_thread.py:
+       * tests/test_unknown.py:
+       Run pyflakes on the testsuite, remove unused imports
+       and reorganize others.
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * glib/glibmodule.c (pyglib_register_constants), (init_glib):
+       * gobject/__init__.py:
+       * gobject/gobjectmodule.c (init_gobject):
+       Move over glib constants to gobject
+       * tests/test_gio.py:
+       * tests/test_mainloop.py:
+       * tests/test_source.py:
+       * tests/test_subprocess.py:
+       * tests/test_thread.py:
+       Update tests to refer to glib when appropriate
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * README:
+       * configure.ac:
+       Bump required glib version to 2.10
+
+2008-07-26  Johan Dahlin  <johan@gnome.org>
+
+       * glib/glibmodule.c (child_watch_dnotify),
+       (pyglib_child_watch_add):
+       * glib/pygiochannel.c (pyg_iowatch_data_free),
+       (py_io_channel_add_watch):
+       * glib/pygspawn.c (_pyg_spawn_async_callback),
+       (pyglib_spawn_async):
+       Use g_slice_new instead of g_new
+
+2008-07-25  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/Makefile.am:
+       * tests/Makefile.am:
+       Make distcheck pass
+
+2008-07-25  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/gobjectmodule.c (init_gobject):
+       * gobject/pygobject-private.h:
+       Remove private structures which moved to pyglib.
+
+2008-07-24  Johan Dahlin  <johan@gnome.org>
+
+       Bug 544600 â€“ pygobject building failed since 839 revision,
+       error : "Py_ssize_t" undeclared
+
+       * glib/pyglib-private.h: Add backward compatibility macros for
+       python 2.4.
+
+       * gio/gfile.override:
+       * gio/gfileenumerator.override:
+       * gio/ginputstream.override:
+       * gio/gio.defs:
+       * gio/gio.override:
+       * gio/goutputstream.override:
+       * tests/test_gio.py:
+       Wrap gio.File.copy, add tests and documentation.
+       Rename PyGAsyncRequestNotify to PyGIONotify and reuse it.
+
+2008-07-23  Johan Dahlin  <johan@gnome.org>
+
+       * glib/pyglib.c (_pyglib_destroy_notify):
+       Rename the function too, not just the prototype!
+
+2008-07-21  Johan Dahlin  <johan@gnome.org>
+
+       * glib/glibmodule.c (pyglib_idle_add), (pyglib_timeout_add),
+       (pyglib_timeout_add_seconds), (pyglib_io_add_watch):
+       * glib/pyglib-private.h:
+       * glib/pyglib.c (pyglib_destroy_notify), (_pyglib_handler_marshal):
+       * glib/pyglib.h:
+       * glib/pygsource.c (pyg_source_set_callback):
+       Make pyglib_destroy_notify and pyglib_handler_marshal private.
+       Add a few public prototypes.
+
+2008-07-21  Johan Dahlin  <johan@gnome.org>
+
+       * glib/glibmodule.c (pyglib_idle_add), (pyglib_timeout_add),
+       (pyglib_timeout_add_seconds), (pyglib_io_add_watch),
+       (pyglib_source_remove), (pyglib_child_watch_add),
+       (pyglib_markup_escape_text), (pyglib_get_current_time),
+       (pyglib_main_depth), (pyglib_filename_display_name),
+       (pyglib_filename_display_basename), (pyglib_filename_from_utf8),
+       (pyglib_get_application_name), (pyglib_set_application_name),
+       (pyglib_get_prgname), (pyglib_set_prgname), (pyglib_register_api),
+       (pyglib_register_error):
+       Mark as static, rename from pyg_* -> pyglib_*. Fill in api struct,
+       rename struct and remove function suffix.
+
+2008-07-21  Johan Dahlin  <johan@gnome.org>
+
+       * glib/Makefile.am:
+       * glib/glibmodule.c (pyg_idle_add), (pyg_timeout_add),
+       (pyg_timeout_add_seconds), (pyg_io_add_watch),
+       (pyglib_register_api), (pyglib_register_error),
+       (pyglib_register_version_tuples), (init_glib):
+       * glib/pygiochannel.c (py_io_channel_next),
+       (py_io_channel_shutdown), (py_io_channel_set_encoding),
+       (py_io_channel_read_chars), (py_io_channel_write_chars),
+       (py_io_channel_write_lines), (py_io_channel_flush),
+       (py_io_channel_set_flags), (py_io_channel_read_line),
+       (py_io_channel_read_lines), (py_io_channel_seek),
+       (py_io_channel_init), (pyglib_iochannel_register_types):
+       * glib/pygiochannel.h:
+       * glib/pyglib-private.h:
+       * glib/pyglib.c (pyglib_threads_enabled),
+       (pyglib_gil_state_ensure), (pyglib_gil_state_release),
+       (pyglib_enable_threads), (pyglib_block_threads),
+       (pyglib_unblock_threads), (pyglib_set_thread_block_funcs),
+       (pyglib_handler_marshal), (pyglib_destroy_notify):
+       * glib/pyglib.h:
+       * glib/pygsource.c (pyg_source_set_callback),
+       (pyglib_source_register_types):
+       * glib/pygsource.h:
+       * glib/pygspawn.c (pyglib_spawn_register_types):
+       * glib/pygspawn.h:
+       * gobject/Makefile.am:
+       * gobject/__init__.py:
+       * gobject/gobjectmodule.c (pyg_set_thread_block_funcs),
+       (init_gobject):
+       * gobject/pygiochannel.c:
+       * gobject/pygobject-private.h:
+       * gobject/pygsource.c:
+       Move over Source, IOChannel, Idle, Timeout and PollFD to glib from
+       gobject.
+       Clean up and add a bit of new api for glib.
+
+2008-07-21  Johan Dahlin  <johan@gnome.org>
+
+       * configure.ac:
+       Use yes/no instead of true/false. Avoid bashism.
+       Fix another logic bug, and let's hope I didn't break anything
+
+2008-07-20  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * configure.ac (pygobject_CODEGEN_DEFINES): Fix libffi check
+       logic.
+
+2008-07-20  Johan Dahlin  <johan@gnome.org>
+
+       * glib/Makefile.am:
+       * glib/glibmodule.c (pyglib_main_context_default), (init_glib):
+       * glib/pyglib.c (pyglib_init), (pyglib_threads_enabled),
+       (pyglib_main_context_new):
+       * glib/pyglib.h:
+       * glib/pygmaincontext.c (_wrap_g_main_context_iteration),
+       (pyglib_maincontext_register_types):
+       * glib/pygmaincontext.h:
+       * glib/pygmainloop.c (pyg_signal_watch_prepare),
+       (pyg_signal_watch_check), (pyg_main_loop_new),
+       (_wrap_g_main_loop_get_context), (_wrap_g_main_loop_run),
+       (pyglib_mainloop_register_types):
+       * glib/pygmainloop.h:
+       * gobject/Makefile.am:
+       * gobject/__init__.py:
+       * gobject/gobjectmodule.c (pyg_destroy_notify), (pyobject_free),
+       (pyg_object_set_property), (pyg_object_get_property),
+       (_pyg_signal_accumulator), (pygobject__g_instance_init),
+       (pyg_handler_marshal), (pygobject_gil_state_ensure),
+       (pygobject_gil_state_release), (marshal_emission_hook),
+       (_log_func), (init_gobject):
+       * gobject/pygboxed.c (pyg_boxed_dealloc), (pyg_boxed_new):
+       * gobject/pygenum.c (pyg_enum_add):
+       * gobject/pygflags.c (pyg_flags_add):
+       * gobject/pygiochannel.c (pyg_iowatch_marshal):
+       * gobject/pygmaincontext.c:
+       * gobject/pygmainloop.c:
+       * gobject/pygobject-private.h:
+       * gobject/pygobject.c (pygobject_data_free), (pyg_toggle_notify),
+       (pygobject_new_with_interfaces), (pygobject_weak_ref_notify):
+       * gobject/pygobject.h:
+       * gobject/pygoptiongroup.c (destroy_g_group), (arg_func):
+       * gobject/pygpointer.c (pyg_pointer_new):
+       * gobject/pygsource.c (pyg_source_get_context),
+       (pyg_source_prepare), (pyg_source_check), (pyg_source_dispatch),
+       (pyg_source_finalize):
+       * gobject/pygtype.c (pyg_closure_invalidate),
+       (pyg_closure_marshal), (pyg_signal_class_closure_marshal):
+       * tests/common.py:
+
+       Move maincontext and mainloop over to glib.
+       Update the threadstate api to use the variant in glib.
+
+2008-07-20  Johan Dahlin  <johan@gnome.org>
+
+       * glib/Makefile.am:
+       * gobject/Makefile.am:
+       * gobject/__init__.py:
+       * gobject/gobjectmodule.c (pyg_threads_init), (pyg_error_check),
+       (pyg_gerror_exception_check), (init_gobject):
+       * gobject/option.py:
+       Install the glib module, the helper library and the headers.
+       Use it from gobject and remove the old glib specific code from there.
+
+2008-07-20  Johan Dahlin  <johan@gnome.org>
+
+       * configure.ac:
+       * gobject/Makefile.am:
+       Use pkg-config to check for libffi again.
+
+2008-07-20  Johan Dahlin  <johan@gnome.org>
+
+       * glib/Makefile.am:
+       * glib/glibmodule.c (pyg_main_context_default):
+       * glib/pyglib.c (pyglib_gerror_exception_check):
+       * glib/pyglib.h:
+       Rename helper library to libpyglib-2.0.
+       Move over pyg_gerror_exception_check as well.
+
+2008-07-20  Johan Dahlin  <johan@gnome.org>
+
+       * Makefile.am:
+       * configure.ac:
+       * glib/Makefile.am:
+       * glib/__init__.py:
+       * glib/glibmodule.c (pyg_destroy_notify), (get_handler_priority),
+       (pyg_handler_marshal), (pyg_idle_add), (pyg_timeout_add),
+       (pyg_timeout_add_seconds), (iowatch_marshal), (pyg_io_add_watch),
+       (pyg_source_remove), (pyg_main_context_default),
+       (child_watch_func), (child_watch_dnotify), (pyg_child_watch_add),
+       (pyg_markup_escape_text), (pyg_get_current_time), (pyg_main_depth),
+       (pyg_filename_display_name), (pyg_filename_display_basename),
+       (pyg_filename_from_utf8), (pyg_get_application_name),
+       (pyg_set_application_name), (pyg_get_prgname), (pyg_set_prgname),
+       (pyg_register_api), (pyg_register_error),
+       (pyg_register_version_tuples), (init_glib):
+       * glib/pyglib-private.h:
+       * glib/pyglib.c (pyglib_init), (pyglib_init_internal),
+       (pyglib_gil_state_ensure), (pyglib_gil_state_release),
+       (pyglib_enable_threads), (pyglib_gil_state_ensure_py23),
+       (pyglib_gil_state_release_py23), (pyglib_error_check):
+       * glib/pyglib.h:
+       * glib/pygspawn.c (pyg_pid_close), (pyg_pid_free),
+       (pyg_pid_tp_init), (pyg_pid_new), (_pyg_spawn_async_callback),
+       (pyglib_spawn_async), (pyg_spawn_register_types):
+       * glib/pygspawn.h:
+       Add glib bindings, currently not installed or used.
+       Add some internal API and move over a couple of functions
+       from the gobject module. Still very much a work in progress.
+
+2008-07-19  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gio.override:
+       Ignore a bunch of functions which are not relevant.
+
+2008-07-19  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gfile.override:
+       * gio/gio.defs:
+       * gio/gio.override:
+       * tests/test_gio.py:
+       Bind gio.Mount.unmount, gio.File.mount_mountable,
+       gio.File.unmount_mountable and gio.File.mount_enclosing_volume.
+       Add documents and tests.
+
+2008-07-19  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gio.override: Set module name back to
+       gio, as setting it to gio._gio breaks pydoc.
+
+       * gio/gio.defs:
+       Use property based constructors when possible.
+
+2008-07-19  Johan Dahlin  <johan@gnome.org>
+
+       * examples/gio/directory-async.py:
+       * gio/gfileenumerator.override:
+       * gio/gio.defs:
+       * tests/test_gio.py:
+       Wrap gio.FileEnumerator.next_files_async/next_files_done.
+       Update the example to use them instead of the synchronous versions,
+       add documentation and tests.
+
+2008-07-19  Johan Dahlin  <johan@gnome.org>
+
+       * examples/gio/directory-async.py:
+       Only fetch name, saves a couple of syscalls.
+       * gio/gio.override:
+       Set name to gio._gio so pychecker/pydoc works.
+
+2008-07-18  Johan Dahlin  <johan@gnome.org>
+
+       * examples/gio/directory-async.py:
+       * gio/gfile.override:
+       * gio/gfileenumerator.override:
+       * gio/gio.defs:
+       * tests/test_gio.py:
+       Wrap gio.File.enumerate_children_async, add tests, docstring
+       and an example.
+       Also document gio.File.enumerate while we're at it.
+
+2008-07-18  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gfile.override:
+       Use %zd instead of %d since it's a Py_ssize_t and not an int.
+
+2008-07-18  Johan Dahlin  <johan@gnome.org>
+
+       * gio/pygio-utils.h:
+       define NO_IMPORT_PYGOBJECT before including pygobject.h
+
+2008-07-18  Johan Dahlin  <johan@gnome.org>
+
+       * gio/giomodule.c (init_gio):
+       Require pygobject 2.15.2
+
+2008-07-17  Johan Dahlin  <johan@gnome.org>
+
+       * gio/giomodule.c (init_gio):
+       Add a pygio_version module attribute
+       (DL_EXPORT): The module is called gio._gio, not just _gio.
+
+2008-07-17  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gio-types.defs:
+       Rename gio.IOErrorEnum to gio.ErrorEnum
+
+2008-07-17  Johan Dahlin  <johan@gnome.org>
+
+       * gio/giomodule.c (init_gio):
+       Add gio.ERROR which maps to the G_IO_ERROR quark.
+
+2008-07-17  Johan Dahlin  <johan@gnome.org>
+
+       * gio/giomodule.c (init_gio):
+       Use the prefix G_IO_ for stripping constants instead of just G_
+       * gobject/gobjectmodule.c (pyg_constant_strip_prefix):
+       Check so the fist part of name and strip_prefix are the same,
+       if they don't, just strip of the part of strip_prefix which
+       matches.
+
+       This removes the initial IO_* prefix for some constants in gio.
+       Eg, gio.IO_ERROR_* -> gio.ERROR_*
+
+2008-07-16  Johan Dahlin  <johan@gnome.org>
+
+       * configure.ac: Post release version bump
+
+=== 2.15.1 ===
+2008-07-16  Johan Dahlin  <johan@gnome.org>
+
+       * NEWS: Update
+
+2008-07-15  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * codegen/pygobject-codegen-2.0.in: Rename from
+       'pygtk-codegen-2.0.in'.
+
+       * configure.ac:
+       * codegen/Makefile.am: Update accordingly.
+
+2008-07-15  Johan Dahlin  <johan@gnome.org>
+
+       * configure.ac: Post release version bump
+
+=== 2.15.0 ===
+2008-07-15  Johan Dahlin  <johan@gnome.org>
+
+       New version
+
+       * NEWS: Update
+
+       * tests/Makefile.am:
+       Make sure we can distcheck the gio module properly
+
+2008-07-15  Johan Dahlin  <johan@gnome.org>
+
+       Bug 450659 â€“ h2def.py - export 'typedef struct' object definitions not
+       working
+
+       * codegen/h2def.py:
+       Patch by Lauro Moura
+
+2008-07-14  Johan Dahlin  <johan@gnome.org>
+
+       Bug 471559 â€“ add AM_PROG_CC_C_O to configure.ac for recent automake
+
+       * configure.ac:
+       Patch by Tim Mooney
+
+2008-07-14  Johan Dahlin  <johan@gnome.org>
+
+       Bug 448173 â€“ use python-config to get python includes
+
+       * configure.ac:
+       Really close the by, patch by Matthias Klose
+
+2008-07-14  Johan Dahlin  <johan@gnome.org>
+
+       Bug 378704 â€“ OptionParser.parse_args() returns unexpected results
+
+       * gobject/option.py:
+       Patch by Johannes Hölzl
+
+2008-07-14  Johan Dahlin  <johan@gnome.org>
+
+       Bug 491773 â€“ autoconf failure: .m4 files cannot be found
+
+       * Makefile.am:
+       Patch by macks@netspace.org
+
+2008-07-14  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfile.override: wrap File.load_contents_async and
+       File.load_contents_finish
+
+       * gio/gio.defs: Add docstring for the above methods.
+
+       * tests/test_gio.py: Add a test for the above methods.
+
+2008-07-14  Johan Dahlin  <johan@gnome.org>
+
+       Bug 487523 â€“ Add xslfiles variable to .pc.in files
+
+       * pygobject-2.0-uninstalled.pc.in:
+       Add xslfiles variable, patch by Damien Carbery
+
+2008-07-14  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gio.defs:
+       Remove g_file_input_stream_seek and g_file_output_stream_seek,
+       they already implement the seekable interface.
+
+2008-07-14  Johan Dahlin  <johan@gnome.org>
+
+       Bug 504337 - crash bug in gobject.Timeout and gobject.Idle
+
+       * gobject/pygsource.c:
+       * tests/test_source.py:
+       Fix crash in Timeout and Idle, patch by Bryan Silverthorn.
+
+2008-07-14  Johan Dahlin  <johan@gnome.org>
+
+       * codegen/argtypes.py:
+       Map GSeekType to an int
+
+       * gio/gfileinfo.override:
+       * gio/ginputstream.override:
+       * gio/goutputstream.override:
+       Add comments for missing API
+
+2008-07-14  Johan Dahlin  <johan@gnome.org>
+
+       * gio/Makefile.am:
+       * gio/gfile.override:
+       * gio/ginputstream.override:
+       * gio/gio.override:
+       * gio/goutputstream.override:
+       * gio/pygio-utils.c (pygio_check_cancellable):
+       * gio/pygio-utils.h:
+       Refactor cancellable check to a utility function, avoids
+       plenty of code duplication.
+
+2008-07-14  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * codegen/definitions.py (ReturnType): New class.
+       (MethodDefBase.__init__): Make 'self.ret' a 'ReturnType' instance,
+       not string.  Accept 'optional' flag.
+
+       * codegen/argtypes.py (ArgMatcher.get_reverse_ret): Test if
+       'ptype' has true 'optional' attribute and copy it to 'props' then.
+
+       * codegen/reversewrapper.py (ReturnType.support_optional): New
+       class field, False by default.
+       (GObjectReturn.support_optional, GObjectReturn.write_decl)
+       (GObjectReturn.write_conversion): Support optional return.
+
+       * pygobject-2.0.pc.in: Add 'codegendir' variable.
+       * codegen/pygtk-codegen-2.0.in: Make 'codegendir' refer to
+       PyGObject's codegen, not PyGTK's one --- the latter will be
+       removed (first part of bug #542821).
+
+2008-07-08  Murray Cumming  <murrayc@murrayc.com>
+
+       * codegen/h2def.py: clean_func(): Strip GSEAL out, to avoid us
+       thinking that there are many functions called GSEAL (merge from
+       PyGTK).
+
+2008-01-29  Olivier Crete  <tester@tester.ca>
+
+       * codegen/h2def.py (DefsWriter.__init__): Fix copy-paste
+       typos (merge from PyGTK).
+
+2008-07-11  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gio/gfile.override: wrap File.load_contents, fix a typo.
+
+       * gio/gio.defs: Add docstring for File.load_contents.
+
+       * tests/test_gio.py: Add a test for the above method.
+
+2008-07-09  Juha Sahakangas  <voas0113@saunalahti.fi>
+
+       * gobject/gobjectmodule.c (pyg_io_add_watch): Fix error message
+       referencing wrong argument.
+
+2008-06-29  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/gobjectmodule.c (pyg_markup_escape_text): text_size
+       should be Py_ssize_t instead of int.
+       Bug 540696 â€“ gobject.markup_escape_text() causes python to segfault.
+
+2008-06-28  Johan Dahlin  <jdahlin@async.com.br>
+
+       * docs/reference/pygobject.xml:
+       Document GObject.handler_block_by_func/handler_unblock_by_func
+
+2008-06-17  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gio/gio-types.defs:
+       * tests/test_gio.py:
+       Sort out confusion between interfaces and objects, add test.
+       Fixes #538601
+
+2008-06-09  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * gobject/pygobject.c (pygobject_copy, pygobject_deepcopy): New
+       functions, unconditionally raise TypeError.
+       (pygobject_methods): Hook them up. (bug #482370)
+
+2008-05-31  Johan Dahlin  <johan@gnome.org>
+
+    * setup.py: set FFI_LIBS to '', since this is mostly used on win32.
+
+2008-05-30  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/gobjectmodule.c (init_gobject): Call PyType_Ready for
+       PyGParamSpec_Type, and add it to the module dict.
+
+2008-05-23  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gio/gio.defs:
+       Add default values for all GSeekType variables.
+
+2008-05-21  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/gobjectmodule.c (pyg_spawn_async): Accept None for the
+       child_setup parameter of gobject.spawn_async().  Also check that
+       it is callable.
+
+2008-04-27  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * gobject/pygenum.c (pyg_enum_richcompare): Fix: raise warning as
+       exception if asked by PyErr_Warn().
+
+       * gobject/pygflags.c (pyg_flags_richcompare):  Don't return NULL
+       after warning; more useful warning message.
+
+       (#480424, borrowing code by Mark Doffman)
+
+2008-04-21  Johan Dahlin  <johan@gnome.org>
+
+       * codegen/h2def.py: Update link to defs format discussion
+
+2008-04-15  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/gobjectmodule.c (init_gobject): Set
+       gobject.GObject.__module__ to gobject._gobject, this
+       helps pylint to check public methods of GObject subclasses
+
+       * tests/Makefile.am (tests):
+       * tests/test_gobject.py (TestGObjectAPI.testGObjectModule):
+       Add a test for this
+
+       (#523821, Simon Schampijer)
+
+2008-04-11  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gio/gio.defs (write_async): document.
+       Add default values to all flags parameters.
+
+2008-04-11  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gio.defs (read_async, read): document.
+       Set io_priority default to G_PRIORITY_DEFAULT.
+
+2008-04-11  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gio/gfile.override:
+       * gio/ginputstream.override:
+       * gio/goutputstream.override:
+       * tests/test_gio.py:
+       Move around the order of the callback argument to async methods,
+       so it comes before priority and cancellable, which can have default
+       values.
+
+2008-04-08  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gio/Makefile.am:
+       * gio/__init__.py:
+       * gio/gappinfo.override:
+       * gio/gio.defs:
+       * gio/gio.override:
+       * tests/test_gio.py:
+       Implement GAppInfo constructor, add tests.
+
+2008-04-08  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gio/Makefile.am:
+       * gio/gfileinfo.override:
+       * gio/gio.defs:
+       * gio/gio.override:
+       * tests/test_gio.py:
+       Wrap GFileInfo.list_attributes(), add tests and
+       set the default of GFileQueryInfoFlags args to G_FILE_QUERY_INFO_NONE.
+
+2008-04-08  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/option.py: Fix a typo
+       * tests/test_option.py:
+       Update the tests after the latest "refactoring".
+       The testsuite should run fine now again, finally.
+
+2008-04-08  Johan Dahlin  <johan@gnome.org>
+
+       * tests/test_gio.py (TestOutputStream.testWriteAsyncError):
+       (TestInputStream._testCloseAsync.callback):
+       Disable these tests until we can figure why they freeze during
+       make check.
+
+2008-04-08  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gio/gio.defs:
+       * gio/gio.override:
+       * tests/test_gio.py:
+       Add bindings for content_type_guess.
+       Based on patch by Thomas Leonard (#525113)
+
+2008-04-08  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gio/gio-types.defs:
+       * gio/gio.defs:
+       * gio/gio.override:
+       * tests/test_gio.py:
+       Add basic support for GThemedIcon, based on patch by
+       Thomas Leonard (#521883)
+
+2008-04-08  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/pygsource.c:
+       * tests/test_source.py:
+       Unbreak Source.prepare (#523075, Bryan Silverthorn)
+
+2008-04-08  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gfile.override (_wrap__install_file_meta): Fix a couple of
+       silly typos and use gio.File instead of GFile in exceptions.
+
+2008-04-07  Johan Dahlin  <johan@gnome.org>
+
+       * gio/__init__.py:
+       * gio/gfile.override:
+       * gio/gio-types.defs:
+       * gio/gio.override:
+       * tests/test_gio.py:
+       Make gio.File() (calling on an interface) a factory for creating
+       files. Add tests and a docstring.
+
+2008-04-07  Johan Dahlin  <johan@gnome.org>
+
+       * gio/Makefile.am (pygiodir): Install gio in the right location
+
+2008-04-06  Johan Dahlin  <johan@gnome.org>
+
+       * tests/test_gio.py: Add tests for recently added features.
+
+       * gio/goutputstream.override:
+       (_wrap_g_output_stream_write_asyn,_wrap_g_output_stream_close_async):
+       * gio/ginputstream.override (async_result_callback_marshal_read):
+       Add wrappers.
+
+       * gio/gio.override: Ignore vararg functions and remove a couple
+       of left overs in the generic marshaller.
+
+       * gio/gio.defs: Remove g_file_output_stream_truncate,
+       g_file_output_stream_tell and g_file_input_stream_tell
+
+       * Makefile.am:
+       * gio/gfileenumerator.override (_wrap_g_file_enumerator_tp_iter):
+       Implement the python iteration protocol on GFileEnumerator
+
+       * codegen/argtypes.py (arg): Add goffset to the int64 arg type
+
+2008-04-02  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * gobject/pygenum.c: bug #428732
+       (pyg_enum_new): Fix two wrong assertions about '__enum_values__'
+       size and contents.
+       (pyg_enum_reduce): New function (based on patch by Phil Dumont).
+       (pyg_enum_methods): Hook it up.
+
+2008-03-24  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * gobject/pygenum.c (pyg_enum_richcompare): Don't return NULL
+       after warning; more useful warning message (bug #519631).
+
+2008-03-22  Johan Dahlin  <johan@gnome.org>
+
+       * gio/ginputstream.override:
+       * gio/gio.override:
+       * tests/test_gio.py:
+
+       Make read_finish() return the string, remove the get_buffer method.
+       This is more pythonic, as it mimics the normal read() behavior of
+       python.
+       Update the tests and use a separate marshaller for read.
+
+2008-03-21  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/__init__.py:
+       * tests/test_properties.py:
+       Allow gobject.property work with subclasses. Add tests.
+
+       (#523352, Tomeu Vizoso)
+
+2008-03-10  Johan Dahlin  <johan@gnome.org>
+
+       * configure.ac: Require gio and giounix 2.15.7.
+
+2008-03-09  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gio-types.defs:
+       * gio/gio.defs:
+       * tests/test_gio.py:
+       Update to SVN of gio:
+       g_file_contains_file -> g_file_has_prefix
+       can_seek and can_truncate are now only on the GSeekable interface
+       Add tests
+
+       (#521207, Thomas Leonard)
+
+2008-03-08  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gio/ginputstream.override:
+       Pass in l instead of i to PyArg_ParseTupleAndKeywords when
+       parsing a long. Fixes the build on 64-bit systems.
+       (#521165, Thomas Leonard)
+
+2008-03-02  Johan Dahlin  <johan@gnome.org>
+
+       * Makefile.am: Dist .m4 files.
+       (#496011, Ed Catmur)
+
+2008-03-02  Paul Pogonyshev  <pogonyshev@gmx.net>
+
+       * gobject/gobjectmodule.c (REGISTER_TYPE): Never override customly
+       set 'tp_new' and 'tp_alloc'.
+
+2008-02-01  Dan Winship  <danw@gnome.org>
+
+       * pygobject-2.0.pc.in (defsdir): Add this so other bindings can
+       find gio.defs
+
+2008-01-21  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gio.override (async_result_callback_marshal):
+       Don't assume the buffer is set, use Py_XINCREF instead of Py_INCREF.
+
+       * gio/Makefile.am:
+       * gio/ginputstream.override:
+       * gio/goutputstream.override:
+       * gio/gvolumemonitor.override:
+       * gio/gfile.override:
+       * tests/test_gio.py:
+       Implement and test GFile.read_async. Use try/finally to always quit
+       the mainloop, even if the test fail.
+       Update source comment headers.
+
+2008-01-20  Johan Dahlin  <johan@gnome.org>
+
+       * tests/test_gio.py (TestVolumeMonitor): New test
+
+       * gio/Makefile.am:
+       * gio/ginputstream.override:
+       * gio/gio.override:
+       * gio/giomodule.c:
+       * gio/goutputstream.override:
+       * gio/gvolumemonitor.override:
+       * gio/unix.override:
+       * gio/unixmodule.c:
+
+       Split out overrides into more files. Fix up module description in
+       comments
+
+2008-01-20  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gio.override (_wrap_g_simple_async_result_get_buffer): Add
+       a new method, to fetch the buffer
+       (_wrap_g_input_stream_read_async): Save a reference to the buffer.
+       * tests/test_gio.py (TestInputStream.testReadAsync.callback):
+       Check the content
+
+       * tests/test_gio.py (TestInputStream.testReadAsyncError):
+       New function to test error condition of async read.
+
+       * gio/gio.override (async_result_callback_marshal): Grab a reference
+       to callback/data.
+
+2008-01-19  Johan Dahlin  <johan@gnome.org>
+
+       * gio/gio.override (_wrap_g_output_stream_write): Impl.
+       * gio/gio.override:
+       * gio/unix.defs:
+       Add GUnixInputStream type and methods
+
+       * tests/common.py:
+       * tests/test_gio.py:
+       Add GIO tests.
+
+       * gio/gio.override (_wrap_g_app_info_get_all_for_type),
+       (_wrap_g_app_info_get_all),
+       (_wrap_g_drive_get_volumes): Implement.
+
+       * gio/gio.override (async_result_callback_marshal): New marshaller
+       for async results
+       (_wrap_g_input_stream_read_async): Impl.
+       * gio/gio-types.defs: Add SimpleAsyncRequest
+       * gio/giomodule.c: Register enums/constants
+
+       * gio/gio.override: Fix a silly bug so it possible to read files
+       larger than 8192 bytes.
+
+       * gio/gio.defs: Set null-ok for all cancelable as well.
+
+       * gio/__init__.py: set gio.unix to None if it's not available
+
+       * gio/gio.override: Implement InputStream.read efficiently without
+       copying the strings, based on the standard libararys file.read()
+       implementation.
+
+       * gio/gio-types.defs (Cancellable): Add wrapper.
+
+       * gio/gio.defs (replace): Do not require cancellable argument
+       to be specified, default to NULL if not.
+
+       * Makefile.am:
+       * codegen/Makefile.am:
+       * codegen/README.defs:
+       * codegen/__init__.py:
+       * codegen/argtypes.py:
+       * codegen/code-coverage.py:
+       * codegen/codegen.py:
+       * codegen/createdefs.py:
+       * codegen/definitions.py:
+       * codegen/defsconvert.py:
+       * codegen/defsgen.py:
+       * codegen/defsparser.py:
+       * codegen/docextract.py:
+       * codegen/docextract_to_xml.py:
+       * codegen/docgen.py:
+       * codegen/h2def.py:
+       * codegen/mergedefs.py:
+       * codegen/missingdefs.py:
+       * codegen/mkskel.py:
+       * codegen/override.py:
+       * codegen/pygtk-codegen-2.0.in:
+       * codegen/reversewrapper.py:
+       * codegen/scanvirtuals.py:
+       * codegen/scmexpr.py:
+
+       * configure.ac:
+       * gio/Makefile.am:
+       * gio/__init__.py:
+       * gio/gio-types.defs:
+       * gio/gio.defs:
+       * gio/gio.override:
+       * gio/giomodule.c: (init_gio):
+       * gio/unix-types.defs:
+       * gio/unix.defs:
+       * gio/unix.override:
+       * gio/unixmodule.c: (initunix):
+
+       Import codegen from pygtk.
+       Add initial gio and gio.unix bindings.
+
+2008-01-11  Johan Dahlin  <johan@gnome.org>
+
+       * configure.ac: Don't link against libffi if we cannot find libffi
+       on the system. (#496006, Ed Catmur)
+
+2008-01-03  Johan Dahlin  <johan@gnome.org>
+
+       Reviewed by: Gustavo
+
+       * configure.ac:
+       * gobject/pygmainloop.c (pyg_signal_watch_prepare): Optinally
+       use PySignal_SetWakeupFd to avoid having to do a timeout to find
+       out if there are any pending signals from python.
+       Fixes #481569
+
+       * configure.ac (CPPFLAGS):
+       Include -Wall and -Werror when checking for PySignal_SetWakeupFd
+
+2008-01-02  Sebastian Rittau  <srittau@jroger.in-berlin.de>
+
+       * gobject/gobjectmodule.c
+       * gobject/gobjectmodule.c (pyg_get_application_name)
+       (pyg_get_prgname): Add wrappers for g_get_application_name and
+       g_get_prgname.
+
+2007-11-30  Rafael Villar Burke  <pachi@rvburke.com>
+
+       * docs/reference/pygobject.xml: Add props attribute
+
+2007-11-24  Paolo Borelli  <pborelli@katamail.com>
+
+       * gobject/gobjectmodule.c (pyg_type_register): check for NULL before
+       dereferencing.
+
+2007-11-24  Paolo Borelli  <pborelli@katamail.com>
+
+       * gobject/gobjectmodule.c (pyg_type_register): do not use a
+       potentially uninitialized variable. Bug #499334.
+
+2007-11-12  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/option.py (OptionParser.parse_args):
+       Set the default value of old_args to 0, so we don't end
+       up slicing with None. Fixes #496278 (Vincent Untz)
+
+2007-11-06  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/option.py (OptionParser.parse_args): Merge in values
+       from all groups to the global option group. Slice up args
+       so it doesn't return too much.
+
+       * tests/test_option.py: Refactor to be unittesty,
+       Add new tests to test what options returns.
+
+2007-11-05  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/pygobject.h:
+       * gobject/gobjectmodule.c:
+       Add pyg_option_group_new to the public API
+
+       * configure.ac: Branch, bump version to 2.15.0.
+
+2007-10-16  Damien Carbery   <damien.carbery@sun.com>
+
+       reviewed by: Johan Dahlin.
+
+       * pygobject-2.0-uninstalled.pc.in: uninstalled.pc file missing
+       'datadir' value. Fixes #486876.
+
+2007-09-16  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * configure.ac: Post-relase version bump.
+
+=== 2.14.0 ===
+2007-09-16  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * configure.ac: Bump version to 2.14.0.
+
+       * NEWS: Update NEWS for next release.
+
+2007-09-06  John Finlay  <finlay@moeraki.com>
+
+       * docs/xsl/fixxref.py.in: Remove DATADIR substitution since it now
+       gets substituted as ${prefix}/share which doesn't work in a Python
+       script.
+
+2007-08-27  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/propertyhelper.py (property.__metaclass__.__repr__): Avoid
+       exporting the metaclass, just define it where it will be used.
+
+       * gobject/__init__.py (GObjectMeta._install_properties):
+       Refactor a bit to make sure that it is possible to use in subclasses,
+       fixes #470718 (Marco Giusti)
+
+2007-08-27   Marco Giusti  <marco.giusti@gmail.com>
+
+       reviewed by: Gustavo J. A. M. Carneiro
+
+       * gobject/propertyhelper.py:
+       * tests/test_properties.py:
+       Bug 470230 â€“ check for default value in boolean type is wrong.
+
+2007-08-27  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * tests/Makefile.am,
+       * gobject/Makefile.am: Remove -D_XOPEN_SOURCE=600
+       -D__EXTENSIONS__, no longer needed.
+
+       * configure.ac: Don't add -std=c9x CFLAG on Solaris.  Fixes
+       #339924 again.
+
+       * gobject/pygtype.c (pyg_type_wrapper_repr): Typecast self->type
+       to (unsigned long int) to fix a compilation warning.
+
+2007-08-14   Ed Catmur   <ed@catmur.co.uk>
+
+       reviewed by: Gustavo J. A. M. Carneiro
+
+       * gobject/pygobject.c (pygobject_new_full, pygobject_clear),
+       (pygobject_get_dict): Bug 466082 â€“ pygobject_new_full not fully
+       initialising PyGObject, chaos results.
+
+2007-08-13  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * tests/test_subtype.py (TestSubType.testGetDict): Add unit test
+       exercising a bug when GObject.__dict__ is accessed directly.
+
+2007-07-08  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/gobjectmodule.c (pygobject_functions)
+       (pyg_timeout_add_seconds): Wrap g_timeout_add_seconds,
+       conditionally compiled if glib version >= 2.13.5.
+
+2007-07-08   Johannes Hölzl   <johannes.hoelzl@gmx.de>
+
+       reviewed by: Gustavo Carneiro
+
+       * gobject/gobjectmodule.c (build_gerror, init_gobject): Work
+       around the deprecation warning of BaseException.message in Python
+       2.6+ affecting GError exceptions.  Fixes #342948.
+
+2007-07-07  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * configure.ac: Post-release version bump.
+
+=== 2.13.2 ===
+2007-07-07  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * NEWS: Update.
+
+2007-07-07  Damien Carbery   <damien.carbery@sun.com>
+
+       reviewed by: Gustavo Carneiro.
+
+       * configure.ac: Bug 339924 â€“ pygobject doesn't compile on opensolaris.
+
+2007-04-30  Johannes Hölzl  <johannes.hoelzl@gmx.de>
+
+       * gobject/gobjectmodule.c (init_gobjectmodule),
+       * gobject/pygoptiongroup.c (arg_func),
+       * gobject/option.py (OptionParser._parse_args, OptionGroup._to_goptiongroup),
+       * tests/test_option.py: OptParse-Exceptions in GOption-callbacks
+       are now convertet into an GError.  GError from the
+       GOptionGroup.run is convertet into an OptParse-Exception.
+       Fixes #342948.
+
+2007-07-06  Ed Catmur  <ed@catmur.co.uk>
+
+       * gobject/pygtype.c (pyg_param_gvalue_from_pyobject),
+       (pyg_param_gvalue_as_pyobject): Applied patch from Ed Catmur to
+       support G_TYPE_VALUE boxed args/signals, and add a test, Fixes
+       #351072
+
+2007-07-06  Carlos Martin  <inean@users.sf.net>
+
+       * tests/test_gtype.py:
+       * tests/testhelpermodule.c: add test for #351072
+
+2007-07-04  Murray Cumming  <murrayc@murrayc.com>
+
+       * gobject/pygobject.c: (pygobject_switch_to_toggle_ref):
+       * gobject/pygobject.h: Rename the private struct field to
+       private_flags, because private is a C++ keyword, so this broke
+       builds of some C++ applications, such as Glom.
+
+2007-07-02  Sebastian Granjoux  <seb.sfo@free.fr>
+
+       reviewed by: Johan Dahlin
+
+       * gobject/gobjectmodule.c: (pyg_gerror_exception_check):
+       * tests/test_gtype.py:
+       * tests/testhelpermodule.c: (_wrap_test_gerror_exception):
+
+       Fix a bug in pyg_error_exception_check, add a test, Fixes #449879
+
+2007-06-17  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/pygobject.h: Add a flags field to PyGObject; uses
+       structure space formerly occupied by the now stale "GSList
+       *closures" field.
+
+       * gobject/pygobject.c (pygobject_switch_to_toggle_ref): Do nothing
+       if the wrapper is already in toggle reference mode.  Closes #447271.
+
+       * tests/test_subtype.py: Test case for #447271.
+
+2007-06-17  Sebastien Bacher  <seb128@ubuntu.com>
+
+       * m4/python.m4: use python-config to get python includes
+          (Closes #448173)
+
+2007-06-16  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/propertyhelper.py,
+       * tests/test_properties.py: Support type=GObject or
+       type=TYPE_OBJECT in the new properties API.
+
+2007-06-06  Yevgen Muntyan  <muntyan@tamu.edu>
+
+       OK'd by Johan
+
+       * gobject/generate-constants.c: Return 0 from main().
+
+       * gobject/Makefile.am: use generate-constants$(EXEEXT) instead
+       of generate-constants in the constants.py target rule.
+
+2007-05-30  Yevgen Muntyan  <muntyan@tamu.edu>
+
+       reviewed by: Gustavo Carneiro
+
+       * autogen.sh: Allow running autogen.sh from outside $srcdir.
+
+2007-05-09  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * tests/Makefile.am (INCLUDES): Idem.
+
+       * gobject/Makefile.am (INCLUDES): Add -D_XOPEN_SOURCE=600 and
+       -D__EXTENSIONS__ to make it compile with c99 and Sun C compiler.
+
+       Fixes #339924: gnome-python doesn't compile on opensolaris.
+
+2007-05-02  Johan Dahlin  <jdahlin@async.com.br>
+
+       * configure.ac: Post-release version bump.
+
+=== 2.13.1 ===
+2007-05-02  Johan Dahlin  <jdahlin@async.com.br>
+
+       * pygobject-2.0-uninstalled.pc.in: Add libdir.
+       Fixes #435132 (Luca Ferretti)
+
+2007-05-01  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/propertyhelper.py:
+       * tests/test_properties.py:
+
+       Store property values in the descriptor per instance, add a test.
+
+       * examples/properties.py:
+       * gobject/Makefile.am:
+       * gobject/__init__.py:
+       * gobject/constants.py.in:
+       * gobject/generate-constants.c: (main):
+       * gobject/propertyhelper.py:
+       * tests/Makefile.am:
+       * tests/test_enum.py:
+       * tests/test_interface.py:
+       * tests/test_properties.py:
+
+       Add a property helper, fixes #338098
+
+2007-04-30  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+       * tests/common.py (importModules): Import testhelper first so that
+       g_thread_init is called before init_pygobject.
+
+       * tests/testhelpermodule.c (inittesthelper): Call g_thread_init
+       before init_pygobject.
+
+       * tests/test_subtype.py (TestSubType.testDescriptor): Unit test
+       for the bug below.
+
+       * gobject/pygobject.c (pygobject_setattro): Account for the case
+       when attribute setting doesn't actually create an instance
+       dictionary, in which case pygobject_switch_to_toggle_ref would be
+       called twice, thereby causing gobject error.
+       Fixes #434659
+
+2007-04-29  James Livingstone  <doclivingstone@gmail.com>
+
+       reviewed by: Johan Dahlin  <johan@gnome.org>
+
+       * gobject/pygtype.c: (pyg_value_from_pyobject):
+       * tests/test_signal.py:
+
+       Add a missing else to avoid throwing a TypeError.
+       Includes a test written by Ed Catmur.
+       Fixes #374653
+
+2007-04-29  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/pygtype.c: (pyg_value_array_from_pyobject):
+       * tests/test_gtype.py:
+       * tests/testhelpermodule.c: (_wrap_test_value_array):
+
+       Treat None in a GValueArray as pointer/NULL, patch by
+       Ed Catmur, fixes #352209.
+
+2007-04-29  Loïc Minier  <lool+gnome@via.ecp.fr>
+
+       reviewed by: Johan Dahlin  <johan@gnome.org>
+
+       * autogen.sh:
+
+       Use dirname $0 instead of pwd to compute srcdir in autogen,
+       fixes #409234
+
+2007-04-29  Damien Carbery <damien.carbery@sun.com>
+
+       reviewed by: Johan Dahlin  <johan@gnome.org>
+
+       * tests/test-unknown.c: (test_interface_iface_method):
+
+       Do not return in a void function, fixes #385127
+
+2007-04-29  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/pygflags.c: (pyg_flags_from_gtype):
+       Fix leak, patch by Daniel Berrange. Fixes #428726 (Phil Dumont)
+
+2007-04-29  Damien Carbery <damien.carbery@sun.com>
+
+       reviewed by: Johan Dahlin  <johan@gnome.org>
+
+       * configure.ac:
+       * pygobject-2.0-uninstalled.pc.in:
+
+       Add an uninstalled pkg-config file, fixes #385129
+
+2007-04-29  Johan Dahlin  <johan@gnome.org>
+
+       * README:
+       * configure.ac:
+       * gobject/Makefile.am:
+       * gobject/ffi-marshaller.c: (g_value_to_ffi_type),
+       (g_value_from_ffi_type), (g_cclosure_marshal_generic_ffi):
+       * gobject/ffi-marshaller.h:
+       * gobject/gobjectmodule.c: (create_signal), (init_gobject):
+       * pygobject-2.0.pc.in:
+       * tests/test_signal.py:
+       * tests/testhelpermodule.c: (test1_callback),
+       (test1_callback_swapped), (test2_callback), (test3_callback),
+       (test4_callback), (test_float_callback), (test_double_callback),
+       (test_string_callback), (test_object_callback), (connectcallbacks),
+       (_wrap_connectcallbacks), (inittesthelper):
+
+       Add a generic CClosure marshaller based on ffi.
+       This makes it possible to connect to signals on PyGObjects from C.
+       libffi is now an optional dependency
+       Fixes #353816 (Edward Hervey)
+
+2007-04-23  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+       * configure.ac: Post-release version bump.
+
+=== 2.13.0 ===
+2007-04-23  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+       * configure.ac: Bump version to 2.13.0.
+
+       * tests/test_properties.py (TestProperties.testMulti): Unit test
+       for get/set_properties.
+
+2007-04-23  Gian Mario Tagliaretti  <gianmt@gnome.org>
+
+       * gobject/pygobject.c: Implemented pygobject_set_properties and
+       pygobject_get_properties in order to set multiple properties using
+       keyword arguments. Fixes 403212
+
+       * docs/reference/pygobject.xml: Docs for the above new methods.
+
+2007-04-14  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/gobjectmodule.c, gobject/pygobject.h: Add a new
+       pyg_gerror_exception_check API.  Fixes #425242.
+
+       * gobject/gobjectmodule.c (pyg_set_application_name)
+       (pyg_set_prgname): Add wrappers for g_set_application_name and
+       g_set_prgname.  Patch by Havoc Pennington.  Fixes #415853.
+
+       * gobject/pygobject.h: Bug #419379: Modernize init_pygobject: use
+       static inline functions instead of macros.
+
+       * gobject/gobjectmodule.c (init_gobject):
+       * gobject/pygobject-private.h:
+       * gobject/pygobject.c (pygobject_data_free, pygobject_data_new),
+       (pygobject_get_inst_data, pyg_toggle_notify),
+       (pygobject_switch_to_toggle_ref),
+       (pygobject_register_wrapper_full, pygobject_register_wrapper),
+       (pygobject_new_full, pygobject_unwatch_closure),
+       (pygobject_watch_closure, pygobject_dealloc, pygobject_repr),
+       (pygobject_traverse, pygobject_clear, pygobject_weak_ref),
+       (pygobject_setattro, pygobject_weak_ref_traverse),
+       (pygobject_weak_ref_notify, pygobject_weak_ref_clear),
+       (pygobject_weak_ref_dealloc, pygobject_weak_ref_new),
+       (pygobject_weak_ref_unref, pygobject_weak_ref_call):
+       * gobject/pygobject.h:
+       * gobject/pygtype.c (gclosure_from_pyfunc):
+       * tests/test_subtype.py:
+       Bug #320428: Break PyGObject<->GObject reference cycle (patch
+       v7.1; thanks John Ehresman for the help with this patch).
+
+2007-03-17  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/pygobject.c (pygobject_emit): Fix %ld vs int warning.
+       (pygobject_chain_from_overridden): Idem.
+
+2007-03-06  Richard Hult  <richard@imendio.com>
+
+       * configure.ac: Fix the docs option so that it's possible to disable
+       building the docs.
+
+2007-03-03  Edward Hervey  <edward@fluendo.com>
+
+       * gobject/pygobject.c: (set_property_from_pspec):
+       Release the GIL when calling g_object_set_property, since setting a
+       property might trigger some code that might come back in python land.
+       Fixes #395048
+
+2007-01-09  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * configure.ac:  Turn the option --disable-docs into --enable-docs.
+       * docs/Makefile.am:  Tread --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-14  Kjartan Maraas  <kmaraas@gnome.org>
+
+       * autogen.sh: Make this work with automake 1.10 too.
+
+2006-11-18  Johan Dahlin  <jdahlin@async.com.br>
+
+       * configure.ac: Post release version bump
+
+=== 2.12.3 ===
+2006-11-18  Johan Dahlin  <jdahlin@async.com.br>
+
+       * NEWS: Update
+
+       * gobject/pygoptiongroup.c (pyg_option_group_dealloc):
+       * tests/test_option.py (TestOption.testBadConstructor):
+       Make sure an exception is raised when we pass in invalid arguments
+       to the optiongroup constructor, add a test. #364576 (Laszlo Pandy)
+
+       * gobject/pygobject.c (pygobject_register_class): set __module__ on
+       gobject derived types, fixes #376099 (Osmo Salomaa)
+
+2006-11-18  Yevgen Muntyan  <muntyan@tamu.edu>
+
+       reviewed by: Johan Dahlin  <johan@gnome.org>
+
+       * gobject/gobjectmodule.c: (create_property):
+       * gobject/pygparamspec.c: (pyg_param_spec_getattr):
+       * tests/test_properties.py:
+
+       Avoid truncating in pyg_param_spec_getattr, add test for all non-float
+       numeric types. Fixes #353943
+
+2006-11-18  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/pygtype.c (gclosure_from_pyfunc): Use PyObject_Cmp instead
+       of comparing function closure addresses, which makes it possible
+       to use any callable and not just functions.
+       Fixes #375589 (Dima)
+
+2006-10-13  John Finlay  <finlay@moeraki.com>
+
+       * docs/Makefile.am (HTML_FILES): Remove
+       html/pygobject-reference-copyright.html.
+       Fixes #361906 (Marc-Andre Lureau)
+
+2006-10-11  John Finlay  <finlay@moeraki.com>
+
+       * docs/reference/pygobject-introduction.xml: Remove Copyright and
+       License section.
+
+       * docs/reference/pygobject-ref.xml: Remove author info
+
+2006-10-05  Cedric Gustin  <cedric.gustin@gmail.com>
+
+       * dsextras.py (Template) (TemplateExtension): Add
+       py_ssize_t_clean flag to be passed to codegen.SourceWriter.
+
+2006-10-04  Cedric Gustin  <cedric.gustin@gmail.com>
+
+       * Makefile.am: Add pygobject_postinstall.py to EXTRA_DIST.
+
+2006-10-03  Johan Dahlin  <jdahlin@async.com.br>
+
+       * configure.ac: Post release version bump
+
+=== 2.12.2 ===
+2006-10-03  Johan Dahlin  <jdahlin@async.com.br>
+
+       * NEWS:
+       * configure.ac: 2.12.2
+
+2006-10-03  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/Makefile.am:
+       * gobject/gobjectmodule.c: (add_signals), (add_properties),
+       (pyg_signal_new), (pyg_object_new), (get_handler_priority),
+       (pyg_io_add_watch), (pyg_spawn_async), (pyg_add_emission_hook),
+       (pyg_remove_emission_hook), (pyg_filename_from_utf8),
+       (_pyg_strv_to_gvalue):
+       * gobject/pygiochannel.c: (py_io_channel_write_chars),
+       (py_io_channel_write_lines):
+       * gobject/pygobject-private.h:
+       * gobject/pygobject.c: (PyGProps_length), (pygobject_init),
+       (pygobject_connect), (pygobject_connect_after),
+       (pygobject_connect_object), (pygobject_connect_object_after),
+       (pygobject_disconnect), (pygobject_handler_is_connected),
+       (pygobject_handler_block), (pygobject_handler_unblock),
+       (pygobject_emit), (pygobject_chain_from_overridden):
+       * gobject/pygoptioncontext.c: (pyg_option_context_parse):
+       * gobject/pygtype.c: (pyg_value_from_pyobject):
+
+       Python 2.5 and 64 bits fixes (Py_ssize_t), closes bug #338487.
+
+       * gobject/pygenum.c (pyg_enum_repr): Const warning fix.
+
+2006-09-29  Johan Dahlin  <jdahlin@async.com.br>
+
+       * pygtk.py: LGPL, not GPL header
+
+2006-09-24  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/pygobject.h (init_pygobject_check): Add parentheses
+       "around && within ||" to please gcc.
+
+2006-09-21  Cedric Gustin  <cedric.gustin@gmail.com>
+
+       * dsextras.py: Catch ImportError exception when codegen is not
+       available: disable Template and TemplateExtension, redirect the
+       user to the pygtk installer and raise a NameError
+       exception. check_date has also been rewritten and now uses
+       distutils.dep_util.newer_group(). defs files can also be built
+       using createdefs by passing tuples as keyword argument to Template
+       (see for example the gdk and gtk templates in setup.py).
+       * setup.py: Changed the way the VERSION macro is defined on win32.
+       Also install the html reference documentation, the xsl files and
+       fixxref.
+       * pygobject_postinstall.py: Set the value of DATADIR in
+       fixxref.py. Add functions to install shortcuts in the Start menu
+       to the reference manual (currently disabled: see bug #353849).
+
+2006-09-16  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * tests/test_signal.py (TestEmissionHook.testCallbackReturnFalse)
+       (TestEmissionHook.testCallbackReturnTrue)
+       (TestEmissionHook.testCallbackReturnTrueButRemove): Add a few more
+       emission hook tests.
+
+       * gobject/gobjectmodule.c (pyg_add_emission_hook): One too many
+       DECREF on 'extra_args'.
+
+2006-09-12  John Ehresman  <jpe@wingware.com>
+
+       * gobject/pygobject.h (init_pygobject_check): Declare variables
+       at start of code block
+
+2006-09-06  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/pygmainloop.c (pyg_signal_watch_prepare): Increase the timeout
+       to 1000ms instead of 100.
+
+=== 2.12.1 ===
+2006-09-04  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/pygobject.h (_PYGOBJECT_H_): Corrected version check,
+       (Sebastian Dröge, #354364)
+
+       * configure.ac: Post release version bump
+
+=== 2.12.0 ===
+2006-09-04  Johan Dahlin  <jdahlin@async.com.br>
+
+       * NEWS:
+       * configure.ac: 2.12.0
+
+2006-08-28  Johan Dahlin  <jdahlin@async.com.br>
+
+       * docs/Makefile.am: Install html files regardless even when passing
+       in --disable-docs, fixes #353159 (Matthias Clasen)
+
+2006-08-27  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * configure.ac: Post-release version bump.
+
+=== 2.11.4 ===
+2006-08-27  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * NEWS: Update.
+
+       * gobject/gobjectmodule.c (pyg_type_register): Correct a bug in
+       the code that checks if parent already implements an interface or not.
+
+       * tests/test-unknown.c (test_interface_base_init),
+       (test_interface_get_type): Add a property to the interface, for
+       better testing.
+       (test_unknown_get_property),
+       (test_unknown_set_property, test_unknown_class_init): Add a
+       property to the class as required by the interface.
+
+       * tests/test_interface.py: More thorough interface testing, with
+       properties and test both the case of implementing an interface
+       from scratch, and re-implementing and interface that a parent
+       already implements.
+
+2006-08-27  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/gobjectmodule.c (pygobject__g_instance_init): If
+       necessary, attach the GObject to the PyGObject here.
+       (pygobject_constructv): Cope with the fact that wrapper->obj may
+       have already been set due to the change above.
+
+       * tests/test_signal.py: Add test case fixed by the changes above,
+       basically calling self.emit() inside do_set_property called
+       implicitly by the constructor due to a CONSTRUCT property.
+
+       Fixes bug 353039: "Failure in signal emission during
+       do_set_property invoked from constructor".
+
+2006-08-26  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/gobjectmodule.c (pyg_type_register): Fix type
+       registration once more to account for all corner cases.  This time
+       we register interfaces in two stages: first, before properties and
+       signals are registered, we register the interfaces that are
+       already implemented in the parent type and are being overridden;
+       second, after registration of properties and signals, we register
+       the remaining interfaces.
+
+2006-08-21  Johan Dahlin  <jdahlin@async.com.br>
+
+       * docs/Makefile.am (EXTRA_DIST): Remove build_stamp, include generated .html
+       in the distributed tarball. Remove builddate.xml, reference directory and fixxref.py
+       dependencies to avoid regenerating the tarball when it's not needed.
+
+       * configure.ac: Post release version bump
+
+=== 2.11.3 ===
+2006-08-21  Johan Dahlin  <jdahlin@async.com.br>
+
+       * NEWS: Update
+
+       * Makefile.am:
+       * docs/Makefile.am:
+       Always install the xsl files & css files, regardless if the
+       documentation was actually built or not. Also clean it up considerably.
+
+2006-08-17  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/gobjectmodule.c (pyg_type_register): Move the interface
+       registration code up, to run before properties and signals
+       registration, because glib doesn't allow us to add interfaces
+       after the first call to g_class_ref.
+
+2006-08-16  John Finlay  <finlay@moeraki.com>
+
+       * docs/reference/pygobject-functions.xml: Update docs for
+       gobject functions.
+
+2006-08-15  Murray Cumming  <murrayc@murrayc.com>
+
+       * gobject/pygobject-private.h:
+       * gobject/pygobject.h:
+       Replace uses of typename with type_name, because that is a
+       reserved C++ keyword. This was breaking compilation of Glom
+       due its use in the new type_register_custom function pointer in
+       pygobject.h.
+
+2006-08-12  John Finlay  <finlay@moeraki.com>
+
+       * pygobject-2.0.pc.in: Add reference to installed pygobject docs
+       * docs/Makefile.am: Add install of style.css
+       * docs/xsl/html.xsl: Define stylesheet as style.css
+       * docs/style.css: Add.
+
+2006-08-10  John Finlay  <finlay@moeraki.com>
+
+       * docs/reference/entities.docbook.in:
+       * docs/reference/pygobject-ref.xml:
+       * docs/Makefile.am:
+       * configure.ac:
+       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.ac:  Post release version bump.
+
+=== 2.11.2 ===
+2006-08-08  Johan Dahlin  <jdahlin@async.com.br>
+
+       * NEWS: Update
+
+2006-08-07  Johan Dahlin  <jdahlin@async.com.br>
+
+       * docs/Makefile.am ($(HTML_DATA)): Fix parallel build
+       (#350225, Ed Catmur)
+
+2006-08-06  Johan Dahlin  <johan@gnome.org>
+
+       * m4/as-expand.m4: New file to workaround automake silliness
+
+       * docs/xsl/fixxref.py.in: New script
+
+       * docs/Makefile.am (XSLFILES): Add fixxref.py script, moved in from
+       PyGTK.
+
+       * docs/xsl/html.xsl: Do not use shade.verbatim, set the background
+       color and border as a normal html tag to avoid an external
+       stylesheet.
+
+2006-08-04  Johan Dahlin  <jdahlin@async.com.br>
+
+       * configure.ac: Post release version bump
+
+=== 2.11.1 ===
+2006-08-04  Johan Dahlin  <jdahlin@async.com.br>
+
+       * NEWS: Update
+
+       * README: Update, some s/PyGTK/PyGObject/
+
+       * configure.ac:
+       * docs/Makefile.am:
+       * docs/reference/.cvsignore:
+       * docs/reference/entities.docbook.in:
+       * docs/reference/pygobject-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-29  John Finlay  <finlay@moeraki.com>
+
+       * gobject/pygobject.h (pyg_param_gvalue_from_pyobject): Fix define
+       to point to the correct function pointer field.
+
+2006-07-29  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/pygflags.c (pyg_flags_add): idem.
+
+       * gobject/pygenum.c (pyg_enum_add): Give a more explicit error
+       message when the gtype is not an enum.
+
+2006-07-25  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/pygobject.h (init_pygobject_check): Add a macro to easily
+       check the installed pygobject version.
+
+       * gobject/pygflags.c (pyg_flags_add)
+       * gobject/pygenum.c (pyg_enum_add): Duplicate the string before
+       sending it to python. Fixes GCC warnings.
+
+2006-07-24  John Finlay  <finlay@moeraki.com>
+
+       * gobject/pygflags.c (pyg_flags_get_first_value_name)
+       (pyg_flags_get_first_value_nick): Avoid segfault when
+       g_flags_get_first_value returns NULL.
+
+2006-07-20  John Finlay  <finlay@moeraki.com>
+
+       * docs/Makefile.am: Make version.xml dependent on config.h
+       Make builddate.xml dependent on REFERENCE_DEPS. Add builddate.xml to
+       build_stamp and pdf dependencies. Add pdf files to cleanup.
+
+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-19  John Finlay  <finlay@moeraki.com>
+
+       * docs/Makefile.am: Use more portable date generator.
+
+       * docs/xsl/ref-html-style.xsl: Add book to list of indexed items.
+
+       * docs/xsl/html.xsl: Output xref links for unknown links.
+
+       * docs/xsl/ref-html-style.xsl: Include refsect1 and refsect2 in
+       indexed items but only if they have ids.
+
+       * configure.ac (AC_CONFIG_FILES) : Add docs/reference/version.xml
+
+       * docs/reference/pygobject-ref.xml: Add pygobject-introduction.xml
+       and version and builddate entities. Remove commented out items.
+
+       * docs/Makefile.am: Add reference/pygobject-introduction.xml and
+        reference/version.xml.in
+
+2006-07-18  Johan Dahlin  <johan@gnome.org>
+
+       * docs/Makefile.am (HTMLdir): Install book in $datadir/gtk-doc/html
+
+2006-07-13  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/gobjectmodule.c: (pyg_type_from_name),
+       (get_type_name_for_class):
+       * gobject/pygobject-private.h:
+       * gobject/pygobject.c: (pygobject_new_with_interfaces),
+       (pygobject_lookup_class), (pygobject_emit):
+       * gobject/pygobject.h:
+       * gobject/pygtype.c: (_wrap_g_type_from_name),
+       (pyg_type_from_object), (pyg_type_register_custom_callback),
+       (pyg_type_get_custom), (_pyg_type_from_name):
+       Add infrastructure for lazy type registration, fixes #346947
+
+2006-07-13  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+       * m4/python.m4: Properly quote AM_CHECK_PYMOD definition.
+
+       * gobject/pygoptioncontext.c (pyg_option_context_parse): Fix mem
+       leak.
+
+2006-07-12  Johan Dahlin  <jdahlin@async.com.br>
+
+       * Makefile.am:
+       * configure.ac:
+       * docs/.cvsignore:
+       * docs/Makefile.am:
+       * docs/common.xsl:
+       * docs/devhelp.xsl:
+       * docs/html.xsl:
+       * docs/pdf-style.xsl:
+       * docs/pdf.xsl:
+       * docs/ref-html-style.xsl:
+       * docs/reference/.cvsignore:
+       * docs/reference/pygobject-classes.xml:
+       * docs/reference/pygobject-constants.xml:
+       * docs/reference/pygobject-functions.xml:
+       * docs/reference/pygobject-gboxed.xml:
+       * docs/reference/pygobject-ginterface.xml:
+       * docs/reference/pygobject-gpointer.xml:
+       * docs/reference/pygobject-maincontext.xml:
+       * docs/reference/pygobject-mainloop.xml:
+       * docs/reference/pygobject-ref.xml:
+       * docs/reference/pygobject.xml:
+       Import GObject part of John Finlay's PyGTK Reference Manual, copy
+       over infrastructure from the pygtk-web module.
+
+2006-07-12  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+       * configure.ac: Post-release version bump to 2.11.1.
+
+=== PyGObject 2.11.0 ===
+2006-07-09  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/gobjectmodule.c (pyg_type_register): Make interface_data
+       point to the python type before adding the interface to the new
+       type.  This should fix interface implementation (actually I
+       thought such code had already been added earlier but can't find it
+       now and it is obviously needed...)
+       (pyg_type_register): move the code that needs g_type_class_ref
+       until after interface registration (more code that I already wrote
+       in the past but got lost).
+
+2006-07-05  John Finlay  <finlay@moeraki.com>
+
+       * gobject/pygiochannel.c (py_io_channel_init): Fix message typo.
+
+2006-06-28  Cedric Gustin  <cedric.gustin@gmail.com>
+
+       * dsextras.py (InstallData): Set datarootdir in .pc file.
+
+       * pygobject_postinstall.py (replace_prefix): Do not parse
+       pygtk-codegen-2.0 as it is part of pygtk.
+
+       * setup.py: Create gobject extension as gobject._gobject. Add
+       pygoptioncontext.c and pygoptiongroup.c to the list of source
+       files. Add option.py to the module files. Changed name of
+       distutils package from pygtk to pygobject.
+
+2006-06-24  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/gobjectmodule.c (pyg_filename_from_utf8): Wrap
+       g_filename_from_utf8.
+
+       * tests/test_signal.py (TestClosures.testGString): Add unit test
+       for signals using the type TYPE_GSTRING.
+
+       * gobject/pygtype.c (pyg_value_as_pyobject)
+       (pyg_value_from_pyobject): Implement conversion code for the type
+       G_TYPE_GSTRING.
+
+       * gobject/gobjectmodule.c (pyg_filename_display_basename)
+       (pyg_filename_display_name): Add bindings for
+       g_filename_display_basename and g_filename_display_name.
+       (init_gobject): Add a TYPE_GSTRING definition.
+
+       * gobject/pygobject.h,
+       * gobject/pygobject-private.h: Make pyg_constant_strip_prefix
+       receive and return const gchar*, to indicate it does not change
+       the string.  Unfortunately since PyModule_AddIntConst is broken in
+       python < 2.5 this introduces const warnings elsewhere :-(
+
+       * gobject/gobjectmodule.c (pyg_flags_add_constants)
+       (pyg_enum_add_constants): Fix const warnings.
+
+2006-06-23  John Finlay  <finlay@moeraki.com>
+
+       * gobject/gobjectmodule.c (pyg_object_class_list_properties)
+       (pyg_signal_list_ids, pyg_signal_lookup, pyg_signal_query): Add
+       support for retrieving signal and propertie info from interface types.
+
+2006-06-04  Johan Dahlin  <johan@gnome.org>
+
+       * gobject/gobjectmodule.c (pyg_spawn_async)
+       (pyg_signal_new): Fix two leaks in error cases, found by
+       Coverity.
+
+2006-05-28  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * tests/test_subtype.py: Uncomment Johan's "subsubtype" test case.
+
+       * gobject/gobjectmodule.c (pygobject__g_instance_init): Pass the
+       g_class to pygobject_new_full, because during the instance init
+       function instances are temporarily assigned the parent's GType.
+
+       * gobject/pygobject-private.h,
+       * gobject/pygobject.c (pygobject_new_full): Make
+       pygobject_new_full accept an optional g_class parameter; If
+       present, the GType is extracted from the class instead of from the
+       instance.
+
+2006-05-20  Yevgen Muntyan  <muntyan@tamu.edu>
+
+       reviewed by: Gustavo Carneiro
+
+       * gobject/pygobject.c (pygobject_init, pygobject_get_property),
+       (pygobject_set_property): Bug 341174: Be more specific in
+       set/get_property error messages.
+
+2006-05-07  Yevgen Muntyan  <muntyan@tamu.edu>
+
+       reviewed by: Gustavo Carneiro
+
+       * gobject/gobjectmodule.c (_log_func, add_warning_redirection),
+       (remove_handler, disable_warning_redirections, init_gobject):
+       * gobject/pygobject.h:  Add new pyg_add_warning_redirection and
+       pyg_disable_warning_redirections APIs (bug #323786 again).
+
+2006-05-07  Johan Dahlin  <johan@gnome.org>
+
+       * Makefile.am (CLEANFILES): Remove pygtk.py, it's not
+       auto-generated any longer. Thanks to Kjartan for noticing.
+
+2006-05-07  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/pygoptioncontext.c:
+       s/sizeof(PyGMainContext)/sizeof(PyGOptionContext)/ (copy-paste error).
+
+2006-05-01  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/gobjectmodule.c (pyg_pid_close): Add a close() method
+       to the GPid wrapper.
+
+       * gobject/gobjectmodule.c (pyg_pid_free, pyg_pid_new),
+       (pyg_spawn_async, init_gobject): Wrap GPid in an object whose
+       destructor calls g_spawn_close_pid.  Fixes #340160.
+
+2006-04-29  Johannes Hölzl <johannes.hoelzl@gmx.de>
+
+       reviewed by: Johan Dahlin  <jdahlin@async.com.br>
+
+       * examples/Makefile.am:
+       * examples/option.py:
+       * gobject/Makefile.am:
+       * gobject/gobjectmodule.c: (init_gobject):
+       * gobject/option.py:
+       * gobject/pygobject-private.h:
+       * gobject/pygoptioncontext.c: (pyg_option_context_init),
+       (pyg_option_context_dealloc), (pyg_option_context_parse),
+       (pyg_option_context_set_help_enabled),
+       (pyg_option_context_get_help_enabled),
+       (pyg_option_context_set_ignore_unknown_options),
+       (pyg_option_context_get_ignore_unknown_options),
+       (pyg_option_context_set_main_group),
+       (pyg_option_context_get_main_group),
+       (pyg_option_context_add_group), (pyg_option_context_compare),
+       (pyg_option_context_new):
+       * gobject/pygoptiongroup.c: (check_if_owned), (destroy_g_group),
+       (pyg_option_group_init), (pyg_option_group_dealloc), (arg_func),
+       (pyg_option_group_add_entries),
+       (pyg_option_group_set_translation_domain),
+       (pyg_option_group_compare), (pyg_option_group_transfer_group),
+       (pyg_option_group_new):
+       * tests/test_option.py:
+
+       Add support for GOption, fixes #163645
+
+2006-04-29  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/pygtype.c (gclosure_from_pyfunc):
+
+       * gobject/pygobject.c (pygobject_disconnect_by_func)
+       (pygobject_handler_block_by_func)
+       (pygobject_handler_unblock_by_func):
+
+       * tests/test_signal.py (TestEmissionHook._callback):
+
+       Fix #154845, add tests and a private method.
+
+2006-04-23  John Ehresman   <jpe@wingware.com>
+
+       reviewed by: Gustavo
+
+       * Makefile.am:
+       * pygtk.py:
+       * pygtk.py.in:
+       Bug 338945: Make pygtk.py relocatable
+
+2006-04-18  John Ehresman   <jpe@wingware.com>
+
+       * dsextras.py: Add compiler / linker flags from pkgconfig-2.0.pc
+       by default, with an override mechanism.  Filter out -lc & -lm if
+       compiling with msvc.
+
+       * setup.py: Change C extension name to _gobject and don't use the
+       pkgconfig-2.0.pc when compiling
+
+2006-04-15  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/__init__.py (_PyGObject_API): Copy _PyGObject_API from
+       gobject._gobject into gobject in order to preserve binary
+       compatibility with 3rd party modules.
+
+       * gobject/pygobject.h (init_pygobject): Import gobject, gobject._gobject.
+
+       * gobject/Makefile.am: Fix pygobject installation dir: install
+       both _gobject.la and __init__.py into
+       $(pyexecdir)/gtk-2.0/gobject.
+
+2006-04-11  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/gobjectmodule.c (init_gobject):
+       * gobject/__init__.py:
+       Move over almost all GType constants from C to Python.
+
+2006-04-11  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/__init__.py:
+       * gobject/gobjectmodule.c (_wrap_pyg_type_register),
+       (pyg__install_metaclass, init_gobject):  GObjectMeta now moved to
+       python-land (__init__.py).
+
+       * gobject/pygobject-private.h:
+       * gobject/pygobject.c (pygobject_register_class):
+       PyGObject_MetaType is now a pointer, not structure.
+
+       * gobject/gobjectmodule.c (_wrap_pyg_type_register): Add optional
+       type name parameter.
+
+       * tests/common.py (importModule): Include original exception
+       string in the raised SystemExit.
+
+2006-04-11  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/.cvsignore:
+       * gobject/Makefile.am:
+       * gobject/__init__.py:
+       * gobject/gobjectmodule.c: (init_gobject):
+       * gobject/pygobject.h:
+       * tests/Makefile.am:
+       * tests/common.py:
+
+       Turn gobject into a package; move _gobject to gobject._gobject and
+       add gobject/__init__.py. Update macros and testsuite.
+
+2006-04-11  Johan Dahlin  <jdahlin@async.com.br>
+
+       * configure.ac: Post release version bump
+
+=== PyGObject 2.10.1 ===
+2006-04-11  Johan Dahlin  <jdahlin@async.com.br>
+
+       * NEWS: Update
+
+2006-04-11  Andy Wingo  <wingo@pobox.com>
+
+       reviewed by: Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/gobjectmodule.c (create_property): Parse unsigned int64
+       constraints in param spec declaration using the "K" ParseTuple
+       format unit, not L -- allows the full range of the datatype to be
+       parsed. K format unit added in python 2.3.
+
+2006-04-01  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * tests/test_properties.py: Add test for #335854.
+
+       * pygtk.py.in (require): For version == '2.0', use a hardcoded
+       pygtk path, recorded during build.
+
+       * gobject/gobjectmodule.c (_pyg_strv_to_gvalue): Don't allow
+       arbitrary sequences, only tuple or list, since a string is a
+       sequence too.
+       (pyg_object_new): Add a bit more detail to the exception string.
+
+2006-01-16  Johan Dahlin  <johan@gnome.org>
+
+       * Makefile.am: Include dsextras.py in the dist and install it.
+
+2006-03-19  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/pygobject.c (pygobject_new_with_interfaces): Remove
+       comment "It will currently not filter out interfaces already
+       implemented by it parents.", since it is no longer true since
+       2006-01-13.
+
+=== PyGObject 2.10.0 ===
+2006-01-16  Johan Dahlin  <johan@gnome.org>
+
+       * NEWS: Update
+
+2006-03-09 Michael Smith  <msmith@fluendo.com>
+
+       reviewed by: Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/pygenum.c: (pyg_enum_new), (pyg_enum_from_gtype),
+       (pyg_enum_add):
+       * gobject/pygflags.c: (pyg_flags_new), (pyg_flags_from_gtype),
+       (pyg_flags_add):
+       Plug a couple of leaks, fixes #334027.
+
+2006-01-19  Johan Dahlin  <johan@gnome.org>
+
+       * configure.ac (export_dynamic):
+       * Makefile.am (egg):
+       Add a make egg target
+
+2006-01-16  Johan Dahlin  <johan@gnome.org>
+
+       * configure.ac: Post release version bump
+
+=== PyGObject 2.9.1 ===
+2006-01-16  Johan Dahlin  <johan@gnome.org>
+
+       * NEWS: Update
+
+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-14  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/gobjectmodule.c (iowatch_marshal): Warn if io callback
+       returns None: almost always this is an error.
+
+2006-01-13  Gustavo J. A. M. Carneiro  <gjc@gnome.org>
+
+       * gobject/pygobject.c (pygobject_register_class): Change strategy
+       a bit: don't ignore bases; use but augment it with missing bases
+       extracted in runtime.
+
+       * gobject/pygobject.c (pygobject_register_class): Don't use the
+       passed in 'bases' parameter; instead find out in runtime the bases
+       for any given gtype.
+       (pyg_type_get_bases, pygobject_new_with_interfaces): Refactor code
+       that dynamically discovers bases into a separate function;
+       Override tp_dealloc, tp_alloc, tp_free, tp_traverse, and tp_clear,
+       inherit them again from the parent type, since type_new inside
+       Python core sets them to hardcoded functions subtype_xxx.  Also
+       call py_parent_type->ob_type, instead of fixed &PyType_Type.
+       (pygobject_clear): Change a g_message to g_warning.
+
+2006-01-13  Johan Dahlin  <jdahlin@async.com.br>
+
+       * gobject/gobjectmodule.c: (pyg_io_add_watch),
+       (marshal_emission_hook), (pyg_add_emission_hook),
+       (pyg_remove_emission_hook):
+       * gobject/pygobject.c:
+       * tests/test_signal.py:
+
+       Add add/remove_emission_hook and tests. Fixes #325977
+
+2006-01-11  Gustavo J. A. M. Carneiro  <gjc@inescporto.pt>
+
+       * gobject/gobjectmodule.c (_pyg_signal_accumulator),
+       (create_signal, pyg_signal_accumulator_true_handled),
+       (initgobject): Bug 155380 -- Add support for signal accumulators.
+
+       * tests/runtests.py: Add 'test_enum', 'test_conversion' to
+       SKIP_FILES, since they depend on pygtk modules so don't work
+       anymore.  This should be eventually fixed, though.
+
+       * tests/test_signal.py: Test signal accumulators.
+
+       * gobject/pygtype.c (object_doc_descr_get): Reorder
+       properties/signals documentation more nicely: signals + properties
+       from each type are presented, with types ranging from the leaf
+       types to the base types.
+
+       * configure.ac: Branch, bump version to 2.9.1.
+
+=== PyGObject 2.8.0 ===
+2006-01-09  Johan Dahlin  <jdahlin@async.com.br>
+
+       * MANIFEST.in:
+       * Makefile.am:
+       * tests/Makefile.am:
+
+       Make dist/distcheck work again
+
+2006-01-09  Johan Dahlin  <jdahlin@async.com.br>
+
+       * setup.py: Add distutils support
+
+       * dsextras.py (get_m4_define): Check for configure.ac aswell.
+
+       * .cvsignore:
+       * AUTHORS:
+       * COPYING:
+       * INSTALL:
+       * Makefile.am:
+       * PKG-INFO.in:
+       * README:
+       * autogen.sh:
+       * configure.ac:
+       * examples/.cvsignore:
+       * examples/Makefile.am:
+       * gobject/gobjectmodule.c: (initgobject):
+       * m4/jhflags.m4:
+       * m4/python.m4:
+       * pygobject-2.0.pc.in:
+       * tests/Makefile.am:
+       * tests/common.py:
+       * tests/leak.glade:
+       * tests/runtests.py:
+       * tests/test_actiongroup.py:
+       * tests/test_dialog.py:
+       * tests/test_gdk.py:
+       * tests/test_gdkevent.py:
+       * tests/test_glade.py:
+       * tests/test_gtype.py:
+       * tests/test_liststore.py:
+       * tests/test_radiobutton.py:
+       * tests/test_signal.py:
+       * tests/test_subtype.py:
+       * tests/test_textview.py:
+       * tests/test_thread.py:
+       * tests/testhelpermodule.c: (test_type_get_type),
+       (_wrap_test_g_object_new):
+       * tests/testmodule.py:
+
+       Split out PyGObject from PyGTK.
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..23e5f25
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,236 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory.  After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).  Here is a another example:
+
+     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644 (file)
index 0000000..3781c83
--- /dev/null
@@ -0,0 +1,7 @@
+include ChangeLog AUTHORS COPYING NEWS README HACKING
+include MANIFEST.in
+include gobject/pygobject.h gobject/pygobject-private.h
+include pygtk.py pygobject-2.0.pc.in
+include dsextras.py
+recursive-include examples *.py
+global-exclude */CVS/* .cvsignore
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..b9b9ed3
--- /dev/null
@@ -0,0 +1,162 @@
+ACLOCAL_AMFLAGS = -I m4
+AUTOMAKE_OPTIONS = 1.7
+
+SUBDIRS = docs codegen glib gobject gio examples
+
+if ENABLE_INTROSPECTION
+SUBDIRS += gi
+endif
+
+SUBDIRS += tests
+
+PLATFORM_VERSION = 2.0
+
+CLEANFILES =
+EXTRA_DIST =                           \
+       MANIFEST.in                     \
+       README.win32                    \
+       pygobject-$(PLATFORM_VERSION).pc.in \
+       PKG-INFO                        \
+       PKG-INFO.in                     \
+       setup.py                        \
+       pygobject_postinstall.py        \
+       pygtk.py                        \
+       dsextras.py                     \
+       ChangeLog.pre-2.18              \
+       m4/as-ac-expand.m4              \
+       m4/jhflags.m4                   \
+       m4/python.m4
+
+MAINTAINERCLEANFILES = \
+       $(srcdir)/INSTALL \
+       $(srcdir)/aclocal.m4 \
+       $(srcdir)/autoscan.log \
+       $(srcdir)/compile \
+       $(srcdir)/config.guess \
+       $(srcdir)/config.h.in \
+       $(srcdir)/config.sub \
+       $(srcdir)/configure.scan \
+       $(srcdir)/depcomp \
+       $(srcdir)/install-sh \
+       $(srcdir)/ltmain.sh \
+       $(srcdir)/missing \
+       $(srcdir)/mkinstalldirs \
+       $(srcdir)/omf.make \
+       $(srcdir)/xmldocs.make \
+       $(srcdir)/gtk-doc.make \
+       $(srcdir)/ChangeLog \
+       $(srcdir)/py-compile \
+       $(srcdir)/m4/libtool.m4 \
+       $(srcdir)/m4/ltoptions.m4 \
+       $(srcdir)/m4/ltsugar.m4 \
+       $(srcdir)/m4/ltversion.m4 \
+       $(srcdir)/m4/lt~obsolete.m4 \
+       `find "$(srcdir)" -type f -name Makefile.in -print` \
+       `find "$(srcdir)" -type f -name "*.pyc" -print`
+
+BUILT_EXTRA_DIST =             \
+       ChangeLog
+
+INCLUDES = -I$(top_srcdir)/gobject $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
+
+# pkg-config files
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = pygobject-$(PLATFORM_VERSION).pc
+
+# python modules
+pkgpyexecdir = $(pyexecdir)/gtk-2.0
+pkgpyexec_PYTHON = dsextras.py
+pkgpyexec_LTLIBRARIES =
+
+# python
+pyexec_PYTHON = pygtk.py
+pyexec_LTLIBRARIES =
+
+# linker flags
+common_ldflags = -module -avoid-version
+if PLATFORM_WIN32
+common_ldflags += -no-undefined
+endif
+
+# install pth file.
+install-data-local:
+       $(mkinstalldirs) $(DESTDIR)$(pythondir)
+       echo "gtk-$(PLATFORM_VERSION)" > $(DESTDIR)$(pyexecdir)/pygtk.pth
+install-exec-local:
+       $(mkinstalldirs) $(DESTDIR)$(pyexecdir)
+       echo "gtk-$(PLATFORM_VERSION)" > $(DESTDIR)$(pyexecdir)/pygtk.pth
+uninstall-local:
+       rm -f $(DESTDIR)$(pythondir)/pygtk.pth $(DESTDIR)$(pyexecdir)/pygtk.pth
+
+EGG_NAME = $(PACKAGE)-$(PACKAGE_VERSION)-py$(PYTHON_VERSION)-$(PLATFORM).egg
+
+egg: EGG_TMPDIR:=$(TMPDIR)/$(PACKAGE)-$(PACKAGE_VERSION)
+egg: $(top_srcdir)/gobject/gobject.la PKG-INFO
+       rm -fr $(EGG_TMPDIR)
+       echo $(EGG_NAME)
+       $(MKDIR_P) $(EGG_TMPDIR)
+       $(MKDIR_P) $(EGG_TMPDIR)/EGG-INFO
+       $(MAKE) -C gobject install-pkgpyexecLTLIBRARIES pkgpyexecdir=$(EGG_TMPDIR)
+       $(INSTALL) dsextras.py $(EGG_TMPDIR)
+       rm -fr $(EGG_TMPDIR)/gobject.la
+       $(INSTALL) PKG-INFO $(EGG_TMPDIR)/EGG-INFO
+       echo "gobject.so" >> $(EGG_TMPDIR)/EGG-INFO/native_libs.txt
+       ( echo "gobject" ; echo "dsextras.py" ) >> $(EGG_TMPDIR)/EGG-INFO/top_level.txt
+       cd $(EGG_TMPDIR) && zip -rq $(EGG_NAME) .
+       mv $(EGG_TMPDIR)/$(EGG_NAME) .
+       rm -fr $(EGG_TMPDIR)
+
+doc-dist:
+       mkdir pygobject
+       cp -r docs/html/*.html pygobject
+       cp -r docs/html/*.sgml pygobject
+       cp -r docs/html/*.devhelp pygobject
+       cp -r docs/style.css pygobject
+       tar cfz $(PACKAGE)-docs.tar.gz pygobject
+       rm -fr pygobject
+
+release-tag:
+       @ROOT=`svn info --xml|egrep ^"<url>"|cut -d\> -f2|cut -d\< -f1`; \
+       SVNVERSION=`echo $(VERSION)|sed s/\\\./_/g`;\
+         echo "* Tagging $(VERSION)"; \
+          svn cp -m "Tag $(VERSION)" \
+              $$ROOT \
+              svn+ssh://johan@svn.gnome.org/svn/pygobject/tags/PYGOBJECT_$$SVNVERSION
+
+
+.PHONY: ChangeLog
+
+ChangeLog:
+       @echo Creating $@
+       @if test -d "$(srcdir)/.git"; then \
+         (GIT_DIR=$(top_srcdir)/.git ./missing --run git log PYGOBJECT_2_17_0^^.. --stat) | fmt --split-only > $@.tmp \
+         && mv -f $@.tmp $@ \
+         || ($(RM) $@.tmp; \
+             echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
+             (test -f $@ || echo git-log is required to generate this file >> $@)); \
+       else \
+         test -f $@ || \
+         (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
+         echo A git checkout and git-log is required to generate this file >> $@); \
+       fi
+
+
+distclean-local:
+       if test $(srcdir) = .; then :; else \
+           rm -f $(BUILT_EXTRA_DIST); \
+       fi
+
+dist-hook: $(BUILT_EXTRA_DIST)
+       files='$(BUILT_EXTRA_DIST)'; \
+       for f in $$files; do \
+         if test -f $$f; then d=.; else d=$(srcdir); fi; \
+         rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done
+
+check.gdb:
+       cd tests && $(MAKE) check.gdb
+
+check.valgrind:
+       cd tests && $(MAKE) check.valgrind
+
+
+-include $(top_srcdir)/git.mk
diff --git a/Makefile.in b/Makefile.in
new file mode 100644 (file)
index 0000000..e20eeca
--- /dev/null
@@ -0,0 +1,1138 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_INTROSPECTION_TRUE@am__append_1 = gi
+@PLATFORM_WIN32_TRUE@am__append_2 = -no-undefined
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(pkgpyexec_PYTHON) \
+       $(pyexec_PYTHON) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(srcdir)/PKG-INFO.in $(srcdir)/config.h.in \
+       $(srcdir)/pygobject-2.0-uninstalled.pc.in \
+       $(srcdir)/pygobject-2.0.pc.in $(top_srcdir)/configure \
+       $(top_srcdir)/docs/reference/entities.docbook.in \
+       $(top_srcdir)/docs/xsl/fixxref.py.in AUTHORS COPYING ChangeLog \
+       INSTALL NEWS compile config.guess config.sub depcomp \
+       install-sh ltmain.sh missing py-compile
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+       $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = pygobject-2.0.pc pygobject-2.0-uninstalled.pc \
+       docs/reference/entities.docbook docs/xsl/fixxref.py PKG-INFO
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" \
+       "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" \
+       "$(DESTDIR)$(pkgconfigdir)"
+LTLIBRARIES = $(pkgpyexec_LTLIBRARIES) $(pyexec_LTLIBRARIES)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+py_compile = $(top_srcdir)/py-compile
+DATA = $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = docs codegen glib gobject gio examples gi tests
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = -I m4
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
+GI_LIBS = @GI_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PLATFORM = @PLATFORM@
+PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
+PYCAIRO_LIBS = @PYCAIRO_LIBS@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+
+# python modules
+pkgpyexecdir = $(pyexecdir)/gtk-2.0
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.7
+SUBDIRS = docs codegen glib gobject gio examples $(am__append_1) tests
+PLATFORM_VERSION = 2.0
+CLEANFILES = 
+EXTRA_DIST = \
+       MANIFEST.in                     \
+       README.win32                    \
+       pygobject-$(PLATFORM_VERSION).pc.in \
+       PKG-INFO                        \
+       PKG-INFO.in                     \
+       setup.py                        \
+       pygobject_postinstall.py        \
+       pygtk.py                        \
+       dsextras.py                     \
+       ChangeLog.pre-2.18              \
+       m4/as-ac-expand.m4              \
+       m4/jhflags.m4                   \
+       m4/python.m4
+
+MAINTAINERCLEANFILES = \
+       $(srcdir)/INSTALL \
+       $(srcdir)/aclocal.m4 \
+       $(srcdir)/autoscan.log \
+       $(srcdir)/compile \
+       $(srcdir)/config.guess \
+       $(srcdir)/config.h.in \
+       $(srcdir)/config.sub \
+       $(srcdir)/configure.scan \
+       $(srcdir)/depcomp \
+       $(srcdir)/install-sh \
+       $(srcdir)/ltmain.sh \
+       $(srcdir)/missing \
+       $(srcdir)/mkinstalldirs \
+       $(srcdir)/omf.make \
+       $(srcdir)/xmldocs.make \
+       $(srcdir)/gtk-doc.make \
+       $(srcdir)/ChangeLog \
+       $(srcdir)/py-compile \
+       $(srcdir)/m4/libtool.m4 \
+       $(srcdir)/m4/ltoptions.m4 \
+       $(srcdir)/m4/ltsugar.m4 \
+       $(srcdir)/m4/ltversion.m4 \
+       $(srcdir)/m4/lt~obsolete.m4 \
+       `find "$(srcdir)" -type f -name Makefile.in -print` \
+       `find "$(srcdir)" -type f -name "*.pyc" -print`
+
+BUILT_EXTRA_DIST = \
+       ChangeLog
+
+INCLUDES = -I$(top_srcdir)/gobject $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
+
+# pkg-config files
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = pygobject-$(PLATFORM_VERSION).pc
+pkgpyexec_PYTHON = dsextras.py
+pkgpyexec_LTLIBRARIES = 
+
+# python
+pyexec_PYTHON = pygtk.py
+pyexec_LTLIBRARIES = 
+
+# linker flags
+common_ldflags = -module -avoid-version $(am__append_2)
+EGG_NAME = $(PACKAGE)-$(PACKAGE_VERSION)-py$(PYTHON_VERSION)-$(PLATFORM).egg
+all: config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+       @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           echo ' $(SHELL) ./config.status'; \
+           $(SHELL) ./config.status;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+       @if test ! -f $@; then \
+         rm -f stamp-h1; \
+         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+       else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+       @rm -f stamp-h1
+       cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
+       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+       rm -f stamp-h1
+       touch $@
+
+distclean-hdr:
+       -rm -f config.h stamp-h1
+pygobject-2.0.pc: $(top_builddir)/config.status $(srcdir)/pygobject-2.0.pc.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+pygobject-2.0-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/pygobject-2.0-uninstalled.pc.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+docs/reference/entities.docbook: $(top_builddir)/config.status $(top_srcdir)/docs/reference/entities.docbook.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+docs/xsl/fixxref.py: $(top_builddir)/config.status $(top_srcdir)/docs/xsl/fixxref.py.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+PKG-INFO: $(top_builddir)/config.status $(srcdir)/PKG-INFO.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+install-pkgpyexecLTLIBRARIES: $(pkgpyexec_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(pkgpyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgpyexecdir)"
+       @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \
+       list2=; for p in $$list; do \
+         if test -f $$p; then \
+           list2="$$list2 $$p"; \
+         else :; fi; \
+       done; \
+       test -z "$$list2" || { \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgpyexecdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgpyexecdir)"; \
+       }
+
+uninstall-pkgpyexecLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgpyexecdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgpyexecdir)/$$f"; \
+       done
+
+clean-pkgpyexecLTLIBRARIES:
+       -test -z "$(pkgpyexec_LTLIBRARIES)" || rm -f $(pkgpyexec_LTLIBRARIES)
+       @list='$(pkgpyexec_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)"
+       @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
+       list2=; for p in $$list; do \
+         if test -f $$p; then \
+           list2="$$list2 $$p"; \
+         else :; fi; \
+       done; \
+       test -z "$$list2" || { \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \
+       }
+
+uninstall-pyexecLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \
+       done
+
+clean-pyexecLTLIBRARIES:
+       -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES)
+       @list='$(pyexec_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+distclean-libtool:
+       -rm -f libtool config.lt
+install-pkgpyexecPYTHON: $(pkgpyexec_PYTHON)
+       @$(NORMAL_INSTALL)
+       test -z "$(pkgpyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgpyexecdir)"
+       @list='$(pkgpyexec_PYTHON)'; dlist=; list2=; test -n "$(pkgpyexecdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+         if test -f $$b$$p; then \
+           $(am__strip_dir) \
+           dlist="$$dlist $$f"; \
+           list2="$$list2 $$b$$p"; \
+         else :; fi; \
+       done; \
+       for file in $$list2; do echo $$file; done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgpyexecdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgpyexecdir)" || exit $$?; \
+       done || exit $$?; \
+       if test -n "$$dlist"; then \
+         if test -z "$(DESTDIR)"; then \
+           PYTHON=$(PYTHON) $(py_compile) --basedir "$(pkgpyexecdir)" $$dlist; \
+         else \
+           PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pkgpyexecdir)" $$dlist; \
+         fi; \
+       else :; fi
+
+uninstall-pkgpyexecPYTHON:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pkgpyexec_PYTHON)'; test -n "$(pkgpyexecdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       filesc=`echo "$$files" | sed 's|$$|c|'`; \
+       fileso=`echo "$$files" | sed 's|$$|o|'`; \
+       echo " ( cd '$(DESTDIR)$(pkgpyexecdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pkgpyexecdir)" && rm -f $$files || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pkgpyexecdir)' && rm -f" $$filesc ")"; \
+       cd "$(DESTDIR)$(pkgpyexecdir)" && rm -f $$filesc || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pkgpyexecdir)' && rm -f" $$fileso ")"; \
+       cd "$(DESTDIR)$(pkgpyexecdir)" && rm -f $$fileso
+install-pyexecPYTHON: $(pyexec_PYTHON)
+       @$(NORMAL_INSTALL)
+       test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)"
+       @list='$(pyexec_PYTHON)'; dlist=; list2=; test -n "$(pyexecdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+         if test -f $$b$$p; then \
+           $(am__strip_dir) \
+           dlist="$$dlist $$f"; \
+           list2="$$list2 $$b$$p"; \
+         else :; fi; \
+       done; \
+       for file in $$list2; do echo $$file; done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pyexecdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pyexecdir)" || exit $$?; \
+       done || exit $$?; \
+       if test -n "$$dlist"; then \
+         if test -z "$(DESTDIR)"; then \
+           PYTHON=$(PYTHON) $(py_compile) --basedir "$(pyexecdir)" $$dlist; \
+         else \
+           PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pyexecdir)" $$dlist; \
+         fi; \
+       else :; fi
+
+uninstall-pyexecPYTHON:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pyexec_PYTHON)'; test -n "$(pyexecdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       filesc=`echo "$$files" | sed 's|$$|c|'`; \
+       fileso=`echo "$$files" | sed 's|$$|o|'`; \
+       echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pyexecdir)" && rm -f $$files || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$filesc ")"; \
+       cd "$(DESTDIR)$(pyexecdir)" && rm -f $$filesc || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$fileso ")"; \
+       cd "$(DESTDIR)$(pyexecdir)" && rm -f $$fileso
+install-pkgconfigDATA: $(pkgconfig_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+       @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+       done
+
+uninstall-pkgconfigDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       $(am__remove_distdir)
+       test -d "$(distdir)" || mkdir "$(distdir)"
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
+       -test -n "$(am__skip_mode_fix)" \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
+         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__remove_distdir)
+
+dist-bzip2: distdir
+       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+       $(am__remove_distdir)
+
+dist-lzma: distdir
+       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+       $(am__remove_distdir)
+
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       $(am__remove_distdir)
+
+dist-tarZ: distdir
+       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+       $(am__remove_distdir)
+
+dist-shar: distdir
+       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       $(am__remove_distdir)
+
+dist-zip: distdir
+       -rm -f $(distdir).zip
+       zip -rq $(distdir).zip $(distdir)
+       $(am__remove_distdir)
+
+dist dist-all: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+       case '$(DIST_ARCHIVES)' in \
+       *.tar.gz*) \
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+       *.tar.bz2*) \
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lzma*) \
+         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+       *.tar.Z*) \
+         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+       *.shar.gz*) \
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+       *.zip*) \
+         unzip $(distdir).zip ;;\
+       esac
+       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       mkdir $(distdir)/_build
+       mkdir $(distdir)/_inst
+       chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
+       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+         && am__cwd=`pwd` \
+         && $(am__cd) $(distdir)/_build \
+         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           $(DISTCHECK_CONFIGURE_FLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) dvi \
+         && $(MAKE) $(AM_MAKEFLAGS) check \
+         && $(MAKE) $(AM_MAKEFLAGS) install \
+         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+               distuninstallcheck \
+         && chmod -R a-w "$$dc_install_base" \
+         && ({ \
+              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+             } || { rm -rf "$$dc_destdir"; exit 1; }) \
+         && rm -rf "$$dc_destdir" \
+         && $(MAKE) $(AM_MAKEFLAGS) dist \
+         && rm -rf $(DIST_ARCHIVES) \
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+         && cd "$$am__cwd" \
+         || exit 1
+       $(am__remove_distdir)
+       @(echo "$(distdir) archives ready for distribution: "; \
+         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+         sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+       @$(am__cd) '$(distuninstallcheck_dir)' \
+       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+          || { echo "ERROR: files left after uninstall:" ; \
+               if test -n "$(DESTDIR)"; then \
+                 echo "  (check DESTDIR support)"; \
+               fi ; \
+               $(distuninstallcheck_listfiles) ; \
+               exit 1; } >&2
+distcleancheck: distclean
+       @if test '$(srcdir)' = . ; then \
+         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+         exit 1 ; \
+       fi
+       @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+         || { echo "ERROR: files left in build directory after distclean:" ; \
+              $(distcleancheck_listfiles) ; \
+              exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES) $(DATA) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pkgconfigdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool clean-pkgpyexecLTLIBRARIES \
+       clean-pyexecLTLIBRARIES mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+       distclean-libtool distclean-local distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-data-local install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-exec-local install-pkgpyexecLTLIBRARIES \
+       install-pkgpyexecPYTHON install-pyexecLTLIBRARIES \
+       install-pyexecPYTHON
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -rf $(top_srcdir)/autom4te.cache
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-local uninstall-pkgconfigDATA \
+       uninstall-pkgpyexecLTLIBRARIES uninstall-pkgpyexecPYTHON \
+       uninstall-pyexecLTLIBRARIES uninstall-pyexecPYTHON
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+       ctags-recursive install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am am--refresh check check-am clean clean-generic \
+       clean-libtool clean-pkgpyexecLTLIBRARIES \
+       clean-pyexecLTLIBRARIES ctags ctags-recursive dist dist-all \
+       dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \
+       dist-xz dist-zip distcheck distclean distclean-generic \
+       distclean-hdr distclean-libtool distclean-local distclean-tags \
+       distcleancheck distdir distuninstallcheck dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-data-local install-dvi install-dvi-am \
+       install-exec install-exec-am install-exec-local install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-pkgconfigDATA \
+       install-pkgpyexecLTLIBRARIES install-pkgpyexecPYTHON \
+       install-ps install-ps-am install-pyexecLTLIBRARIES \
+       install-pyexecPYTHON install-strip installcheck \
+       installcheck-am installdirs installdirs-am maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+       uninstall uninstall-am uninstall-local uninstall-pkgconfigDATA \
+       uninstall-pkgpyexecLTLIBRARIES uninstall-pkgpyexecPYTHON \
+       uninstall-pyexecLTLIBRARIES uninstall-pyexecPYTHON
+
+
+# install pth file.
+install-data-local:
+       $(mkinstalldirs) $(DESTDIR)$(pythondir)
+       echo "gtk-$(PLATFORM_VERSION)" > $(DESTDIR)$(pyexecdir)/pygtk.pth
+install-exec-local:
+       $(mkinstalldirs) $(DESTDIR)$(pyexecdir)
+       echo "gtk-$(PLATFORM_VERSION)" > $(DESTDIR)$(pyexecdir)/pygtk.pth
+uninstall-local:
+       rm -f $(DESTDIR)$(pythondir)/pygtk.pth $(DESTDIR)$(pyexecdir)/pygtk.pth
+
+egg: EGG_TMPDIR:=$(TMPDIR)/$(PACKAGE)-$(PACKAGE_VERSION)
+egg: $(top_srcdir)/gobject/gobject.la PKG-INFO
+       rm -fr $(EGG_TMPDIR)
+       echo $(EGG_NAME)
+       $(MKDIR_P) $(EGG_TMPDIR)
+       $(MKDIR_P) $(EGG_TMPDIR)/EGG-INFO
+       $(MAKE) -C gobject install-pkgpyexecLTLIBRARIES pkgpyexecdir=$(EGG_TMPDIR)
+       $(INSTALL) dsextras.py $(EGG_TMPDIR)
+       rm -fr $(EGG_TMPDIR)/gobject.la
+       $(INSTALL) PKG-INFO $(EGG_TMPDIR)/EGG-INFO
+       echo "gobject.so" >> $(EGG_TMPDIR)/EGG-INFO/native_libs.txt
+       ( echo "gobject" ; echo "dsextras.py" ) >> $(EGG_TMPDIR)/EGG-INFO/top_level.txt
+       cd $(EGG_TMPDIR) && zip -rq $(EGG_NAME) .
+       mv $(EGG_TMPDIR)/$(EGG_NAME) .
+       rm -fr $(EGG_TMPDIR)
+
+doc-dist:
+       mkdir pygobject
+       cp -r docs/html/*.html pygobject
+       cp -r docs/html/*.sgml pygobject
+       cp -r docs/html/*.devhelp pygobject
+       cp -r docs/style.css pygobject
+       tar cfz $(PACKAGE)-docs.tar.gz pygobject
+       rm -fr pygobject
+
+release-tag:
+       @ROOT=`svn info --xml|egrep ^"<url>"|cut -d\> -f2|cut -d\< -f1`; \
+       SVNVERSION=`echo $(VERSION)|sed s/\\\./_/g`;\
+         echo "* Tagging $(VERSION)"; \
+          svn cp -m "Tag $(VERSION)" \
+              $$ROOT \
+              svn+ssh://johan@svn.gnome.org/svn/pygobject/tags/PYGOBJECT_$$SVNVERSION
+
+.PHONY: ChangeLog
+
+ChangeLog:
+       @echo Creating $@
+       @if test -d "$(srcdir)/.git"; then \
+         (GIT_DIR=$(top_srcdir)/.git ./missing --run git log PYGOBJECT_2_17_0^^.. --stat) | fmt --split-only > $@.tmp \
+         && mv -f $@.tmp $@ \
+         || ($(RM) $@.tmp; \
+             echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
+             (test -f $@ || echo git-log is required to generate this file >> $@)); \
+       else \
+         test -f $@ || \
+         (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
+         echo A git checkout and git-log is required to generate this file >> $@); \
+       fi
+
+distclean-local:
+       if test $(srcdir) = .; then :; else \
+           rm -f $(BUILT_EXTRA_DIST); \
+       fi
+
+dist-hook: $(BUILT_EXTRA_DIST)
+       files='$(BUILT_EXTRA_DIST)'; \
+       for f in $$files; do \
+         if test -f $$f; then d=.; else d=$(srcdir); fi; \
+         rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done
+
+check.gdb:
+       cd tests && $(MAKE) check.gdb
+
+check.valgrind:
+       cd tests && $(MAKE) check.valgrind
+
+-include $(top_srcdir)/git.mk
+
+# 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:
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..eeae929
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,1079 @@
+2.28.6 11-Jun-1011
+        - closure: avoid double free crash (Ignacio Casal Quinteiro)
+        - [gi] backport of "GVariant has a GType" fe386a (John (J5) Palmieri)
+        - [gi] fixes to backport commit 6b5a65 - in older glib GVariants are still structs (John (J5) Palmieri)
+        - GVariantType is a boxed struct (Tomeu Vizoso)
+        - Use _gi.Struct to wrap fundamentals (Tomeu Vizoso)
+        - Added __eq__ method for Gdk.Color and Gdk.RGBA (Jason Siefken)
+        - Remove useless import (Ignacio Casal Quinteiro)
+        - Revert "[gi] Removed hack to avoid using GLib.Variant.new_variant." (Ignacio Casal Quinteiro)
+        - closure: Check the out arg is not null. Fixes bug #651812 (Ignacio Casal Quinteiro)
+        - Fix GC-related crash during PyGObject deallocation (Daniel Drake)
+        - Fix symbol names to be locale independent (Martin Pitt)
+        - Updated DOAP file (Sebastian Pölsterl)
+
+2.28.4 18-Apr-2011
+        - Version bump to 2.24.4 (Sebastian Pölsterl)
+        - [gi] Don't create variant twice (Sebastian Pölsterl)
+        - pygi-convert.sh: Make sure the uppercase GObject module is imported instead of the lowercase (Sebastian Pölsterl)
+        - [gi] Removed hack to avoid using GLib.Variant.new_variant. (Sebastian Pölsterl)
+        - [gi] Added additional test case for GVariant handling (Sebastian Pölsterl)
+        - [gi] Added support for GVariant arguments (Sebastian Pölsterl)
+        - Fix ABI break in old static bindings. (Steve Frécinaux)
+        - fetch size from an enum type (Mike Gorse)
+        - dsextras.py: ensure eol characters are preserved when writing template files (so \n does not become \r\n) (Dieter Verfaillie)
+
+2.28.3 23-Mar-2011
+       - fix a typo when converting objects to strings gvalues (John (J5) Palmieri)
+
+2.28.2 22-Mar-2011
+       - fix static ABI for setting string gvalues from python objects (John (J
+       - Fix GSchema tests for separate build tree (Martin Pitt)
+       - GIO tests: Fix remaining test case for separate build tree (Martin Pit
+       - GIO tests: Fix for separate build tree (Martin Pitt)
+
+2.28.1 21-Mar-2011
+       - pygi-convert.sh remove gobject tests, GObject works now (John Stowers)
+       - pygi-convert.sh add GObject.xxx and webkit (John Stowers)
+       - [gi] marshal raw closures (John (J5) Palmieri)
+       - Revert "Deduce PYTHON_LIBS in addition to PYTHON_INCLUDES" (Martin Pit
+       - setup.py: fix user_access_control option (Dieter Verfaillie)
+       - [gi-overrides] fix marshalling pygobjects in treemodels (John (J5) Pal
+       - [gi] Respect the MessageType for Gtk.MessageDialog (Martin Pitt)
+       - [gi] Do not require signature for D-BUS methods without arguments (Mar
+       - [gi-demos] add pickers demo (John (J5) Palmieri)
+       - [gi-demos] add menu demo (John (J5) Palmieri)
+       - [gi-overrides] TreeViewColumn.set_cell_data_func func_data can be None
+       - [gi-demos] dont try and run demos that represent directories (John Sto
+       - [gi-overrides] fix exception block so it works in Python 2.5 (John (J5
+
+2.28.0 08-Mar-2011 (stable)
+       - [gi-demos] some python 3 compat fixes (John (J5) Palmieri)
+       - [gi-demos] catch the correct error class (John (J5) Palmieri)
+       - Try not to sink objects returned by C functions. (Steve Frécinaux)
+       - Do not leak python references when using the gobject.property() helper. (Steve Frécinaux)
+       - [gi] fix try except blocks so they work in Python 2.5 (John (J5) Palmieri)
+       - handle uchar as bytes, not strings in python 3 (John (J5) Palmieri)
+       - [gi-overrides] handle unichar gvalues when setting treemodels (John (J5) Palmieri)
+       - [gi-overrides] special case python 2 keywords that crept in (John (J5) Palmieri)
+       - check for the py3 _thread module in configure.ac if thread is not found (John (J5) Palmieri)
+       - [gi-demos] add iconview demo (John (J5) Palmieri)
+       - [gi] wrap the keyword argument in a dict so we don't break Python 2.5 (John (J5) Palmieri)
+       - [gi-demos] add the combobox with string ids section to the demos (John (J5) Palmieri)
+       - [gi-overrides] add an override for Gdk.RGBA (John (J5) Palmieri)
+       - [gi-demos] fix up search-entry to reflect annotations fixed in Gtk+ master (John (J5) Palmieri)
+       - [gi-demos] add search entry demo (John (J5) Palmieri)
+       - [gi] wrap map in a list for Python 3 compat (John (J5) Palmieri)
+       - [gi-demos] fix up the validation combobox (John (J5) Palmieri)
+       - add overridesdir variable in the .pc file for 3rd party overrides (John (J5) Palmieri)
+       - [gi] remove unref for closures since they are floating objects that get sunk (John (J5) Palmieri)
+       - setup.py: Set bdist_wininst user-access-control property (Dieter Verfaillie)
+       - Fix uninitialized variable in gi.require_version() (Martin Pitt)
+       - Run tests with LC_MESSAGES="C" (Martin Pitt)
+       - [gi-overrides] override Gtk.stock_lookup to not return success (John (J5) Palmieri)
+2.27.91 28-Feb-2011 (2.28 pre-release)
+       - [gi-tests] use Gdk.test_simulate_button instead of emitting event ourselves (John (J5) Palmieri)
+       - [gi-tests] tests for EventButton override. (Laszlo Pandy)
+       - Skip interfaces when checking for conflicts in the MRO (Tomeu Vizoso)
+       - [gi-overrides] Add event methods to all event union members (John (J5) Palmieri)
+       - [gi] check to see if object is a member of a union when validating paramaters (John (J5) Palmieri)
+       - [gi] Remove DyanmicModule.load() to _load() to prevent overriding GI attrs. (Laszlo Pandy)
+       - Test case with John's fix for crash with C arrays and a GError is set. (Laszlo Pandy)
+       - [gi-overrides] fix setting rows in treeview to accept None as a value (John (J5) Palmieri)
+       - [gi] Add value_name for enum and flags from introspection "c:identifier" (if attr is available). (Laszlo Pandy)
+       - Don't force loading of DynamicModule until set in sys.modules (Laszlo Pandy)
+       - Fix flags with multiple names for the same value. (Laszlo Pandy)
+       - [gi-demos] add liststore demo (John (J5) Palmieri)
+       - [gi-demos] run through the demos and remove the FIXMEs that have been fixed (John (J5) Palmieri)
+       - Load typelibs at import time, add gi.require_version() (Tomeu Vizoso)
+       - use GValue support to marshal GtkTreeModel values correctly (John (J5) Palmieri)
+       - [gi] pass raw GValues instead of trying to marshal them (John (J5) Palmieri)
+       - [gi-demos] add icon view edit and drag-and-drop demo (John (J5) Palmieri)
+       - [gi] Register GType for non-GType enums and flags at runtime. (Laszlo Pandy)
+       - [gi-demos] add info bars demo (John (J5) Palmieri)
+       - tests/runtests.py: Add missing "import sys" (Martin Pitt)
+       - [gi] Add Pythonic gdbus method invocation (Martin Pitt)
+       - Skip GError out parameters in Python closure. (Laszlo Pandy)
+       - [gi-demos] added rotate text demo (John (J5) Palmieri)
+       - [gi-demos] add images demo (John (J5) Palmieri)
+       - [gi-demos] add pixbuf demo (John (J5) Palmieri)
+       - [gi-demos] remove fixmes from print demo, fixed in pango (John (J5) Palmieri)
+       - [gi-demos] add printing demo (John (J5) Palmieri)
+       - [gi-overrides] add cursor overrides (John (J5) Palmieri)
+       - [gi-demos] add the links demo (John (J5) Palmieri)
+       - [gi-demos] add expander demo (John (J5) Palmieri)
+       - [gi-overrides] use pop instead of del and add extra tests for Gtk.Table kwargs (John (J5) Palmieri)
+       - [tests] Separate processes for GI and static binding tests. (Laszlo Pandy)
+       - [GI] Remove implicit loading of gi module preserve the code path for static bindings. (Laszlo Pandy)
+       - [gi-demos] add dialogs demo (John (J5) Palmieri)
+       - [gi-overrides] fix typo in GtkTable constructor (John (J5) Palmieri)
+       - [gi-demos] keep popup menu from destroying itself by holding a ref in app class (John (J5) Palmieri)
+       - [gi-overrides] add a Gtk.Menu override for the popup method (John (J5) Palmieri)
+       - [gi-demos] fix the about dialog in appwindow demo (John (J5) Palmieri)
+       - [gi-demos] fix clipboard demo so DnD works (John (J5) Palmieri)
+       - [gi-demos] fix clipboard demo to reflect new API (John (J5) Palmieri)
+       - [gi-demo] Fix color dialog demo to run with new draw, style and color apis (John (J5) Palmieri)
+       - [gi-demos] fix most of the combobox app (John (J5) Palmieri)
+       - Use PyGI type conversion (to fix foreign types) for signal callbacks. (Laszlo Pandy)
+       - [gi-demos] fix drawingarea app to use the new draw api (John (J5) Palmieri)
+       - [gi-overrides] for Gtk 3 alias Gdk.Rectangle to cairo.RectangleInt (John (J5) Palmieri)
+       - [gi-overrides] let user set the proper property names in Gtk.Table (John (J5) Palmieri)
+       - [gi-demos] get appwindow demo working again (John (J5) Palmieri)
+       - [gi-demos] fixed use of tree_iter_get (John (J5) Palmieri)
+
+2.27.90 11-Feb-2011 (2.28 pre-release)
+       - fix build to correctly use python-config (John (J5) Palmieri)
+       - Run gio tests separately when enabled (Martin Pitt)
+       - Revert "Remove gio static bindings" (Martin Pitt)
+       - Decrease the refcount for GInitiallyUnowned constructors. (Steve Frécinaux)
+       - Ensure the sink functions are only ran once. (Steve Frécinaux)
+       - Revert "Fix wrong refcount when calling introspected widget constructors" (Steve Frécinaux)
+       - Revert "Fix reference leaks for GInitiallyUnowned objects" (Steve Frécinaux)
+       - Run test suite under dbus-launch (Martin Pitt)
+       - Fix test_gdbus.py to be Python3 friendly (Martin Pitt)
+       - [gi] Provide comfortable GSettings API (Martin Pitt)
+       - Fix vfunc search bug when using GInterfaces and a do_* method. (Laszlo Pandy)
+       - [GI] Add tests for Gtk.Widget.drag_* methods. (Laszlo Pandy)
+       - [python 3] use the right syntaxis to raise exceptions (Ignacio Casal Quinteiro)
+       - [gi] return PYGLIB_MODULE_ERROR_RETURN on error and use pygobject_init (Ignacio Casal Quinteiro)
+       - [gi] return PYGLIB_MODULE_ERROR_RETURN on error (Ignacio Casal Quinteiro)
+       - Fix wrong refcount when calling introspected widget constructors (Steve Frécinaux)
+       - Gdk.Window: Map the standard constructor to the *new* constructor (Simon Schampijer)
+       - Ship tests/org.gnome.test.gschema.xml in dist tarballs (Martin Pitt)
+       - [gi] Add GSettings tests (Martin Pitt)
+       - [gi] Provide GtkTextBuffer.insert_with_tags_by_name() (Martin Pitt)
+       - [gi] Support tag names in GtkTextBuffer.insert_with_tags() (Martin Pitt)
+       - Add MAINTAINERCLEANFILES (Ignacio Casal Quinteiro)
+       - Remove .gitignore files and use git.mk (Ignacio Casal Quinteiro)
+       - pygi-convert.sh: Convert Pango.TabAlign.* (Martin Pitt)
+       - pygi-convert.sh: Drop window -> get_window() conversion (Martin Pitt)
+       - pygi-convert.sh: Don't convert self.window assignments (Martin Pitt)
+       - Fix leaked python reference in python-defined subclasses (Steve Frécinaux)
+       - Add some tests for the number of python refs held at creation time (Steve Frécinaux)
+       - Factor out parameter marshalling from construction functions. (Steve Frécinaux)
+       - [gi] in python 3 an array of uint8 can be bytes but not string (John (J5) Palmieri)
+       - [gi] fix Gio.FileEnumerator to reflect the Python 3 iter protocol (John (J5) Palmieri)
+       - [gi] python 3 fixes (John (J5) Palmieri)
+       - [gi] fix try/except blocks using depricated raise format (John (J5) Palmieri)
+       - [gi] Add docstring to GLib.Variant constructor (Martin Pitt)
+       - [gi] update gdbus test cases for previous GVariant change (Martin Pitt)
+       - [gi] Accept only a single object in GLib.Variant constructor (Martin Pitt)
+       - Speed up _setup_native_vfuncs() (Laszlo Pandy)
+       - Speed up class creation: rewrite _setup_vfuncs() to be much more efficient. (Laszlo Pandy)
+       - pygi-convert.sh: Convert gtk.UI_MANAGER_* (Sebastian Pölsterl)
+       - pygi-convert.sh: Convert gdk.GRAB_* (Sebastian Pölsterl)
+       - [gi] set the gtype GValue correctly (Ignacio Casal Quinteiro)
+       - [gi] use the right argument type for callback (Ignacio Casal Quinteiro)
+       - [gi] Add test cases for GDBus client operations (Martin Pitt)
+       - [gi] Add Variant construction/unpack support for boxed Variants (Martin Pitt)
+       - Merge branch 'windows-setup-fixes' (Dieter Verfaillie)
+       - pygi-convert.sh: GdkPixbuf methods (Thomas Hindoe Paaboel Andersen)
+       - pygi-convert.sh: Gdk.COLORSPACE_RGB (Thomas Hindoe Paaboel Andersen)
+       - [gi] Support nested objects and empty sequences in GLib.Variant building (Martin Pitt)
+       - Uncomment test_gi.TestInterfaceClash (Tomeu Vizoso)
+       - Fix reference leaks for GInitiallyUnowned objects (Steve Frécinaux)
+       - Add tests for refcount of a GObject owned by a library (Steve Frécinaux)
+       - Add a test to check for regular object reference count (Steve Frécinaux)
+       - [gi] Update TreeView.enable_model_drag_{source,dest} to current GTK (Martin Pitt)
+       - Fix a typo in a private symbol name. (Steve Frécinaux)
+       - pygi-convert.sh: Convert glib.source_remove() (Martin Pitt)
+       - Fix typo in previous commit to actually convert glib.GError (Martin Pitt)
+       - pygi-convert.sh: Move some glib bits which are better handled by gobject (Martin Pitt)
+       - Modify override for Gtk.Adjustment to allow position or keyword arguments in __init__(). (Laszlo Pandy)
+       - [gi] Fix small typo in previous commit (Martin Pitt)
+       - [gi] Add pythonic iterator and indexing for string GVariants (Martin Pitt)
+       - Construct structs using default API constructor (Tomeu Vizoso)
+       - pygi-convert.sh: Migrate Gdk.Cursor constructor, and some cursor names (Martin Pitt)
+       - pygi-convert.sh: Handle .window attributes (Martin Pitt)
+       - Also deal with foreign boxed structs (Tomeu Vizoso)
+       - [gi] Convert GErrors to GObject.GError exceptions, and throw them upon returning from calling the C function. (Laszlo Pandy)
+       - pygi-convert.sh: Don't convert glib -> GLib for now (Martin Pitt)
+       - Link libregress.so to GIO_LIBS again (Tomeu Vizoso)
+       - Fix attributes 2BUTTON_PRESS and 3BUTTON_PRESS of Gdk.EventType. (Laszlo Pandy)
+       - [gi] Fixed typo in exception (Sebastian Pölsterl)
+       - [gi] Enable handling of Gdk.EventType.2BUTTON_PRESS and 3BUTTON_PRESS (Sebastian Pölsterl)
+       - Revert "Fix Pango FontDescription override" (Martin Pitt)
+       - Python iterator interface support for GFileEnumerator. (Tony Young)
+       - Remove gio static bindings (Tomeu Vizoso)
+       - [gi] set length when marshalling guint8 erases (Ignacio Casal Quinteiro)
+       - Convert Gdk.Pixbuf to GdkPixbuf.Pixbuf (Sebastian Pölsterl)
+       - Disable calls to PyGILState_* when threads are disabled (Arnaud Charlet)
+       - pygi-convert.sh: Do not comment out set_cell_data_func() calls; these should be ported properly (Martin Pitt)
+       - pygi-convert.sh: Fix match for adding missing imports (Martin Pitt)
+       - pygi-convert.sh: Fix Gtk.Label handling to be idempotent (Martin Pitt)
+       - Remove trailing whitespace from gi/overrides/Gtk.py (Laszlo Pandy)
+       - Fix Pango FontDescription override (Martin Pitt)
+       - tests: Respect existing $GI_TYPELIB_PATH (Martin Pitt)
+       - Merge branch 'value' (Sebastian Pölsterl)
+       - GTK overrides: Do type conversion to column types of ListStore and TreeStore in set_value (Sebastian Pölsterl)
+       - Always register a new GType when a GObject class is subclassed (Steve Frécinaux)
+       - Raise required versions of GLib and GObject-Introspection (Simon van der Linden)
+       - pygi-convert.sh: Handle keysyms (Martin Pitt)
+       - GLib overrides: Add test case for array variant building (Martin Pitt)
+       - Remove cairo.RectangleInt from the foreign module (Tomeu Vizoso)
+       - Dont try to guess the transfer if its a boxed (Tomeu Vizoso)
+       - The tags can be Empty not None. (Ignacio Casal Quinteiro)
+       - Add Pythonic iterators and indexing to GVariant (Martin Pitt)
+       - Add GLib.Variant.unpack() (Martin Pitt)
+       - Add override for gtk_text_buffer_insert_with_tags (Ignacio Casal Quinteiro)
+       - Deduce PYTHON_LIBS in addition to PYTHON_INCLUDES (Simon van der Linden)
+       - Kill JD_CHECK_PYTHON_HEADERS (Simon van der Linden)
+       - Revert "Override Gtk.Box.pack_start and pack_end to set default values to be compliant with pygtk" (Sebastian Pölsterl)
+       - Revert "Override Gtk.CellLayout.pack_start and pack_end to add default values to be compliant with pygtk" (Sebastian Pölsterl)
+       - Revert "Override Gtk.TreeViewColumn.pack_start, pack_end and set_cell_data_func to add default values to be compliant with pygtk" (Sebastian Pölsterl)
+       - pygi-convert.sh: Handle gtk.combo_box_new_text() (Martin Pitt)
+       - Override TreeSortable.set_sort_func and set_default_sort_func to add default values to be pygtk compliant (Sebastian Pölsterl)
+       - Override Gtk.TreeViewColumn.pack_start, pack_end and set_cell_data_func to add default values to be compliant with pygtk (Sebastian Pölsterl)
+       - Override Gtk.CellLayout.pack_start and pack_end to add default values to be compliant with pygtk (Sebastian Pölsterl)
+       - Override Gtk.Paned pack1 and pack2 to add default values to be compliant with pygtk (Sebastian Pölsterl)
+       - Override Gtk.Box.pack_start and pack_end to set default values to be compliant with pygtk (Sebastian Pölsterl)
+       - Handle GObject subclasses in the property helper. (Steve Frécinaux)
+       - Fix handling of unicode for GtkTreeModels (Martin Pitt)
+       - In IntrospectionModule and DynamicModule classes, make all instance attributes start with an underscore. (Laszlo Pandy)
+       - Amend previous enum wrapping commit to remove redundant setting of __info__ attribute. (Laszlo Pandy)
+       - pygi-convert.sh: Handle GdkPixbuf.InterpType (Martin Pitt)
+       - Fix wrapping of enums: Create new Python type for each non-gtype enum. (Laszlo Pandy)
+       - Use g_vfunc_info_invoke for chaining up in vfuncs (Tomeu Vizoso)
+       - Move pyglib_{main_context, option_context, option_group}_new into _PyGLib_API (Simon van der Linden)
+       - pygi-convert.sh: Handle Gdk.DragAction (Martin Pitt)
+       - pygi-convert.sh: Generalize Gtk.Settings migration (Martin Pitt)
+       - pygi-convert.sh: Don't change the name of "glib" submodules (Martin Pitt)
+       - Plug another memory leak (Paolo Borelli)
+       - Plug a small memory leak. (Paolo Borelli)
+       - Override Table.attach() to behave like pygtk (Paolo Borelli)
+       - pygi-convert.sh: Convert Pango.WrapMode (Martin Pitt)
+       - pygi-convert.sh: Don't change the name of "gtk" submodules (Martin Pitt)
+       - Fix the __dir__() methods on DynamicModule and IntrospectionModule (Laszlo Pandy)
+       - pygi-convert.sh: handle ReliefStyle (Paolo Borelli)
+       - setup.py: fix the provides keyword argument (Dieter Verfaillie)
+       - setup.py: use the same spaces-less format for all setup() parameters (Dieter Verfaillie)
+       - Add a __repr__() method to DynamicModule. (Laszlo Pandy)
+       - Go back to using getattr() in DynamicModule.__getattr__ (Tomeu Vizoso)
+       - Change __dir__() to report all the attributes that __getattr__ supports (Laszlo Pandy)
+       - Bump the minimum gio dependency (Emilio Pozuelo Monfort)
+       - Add test for incorrect attributes in Gdk.Event (Tomeu Vizoso)
+       - Don't call getattr again in gi.overrides.Gdk.Event.__getattr__ (Simon van der Linden)
+       - Release allocated array of arguments when handling closures (Mike Gorse)
+       - Release GIValueInfo when checking an enum argument (Mike Gorse)
+       - Respect different type lengths when assigning out-argument pointers. (Eitan Isaacson)
+       - Fix stupid name clash (Tomeu Vizoso)
+       - Add /usr/share to XDG_DATA_DIRS when running the tests (Tomeu Vizoso)
+       - Comment out tests that require SRV lookups (Tomeu Vizoso)
+       - Use suppresion file when running valgrind (Tomeu Vizoso)
+       - Fix warnings. (Ignacio Casal Quinteiro)
+       - Allow comparing Gtk.TreePath to None (Jesse van den Kieboom)
+       - handle unicode objects in properties (John (J5) Palmieri)
+       - dsextras.py: check if gcc is there when platform is win32 and compiler is mingw32 (Dieter Verfaillie)
+       - dsextras.py: be consistent in how distutils imports are done (Dieter Verfaillie)
+       - dsextras.py: add have_gcc() function (Dieter Verfaillie)
+       - dsextras.py: use distutils.spawn.find_executable for have_pkgconfig() (Dieter Verfaillie)
+       - setup.py: fix another case of use True/False instead of 1/0 (Dieter Verfaillie)
+       - pygi-convert.sh: improve GtkSourceView conversion (Paolo Borelli)
+       - pygi-convert.sh: Gtk.DialogFlags conversion (Paolo Borelli)
+       -       Doc Extractor: Print the gtk-doc blocks sorted by function name. (José Alburquerque)
+       - pygi-convert.sh: add more Gtk conversions and sort (Paolo Borelli)
+       - pygi-convert.sh: convert Atk (Paolo Borelli)
+       - pygi-convert.sh: convert a few more Gio types (Paolo Borelli)
+       - pygi-convert.sh: more GLib conversion (Paolo Borelli)
+       - pygi-convert.sh: remove two cases handled by overrides (Paolo Borelli)
+       - Override Gtk.ScrolledWindow constructor (Paolo Borelli)
+       - pygi-convert.sh: Fix 'find' syntax (Paolo Borelli)
+       - pygi-convert.sh: start handling Gio and GLib (Paolo Borelli)
+       - pygi-convert.sh: convert Gdk.ScrollDirection. (Paolo Borelli)
+       - Override Pango.Layout constructor. (Paolo Borelli)
+       - Remove Pango.FontDescription() conversion. (Paolo Borelli)
+       - Override GtkAction and GtkRadioAction constructors. (Paolo Borelli)
+       - Override Adjustment constructor to behave like pygtk (Dmitrijs Ledkovs)
+       - add secondary_text apis to MessageDialog (John (J5) Palmieri)
+       - [gi] get rid of some debug prints and fix error messages (John (J5) Palmieri)
+       - Fix demo for override changes. (Paolo Borelli)
+       - Override Pango.FontDescription. (Paolo Borelli)
+       - Stop checking that all vfuncs are implemented (Tomeu Vizoso)
+       - Fix usage of TreeIter api that is now an override. (Paolo Borelli)
+       - Fix Gtk.Label(label="Foo") (Paolo Borelli)
+       - Fix typo when raising an exception (Paolo Borelli)
+       - pygi-convert.sh: Added more conversions (Sebastian Pölsterl)
+       - Override LinkButton constructor to make 'uri' mandatory (Paolo Borelli)
+       - Container should be iterable. (Dmitry Morozov)
+       - No need to import Gdk (Paolo Borelli)
+       - Remove semicolumns (Paolo Borelli)
+       - [gi] make sure Gtk.Button override passes all keywords to parent constructor (John (J5) Palmieri)
+       - Fix cut&paste error in the Label override (Paolo Borelli)
+       - pygi-convert.sh: handle TextWindowType (Paolo Borelli)
+       - Override Label constructor to behave like pygtk (Paolo Borelli)
+       - Override GtkTable constructor to behave like pygtk (Paolo Borelli)
+       - pygi-convert.sh: convert MovementStep (Paolo Borelli)
+       - Update Gdk overrides to work with latest Gtk+ 3 (Paolo Borelli)
+       - Gtk: add an override for Gtk.main_quit (Johan Dahlin)
+       - [gi] handle subtypes when inserting into tree models (John (J5) Palmieri)
+       - Override TreeSelection.select_path and TreeView.scroll_to_cell (Paolo Borelli)
+       - Override TreePath.__new__ (Paolo Borelli)
+       - Override Container to behave like a sequence (Paolo Borelli)
+       - refactor Jonathan Matthew recurse vfunc patch so it applys and clean up a bit (John (J5) Palmieri)
+       - Recurse up through base classes when setting up vfuncs (Jonathan Matthew)
+       - add a profiling torture test for when we fix up invoke (John (J5) Palmieri)
+       - moved dynamic and base modules outside of gtk-2.0 directory (John (J5) Palmieri)
+       - add test for inout argument count (John (J5) Palmieri)
+       - [gi] add check for UNICHAR (John (J5) Palmieri)
+       - Support gunichar (Paolo Borelli)
+       - pygi-convert.sh: gtk.accel_map -> Gtk.AccelMap._ (Paolo Borelli)
+       - pygi-convert.sh: handle "from gtk import gdk" (Paolo Borelli)
+       - pygi-convert.sh: add some Pango special cases (Paolo Borelli)
+       - Override TextIter (begins|ends|toggles)_tag() (Paolo Borelli)
+       - Override TextBuffer.set_text() to make length optional (Paolo Borelli)
+       - Override TextBuffer.create_mark() (Paolo Borelli)
+       - Fix TextBuffer.get_selection_bounds() override (Paolo Borelli)
+       - [gi] fix ActionGroup constructor to allow other keyword properties to be set (John (J5) Palmieri)
+       - [gi] require the name parameter when creatin a Gtk.ActionGroup (John (J5) Palmieri)
+       - Override UIManager.insert_action_group (Paolo Borelli)
+       - Override TreeModel.get() to return a tuple (Paolo Borelli)
+       - Make TreeSelection.get_selected_rows compatible with PyGtk (Paolo Borelli)
+       - [gi] switch to using sequences/tuples when marshalling cairo_rectangle_int_t (John (J5) Palmieri)
+       - [gi] overrides for treeview Drag and Drop (John (J5) Palmieri)
+       - [gi] when encountering guint8 arrays treat them as byte arrays (John (J5) Palmieri)
+       - pygi-convert.sh: Add pynotify -> Notify (Martin Pitt)
+       - pygi-convert.sh: Remove sugar specifics, and allow command line file list (Martin Pitt)
+       - pygi-convert.sh: Cover Message and Buttons types (Martin Pitt)
+       - [gi] fix actiongroup test since actions are hashed (John (J5) Palmieri)
+       - [gi] when converting to UTF-8 accept Python Unicode objects as input (Python 2) (John (J5) Palmieri)
+       - Correct a bug in the freeing of memory in pygi-invoke.c. (Damien Caliste)
+       - update news for release (John (J5) Palmieri)
+       - Implement richcompare for GIBaseInfo (Jonathan Matthew)
+       - [gi] add the rectangle_int_t forign cairo type (John (J5) Palmieri)
+       - add a foreign type for cairo_rectangle_int_t and allow it to be caller-allocated (John (J5) Palmieri)
+       - [gi] add overrides to Gtk.Editable (John (J5) Palmieri)
+       - [gi] handle virtual invokers (John (J5) Palmieri)
+       - add overrides for the insert* apis of list_store and tree_store (John (J5) Palmieri)
+       - fix dialogs overrides which were relying on broken inheritance behavior (John (J5) Palmieri)
+       - Add a overrides registry so we can refrence overrides inside the module (John (J5) Palmieri)
+       - Merge remote branch 'dieterv/setup-fixes-for-merge' (John Stowers)
+       - setup.py: ease maintenance burden for tests installation (Dieter Verfaillie)
+       - fix inheritence issues in overrides (John (J5) Palmieri)
+       - tests: add runtests-windows.py script (Dieter Verfaillie)
+       - pygobject_postinstall.py: remove pygobject-2.0.pc treatment from postinstall as pkg-config on windows figures out the correct prefix at runtime (Dieter Verfaillie)
+       - pygobject_postinstall.py: remove shortcut creation (Dieter Verfaillie)
+       - setup.py: formatting cleanup, makes things readable (Dieter Verfaillie)
+       - setup.py: build and install tests (Dieter Verfaillie)
+       - setup.py: install documentation when available on build system (Dieter Verfaillie)
+       - setup.py: install pygobject-codegen script (Dieter Verfaillie)
+       - setup.py: install fixxref.py script (Dieter Verfaillie)
+       - setup.py: rearrange constants (Dieter Verfaillie)
+       - setup.py: check python version and pkgconig availability before anything else (Dieter Verfaillie)
+       - setup.py: simplify sys.platform != 'win32' detection and error reporting (Dieter Verfaillie)
+       - setup.py: rearrange imports (Dieter Verfaillie)
+       - README.win32: update build instructions (Dieter Verfaillie)
+       - dsextras.py: formatting cleanup, makes things readable (Dieter Verfaillie)
+       - dsextras.py: add ggc4 to MSVC compatible struct packing comment (Dieter Verfaillie)
+       - dsextras.py: use the pkgc_ functions instead of repeating pgk-config incantations all over the place (Dieter Verfaillie)
+       - dsextras.py: add pkgc_get_version and pkgc_get_defs_dir functions (Dieter Verfaillie)
+       - dsextras.py: PEP8: Comparisons to singletons like None should always be done with 'is' or 'is not', never the equality operators. (Dieter Verfaillie)
+       - dsextras.py: use True/False instead of 1/0 (Dieter Verfaillie)
+       - dsextras.py: rearrange imports (Dieter Verfaillie)
+       - Add distutils generated build/dist directories and eclipse configuration files to .gitignore (Dieter Verfaillie)
+       - [gi] add tests for calling dir on a dynamic module (John (J5) Palmieri)
+       - [gi] dir() now works for modules (Deepankar Sharma)
+       - Don't check the inner type when comparing gpointers (Simón Pena)
+       - Release GIL when calling into C functions (John (J5) Palmieri)
+       - _gi.Repository : Implement missing info bindings. (José Aliste)
+       - include Python.h so that PY_VERSION_HEX gets defined (John (J5) Palmieri)
+       - [gi] make overrides work for python 3.x protocols and alias for python 2.x (John (J5) Palmieri)
+       - Override Gtk.Widget.translate_coordinates to not return success value (Sebastian Pölsterl)
+       - Override Gtk.TreeViewColumn.cell_get_position to not return success value (Sebastian Pölsterl)
+       - Override get_path_at_pos and get_dest_row_at_pos of Gtk.TreeView to not return success value (Sebastian Pölsterl)
+       - Override Gtk.TreeSortable.get_sort_column_id to not return success value (Sebastian Pölsterl)
+       - Override forward_search and backward_search of Gtk.TextIter to not return success value (Sebastian Pölsterl)
+       - Override Gtk.TextBuffer.get_selection_bounds to not return success value (Sebastian Pölsterl)
+       - Override Gtk.RecentInfo.get_application_info to not return success value (Sebastian Pölsterl)
+       - Override Gtk.IMContext.get_surrounding to not return success value (Sebastian Pölsterl)
+       - Override get_item_at_pos, get_visible_range, get_dest_item_at_pos of Gtk.IconView to not return success value (Sebastian Pölsterl)
+       - Override Gtk.Container.get_focus_chain to not return success value (Sebastian Pölsterl)
+       - Override Gtk.ComboBox.get_active_iter to not return success value (Sebastian Pölsterl)
+       - [gi] make parameter check less strict when dealing with GValue params (John (J5) Palmieri)
+       - Shortcut removal is not needed on post-uninstall (John Stowers)
+       - Disable shortcut creation in windows installer (John Stowers)
+       - overrides for all subclasses of dialog (John (J5) Palmieri)
+       - Make TreeModel behave like in GTK-2.x (Sebastian Pölsterl)
+       - Correctly build GIO on windows (John Stowers)
+       - Require Python >= 2.6.0 for Windows build (John Stowers)
+       - Fix depreciation warning in dsextras.py (John Stowers)
+       - Fix build on windows (John Stowers)
+       - Support for GCC4 in Windows distutils build - bug 626548 (Michael Culbertson)
+       - Remove obsolete comments in dsextras.py (John Stowers)
+       - Broken dsextras.py pkg-config check error message (John Stowers)
+       - add compat functions for the deprecated PyCObject api (John (J5) Palmieri)
+       - Add __path__ attributes. (Damien Caliste)
+       - Override Gtk.TreeSelection.get_selected to not return success value. (Sebastian Pölsterl)
+       - Make row optional in Gtk.TreeStore/ListStore.append override (Vincent Untz)
+       - Revert "add compat functions for the deprecated PyCObject api" (John (J5) Palmieri)
+       - return NULL instead of -1 which fixes crash when introspection is turned off (John (J5) Palmieri)
+       - add compat functions for the deprecated PyCObject api (John (J5) Palmieri)
+       - fix commit 7fe83108 which didn't use the compat functions for string handling (John (J5) Palmieri)
+       - Python 3 fixes for dsextras and the python.m4 distribution files (John (J5) Palmieri)
+
+2.27.0 10-Nov-2010
+       - Implement richcompare for GIBaseInfo (Jonathan Matthew)
+        - [gi] add the rectangle_int_t forign cairo type (John (J5) Palmieri)
+        - add a foreign type for cairo_rectangle_int_t and allow it to be caller-allocated (John (J5) Palmieri)
+        - [gi] add overrides to Gtk.Editable (John (J5) Palmieri)
+        - [gi] handle virtual invokers (John (J5) Palmieri)
+        - add overrides for the insert* apis of list_store and tree_store (John (J5) Palmieri)
+        - fix dialogs overrides which were relying on broken inheritance behavior (John (J5) Palmieri)
+        - Add a overrides registry so we can refrence overrides inside the module (John (J5) Palmieri)
+        - Merge remote branch 'dieterv/setup-fixes-for-merge' (John Stowers)
+        - setup.py: ease maintenance burden for tests installation (Dieter Verfaillie)
+        - fix inheritence issues in overrides (John (J5) Palmieri)
+        - tests: add runtests-windows.py script (Dieter Verfaillie)
+        - pygobject_postinstall.py: remove pygobject-2.0.pc treatment from postinstall as pkg-config on windows figures out the correct prefix at runtime (Dieter Verfaillie)
+        - pygobject_postinstall.py: remove shortcut creation (Dieter Verfaillie)
+        - setup.py: formatting cleanup, makes things readable (Dieter Verfaillie)
+        - setup.py: build and install tests (Dieter Verfaillie)
+        - setup.py: install documentation when available on build system (Dieter Verfaillie)
+        - setup.py: install pygobject-codegen script (Dieter Verfaillie)
+        - setup.py: install fixxref.py script (Dieter Verfaillie)
+        - setup.py: rearrange constants (Dieter Verfaillie)
+        - setup.py: check python version and pkgconig availability before anything else (Dieter Verfaillie)
+        - setup.py: simplify sys.platform != 'win32' detection and error reporting (Dieter Verfaillie)
+        - setup.py: rearrange imports (Dieter Verfaillie)
+        - README.win32: update build instructions (Dieter Verfaillie)
+        - dsextras.py: formatting cleanup, makes things readable (Dieter Verfaillie)
+        - dsextras.py: add ggc4 to MSVC compatible struct packing comment (Dieter Verfaillie)
+        - dsextras.py: use the pkgc_ functions instead of repeating pgk-config incantations all over the place (Dieter Verfaillie)
+        - dsextras.py: add pkgc_get_version and pkgc_get_defs_dir functions (Dieter Verfaillie)
+        - dsextras.py: PEP8: Comparisons to singletons like None should always be done with 'is' or 'is not', never the equality operators. (Dieter Verfaillie)
+        - dsextras.py: use True/False instead of 1/0 (Dieter Verfaillie)
+        - dsextras.py: rearrange imports (Dieter Verfaillie)
+        - Add distutils generated build/dist directories and eclipse configuration files to .gitignore (Dieter Verfaillie)
+        - [gi] add tests for calling dir on a dynamic module (John (J5) Palmieri)
+        - [gi] dir() now works for modules (Deepankar Sharma)
+        - Don't check the inner type when comparing gpointers (Simón Pena)
+        - Release GIL when calling into C functions (John (J5) Palmieri)
+        - _gi.Repository : Implement missing info bindings. (José Aliste)
+        - include Python.h so that PY_VERSION_HEX gets defined (John (J5) Palmieri)
+        - [gi] make overrides work for python 3.x protocols and alias for python 2.x (John (J5) Palmieri)
+        - Override Gtk.Widget.translate_coordinates to not return success value (Sebastian Pölsterl)
+        - Override Gtk.TreeViewColumn.cell_get_position to not return success value (Sebastian Pölsterl)
+        - Override get_path_at_pos and get_dest_row_at_pos of Gtk.TreeView to not return success value (Sebastian Pölsterl)
+        - Override Gtk.TreeSortable.get_sort_column_id to not return success value (Sebastian Pölsterl)
+        - Override forward_search and backward_search of Gtk.TextIter to not return success value (Sebastian Pölsterl)
+        - Override Gtk.TextBuffer.get_selection_bounds to not return success value (Sebastian Pölsterl)
+        - Override Gtk.RecentInfo.get_application_info to not return success value (Sebastian Pölsterl)
+        - Override Gtk.IMContext.get_surrounding to not return success value (Sebastian Pölsterl)
+        - Override get_item_at_pos, get_visible_range, get_dest_item_at_pos of Gtk.IconView to not return success value (Sebastian Pölsterl)
+        - Override Gtk.Container.get_focus_chain to not return success value (Sebastian Pölsterl)
+        - Override Gtk.ComboBox.get_active_iter to not return success value (Sebastian Pölsterl)
+        - [gi] make parameter check less strict when dealing with GValue params (John (J5) Palmieri)
+        - Shortcut removal is not needed on post-uninstall (John Stowers)
+        - Disable shortcut creation in windows installer (John Stowers)
+        - overrides for all subclasses of dialog (John (J5) Palmieri)
+        - Make TreeModel behave like in GTK-2.x (Sebastian Pölsterl)
+        - Correctly build GIO on windows (John Stowers)
+        - Require Python >= 2.6.0 for Windows build (John Stowers)
+        - Fix depreciation warning in dsextras.py (John Stowers)
+        - Fix build on windows (John Stowers)
+        - Support for GCC4 in Windows distutils build - bug 626548 (Michael Culbertson)
+        - Remove obsolete comments in dsextras.py (John Stowers)
+        - Broken dsextras.py pkg-config check error message (John Stowers)
+        - add compat functions for the deprecated PyCObject api (John (J5) Palmieri)
+        - Add __path__ attributes. (Damien Caliste)
+        - Override Gtk.TreeSelection.get_selected to not return success value. (Sebastian Pölsterl)
+        - Make row optional in Gtk.TreeStore/ListStore.append override (Vincent Untz)
+        - Revert "add compat functions for the deprecated PyCObject api" (John (J5) Palmieri)
+        - return NULL instead of -1 which fixes crash when introspection is turned off (John (J5) Palmieri)
+        - add compat functions for the deprecated PyCObject api (John (J5) Palmieri)
+        - fix commit 7fe83108 which didn't use the compat functions for string handling (John (J5) Palmieri)
+        - Python 3 fixes for dsextras and the python.m4 distribution files (John (J5) Palmieri)
+
+2.26.0 24-Sep-2010
+        - Wrap g_get_system_{config,data}_dirs () (John Strowers)
+       - fixed make check and make dist (John (J5) Palmieri)
+        - Disable GI tests when introspection disabled (John Stowers)
+        - Wrap g_uri_list_extract_uris. Fixes bug #584431 (Tomeu Vizoso)
+        - Fix a few uses of TRUE and FALSE in the docs (Paul Bolle)
+        - pygi: always free the invocation_state struct (Damien Caliste)
+        - Start implementing something equivalent to g_variant_new (Tomeu Vizoso)
+        - fixed typo - missing comma in glib.option module (John (J5) Palmieri)
+        - add checks so we can compile under python 3 by setting PYTHON=python3 (John (J5) Palmieri)
+        - Rename static methods as functions (Tomeu Vizoso)
+        - fix a couple of compiler warnings (John (J5) Palmieri)
+        - remove unused code (John (J5) Palmieri)
+        - Check the type of the instance object (John (J5) Palmieri)
+        - include the correct pycairo version (John (J5) Palmieri)
+        - Use PyMapping_Keys to determine if an object is a dict (py3k fix) (John (J5) Palmieri)
+        - fix handling of UINT64 and INT64 arguments in py3k (John (J5) Palmieri)
+        - properly handle ulongs properties in py3k (John (J5) Palmieri)
+        - Specify encoding of tests/test_gi.py (Tomeu Vizoso)
+        - use actual unicode in the tests on py3k, not the byte representation (John (J5) Palmieri)
+        - s/METH_KEYWORDS/METH_VARARGS|METH_KEYWORDS/ when defining object methods (John (J5) Palmieri)
+        - fix subclassing PyLong by calling __new__ correctly (John (J5) Palmieri)
+        - minor py3k fixups for python modules (John (J5) Palmieri)
+        - minor fixes in tests for py3k compat (John (J5) Palmieri)
+        - compilation: Fix syntax error (Colin Walters)
+        - Add missing file (Tomeu Vizoso)
+        - Add override for GLib.Variant.new_tuple (Tomeu Vizoso)
+        - fix for changes in the gi test libraries (John (J5) Palmieri)
+        - Gtk.DialogFlags.NO_SEPARATOR has been removed in Gtk 3.0 (John (J5) Palmieri)
+        - no need to offset arg positions when is_method is true (John (J5) Palmieri)
+        - gi: Add support for more property types (Tomeu Vizoso)
+        - use PyObject_SetAttrString, not PyDict_SetItemString when setting __gtype__ (John (J5) Palmieri)
+        - Rename GArgument to GIArgument (Tomeu Vizoso)
+        - fix up tests so they run in py3k (John (J5) Palmieri)
+        - tests: Port to new introspection tests (Colin Walters)
+        - we need to specify tp_hash since we overide tp_richcompare (John (J5) Palmieri)
+        - working enum/flags/pid subclasses of long (John Ehresman)
+        - make vfuncs work in py3k (John (J5) Palmieri)
+        - make cairo module compile in py3k (John (J5) Palmieri)
+        - fix exceptions so they work in python 3.x (John (J5) Palmieri)
+        - make the gi module compile under 3.x (John (J5) Palmieri)
+        - fix up testshelper module so it compiles in python 3.x (John (J5) Palmieri)
+        - convert to using PYGLIB_DEFINE_TYPE for module objects (John (J5) Palmieri)
+        - some more p3k PyString and PyInt eradication in GI (John (J5) Palmieri)
+        - pyglib: Fix typo (Leo Singer) (Tomeu Vizoso)
+        - Add defines for size_t and ssize_t conversion functions (Gustavo Noronha Silva)
+        - pyglib: Fix a compiler warning (Colin Walters)
+        - Don't force gtk 2.0 (Tomeu Vizoso)
+        - Fix some ref leaks in hook_up_vfunc_implementation() (Steve Frécinaux)
+        - handle strings correctly in gio (John (J5) Palmieri)
+        - make giomodule compile under py3k (John (J5) Palmieri)
+        - for py3k we need to do some more processing to get bytes from a unicode string (John (J5) Palmieri)
+        - use Bytes instead of Unicode when reading io (John (J5) Palmieri)
+        - prefix compat macros with PYGLIB (John (J5) Palmieri)
+        - Gtk.Button unit tests (John (J5) Palmieri)
+        - [Gtk] Add overrides for Button (Johan Dahlin)
+        - Make Cairo an optional dependency (Simon van der Linden)
+        - Don't import again PyGObject (John Ralls) (Tomeu Vizoso)
+        - move to using richcompare slot instead of compare (John (J5) Palmieri)
+        - Replace autogen.sh by a newer version (Simon van der Linden)
+        - Fix some warnings (Simon van der Linden)
+        - Fix caller-allocates emergency free. (Simon van der Linden)
+        - Remove useless checks. (Simon van der Linden)
+        - Call valgrind with G_SLICE=always-malloc G_DEBUG=gc-friendly (Tomeu Vizoso)
+        - Fix some warnings. (Ignacio Casal Quinteiro)
+        - Add myself as a maintainer (Simon van der Linden)
+        - Properly allocate boxed structs that are (caller-allocates) (Tomeu Vizoso)
+        - override gdk.Event to return attribute from the proper event object (Toms Baugis)
+        - check if z# needs an int or Py_ssize_t (John (J5) Palmieri)
+        - make sure we parse parameters to python object vars not glib vars (John (J5) Palmieri)
+        - Make an example and a demo work out of the box (Paul Bolle)
+        - make sure caller allocated structs are freed when they go out of scope (John (J5) Palmieri)
+        - Revert "override gdk.Event to return attribute from the proper event object." (Tomeu Vizoso)
+        - PyGI: properly quit cairo-demo (Paul Bolle)
+        - override gdk.Event to return attribute from the proper event object. (Toms Baugis)
+        - Clean and improve the test infrastructure (Simon van der Linden)
+        - Add some more transformations to pygi-convert.sh (Tomeu Vizoso)
+        - Adapt to API changes: g_irepository_enumerate_versions (Tomeu Vizoso)
+        - Add GValue<->GArgument marshalling for some more types (Tomeu Vizoso)
+        - Chain up with the non-introspection implementation for properties if needed (Tomeu Vizoso)
+        - Improve error reporting for missing attributes in introspection modules (Tomeu Vizoso)
+        - Implement getting and setting properties using introspection information. (Tomeu Vizoso)
+        - Readd Gdk.Rectangle override for Gtk-2.0 (Tomeu Vizoso)
+        - Allow specifying a version when loading a typelib (Tomeu Vizoso)
+        - treat GFreeFunc as equivalent to GDestroyNotify when scanning callbacks (Jonathan Matthew)
+        - Don't use == to compare doubles, use <= and =>. (Simon van der Linden)
+        - Allow passing ints as enum args (Tomeu Vizoso)
+        - Make error message less ambiguous (Tomeu Vizoso)
+        - fix passing in type names as a GType and add gtype unit tests (John (J5) Palmieri)
+        - Increase a bit verbosity of tests so people know which test failed (Tomeu Vizoso)
+        - Actually add the files for GVariant foreign structs (Tomeu Vizoso)
+        - Add foreign struct support for GVariant (Tomeu Vizoso)
+
+2.21.5 12-Jul-2010
+        - Shut up some compiler warnings (Florian Müllner)
+        - Adjust to API break in GObject-Introspection (Florian Müllner)
+        - pass in the demo app so demos can use utility methods like requesting file paths (John (J5) Palmieri)
+        - demo fixes to keep up with Gtk+ (John (J5) Palmieri)
+        - override test fixes for new GTK+ annotations (John (J5) Palmieri)
+        - Fix warning. (Ignacio Casal Quinteiro)
+        - fix up treeiter usage due to caller-allocates annotations in gtk+ (John (J5) Palmieri)
+        - add entry completion demo (John (J5) Palmieri)
+        - string changes (John (J5) Palmieri)
+        - add the Entry demo directory and the entry_buffer demo (John (J5) Palmieri)
+        - fix loading of demo modules to support sub modules (John (J5) Palmieri)
+        - add the ability to have demos in sub catagories (John (J5) Palmieri)
+        - Add  __name__ to DynamicModule class. (Jose Aliste)
+        - Do not override GdkRectangle. (Ignacio Casal Quinteiro)
+        - Add override for TreeModel implementing __len__() (Philip Withnall)
+
+2.21.4 29-Jun-2010
+        - Build the cairo shim as a python module so the _gi module stops linking to it (Tomeu Vizoso)
+        - add drawing area demo (John (J5) Palmieri)
+        - sort the demo list (John (J5) Palmieri)
+        - rename iter to treeiter so we aren't using a python reserved word (John (J5) Palmieri)
+        - Fixup for change in buffer API (John (J5) Palmieri)
+        - add ListStore, TreeStore and TreeViewColumn APIs (John (J5) Palmieri)
+        - Add unit test for add_actions user data. (Ignacio Casal Quinteiro)
+        - Pass user_data param when adding actions (Paolo Borelli)
+        - add an exception type to the try/except block (John (J5) Palmieri)
+        - return PyList instead of PyTuple for array, return empty list for NULL arrays (John (J5) Palmieri)
+        - Fix 'make distcheck' (Tomeu Vizoso)
+        - Allow building pygobject without introspection support by providing --disable-introspection to configure. (Tomeu Vizoso)
+        - Make sure that sys.argv is a list and not a sequence. (Tomeu Vizoso)
+        - Force loading the GObject typelib so we have available the wrappers for base classes such as GInitiallyUnowned. (Tomeu Vizoso)
+        - we shouldn't g_array_free NULL pointers (John (J5) Palmieri)
+        - remove unneeded TextIter creation in the tests (John (J5) Palmieri)
+        - add override for TextBuffer (John (J5) Palmieri)
+        - fix up some build issues (John (J5) Palmieri)
+        - make the overrides file git friendly by appending to __all__ after each override (John (J5) Palmieri)
+        - Override Dialog constructor and add_buttons method (Paolo Borelli)
+        - Merge PyGI (Johan Dahlin)
+
+2.21.3 21-Jun-2010
+        - Proper handling of null-ok in virtual methods (Ludovic L'Hours)
+        - Fall back to use the floating references API in glib if there isn't a sinkfunc defined. (Tomeu Vizoso)
+        - Revert "Drop sinkfuncs." (Tomeu Vizoso)
+        - [giounix] Make it possible to compile on glib 2.20 (Johan Dahlin)
+        - Release the lock when potentially invoking Python code. (Sjoerd Simons)
+
+2.21.2 10-Jun-2010
+        - Drop sinkfuncs. (Tomeu Vizoso)
+        - Clear error if we failed the import (Colin Walters)
+        - Added missing , to keyword list of gio.GFile.set_attribute (John Ehresman)
+        - Fix arg conversion in gio.GFile.set_attribute (John Ehresman)
+        - Set constants under python 2.5 or before (John Ehresman)
+        - Doc Extractor: Use replacements that make sense for &...; expressions. (José Alburquerque)
+        - Add build docs for windows (John Stowers)
+        - Setup.py cosmetic tidy (John Stowers)
+        - Fix crash when importing gio (John Stowers)
+        - Bug 589671 - Dont use generate-constants (John Stowers)
+        - Bug 589671 - Fix setup.py for windows build (John Stowers)
+        - Include pygsource.h (John Stowers)
+        - codegen/docextract_to_xml.py: One more &...; replacement (&nbsp;). (José Alburquerque)
+        - codegen/docextract_to_xml.py: Replace some &..; that cause errors. (José Alburquerque)
+        - codegen/docextract_to_xml.py: Handle C++ multi-line comments. (José Alburquerque)
+        - codegen/docextract.py: Stop final section processing on first match. (José Alburquerque)
+        - Update doc extraction tool to handle GObjectIntrospection annotations. (José Alburquerque)
+        - Docs: replace gio.IO_ERROR_* with gio.ERROR_* (Paul Bolle)
+        - Bug 613341 - pygobject tests seem to require pygtk causing a circular (Gian Mario)
+        - Don't raise an error in _pygi_import if pygi support is disabled (Simon van der Linden)
+        - Initialize PyGPollFD_Type.fd_obj to NULL (Tomeu Vizoso)
+        - Bug 605937 - pygobject: Makefile.am sets $TMPDIR, disrupting distcc (Gian Mario)
+        - Wrap gio.Cancellable.make_pollfd() and add a test (Gian Mario)
+        - Make cancellable an optional parameter in many methods (Gian Mario)
+
+2.21.1 02-Jan-2010
+        - Wrap gio.Volume.eject_with_operation (Gian Mario)
+        - Wrap gio.Mount.eject_with_operation (Gian Mario)
+        - Wrap gio.Mount.unmount_mountable_with_operation (Gian Mario)
+        - Wrap File.unmount_mountable_with_operation (Gian Mario)
+        - Wrap gio.File.stop_mountable (Gian Mario)
+        - Wrap gio.File.start_mountable (Gian Mario)
+        - Wrap gio.File.replace_readwrite_async (Gian Mario)
+        - Wrap gio.File.poll_mountable (Gian Mario)
+        - Wrap gio.File.open_readwrite_async (Gian Mario)
+        - Wrap gio.File.eject_mountable_with_operation (Gian Mario)
+        - Wrap gio.File.create_readwrite_async (Gian Mario)
+        - Wrap gio.Drive.stop (Gian Mario)
+        - Wrap gio.Drive.start (Gian Mario)
+        - Wrap gio.SocketListener.accept_socket_async|finish (Gian Mario)
+        - Wrap gio.SocketListener.accept_finish (Gian Mario)
+        - Wrap gio.SocketListener.accept_async (Gian Mario)
+        - Wrap gio.SocketListener.accept_socket (Gian Mario)
+        - Wrap gio.SocketListener.accept (Gian Mario)
+        - Make cancellable optional in gio.SocketClient.connect_to_host
+          (Gian Mario)
+        - Wrap gio.SocketListener.add_address (Gian Mario)
+        - Wrap gio.SocketClient.connect_to_service_async (Gian Mario)
+        - Wrap gio.SocketClient.connect_to_host_async (Gian Mario)
+        - Wrap gio.SocketClient.connect_async (Gian Mario)
+        - Wrap gio.SocketAddressEnumerator.next_async (Gian Mario)
+        - Add a missing object gio.InetSocketAddress new in GIO 2.22
+          (Gian Mario)
+        - Make cancellable optional for gio.SocketAddressEnumerator.next
+          (Gian Mario)
+        - Wrap gio.Socket.condition_wait (Gian Mario)
+        - Wrap gio.Socket.condition_check (Gian Mario)
+        - Wrap gio.Resolver.lookup_service_finish (Gian Mario)
+        - Wrap gio.Resolver.lookup_service_async (Gian Mario)
+        - Wrap gio.Resolver.lookup_service (Gian Mario)
+        - Wrap gio.Resolver.lookup_by_address_async (Gian Mario)
+        - Wrap gio.Resolver.lookup_by_name_finish (Gian Mario)
+        - Wrap gio.Drive.eject_with_data (Gian Mario)
+        - Deprecate old gio.Drive methods (Gian Mario)
+        - Wrap gio.Resolver.lookup_by_name (Gian Mario)
+        - Make cancellable optional in gio.Resolver.lookup_by_address
+          (Gian Mario)
+        - Strip g_ prefix for many other functions (Gian Mario)
+        - Strip g_ prefix from InetAddress functions (Gian Mario)
+        - Fix function name gio.resolver_get_default (Gian Mario)
+        - Wrap gio.FileIOStream.query_info_async (Gian Mario)
+        - Register enums and flags in PyGI if needed (Tomeu Vizoso, #603534)
+        - Wrap gio.IOStream.close_async (Gian Mario)
+        - Make cancellable optional in GFile.create_readwrite (Gian Mario)
+        - Remove a duplicate entry in gio.defs (Gian Mario)
+        - Wrap gio.FileInfo.set_modification_time (Gian Mario)
+        - Wrap gio.EmblemedIcon.get_emblems (Gian Mario)
+        - Update Enums and Flags with new API (Gian Mario)
+        - Fix handling of uchar in pyg_value_from_pyobject (Bastian Winkler)
+
+2.21.0 18-dec-2009
+        - pygmainloop: fix use of PySignal_WakeUpFD API for nested loops
+          (Philippe Normad, #481569)
+        - Add capabilities to import wrappers from pygi (Simon van der Linden)
+        - Move threads_init() function from 'gobject' to 'glib' (Paul)
+        - Fix wrong minimum checking in float properties (Paul, #587637)
+        - Wrap new API added in GIO 2.22 (Gian Mario)
+        - Fix bad name when rebuilding the unix source module (Gian Mario)
+        - Add the missing limit constants from glibconfig.h
+          (Tomeu Vizoso, #603244)
+        - Suppress warnings about format conversion
+          (Simon van der Linden, #603355)
+        - Properly define Connectable as interface type and not object type
+          (Gian Mario)
+        - Wrap new API added in GIO-UNIX 2.22 (Gian Mario)
+        - Wrap g_find_program_in_path (Gian Mario, #598435)
+        - Add pygi-external.h into Makefile SOURCES (Gian Mario)
+
+2.20.0 23-sep-2009
+        - Allow to use automake 1.11 (Paolo Borelli)
+        - Specify programming language in .devhelp file (Frédéric Péters)
+        - Plug reference leak of GSource in pyg_main_loop_init (Paul)
+        - Updated uninstalled.pc file (Brian Cameron)
+
+2.19.0 10-aug-2009
+        - Add macros to help with Python list to/from GList/GSList conversions.
+          (John Finlay)
+        - GIO docs practically completed (Gian)
+        - GFileInfo.list_attributes should accept None/NULL (Gian)
+        - Strip out Windows DLL API macros (John Finlay)
+        - Document that many functions got moved gobject -> glib (Paul)
+        - Allow h2def.py to work when there are tabs or multiple spaces after
+          the struct keyword. (Murray Cumming)
+        - Fix build when builddir is not the same as srcdir
+          (Theppitak Karoonboonyanan)
+        - Make gio.Emblem constructor new-style (Paul)
+        - Cleanup GIO overrides to use Python function/method names (Paul)
+        - Make codegen report errors using Python function/method names (Paul)
+        - Fix object type in gio.BufferedInputStream_fill_async (Gian)
+        - Wrap gio.BufferedInputStream.fill_async (Gian)
+        - Add gio.BufferedOutputStream which was forgotten in the types (Gian)
+        - Split overrides for gio.MemoryOutputStream (Gian)
+        - Wrap gio.memory_input_stream_new_from_data (Gian)
+        - Introduces the girepository module from the former PyBank
+          (Simon van der Linden)
+        - Add API appeared in 2.20 but not marked as such in gio docs (Gian)
+        - Wrap gio.FileOutputStream.query_info_async (Gian)
+        - Wrap gio.FileInputStream.query_async (Gian)
+        - Install executable codegen parts with executing permissions (Paul)
+        - Wrap gio.DataInputStream.read_line_async and read_until_async (Paul)
+        - Fix gio.OutputStream.splice_async (Paul)
+        - Add GIO 2.20 API and update docs (Gian)
+
+2.18.0 24-may-2009
+        - Improve gio docs with some more classes (Gian)
+        - Wrap gio.OutputStream.splice_async() (Gian)
+        - Add Python ver into installed libpyglib name (Emilio Pozuelo Monfort)
+        - Wrap gio.OutputStream.flush_async() (Gian)
+        - Use 'Requires.private' for libffi in '.pc' files (Josselin Mouette)
+        - Add wrapper for gio.FileAttributeMatcher (Gian)
+        - Mark relevant glib.IOChannel methods as METH_NOARGS (Paul)
+        - Retire hand-written ChangeLog; autocreate from Git history (Paul)
+        - Wrap gio.InputStream.skip_async() (Gian)
+        - Add in codegen -n --namespace option and the code to remove dll
+          API in headers, added documentation (Siavash Safi)
+        - Properly mark glib.get_user_special_dir() as a keywords method (Paul)
+
+2.17.0 30-apr-2009
+        - Write a good part of the docs for gio (Gian)
+        - Wrap g_mount_guess_content_type g_mount_guess_content_type_finish
+          g_mount_guess_content_type_sync (Gian, #580802)
+        - Swap first two arguments of gio.File.query_info_async (Paul, #580490)
+        - Fix a crash in pyg_type_add_interfaces (Paul, #566571)
+        - Remove an empty structure, use sizeof(PyObject)
+          instead (Paul, #560591)
+        - Wrap four g_get_user_*_dir() functions (Paul, #575999)
+        - Remove 'ltihooks.py' as using deprecated Python module (Paul)
+        - Code maintenance: add .gitignore files (Paul)
+        - CellRendererPixbuf stock-size property has wrong type (Paul, #568499)
+        - Add a doap file after git migration (Johan Dahlin)
+        - missing dep on libffi in pygobject-2.0.pc (Götz Waschk, #550231)
+        - g_volume_monitor_tp_new new function, return the singleton object.
+          (Paul, #555613)
+        - Remove a DeprecationWarning under python 2.6 (James Westby, #573753)
+        - several scripts from codegen directory are not distributed
+          (Krzesimir Nowak)
+        - g_file_copy_async change argument order to keep it consistent with the
+          other methods (Gian)
+        - memory leak in gio.File.copy_async (Paul Pogonyshev, #578870)
+        - g_file_monitor should accept None for cancellable and set the default
+          flag to G_FILE_MONITOR_NONE (Gian)
+        - pyg_notify_free needs to ensure it has GIL before calling Py_XDECREF
+          (Jonathan Matthew)
+        - Wrap g_file_set_display_name_async (Gian)
+        - Add a semi-private method to return the option context C object from
+          an option context wrapper (Tristan Hill)
+        - Converting a negative long Python value to a GUINT64 GValue doesn't
+          error out as it should (Gustavo J. A. M. Carneiro, #577999)
+        - Wrap g_file_set_attributes_async and
+          g_file_set_attributes_finish (Gian)
+        - g_file_query_filesystem_info_async fix a typo (Gian)
+        - Wrap g_file_query_filesystem_info_async (Gian)
+        - Add missing g_file_query_filesystem_info_async and
+         g_file_query_filesystem_info_finish (Gian)
+        - Wrap g_file_eject_mountable (Gian)
+        - g_file_copy callback cannot be optional (Gian)
+        - Swap various kwargs names to reflect the code (Gian)
+        - Update the address of the FSF (Tobias Mueller, #577134)
+        - Add g_volume_should_automount (Gian)
+        - Wrap g_drive_enumerate_identifiers and g_volume_enumerate_identifiers
+          (Gian)
+       - Add a couple of convinence functions to convert from/to a python list
+         and an array of strings (Gian)
+       - Allow setting pytype wrapper class (Mark Lee, John Ehresman, #559001)
+       - Wrap g_file_enumerator_close_async (Gian Mario Tagliaretti)
+
+2.16.1 22-feb-2009
+        - Apply the patch provided by Cygwin Ports maintainer
+          (Paul Pogonyshev, #564018)
+        - Bad -I ordering can break build, patch from [dmacks netspace org]
+          (Gian Mario Tagliaretti, #566737)
+        - Fix keyword list to be in sync with positional arguments
+          (Paul, #566744)
+        - Add a comment explaining why the two for loops for registering
+          interfaces (Gustavo Carneiro)
+        - Huge cleanup of GIO overrides (Paul, #566706)
+        - gtk.Buildable interface method override is not recognized
+          (Paul, #566571)
+        - Do not escape the ampersand "&" in entity references. Replace some
+          unusual entity references in the output with their literal values.
+          (Daniel Elstner, #568485)
+        - gio.InputStream.read_async can cause memory corruption.
+          (Paul, #567792)
+        - Inconsistent use of tabs and spaces in pygtk.py (Paul, #569350)
+        - Huge fix of memory leaks in GIO (Paul, Paolo Borelli, Gian, #568427)
+        - non-async functions don't release python locks before calling
+          blocking C functions (Gian, Gustavo, #556250)
+        - Change comment to avoid false positives when grep'ing for deprecated
+          gtk functions (Andre Klapper)
+        - ltihooks.py updating license header from GPL to LGPL
+          (James Henstridge)
+
+2.16.0 04-jan-2009
+        - gobject.timeout_add_seconds() not found in docs
+          (Paul Pogonyshev, #547119)
+        - _wrap_g_output_stream_write_async not adding a reference to the
+          buffer passed (Paul, #564102)
+        - gio.VolumeMonitor segfaults (Gian Mario Tagliaretti, #555613)
+        - Test if `domain' is not-null before using it to avoids segfaults
+          (Paul, #561826)
+        - g_output_stream_write_all use gsize instead of gssize (Gian)
+        - add __repr__ to gio.Drive, gio.Mount and gio.Volume
+          (Paul, #530935)
+        - Missing AC_CONFIG_MACRO_DIR([m4]) (Loïc Minier, #551227)
+        - Make codegen not import when corresponding argument types are not
+          registered (Paul, #551056)
+        - Fix typos breaking compilation (Frederic Peters #551212)
+        - GFile load_contents methods chop data at first \0
+          (Jonathan Matthew, #551059) 
+
+2.15.4 3-sep-2008
+        - Fix typo in GPointer type registration (Loïc Minier,#550463)
+        - support G_TYPE_CLOSURE in codegen (Gian)
+
+2.15.3 31-aug-2008
+        - Beginning of porting to 3.0. glib & gobject module ported.
+        - Wrap g_app_info_* functions (Gian)
+        - Wrap gio.FileAttributeInfo (Gian)
+        - Wrap g_vfs_get_supported_uri_schemes (Johan, #545846)
+        - Wrap g_file_info_get_modification_time (Johan, #545861)
+        - Wrap gio.Volume.mount/eject (Johan)
+        - Wrap gio.File.move (Johan)
+        - Wrap gio.query_writable_namespaces (Gian, #545920)
+        - Separate glib & gobject documentation
+        - Wrap GFile.append_to_async (Gian, #545959)
+        - Wrap GFile.create_async (Gian, #546020)
+        - Change return value from 'gboolean' to 'int' and changed semantics
+          to Pythonic (Paul, #544946)
+        - Wrap GFile.replace_async and query_info_async (Gian, #546046)
+        - GIcon and implementations improvements (Paul, #546135)
+        - Improve __repr__ and richcompare for gio classes (Paul)
+        - Missing Py_INCREFs for some file async methods (Jonathan Matthew, #546734)
+        - File.copy progress_callback does not work (Paul, #546591)
+        - add File.replace_contents, replace_contents_async, replace_contents_finish.
+          (Jonathan Matthew, #547067)
+        - Add GFile.query_default_handler (Gian)
+        - fix docstring line length (Jonathan Matthew, #547134)
+        - improve runtime type wrapper creation (Paul, #547104)
+        - make gio.File more Pythonic (Paul, #546120)
+        - No TypeError raised when type is None (Paul, #540376)
+        - wrap a few memory stream methods (Paul, #547354)
+        - wrap gio.DataInputStream.read_line and ...read_until (Paul, #547484)
+        - wrap four important asynchronous methods in gio.Drive and gio.Mount
+          (Paul, #547495)
+        - gio.InputStream.read() looks broken (Paul, #547494)
+        - wrap g_content_types_get_registered() (Paul, #547088)
+        - cannot create new threads when pygtk is used (Paul, #547633)
+        - an unitialized variable in PyGLib (Paul, #549351)
+        - Constructor of gtk.TreeView raises TypeError when model is None
+          (Paul, #549191)
+        - Fix memory problems reported by valgrind due to invalid tp_basicsize in
+          PyGPropsDescr_Type. (Gustavo, #549945)
+
+2.15.2 26-jul-2008
+        - New module: glib, which contains the parts of the old
+          gobject bindings which are in the glib library.
+          MainLoop/MainContext/Sources/GOption and a few others has now moved.
+        - Add a new installed library libpyglib-2.0, which contains the extension
+          API for third-part modules instead of relying on macros which accesses
+          struct fields.
+        - Add bindings for gio.File.enumerate_children_async,
+          gio.FileEnumerator.next_files_async, gio.Mount.mount,
+          gio.File.mount_mountable, gio.File.mount_enclosing_volume,
+          gio.File.unmount_mountable, gio.File.copy.
+        - Add a new api for mapping a GError domain to an exception and register
+          an exception for GIOError.
+        - Remove leading IO_* prefix for the gio flags and register a quark
+          for the domain.
+        - Use GSlice in the glib module and bump required version to 2.14.
+
+2.15.1 15-jul-2008
+        - Rename pygtk-codegen-2.0 to pygobject-codegen-2.0 to avoid
+          conflicting with PyGTK (Paul Pogonyshev)
+
+2.15.0 15-jul-2008
+        - Add GIO bindings (Johan, Mario Tagliaretti, Thomas Leonard)
+       - Move codegen from PyGTK (Johan, Paul Pogonyshev, #542821)
+       - Add more variables to the .pc files (Damien Carbery, Paul, 
+          Dan Winship, #486876)
+       - Add pyg_option_group_new to the public API (Johan)
+       - Add g_get_application_anme and g_get_progname (Sebastian Rittau)
+       - Avoid making wakeups when using Python 2.6 (Johan, Gustavo,
+         Adam Olsen, Josselin Mouette, Philippe Normand, Guido Van Rossum)
+       - Only link against libffi when found (Ed Catmur, #496006)
+       - Improve gobject.property (Tomeu Vizoso, #523352)
+       - Improve enum comparision and warnings (Paul, Phil Dumont, #428732)
+       - Many gobject.Source improvements (Bryan Silverthorn)
+       - Apply some fixes to make pylint happier (Johan, Simon Schampijer,
+         #523821)
+       - Fix error message in pyg_io_add_watch (Juha Sahkangas)
+       - Improve h2def.py (Oliver Crete, Murray Cumming, Lauro Moura)
+
+2.14.0 16-sep-2007
+       - Fix a Python 2.6 deprecation warning (Johannes Hölzl, #342948)
+       - Wrap g_timeout_add_seconds, when compiling with glib 2.14 (Gustavo)
+       - Always fully initialize the PyGObject (Ed Catmur, #466082)
+       - Fix compilation in Solaris, again (#339924, Gustavo)
+       - Fix check for default value in boolean type (Marco Giusti, #470230)
+       - Fix new style properties with subclasses (Johan Dahlin, #470718)
+       - Docs generation fixes (John Finlay)
+
+2.13.2 07-jul-2007
+       - Fix build on opensolaris (Damien Carbery, #339924)
+       - Proxy GOption exceptions from Python to C (Johannes Hölzl, #342948)
+       - Support G_TYPE_VALUE boxed args/signals
+        (Ed Catmur, Carlos Martin, #351072)
+       - pyg_error_exception_check bug fix (Sebastian Granjoux, #449879)
+       - Toggle references bug fix (#447271, Gustavo Carneiro)
+       - use python-config to get python includes (#448173, Sebastien Bacher)
+       - Support GObject properties in new properties API (Gustavo)
+       - generate-constants fixes (Muntyan)
+        - Allow running autogen.sh from outside $srcdir (Muntyan)
+
+2.13.1 02-may-2007
+        - Generic CClosure marshaller using libffi (Johan, #353816)
+       - Uninstalled .pc file (Damien Carbery, #385129)
+       - Fix leak in GFlags handling (Daniel Berrange, #428726)
+       - Use dirname in autogen (Loïc Minier, #409234)
+       - Treat None in a GValueArray as pointer/NULL (Ed Catmur, #352209)
+       - Toggle reference bug fix in tp_setattro (Gustavo, #434659)
+       - Add a simplified helper for creating properties (Johan, Gustavo, #338089)
+       - Avoid throwing an exception in GValue converter (James Livingstone,
+          Ed Catmur, #374653)
+       - Build fix in .pc file (Luca Ferretti, #435132)
+
+2.13.0 23-april-2007
+        - Release the GIL in g_object_set_property (Edward Hervey, #395048)
+        - Break PyGObject<->GObject reference cycle (Gustavo Carneiro, #320428)
+        - use static inline functions for init_pygobject (Gustavo, #419379)
+        - Wrap g_set_application_name, g_set_prgname
+          (Havoc Pennington, #415853)
+        - New pyg_gerror_exception_check API (Gustavo, #425242)
+        - New API to get/set multiple properties
+          (Gian Mario Tagliaretti, #403212)
+        - Misc. bug fixes.
+
+2.12.3 18-november-2006
+       - distutils build fixes (Cedric)
+       - documentation updates (John)
+       - gobject.handler_block_by_func and friends now accept methods 
+         (Johan, Dima, #375589)
+       - avoid truncating of gparamspec (Yevgen Muntyan, #353943)
+       - set __module__ on gobject derived types (Johan, 
+         Osmo Salomaa, #376099)
+       - Ensure exceptions are raised on errors in gobject.OptionGroup
+                (Johan, Laszlo Pandy, #364576
+
+2.12.2 3-october-2006
+       - Make PyGObject 64-bit safe for Python 2.5 (Gustavo)
+       - All headers are now LGPL and not GPL (Johan)
+       - Remove a couple of GCC warnings (Gustavo)
+       - Revive distutils support (Cedric Gustin)
+       - Emission hook reference count bugfix (Gustavo)
+       - MSVC/ANSI C compilation fix (John Ehresman)
+       - Bump Ctrl-C timeout handler from 100ms to 1000 (Johan)
+
+2.12.1 4-september-2006
+       - Corrected version check (Sebastian Dröge, #354364)
+
+2.12.0 4-september-2006
+      - Install the html files even when using --disable-docs (#353159, Johan,
+        Matthias Clasen)
+
+2.11.4 27-august-2006
+      - Include pre-generated html docs in the tarball  (Johan)
+      - Fix bug in do_set_property called from constructor (Gustavo, #353039)
+      - Fix type registration involving interfaces with signals and/or
+        properties (Gustavo)
+
+2.11.3 21-august-2006
+      - Documentation updates (John)
+      - Documentation build fixes (Johan, John, Gian Mario Tagliaretti)
+      - PyGObject can now be compiled using a C++ compiler (Murray Cumming)
+      - Type registration bug fix (Gustavo)
+
+2.11.2 8-august-2006
+      - Add fixxref.py from PyGTK (Johan)
+      - Fix parallel build (#350225, Ed Catmur)
+
+2.11.1 4-august-2006
+      - Add John Finlay's reference manual (Johan, John)
+      - Fix GOption mem leak (Gustavo)
+      - Infrastructure for lazy type registration (Johan)
+      - Enum/Flags fixes (Gustavo, John)
+      - Eliminate some GCC warnings (Johan)
+
+2.11.0 12-july-2006
+      - Add GOption support (#163645, Johannes Hölzl)
+      - GObject metaclass converted to Python code (Gustavo)
+      - Register GType constants from Python-land (Johan)
+      - Distutils updates (John Ehresman, Cedric Gustin)
+      - Add support for signal emission hooks (#154845, Johan)
+      - g_spawn_close_pid support (Gustavo)
+      - Add new APIs do add or disable log redirections (Muntyan, #323786)
+      - "sub-sub-type" bug fixed (Gustavo)
+      - Coverity report code fixes (Johan)
+      - Support retrieving signal and property info from interfaces (Finlay)
+      - Support parameters of type G_TYPE_GSTRING in signals (Gustavo)
+      - Wrap a few g_filename_* APIs (Gustavo)
+
+2.10.1 11-april-2006
+      - uint64 property bug fix (Andy Wingo)
+      - Hard code path to 2.0 (Gustavo)
+      - Allow only tuples and lists in strv to value (Gustavo)
+      - Include dsextras.py in the dist (Johan)
+
+2.10.0 13-march-2006
+      - enum/leak fix (Michael Smith)
+
+2.9.0 16-january-2006
+      - Signal accumulator support (Gustavo)
+      - GObject doc string generation improvements (Gustavo)
+      - Discover GInterfaces in runtime (Gustavo)
+      - Warn if return value in iowatch callback is not bool (Gustavo)
+      - Convert string arrays properly (Christopher Aillon)
+
+2.8.0 9-january-2006
+      - Initial release, split of from PyGTK.
+      - Updates for Python 2.5's richcompare (Manish Yosh)
+      - PyFlags bug fixes (Gustavo)
+      - Fix leak in pygobject_new_with_interfaces (Johan)
+      - Undeprecate gobject.type_register (Johan)
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644 (file)
index 0000000..bfad894
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,25 @@
+Metadata-Version: 1.0
+Name: PyGObject
+Version: 2.28.6
+Summary: Python bindings for GObject
+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/pygobject/2.28/pygobject-2.28.6.tar.gz
+Description: Python bindings for GLib, GObject and GIO
+Platform: POSIX, Windows
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Linux
+Classifier: Environment :: MacOS X
+Classifier: Environment :: Win32 (MS Windows)
+Classifier: Environment :: Unix
+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
diff --git a/PKG-INFO.in b/PKG-INFO.in
new file mode 100644 (file)
index 0000000..ac0e2e6
--- /dev/null
@@ -0,0 +1,25 @@
+Metadata-Version: 1.0
+Name: PyGObject
+Version: @VERSION@
+Summary: Python bindings for GObject
+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/pygobject/@PYGOBJECT_MAJOR_VERSION@.@PYGOBJECT_MINOR_VERSION@/pygobject-@VERSION@.tar.gz
+Description: Python bindings for GLib, GObject and GIO
+Platform: POSIX, Windows
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Linux
+Classifier: Environment :: MacOS X
+Classifier: Environment :: Win32 (MS Windows)
+Classifier: Environment :: Unix
+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
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..c5a7089
--- /dev/null
+++ b/README
@@ -0,0 +1,101 @@
+PyGObject
+=====
+Original authors:   James Henstridge <james@daa.com.au>
+                    Johan Dahlin <johan@gnome.org>
+
+Current maintainers:  Gustavo J A M Carneiro <gjc@gnome.org>
+                      Paul Pogonyshev <pogonyshev@gmx.net>
+                      Gian Mario Tagliaretti <gianmt@gnome.org>
+                      Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+
+This archive contains bindings for the GLib, GObject and GIO,
+to be used in Python. It is a fairly complete set of bindings,
+it's already rather 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=pygobject
+
+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.
+
+New Versions
+============
+
+New versions of this package can be found at:
+  http://ftp.gnome.org/pub/GNOME/sources/pygobject/
+
+
+Mailing list
+============
+
+pygobject share mailing list with 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
+  * Glib 2.22.4 or higher
+  * GIO 2.22.4 or higher
+  * GIO-unix 2.22.4 or higher
+  * libffi (optional)
+
+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
+===========
+
+PyGObject 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 PyGObject installation.
+
+Tests
+=====
+
+After having compiled and installed pygobject, 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 PyGObject, you might want to
+send a message to the mailing list (information on subscribing is
+above).  Alternatively, your question may be answered in the PyGTK FAQ:
+
+    http://www.async.com.br/faq/pygtk/?req=index
diff --git a/README.win32 b/README.win32
new file mode 100644 (file)
index 0000000..5819c8d
--- /dev/null
@@ -0,0 +1,21 @@
+Windows Setuptools Build Instructions
+======================================
+
+  1. Install gtk+ bundle from gtk.org (to C:\GTK for example)
+  2. Install Python2.6
+  3. Install MinGW and MSYS
+  4. Add the following to your msys environment variables
+     (open and append to C:\msys\1.0\etc\profile) or set for the session
+
+     $ export PATH=/c/GTK/bin:/c/Python26:/c/Python26/Scripts:$PATH
+     $ export PKG_CONFIG_PATH=/c/GTK/lib/pkgconfig:/c/Python26/Lib/pkgconfig:$PKG_CONFIG_PATH
+
+  5. In msys shell, build with
+
+     $ python setup.py build --compiler=mingw32 --enable-threading bdist_wininst --user-access-control=auto
+
+Tested with
+  * gtk+-bundle_2.20.0-20100406_win32.zip
+  * MinGW-5.16.exe
+  * MSYS-1.0.11.exe
+  * python-2.6.5.exe
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644 (file)
index 0000000..9508e3e
--- /dev/null
@@ -0,0 +1,1688 @@
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009  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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# 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,
+dnl gthread, or gio 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"
+         ;;
+         gio*) 
+             pkg_config_args="$pkg_config_args $module-2.0"
+         ;;
+      esac
+  done
+
+  PKG_PROG_PKG_CONFIG([0.16])
+
+  no_glib=""
+
+  if test "x$PKG_CONFIG" = x ; then
+    no_glib=yes
+    PKG_CONFIG=no
+  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 ()
+{
+  unsigned int major, minor, micro;
+  char *tmp_version;
+
+  fclose (fopen ("conf.glibtest", "w"));
+
+  /* HP/UX 9 (%@#!) writes to sscanf strings */
+  tmp_version = g_strdup("$min_glib_version");
+  if (sscanf(tmp_version, "%u.%u.%u", &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 (%u.%u.%u) was found.\n",
+               glib_major_version, glib_minor_version, glib_micro_version);
+        printf("*** You need a version of GLIB newer than %u.%u.%u. 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
+])
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
+# 
+# Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# 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 of the License, 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.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_default([$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+       AC_MSG_RESULT([no])
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+       m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])
+        ])
+elif test $pkg_failed = untried; then
+       AC_MSG_RESULT([no])
+       m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
+        ])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       $3
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  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.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  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.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
+# 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.
+
+# serial 4
+
+# This was merged into AC_PROG_CC in Autoconf.
+
+AU_DEFUN([AM_PROG_CC_STDC],
+[AC_PROG_CC
+AC_DIAGNOSE([obsolete], [$0:
+       your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
+       `ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
+       you adjust the code.  You can also remove the above call to
+       AC_PROG_CC if you already called it elsewhere.])
+am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
+])
+AU_DEFUN([fp_PROG_CC_STDC])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# 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.
+
+# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# 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.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 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.
+
+# serial 16
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008  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.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# 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.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer],
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# 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.
+
+# serial 6
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# 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.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006  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.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  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.
+
+# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
+# 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.
+
+# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------------------------
+# Adds support for distributing Python modules and packages.  To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable.  To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+#
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+#
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+#
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement.  MINIMUM-VERSION should consist of
+# numbers and dots only.
+AC_DEFUN([AM_PATH_PYTHON],
+ [
+  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
+  dnl supported. (2.0 was released on October 16, 2000).
+  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
+                    [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
+python2.1 python2.0])
+
+  m4_if([$1],[],[
+    dnl No version check is needed.
+    # Find any Python interpreter.
+    if test -z "$PYTHON"; then
+      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
+    fi
+    am_display_PYTHON=python
+  ], [
+    dnl A version check is needed.
+    if test -n "$PYTHON"; then
+      # If the user set $PYTHON, use it and don't search something else.
+      AC_MSG_CHECKING([whether $PYTHON version >= $1])
+      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
+                             [AC_MSG_RESULT(yes)],
+                             [AC_MSG_ERROR(too old)])
+      am_display_PYTHON=$PYTHON
+    else
+      # Otherwise, try each interpreter until we find one that satisfies
+      # VERSION.
+      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
+       [am_cv_pathless_PYTHON],[
+       for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
+         test "$am_cv_pathless_PYTHON" = none && break
+         AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+       done])
+      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+      if test "$am_cv_pathless_PYTHON" = none; then
+       PYTHON=:
+      else
+        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+      fi
+      am_display_PYTHON=$am_cv_pathless_PYTHON
+    fi
+  ])
+
+  if test "$PYTHON" = :; then
+  dnl Run any user-specified action, or abort.
+    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
+  else
+
+  dnl Query Python for its version number.  Getting [:3] seems to be
+  dnl the best way to do this; it's what "site.py" does in the standard
+  dnl library.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
+    [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
+  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+
+  dnl Use the values of $prefix and $exec_prefix for the corresponding
+  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
+  dnl distinct variables so they can be overridden if need be.  However,
+  dnl general consensus is that you shouldn't need this ability.
+
+  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
+  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
+
+  dnl At times (like when building shared libraries) you may want
+  dnl to know which OS platform Python thinks this is.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
+    [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
+  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
+
+
+  dnl Set up 4 directories:
+
+  dnl pythondir -- where to install python scripts.  This is the
+  dnl   site-packages directory, not the python standard library
+  dnl   directory like in previous automake betas.  This behavior
+  dnl   is more consistent with lispdir.m4 for example.
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
+    [am_cv_python_pythondir],
+    [if test "x$prefix" = xNONE
+     then
+       am_py_prefix=$ac_default_prefix
+     else
+       am_py_prefix=$prefix
+     fi
+     am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+     case $am_cv_python_pythondir in
+     $am_py_prefix*)
+       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
+       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
+       ;;
+     *)
+       case $am_py_prefix in
+         /usr|/System*) ;;
+         *)
+         am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
+         ;;
+       esac
+       ;;
+     esac
+    ])
+  AC_SUBST([pythondir], [$am_cv_python_pythondir])
+
+  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
+  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
+  dnl   more consistent with the rest of automake.
+
+  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+
+  dnl pyexecdir -- directory for installing python extension modules
+  dnl   (shared libraries)
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
+    [am_cv_python_pyexecdir],
+    [if test "x$exec_prefix" = xNONE
+     then
+       am_py_exec_prefix=$am_py_prefix
+     else
+       am_py_exec_prefix=$exec_prefix
+     fi
+     am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
+     echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+     case $am_cv_python_pyexecdir in
+     $am_py_exec_prefix*)
+       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
+       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
+       ;;
+     *)
+       case $am_py_exec_prefix in
+         /usr|/System*) ;;
+         *)
+          am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
+          ;;
+       esac
+       ;;
+     esac
+    ])
+  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
+  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
+
+  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+
+  dnl Run any user-specified action.
+  $2
+  fi
+
+])
+
+
+# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent (first
+# word of sys.version), in order to cope with versions such as 2.2c1.
+# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
+AC_DEFUN([AM_PYTHON_CHECK_VERSION],
+ [prog="import sys
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex)"
+  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
+
+# Copyright (C) 2001, 2003, 2005  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.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# 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.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2009  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.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001, 2003, 2005  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.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008  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.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/as-ac-expand.m4])
+m4_include([m4/jhflags.m4])
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
+m4_include([m4/python.m4])
diff --git a/codegen/Makefile.am b/codegen/Makefile.am
new file mode 100644 (file)
index 0000000..f9886eb
--- /dev/null
@@ -0,0 +1,33 @@
+PLATFORM_VERSION = 2.0
+
+bin_SCRIPTS = pygobject-codegen-$(PLATFORM_VERSION)
+
+codegendir = $(pkgdatadir)/$(PLATFORM_VERSION)/codegen
+
+codegen_SCRIPTS = \
+       code-coverage.py \
+       codegen.py \
+       createdefs.py \
+       defsconvert.py \
+       defsgen.py \
+       docextract_to_xml.py \
+       docgen.py \
+       h2def.py \
+       mergedefs.py \
+       missingdefs.py \
+       mkskel.py \
+       scanvirtuals.py \
+       scmexpr.py
+
+codegen_PYTHON = \
+       __init__.py \
+       argtypes.py \
+       definitions.py \
+       defsparser.py \
+       docextract.py \
+       override.py \
+       reversewrapper.py
+
+EXTRA_DIST = $(codegen_SCRIPTS) README.defs pygobject-codegen-$(PLATFORM_VERSION).in
+
+-include $(top_srcdir)/git.mk
diff --git a/codegen/Makefile.in b/codegen/Makefile.in
new file mode 100644 (file)
index 0000000..12a8cf9
--- /dev/null
@@ -0,0 +1,576 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = codegen
+DIST_COMMON = $(codegen_PYTHON) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(srcdir)/pygobject-codegen-2.0.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+       $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = pygobject-codegen-2.0
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(codegendir)" \
+       "$(DESTDIR)$(codegendir)"
+SCRIPTS = $(bin_SCRIPTS) $(codegen_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+py_compile = $(top_srcdir)/py-compile
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
+GI_LIBS = @GI_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PLATFORM = @PLATFORM@
+PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
+PYCAIRO_LIBS = @PYCAIRO_LIBS@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+PLATFORM_VERSION = 2.0
+bin_SCRIPTS = pygobject-codegen-$(PLATFORM_VERSION)
+codegendir = $(pkgdatadir)/$(PLATFORM_VERSION)/codegen
+codegen_SCRIPTS = \
+       code-coverage.py \
+       codegen.py \
+       createdefs.py \
+       defsconvert.py \
+       defsgen.py \
+       docextract_to_xml.py \
+       docgen.py \
+       h2def.py \
+       mergedefs.py \
+       missingdefs.py \
+       mkskel.py \
+       scanvirtuals.py \
+       scmexpr.py
+
+codegen_PYTHON = \
+       __init__.py \
+       argtypes.py \
+       definitions.py \
+       defsparser.py \
+       docextract.py \
+       override.py \
+       reversewrapper.py
+
+EXTRA_DIST = $(codegen_SCRIPTS) README.defs pygobject-codegen-$(PLATFORM_VERSION).in
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign codegen/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign 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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+pygobject-codegen-2.0: $(top_builddir)/config.status $(srcdir)/pygobject-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)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+            } \
+       ; done
+
+uninstall-binSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-codegenSCRIPTS: $(codegen_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       test -z "$(codegendir)" || $(MKDIR_P) "$(DESTDIR)$(codegendir)"
+       @list='$(codegen_SCRIPTS)'; test -n "$(codegendir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(codegendir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(codegendir)$$dir" || exit $$?; \
+            } \
+       ; done
+
+uninstall-codegenSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(codegen_SCRIPTS)'; test -n "$(codegendir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(codegendir)" && rm -f $$files
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-codegenPYTHON: $(codegen_PYTHON)
+       @$(NORMAL_INSTALL)
+       test -z "$(codegendir)" || $(MKDIR_P) "$(DESTDIR)$(codegendir)"
+       @list='$(codegen_PYTHON)'; dlist=; list2=; test -n "$(codegendir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+         if test -f $$b$$p; then \
+           $(am__strip_dir) \
+           dlist="$$dlist $$f"; \
+           list2="$$list2 $$b$$p"; \
+         else :; fi; \
+       done; \
+       for file in $$list2; do echo $$file; done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(codegendir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(codegendir)" || exit $$?; \
+       done || exit $$?; \
+       if test -n "$$dlist"; then \
+         if test -z "$(DESTDIR)"; then \
+           PYTHON=$(PYTHON) $(py_compile) --basedir "$(codegendir)" $$dlist; \
+         else \
+           PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(codegendir)" $$dlist; \
+         fi; \
+       else :; fi
+
+uninstall-codegenPYTHON:
+       @$(NORMAL_UNINSTALL)
+       @list='$(codegen_PYTHON)'; test -n "$(codegendir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       filesc=`echo "$$files" | sed 's|$$|c|'`; \
+       fileso=`echo "$$files" | sed 's|$$|o|'`; \
+       echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(codegendir)" && rm -f $$files || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$filesc ")"; \
+       cd "$(DESTDIR)$(codegendir)" && rm -f $$filesc || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$fileso ")"; \
+       cd "$(DESTDIR)$(codegendir)" && rm -f $$fileso
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$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)" "$(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:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-codegenPYTHON install-codegenSCRIPTS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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-codegenSCRIPTS
+
+.MAKE: install-am install-strip
+
+.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-codegenSCRIPTS install-data install-data-am \
+       install-dvi install-dvi-am install-exec install-exec-am \
+       install-html install-html-am install-info install-info-am \
+       install-man install-pdf install-pdf-am install-ps \
+       install-ps-am 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-codegenSCRIPTS
+
+
+-include $(top_srcdir)/git.mk
+
+# 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:
diff --git a/codegen/README.defs b/codegen/README.defs
new file mode 100644 (file)
index 0000000..5f7957e
--- /dev/null
@@ -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))
+
diff --git a/codegen/__init__.py b/codegen/__init__.py
new file mode 100644 (file)
index 0000000..86188f9
--- /dev/null
@@ -0,0 +1,16 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+__all__ = [
+    'argtypes',
+    'codegen',
+    'definitions',
+    'defsparser',
+    'docextract',
+    'docgen',
+    'h2def',
+    'defsgen'
+    'mergedefs',
+    'mkskel',
+    'override',
+    'scmexpr'
+]
diff --git a/codegen/argtypes.py b/codegen/argtypes.py
new file mode 100644 (file)
index 0000000..46e868e
--- /dev/null
@@ -0,0 +1,1043 @@
+# -*- 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 != None:
+            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] == '*':
+            decl_type = self.typename
+            ret = 'ret'
+            if ptype[:6] == 'const-':
+                decl_type = 'const ' + self.typename
+                ret = '(%s*) ret' % (self.typename,)
+            info.varlist.add(decl_type, '*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):
+        ret, props = self._get_reverse_common(ptype, self.reverse_rettypes)
+        if hasattr(ptype, 'optional') and ptype.optional:
+            if ret.supports_optional:
+                props['optional'] = True
+            else:
+                raise ArgTypeNotFoundError("Unsupported 'optional' for %s"
+                                           % (ptype,))
+        return ret, props
+
+    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)
+matcher.register('GSeekType', arg) # Hack, but we have no python wrapper
+
+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)
+matcher.register('goffset', 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())
+matcher.register_boxed("GClosure", "G_TYPE_CLOSURE")
diff --git a/codegen/code-coverage.py b/codegen/code-coverage.py
new file mode 100755 (executable)
index 0000000..1dc54c3
--- /dev/null
@@ -0,0 +1,44 @@
+#! /usr/bin/env python
+
+from __future__ import generators
+import sys, os
+
+def read_symbols(file, type=None, dynamic=0):
+    if dynamic:
+        cmd = 'nm -D %s' % file
+    else:
+        cmd = 'nm %s' % file
+    for line in os.popen(cmd, 'r'):
+        if line[0] != ' ':  # has an address as first bit of line
+            while line[0] != ' ':
+                line = line[1:]
+        while line[0] == ' ':
+            line = line[1:]
+        # we should be up to "type symbolname" now
+        sym_type = line[0]
+        symbol = line[1:].strip()
+
+        if not type or type == sym_type:
+            yield symbol
+
+def main():
+    if len(sys.argv) != 3:
+        sys.stderr.write('usage: coverage-check library.so wrapper.so\n')
+        sys.exit(1)
+    library = sys.argv[1]
+    wrapper = sys.argv[2]
+
+    # first create a dict with all referenced symbols in the wrapper
+    # should really be a set, but a dict will do ...
+    wrapper_symbols = {}
+    for symbol in read_symbols(wrapper, type='U', dynamic=1):
+        wrapper_symbols[symbol] = 1
+
+    # now go through the library looking for matches on the defined symbols:
+    for symbol in read_symbols(library, type='T', dynamic=1):
+        if symbol[0] == '_': continue
+        if symbol not in wrapper_symbols:
+            print symbol
+
+if __name__ == '__main__':
+    main()
diff --git a/codegen/codegen.py b/codegen/codegen.py
new file mode 100755 (executable)
index 0000000..008f01c
--- /dev/null
@@ -0,0 +1,1722 @@
+#! /usr/bin/env python
+
+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.py_name,
+                 'errorreturn': '-1' }
+
+    def get_initial_method_substdict(self, method):
+        substdict = { 'name': '%s.%s' % (self.objinfo.py_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 != None 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'] = meth.name
+        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
+                        props["nullok"] = param.pnull
+                        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'] = meth.name
+        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
+                        props["nullok"] = param.pnull
+                        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, importing_for in self.overrides.get_imports():
+            if importing_for is None or is_registered_object(importing_for):
+                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')
+
+        self.fp.write(
+            '#ifdef VERSION\n'
+            '    PyModule_AddStringConstant(module, "__version__", VERSION);\n'
+            '#endif\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, importing_for in imports:
+            if importing_for is None or is_registered_object(importing_for):
+                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 is_registered_object(c_name):
+    return c_name in _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))
diff --git a/codegen/createdefs.py b/codegen/createdefs.py
new file mode 100755 (executable)
index 0000000..84d50b1
--- /dev/null
@@ -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))
diff --git a/codegen/definitions.py b/codegen/definitions.py
new file mode 100644 (file)
index 0000000..bfb6faf
--- /dev/null
@@ -0,0 +1,575 @@
+# -*- 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
+
+# We currently subclass 'str' to make impact on the rest of codegen as
+# little as possible.  Later we can subclass 'object' instead, but
+# then we must find and adapt all places which expect return types to
+# be strings.
+class ReturnType(str):
+    def __new__(cls, *args, **kwds):
+        return str.__new__(cls, *args[:1])
+    def __init__(self, type_name, optional=False):
+        str.__init__(self)
+        self.optional = optional
+
+# Parameter for property based constructors
+class Property(object):
+    def __init__(self, pname, optional, argname):
+        self.pname = pname
+        self.optional = optional
+        self.argname = argname
+
+    def __len__(self): return 4
+    def __getitem__(self, i):
+        return ('', self.pname, self.optional, self.argname)[i]
+
+    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(object):
+    docstring = "NULL"
+
+    def py_name(self):
+        return '%s.%s' % (self.module, self.name)
+
+    py_name = property(py_name)
+
+    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':
+                type_name = arg[1]
+                optional = False
+                for prop in arg[2:]:
+                    if prop[0] == 'optional':
+                        optional = True
+                self.ret = ReturnType(type_name, optional)
+            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')
diff --git a/codegen/defsconvert.py b/codegen/defsconvert.py
new file mode 100755 (executable)
index 0000000..c3c2324
--- /dev/null
@@ -0,0 +1,132 @@
+#! /usr/bin/env python
+
+import sys
+import string, re
+
+# ------------------ 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)
+
+
+STATE_START = 0
+STATE_OBJECT = 1
+STATE_INTERFACE = 2
+STATE_BOXED = 3
+STATE_ENUM = 4
+STATE_FLAGS = 5
+STATE_METHOD = 6
+STATE_FUNCTION = 7
+
+def convert(infp=sys.stdin, outfp=sys.stdout):
+    state = STATE_START
+    seen_params = 0
+
+    line = infp.readline()
+    while line:
+        if line[:8] == '(object ':
+            state = STATE_OBJECT
+            seen_params = 0
+            outfp.write('(define-object ' + line[8:])
+        elif line[:11] == '(interface ':
+            state = STATE_INTERFACE
+            seen_params = 0
+            outfp.write('(define-interface ' + line[11:])
+        elif line[:7] == '(boxed ':
+            state = STATE_BOXED
+            seen_params = 0
+            outfp.write('(define-boxed ' + line[7:])
+        elif line[:6] == '(enum ':
+            state = STATE_ENUM
+            seen_params = 0
+            outfp.write('(define-enum ' + line[6:])
+        elif line[:7] == '(flags ':
+            state = STATE_FLAGS
+            seen_params = 0
+            outfp.write('(define-flags ' + line[7:])
+        elif line[:8] == '(method ':
+            state = STATE_METHOD
+            seen_params = 0
+            outfp.write('(define-method ' + line[8:])
+        elif line[:10] == '(function ':
+            state = STATE_FUNCTION
+            seen_params = 0
+            outfp.write('(define-function ' + line[10:])
+        elif line[:13] == '  (in-module ':
+            outfp.write(re.sub(r'^(\s+\(in-module\s+)(\w+)(.*)$',
+                               r'\1"\2"\3', line))
+        elif line[:10] == '  (parent ':
+            outfp.write(re.sub(r'^(\s+\(parent\s+)(\w+)(\s+\((\w+)\))?(.*)$',
+                               r'\1"\4\2"\5', line))
+        elif line[:14] == '  (implements ':
+            outfp.write(re.sub(r'^(\s+\(implements\s+)([^\s]+)(\s*\))$',
+                               r'\1"\2"\3', line))
+        elif line[:13] == '  (of-object ':
+            outfp.write(re.sub(r'^(\s+\(of-object\s+)(\w+)(\s+\((\w+)\))?(.*)$',
+                               r'\1"\4\2"\5', line))
+        elif line[:10] == '  (c-name ':
+            outfp.write(re.sub(r'^(\s+\(c-name\s+)([^\s]+)(\s*\))$',
+                               r'\1"\2"\3', line))
+            if state in (STATE_OBJECT, STATE_INTERFACE, STATE_BOXED,
+                         STATE_ENUM, STATE_FLAGS):
+                c_name = re.match(r'^\s+\(c-name\s+([^\s]+)\s*\)$',
+                                  line).group(1)
+                outfp.write('  (gtype-id "%s")\n' % typecode(c_name))
+        elif line[:15] == '  (return-type ':
+            outfp.write(re.sub(r'^(\s+\(return-type\s+)([^\s]+)(\s*\))$',
+                               r'\1"\2"\3', line))
+        elif line[:13] == '  (copy-func ':
+            outfp.write(re.sub(r'^(\s+\(copy-func\s+)(\w+)(.*)$',
+                               r'\1"\2"\3', line))
+        elif line[:16] == '  (release-func ':
+            outfp.write(re.sub(r'^(\s+\(release-func\s+)(\w+)(.*)$',
+                               r'\1"\2"\3', line))
+        elif line[:9] == '  (field ':
+            if not seen_params:
+                outfp.write('  (fields\n')
+            seen_params = 1
+            outfp.write(re.sub(r'^\s+\(field\s+\(type-and-name\s+([^\s]+)\s+([^\s]+)\s*\)\s*\)$',
+                               '    \'("\\1" "\\2")', line))
+        elif line[:9] == '  (value ':
+            if not seen_params:
+                outfp.write('  (values\n')
+            seen_params = 1
+            outfp.write(re.sub(r'^\s+\(value\s+\(name\s+([^\s]+)\)\s+\(c-name\s+([^\s]+)\s*\)\s*\)$',
+                               '    \'("\\1" "\\2")', line))
+        elif line[:13] == '  (parameter ':
+            if not seen_params:
+                outfp.write('  (parameters\n')
+            seen_params = 1
+            outfp.write(re.sub(r'^\s+\(parameter\s+\(type-and-name\s+([^\s]+)\s+([^\s]+)\s*\)(\s*.*)\)$',
+                               '    \'("\\1" "\\2"\\3)', line))
+        elif line[:11] == '  (varargs ':
+            if seen_params:
+                outfp.write('  )\n')
+            seen_params = 0
+            outfp.write('  (varargs #t)\n')
+        elif line[0] == ')':
+            if seen_params:
+                outfp.write('  )\n')
+            seen_params = 0
+            state = STATE_START
+            outfp.write(line)
+        else:
+            outfp.write(line)
+        line = infp.readline()
+
+if __name__ == '__main__':
+    convert()
diff --git a/codegen/defsgen.py b/codegen/defsgen.py
new file mode 100755 (executable)
index 0000000..6c2e63d
--- /dev/null
@@ -0,0 +1,737 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+#
+# Copyright (C) 2006-2009 John Finlay.
+#
+# Scan the given public .h files of a GTK module (or module using
+# GTK object conventions) and generates a set of scheme defs.
+#
+# defsgen uses the ctypes module to extract information from the installed
+# module library (or libraries) to generate the object, interface, function,
+# method, virtual, enum and flags defs. defsgen uses the gobject library
+# g_type_* functions. defsgen will try to open the "libgobject-2.0.so" library
+# if one is not specified on the command line.
+#
+# Basically the operation of defsgen is:
+#
+# - open and initialize the gobject and module libraries
+# - read each .h file into a buffer which is scrubbed of extraneous data
+# - find all *_get_type() functions prototypes
+# - look in the module libraries for the get_type symbols
+# - if found run the get_type() function to retrieve the GType
+# - find the parent type name and save the object info
+# - find each function prototypes in the file and check if it has a symbol in
+#   the module libraries - save the info if found
+# - extract the virtual prototypes from the Class or Iface structs and save
+# - write out the various defs.
+#
+# The command line options are:
+#
+#   -l --modulelib   Adds the given module library name to the list to be used
+#                    for finding symbols. Mor ethan one modulefile may be
+#                    specified. (required)
+#   -L --libgobject  Specifies the name of the gobject library (optional but
+#                    must be specified if "libgobject-2.0.so" is not availble)
+#   -s --separate    Create separate files for objects and function/method defs
+#                    using the given name as the base name (optional). If this
+#                    is not specified the combined object and function defs
+#                    will be output to sys.stdout.
+#   -f --defsfile    Extract defs from the given file to filter the output defs
+#                    that is don't output defs that are defined in the
+#                    defsfile. More than one deffile may be specified.
+#   -D --defines     Include portions of the defsfile defs that are conditional
+#                    on the given define, for example GDK_TARGET_X11. Only
+#                    useful with the --defsfile option
+#   -m --modulename  The prefix to be stripped from the front of function names
+#                    for the given module
+#   -p --useprefix   Use the modulename prefix as a hint to split names into
+#                    module and name for object and enum defs. Also used for
+#                    generating type codes.
+#   --onlyenums      Only produce defs for enums and flags
+#   --onlyobjdefs    Only produce defs for objects
+#   --onlyvirtuals   Only produce defs for virtuals
+#   --genpropgetsets Experimental option to generate prop-getset annotations.
+#                    Not supported by codegen.py and friends.
+#
+# Examples:
+#
+# python defsgen.py -m pango -l libpango-1.0.so \
+#            /usr/local/include/pango-1.0/pango/*.h >/tmp/pango.defs
+#
+# - Outputs all defs for the pango module.using the library module
+#   libpango-1.0.so.
+#
+# python defsgen.py -m gdk -DGDK_TARGET_X11 -l libgdk-x11-2.0.so \
+#            -l libgdk_pixbuf-2.0.so -s /tmp/gdk-2.10 \
+#            -f /usr/tmp/pygtk/gtk/gdk-base.defs \
+#            /usr/local/include/gtk-2.0/gdk/*.h \
+#            /usr/local/include/gtk-2.0/gdk-pixbuf/*.h
+#
+# - Outputs the gdk module defs that are not contained in the defs file
+#   /usr/tmp/pygtk/gtk/gdk-base.defs. Two output files are created:
+#   /tmp/gdk-2.10-types.defs and /tmp/gdk-2.10.defs.
+#
+# Based on the original h2def.py program by
+# Toby D. Reeves <toby@max.rl.plh.af.mil> and
+# 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
+# Extensively modified by John Finlay to use ctypes module to extract GType
+# info from the given library and to create virtual defines.
+#
+
+import getopt
+import os
+import re, string
+import sys
+import ctypes
+import defsparser
+
+#------------------ utility defs -----------------
+
+_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 uppercase 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 name.upper()
+
+def typecode(typename, prefix, use_prefix):
+    """create a typecode (eg. GTK_TYPE_WIDGET) from a typename"""
+    tcode = to_upper_str(typename)
+    if (use_prefix and prefix and tcode.lower() != prefix
+        and tcode.lower().startswith(prefix)):
+        l = len(prefix)
+        tcode = tcode[:l] + '_TYPE' + tcode[l:]
+    else:
+        tcode = tcode.replace('_', '_TYPE_', 1)
+    return tcode
+
+_class_iface_pat = re.compile(r'\w+(Class|Iface)')
+
+def class_iface_sub(mobj):
+    '''Returns matched string if it matches a Class or Iface struct
+    otherwise returns the empty string'''
+    if not _class_iface_pat.match(mobj.group(1)):
+        return ''
+    return mobj.group(0)
+
+clean_patterns = [
+    # strip comments
+    (re.compile(r'/\*.*?\*/', re.DOTALL), ''),
+    # compact continued lines
+    (re.compile(r"\\\n", re.MULTILINE), ''),
+    # remove preprocess directives
+    (re.compile(r"""^[#].*?$""", re.MULTILINE), ''),
+    # strip DECLS macros and Windows DLL API macros
+    (re.compile(r"""G_BEGIN_DECLS|BEGIN_LIBGTOP_DECLS|G_END_DECLS|[A-Z]+_API """,
+                re.MULTILINE), ''),
+    # remove extern "C"
+    (re.compile(r'^\s*(extern)\s+"C"\s+{', re.MULTILINE), ''),
+    # remove singleline typedefs of stucts
+    (re.compile(r'^typedef\s+struct\s*[^{;\n]*;\s*$', re.MULTILINE), ''),
+    # remove all struct definitons but those for object classes and interfaces
+    (re.compile(r'^struct\s+(\w+)\s+{[^}]+}\s*;\s*$', re.MULTILINE),
+     class_iface_sub),
+    # compress multiple whitespace
+    (re.compile(r'\s+', re.MULTILINE), ' '),
+    # clean up line ends
+    (re.compile(r';\s*', re.MULTILINE), '\n'),
+    (re.compile(r'^\s*', re.MULTILINE), ''),
+    # associate *, &, and [] with type instead of variable
+    (re.compile(r' \s* ([*|&]+) \s* ([(\w]+)', re.VERBOSE), r'\1 \2'),
+    (re.compile(r'\s+ (\w+) \[ \s* \]', re.VERBOSE), r'[] \1'),
+    # make return types that are const work.
+    (re.compile(r'\s*\*\s*G_CONST_RETURN\s*\*\s*'), '** '),
+    (re.compile(r'G_CONST_RETURN |const '), 'const-'),
+    # remove typedefs of callback types
+    (re.compile(r'^typedef\s+\w+\s*\*?\s*\(\s*\*\s*\w+\)\s*\([^(]*\)\n',
+                re.MULTILINE), ''),
+    #strip GSEAL macros from the middle of function declarations:
+    (re.compile(r"""GSEAL""", re.VERBOSE), '')
+    ]
+
+def clean_buffer(buf):
+    """Cleans out extraneous data leaving function prototypes, Class and Iface
+    structs."""
+    for pat, subst in clean_patterns:
+        buf = pat.sub(subst, buf)
+    return buf
+
+# ------------------ utility classes -------------------------
+
+class ObjDef(object):
+    def __init__(self, name, type_id, parent_name, parent_type, base_name):
+        self.name = name
+        self.type = type_id
+        self.parent_name = parent_name
+        self.parent_type = parent_type
+        self.base_name = base_name
+        self.props = []
+        return
+    def __cmp__(self, other):
+        try:
+            res = cmp(self.name, other.name)
+        except AttributeError:
+            res = cmp(id(self), id(other))
+        return res
+    def set_properties(self, gobj):
+        if self.base_name == 'GObject':
+            self.props = self._get_gobject_properties(gobj)
+        elif self.base_name == 'GInterface':
+            self.props = self._get_ginterface_properties(gobj)
+
+    def _get_gobject_properties(self, gobj):
+        klass = gobj.g_type_class_ref(self.type)
+        num = ctypes.c_uint()
+        plist = gobj.g_object_class_list_properties(klass, ctypes.byref(num))
+        props = [plist[i][0].name for i in range(num.value)
+                 if self.name == gobj.g_type_name(plist[i][0].owner_type)]
+        return props
+    def _get_ginterface_properties(self, gobj):
+        iface = gobj.g_type_default_interface_ref(self.type)
+        num = ctypes.c_uint()
+        plist = gobj.g_object_interface_list_properties(iface,
+                                                        ctypes.byref(num))
+        props = [plist[i][0].name for i in range(num.value)]
+        return props
+
+# ------------------ Find object definitions -----------------
+
+split_prefix_pat = re.compile('([A-Z]+[a-z]*)([A-Za-z0-9]+)')
+
+get_type_pat = re.compile(r'''^\s*(GType|GtkType)\s+
+([a-z]\w+_get_type)\s*(\(void\)|\(\)).*$''', re.VERBOSE | re.MULTILINE)
+
+defkeys = 'GBoxed GInterface GObject gpointer GEnum GFlags'
+
+def find_defs(buf, gobj, modlib, defs):
+    """Find possible gobject, gboxed, interface, gpointer, enum and flags
+    definitions in header files.and find parent type."""
+    #  find all *_get_type() functions that may represent a GObject
+    for m in get_type_pat.findall(buf):
+        func_name = m[1]
+        for lib in modlib:
+            if hasattr(lib, func_name):
+                objtype = apply(getattr(lib, func_name))
+                obj_name = gobj.g_type_name(objtype)
+                parent = gobj.g_type_parent(objtype)
+                parent_name = gobj.g_type_name(parent)
+                base_name = gobj.g_type_name(gobj.g_type_fundamental(parent))
+                #if gobj.g_type_is_a(parent, gobj.GObject):
+                #    base_name = 'GObject'
+                if base_name in defkeys:
+                    obj = ObjDef(obj_name, objtype, parent_name, parent,
+                                 base_name)
+                    obj.set_properties(gobj)
+                    defs[obj.base_name].append(obj)
+                break
+    return
+
+# ------------------ Find function definitions -----------------
+
+arg_split_pat = re.compile("\s*,\s*")
+
+proto_pat=re.compile(r"""^
+\s*((?:-|\w|\&|\*)+)  # return type
+\s+                   # skip whitespace
+([a-z]\w+)\s*[(]      # match the function name until the opening (
+\s*(.*?)\s*[)].*      # group the function arguments
+$""", re.IGNORECASE|re.VERBOSE|re.MULTILINE)
+
+def find_func_defs(buf, modlib, deffile, defs, verbose):
+    '''Find function prototypes in buf that have symbols in modlib
+    and save in defs.'''
+    funcs = defs['funcs'][deffile] = []
+    for m in proto_pat.findall(buf):
+        ret, func, args = m
+        if not True in [hasattr(lib, func) for lib in modlib]:
+            if verbose:
+                sys.stderr.write('no symbol for function: ' + func
+                                 + ' from file' + deffile + '\n')
+        else:
+            args = arg_split_pat.split(args)
+            args = [a.replace(' ','-', a.count(' ')-1) for a in args]
+            funcs.append((func, ret, args))
+    return
+
+virtual_pat = re.compile(r'''^
+\s*((?:-|\w|\&|\*)+)   # return type
+\s*                    # skip whitespace
+\(\s*\*\s*             # opening (
+([a-z]\w+)\)           # match the function name until the closing )
+\s*\(\s*([^)]*)\).*      # group the function arguments
+$''', re.VERBOSE|re.MULTILINE)
+
+class_iface_struct_pat = re.compile(
+    r'^struct\s+_(\w+)(?:Class|Iface)\s+{([^}]+)}\s*$', re.MULTILINE)
+
+def find_virt_defs(buf, deffile, defs):
+    '''Find virtual function prototypes in buf and save in defs.'''
+    virts = defs['virts'][deffile] = []
+    # get the Class or Iface structs
+    for m in class_iface_struct_pat.findall(buf):
+        objname, virtuals  = m
+        for v in virtual_pat.findall(virtuals):
+            ret, func, args = v
+            if 'reserved' in func or args == 'void':
+                continue
+            args = arg_split_pat.split(args)
+            args = [a.replace(' ','-', a.count(' ')-1) for a in args]
+            virts.append((func, ret, args, objname))
+    return
+
+enum_pat = re.compile(r'^\s*typedef enum\s+{\s*([^}]*)}\s*([^\s]*)$',
+                      re.MULTILINE)
+values_splitter = re.compile(r'\s*,\s', re.MULTILINE)
+
+def find_enums(buf, defs):
+    for vals, name in enum_pat.findall(buf):
+        if name != 'GdkCursorType':
+            isflags = '<<' in vals
+            entries = [val.split()[0] for val in values_splitter.split(vals)
+                       if val.strip()]
+            if entries:
+                defs['untypedenums'][name] = (isflags, entries)
+    return
+
+# ------------------ write definitions -----------------
+
+type_pat = re.compile(r'(?:const-)?([A-Za-z0-9]+)\*?\s+')
+pointer_pat = re.compile('(.*)\*$')
+func_new_pat = re.compile('(\w+)_new$')
+getset_pat = re.compile(r'^(?:get|set)_(.*)$')
+
+def split_prefix(cname, prefix, use_prefix):
+    # use the module prefix to split the cname
+    pre = prefix.replace('_', '')
+    if use_prefix and cname.lower().startswith(pre):
+        l = len(pre)
+        module = cname[:l]
+        name = cname[l:]
+    else:
+        m = split_prefix_pat.match(cname)
+        if m:
+            module = m.group(1)
+            name = m.group(2)
+    return module, name
+
+class DefsWriter:
+    def __init__(self, defs, fp=None, prefix=None, verbose=False,
+                 defsfiles=None, defines={}, genpropgetsets=False,
+                 useprefix=False):
+        self.defs = defs
+        self.use_prefix = useprefix
+        self.objnames = reduce(list.__add__,
+                               [[o.name for o in defs[base]]
+                                for base in defkeys.split()[:3]])
+        self.othernames = reduce(list.__add__,
+                                 [[o.name for o in defs[base]]
+                                  for base in defkeys.split()[3:]])
+        self.objifacedefs = dict(reduce(list.__add__,
+                                       [[(o.name, o) for o in defs[base]]
+                                        for base in defkeys.split()[1:3]]))
+        self.fp = (fp, sys.stdout)[not fp]
+        self.prefix = prefix
+        self.verbose = verbose
+        self.genpropgetsets = genpropgetsets
+        self._c_names={}
+        for defsfile in defsfiles:
+            filter = defsparser.DefsParser(defsfile, defines)
+            filter.startParsing()
+            self._c_names.update(filter.c_name)
+            for vdef in filter.virtuals:
+                self._c_names[vdef.of_object + '.' + vdef.name] = None
+        return
+
+    def write_func_defs(self, deffiles, onlyvirts=False):
+        filter = self._c_names
+        for deffile in deffiles:
+            self.fp.write('\n;; From %s\n\n' % os.path.basename(deffile))
+            if not onlyvirts:
+                for func, ret, args in self.defs['funcs'][deffile]:
+                    if not func in filter:
+                        self._write_func(func, ret, args)
+            for virt, ret, args, objname in self.defs['virts'][deffile]:
+                if not objname + '.' + virt in filter:
+                    self._write_virt(objname, virt, ret, args)
+            self.fp.write('\n')
+        return
+
+    def write_enum_defs(self, fp=None):
+        fp = (fp, self.fp)[not fp]
+        klassptrs = {'GEnum':ctypes.POINTER(EnumClass),
+                    'GFlags':ctypes.POINTER(FlagsClass)}
+        filter = self._c_names
+        objs = self.defs['GEnum'] + self.defs ['GFlags']
+        #objs.sort()
+        fp.write(';; Enumerations and Flags ...\n\n')
+        for obj in objs:
+            cname = name = obj.name
+            tcode = typecode(cname, self.prefix, self.use_prefix)
+            if cname in filter:
+                continue
+            if cname in self.defs['untypedenums']:
+                if tcode not in self.defs['typedefines']:
+                    # no type define so skip and print as untyped enum
+                    continue
+                self.defs['untypedenums'].pop(cname, None)
+            parent_name = obj.parent_name
+            klassptr = klassptrs[parent_name]
+            typename = parent_name.lower()[1:]
+            module = None
+            module, name = split_prefix(cname, self.prefix, self.use_prefix)
+            fp.write('(define-' + typename + ' ' + name + '\n')
+            if module:
+                fp.write('  (in-module "' + module + '")\n')
+            fp.write('  (c-name "' + cname + '")\n')
+            fp.write('  (gtype-id "' + tcode + '")\n')
+            fp.write('  (values\n')
+            classref = self.gobj.g_type_class_ref(obj.type)
+            itemclass = ctypes.cast(classref, klassptr).contents
+            for i in range(itemclass.n_values):
+                val = itemclass.values[i]
+                fp.write('    \'("%s" "%s")\n' % (val.value_nick,
+                                                  val.value_name))
+            fp.write('  )\n')
+            fp.write(')\n\n')
+        if self.defs['untypedenums']:
+            self.write_untyped_enum_defs(fp)
+        return
+
+    def write_untyped_enum_defs(self, fp):
+        fp.write(';; Untyped enumerations and flags ...\n\n')
+        filter = self._c_names
+        for cname, (isflags, entries) in self.defs['untypedenums'].items():
+            if filter and cname in filter: continue
+            module, name = split_prefix(cname, self.prefix, self.use_prefix)
+            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')
+            preindex = entries[0].rfind('_')
+            for ent in entries[1:]:
+                while (preindex > 0
+                       and ent[:preindex] != entries[0][:preindex]):
+                    preindex = ent[:preindex].rfind('_')
+            fp.write('  (values\n')
+            for ent in entries:
+                fp.write('    \'("%s" "%s")\n' %
+                         (ent[preindex+1:].lower().replace('_', '-'), ent))
+            fp.write('  )\n')
+            fp.write(')\n\n')
+        
+
+    def _write_obj_helper(self, obj, fp):
+        base_name = obj.base_name.lower()[1:]
+        cmodule = None
+        cname = name = obj.name
+        type_id = obj.type
+        parent_name = obj.parent_name
+        cmodule, name = split_prefix(cname, self.prefix, self.use_prefix)
+        fp.write('(define-' + base_name + ' ' + name + '\n')
+        if cmodule:
+            fp.write('  (in-module "' + cmodule + '")\n')
+        if base_name == 'object':
+            fp.write('  (parent "' + parent_name + '")\n')
+        fp.write('  (c-name "' + cname + '")\n')
+        fp.write('  (gtype-id "'
+                 + typecode(cname, self.prefix, self.use_prefix) + '")\n')
+        n = ctypes.c_uint()
+        ifaces = self.gobj.g_type_interfaces(type_id, ctypes.byref(n))
+        for i in range(n.value):
+            iface_name = self.gobj.g_type_name(ifaces[i])
+            if iface_name in self.interfaces:
+                fp.write('  (implements "%s")\n' % iface_name)
+        if base_name == 'interface':
+            prereq = self.gobj.g_type_interface_prerequisites(type_id,
+                                                              ctypes.byref(n))
+            for i in range(n.value):
+                fp.write('  (prerequisite "%s")\n'
+                         % self.gobj.g_type_name(prereq[i]))
+        # should do something about accessible fields
+        fp.write(')\n\n')
+        return
+
+    def write_obj_defs(self, fp=None):
+        fp = (fp, self.fp)[not fp]
+        fp.write(';; -*- scheme -*-\n')
+        filter = self._c_names
+        for base in defkeys.split()[:4]:
+            base_name = base.lower()[1:]
+            fp.write('; %s definitions ...\n\n' % base_name)
+            for obj in self.defs[base]:
+                if not obj.name in filter:
+                    self._write_obj_helper(obj, fp)
+        return
+
+    def _write_func(self, name, ret, args):
+        if len(args) >= 1:
+            # methods must have at least one argument
+            munged_name = name.replace('_', '')
+            m = type_pat.match(args[0])
+            if m:
+                obj = m.group(1)
+                if munged_name.startswith(obj.lower()):
+                    if obj not in self.othernames:
+                        self._write_method(obj, name, ret, args)
+                        return
+        fname = name
+        if self.prefix:
+            fname = re.sub('^'+self.prefix+'_', '', fname)
+
+        # it is either a constructor or normal function
+        self.fp.write('(define-function ' + fname + '\n')
+        self.fp.write('  (c-name "' + name + '")\n')
+
+        # Asume that a constructor function name
+        # ends with '_new' and it returns an object pointer.
+        m = func_new_pat.match(name)
+        r = pointer_pat.match(ret)
+        if m and r:
+            cname = ''
+            # get the type name by using the _get_type function
+            func = m.group(1) + '_get_type'
+            lib = [l for l in self.modlib if hasattr(l, func)]
+            if lib:
+                cname = self.gobj.g_type_name(apply(getattr(lib[0], func)))
+            if cname and self.gobj.g_type_from_name(r.group(1)):
+                self.fp.write('  (is-constructor-of "' + cname + '")\n')
+        self._write_return(ret)
+        self._write_arguments(args)
+        return
+
+    def _write_method(self, obj, name, ret, args):
+        regex = ''.join([c+'_?' for c in obj.lower()])
+        mname, count = re.subn(regex, '', name, 1)
+        if not count and self.prefix:
+            mname = re.sub('^'+self.prefix+'_', '', mname)
+        self.fp.write('(define-method ' + mname + '\n')
+        self.fp.write('  (of-object "' + obj + '")\n')
+        self.fp.write('  (c-name "' + name + '")\n')
+        m = getset_pat.match(mname)
+        if self.genpropgetsets and m and len(args[1:]) <= 1:
+            prop = m.group(1)
+            if obj in self.objifacedefs:
+                oidef = self.objifacedefs[obj]
+                if prop.replace('_', '-') in oidef.props:
+                    self.fp.write('  (prop-getset "' + prop + '")\n')
+        self._write_return(ret)
+        self._write_arguments(args[1:])
+        return
+
+    def _write_virt(self, obj, name, ret, args):
+        self.fp.write('(define-virtual ' + name + '\n')
+        self.fp.write('  (of-object "' + obj + '")\n')
+        self._write_return(ret)
+        self._write_arguments(args[1:])
+        return
+
+    def _write_return(self, ret):
+        if ret == 'void':
+            ret = 'none'
+        self.fp.write('  (return-type "' + ret + '")\n')
+        return
+
+    def _write_arguments(self, args):
+        if args and not 'void' in args:
+            varargs = ''
+            self.fp.write('  (parameters\n')
+            for arg in args:
+                if arg == '...':
+                    varargs = '  (varargs #t)\n'
+                else:
+                    tupleArg = tuple(arg.split())
+                    if len(tupleArg) == 2:
+                        self.fp.write('    \'("%s" "%s")\n' % tupleArg)
+            self.fp.write('  )\n' + varargs)
+        self.fp.write(')\n\n')
+
+# ---------- ctypes support classes for gobject library functions ----------
+
+GType = ctypes.c_uint
+
+class GTypeClass(ctypes.Structure):
+    _fields_ = [('g_type', GType)]
+
+class GTypeInstance(ctypes.Structure):
+    _fields_ = [('g_class', ctypes.POINTER(GTypeClass))]
+
+class EnumValue(ctypes.Structure):
+    _fields_ = [('value', ctypes.c_int),
+                ('value_name', ctypes.c_char_p),
+                ('value_nick', ctypes.c_char_p)]
+
+class FlagsValue(ctypes.Structure):
+    _fields_ = [('value', ctypes.c_uint),
+                ('value_name', ctypes.c_char_p),
+                ('value_nick', ctypes.c_char_p)]
+
+class EnumClass(ctypes.Structure):
+    _fields_ = [('g_type_class',  GTypeClass),
+                ('minimum', ctypes.c_int),
+                ('maximum', ctypes.c_int),
+                ('n_values', ctypes.c_uint),
+                ('values', ctypes.POINTER(EnumValue))]
+
+class FlagsClass(ctypes.Structure):
+    _fields_ = [('g_type_class', GTypeClass),
+               ('mask', ctypes.c_uint),
+               ('n_values', ctypes.c_uint),
+               ('values', ctypes.POINTER(FlagsValue))]
+
+class GTypeInterface(ctypes.Structure):
+    _fields_ = [('g_type', GType),
+                ('g_instance_type', GType)]
+
+class GParamSpec(ctypes.Structure):
+    _fields_ = [('g_type_instance', GTypeInstance),
+                ('name', ctypes.c_char_p),
+                ('flags', ctypes.c_uint),
+                ('value_type', GType),
+                ('owner_type', GType)]
+
+# ------------------ Main function -----------------
+
+def main(args):
+    verbose = False
+    all = True
+    onlyenums = False
+    onlyobjdefs = False
+    onlyvirtuals = False
+    separate = False
+    modulename = None
+    defsfiles = []
+    libgobject = None
+    modulelibs = []
+    defines = {}
+    genpropgetsets = False
+    use_prefix = False
+    opts, args = getopt.getopt(args[1:], 'vs:m:f:D:L:l:p',
+                               ['onlyenums', 'onlyobjdefs', 'onlyvirtuals',
+                                'modulename=', 'separate=',
+                                'defsfile=', 'defines=', 'genpropgetsets',
+                                'libgobject-', 'modulelib=', 'useprefix'])
+    for o, v in opts:
+        if o == '-v':
+            verbose = True
+        if o == '--onlyenums':
+            onlyenums = True
+            all = False
+        if o == '--onlyvirtuals':
+            onlyvirtuals = True
+            all = False
+        if o == '--onlyobjdefs':
+            onlyobjdefs = True
+            all = False
+        if o in ('-p', '--useprefix'):
+            use_prefix = True
+        if o == '--genpropgetsets':
+            genpropgetsets = True
+        if o in ('-s', '--separate'):
+            separate = v
+        if o in ('-m', '--modulename'):
+            modulename = v
+        if o in ('-L', '--libgobject'):
+            libgobject = v
+        if o in ('-l', '--modulelib'):
+            modulelibs.append(v)
+        if o in ('-f', '--defsfile'):
+            defsfiles.append(v)
+        if o in ('-D', '--defines'):
+            nameval = v.split('=')
+            try:
+                defines[nameval[0]] = nameval[1]
+            except IndexError:
+                defines[nameval[0]] = None
+
+    if not args[0:1]:
+        print 'Must specify at least one input file name'
+        return -1
+    if not modulelibs:
+        print 'Must specify one or more modulelib names'
+        return -1
+
+    # load the gobject and module libraries and init the gtype system
+    if not libgobject:
+        if verbose:
+            sys.stderr.write('Using "libgobject-2.0.so" as the libobject' \
+                             'library name by default\n')
+        gobj = ctypes.cdll.LoadLibrary('libgobject-2.0.so')
+    else:
+        gobj = ctypes.cdll.LoadLibrary(libgobject)
+
+    modlib = [ctypes.cdll.LoadLibrary(lib) for lib in modulelibs]
+
+    gobj.g_type_init()
+    gobj.g_type_name.restype = ctypes.c_char_p
+    gobj.g_type_from_name.argtypes = [ctypes.c_char_p]
+    gobj.g_type_interfaces.restype = ctypes.POINTER(ctypes.c_int)
+    gobj.g_type_interface_prerequisites.restype = ctypes.POINTER(ctypes.c_int)
+    gobj.g_object_class_list_properties.restype = ctypes.POINTER(ctypes.POINTER(GParamSpec))
+    gobj.g_object_interface_list_properties.restype = ctypes.POINTER(ctypes.POINTER(GParamSpec))
+    gobj.GObject = gobj.g_type_from_name('GObject')
+    gobj.g_object_new(gobj.GObject, None)
+
+    defs = {}
+    for key in defkeys.split():
+        defs[key] = []
+    defs['funcs'] = {}
+    defs['virts'] = {}
+    defs['untypedenums'] = {}
+    defs['typedefines'] = []
+
+    # read in all the object and function definitions
+    args.sort()
+    type_define_pat = re.compile(
+        r'^#define\s+([A-Z]\S+_TYPE_\S+)\s+.*[a-z]\w+_get_type.*$',
+        re.MULTILINE)
+    for filename in args:
+        buf = open(filename).read()
+        defs['typedefines'] += type_define_pat.findall(buf)
+        buf = clean_buffer(buf)
+        find_enums(buf, defs)
+        find_defs(buf, gobj, modlib, defs)
+        find_func_defs(buf, modlib, filename, defs, verbose)
+        find_virt_defs(buf, filename, defs)
+
+    for key in defkeys.split():
+        defs[key].sort()
+
+    methods = types = None
+    if separate:
+        methods = file(separate + '.defs', 'w')
+        types = file(separate + '-types.defs', 'w')
+
+    dw = DefsWriter(defs, methods, prefix=modulename, verbose=verbose,
+                    defsfiles=defsfiles, defines=defines,
+                    genpropgetsets=genpropgetsets, useprefix=use_prefix)
+    dw.interfaces = [i.name for i in defs['GInterface']]
+    dw.gobj = gobj
+    dw.modlib = modlib
+
+    if onlyobjdefs or all:
+        dw.write_obj_defs(types)
+        if separate:
+            print "Wrote object defs to %s-types.defs" % separate
+    if onlyenums or all:
+        dw.write_enum_defs(types)
+        if separate:
+            print "Wrote enum and flags defs to %s-types.defs" % separate
+    if onlyvirtuals or all:
+        dw.write_func_defs(args, onlyvirtuals)
+        if separate:
+            print "Wrote function and virtual defs to %s.defs" % separate
+
+if __name__ == '__main__':
+    sys.exit(main(sys.argv))
diff --git a/codegen/defsparser.py b/codegen/defsparser.py
new file mode 100644 (file)
index 0000000..37ba0a2
--- /dev/null
@@ -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)
diff --git a/codegen/docextract.py b/codegen/docextract.py
new file mode 100644 (file)
index 0000000..eff8c5e
--- /dev/null
@@ -0,0 +1,448 @@
+# -*- 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 GtkDoc:
+    def __init__(self):
+        self.name = None
+        self.block_type = '' # The block type ('function', 'signal', 'property')
+        self.params = []
+        self.annotations = []
+        self.description = ''
+        self.ret = ('', []) # (return, annotations)
+    def set_name(self, name):
+        self.name = name
+    def set_type(self, block_type):
+        self.block_type = block_type
+    def get_type(self):
+        return self.block_type
+    def add_param(self, name, description, annotations=[]):
+        if name == '...':
+            name = 'Varargs'
+        self.params.append((name, description, annotations))
+    def append_to_last_param(self, extra):
+        self.params[-1] = (self.params[-1][0], self.params[-1][1] + extra,
+            self.params[-1][2])
+    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,
+                    self.params[i][2])
+                return
+        # fall through to adding extra parameter ...
+        self.add_param(name, extra)
+    def add_annotation(self, annotation):
+        self.annotations.append(annotation)
+    def get_annotations(self):
+        return self.annotations
+    def append_to_description(self, extra):
+        self.description = self.description + extra
+    def get_description(self):
+        return self.description
+    def add_return(self, first_line, annotations=[]):
+        self.ret = (first_line, annotations)
+    def append_to_return(self, extra):
+        self.ret = (self.ret[0] + extra, self.ret[1])
+
+comment_start_pattern = re.compile(r'^\s*/\*\*\s')
+comment_end_pattern = re.compile(r'^\s*\*+/')
+comment_line_lead_pattern = re.compile(r'^\s*\*\s*')
+comment_empty_line_pattern = re.compile(r'^\s*\**\s*$')
+function_name_pattern = re.compile(r'^([a-z]\w*)\s*:?(\s*\(.*\)\s*){0,2}\s*$')
+signal_name_pattern = re.compile(r'^([A-Z]\w+::[a-z0-9-]+)\s*:?(\s*\(.*\)\s*){0,2}\s*$')
+property_name_pattern = re.compile(r'^([A-Z]\w+:[a-z0-9-]+)\s*:?(\s*\(.*\)\s*){0,2}\s*$')
+return_pattern = re.compile(r'^@?(returns:|return\s+value:)(.*\n?)$', re.IGNORECASE)
+deprecated_pattern = re.compile(r'^(deprecated\s*:\s*.*\n?)$', re.IGNORECASE)
+rename_to_pattern = re.compile(r'^(rename\s+to)\s*:\s*(.*\n?)$', re.IGNORECASE)
+param_pattern = re.compile(r'^@(\S+)\s*:(.*\n?)$')
+# Used to extract the annotations in the parameter and return descriptions
+# extracted using above [param|return]_pattern patterns.
+annotations_pattern = re.compile(r'^(?:(\s*\(.*\)\s*)*:)')
+# Used to construct the annotation lists.
+annotation_lead_pattern = re.compile(r'^\s*\(\s*(.*?)\s*\)\s*')
+
+# These patterns determine the identifier of the current comment block.  They
+# are grouped in a list for easy determination of block identifiers (in
+# skip_to_identifier).  The function_name_pattern should be tested for last
+# because it always matches signal and property identifiers.
+identifier_patterns = [ signal_name_pattern, property_name_pattern, function_name_pattern ]
+
+# This pattern is to match return sections that forget to have a colon (':')
+# after the initial 'Return' phrase.  It is not included by default in the list
+# of final sections below because a lot of function descriptions begin with
+# 'Returns ...' and the process_description() function would stop right at that
+# first line, thinking it is a return section.
+no_colon_return_pattern = re.compile(r'^@?(returns|return\s+value)\s*(.*\n?)$', re.IGNORECASE)
+since_pattern = re.compile(r'^(since\s*:\s*.*\n?)$', re.IGNORECASE)
+
+# These patterns normally will be encountered after the description.  Knowing
+# the order of their appearance is difficult so this list is used to test when
+# one begins and the other ends when processing the rest of the sections after
+# the description.
+final_section_patterns = [ return_pattern, since_pattern, deprecated_pattern, rename_to_pattern ]
+
+def parse_file(fp, doc_dict):
+    line = fp.readline()
+    while line:
+        cur_doc = GtkDoc()
+        line = skip_to_comment_block(fp, line)
+        line = skip_to_identifier(fp, line, cur_doc)
+        # See if the identifier is found (stored in the current GtkDoc by
+        # skip_to_identifier).  If so, continue reading the rest of the comment
+        # block.
+        if cur_doc.name:
+            line = process_params(fp, line, cur_doc)
+            line = process_description(fp, line, cur_doc)
+            line = process_final_sections(fp, line, cur_doc)
+            # Add the current doc block to the dictionary of doc blocks.
+            doc_dict[cur_doc.name] = cur_doc
+
+# Given a list of annotations as string of the form 
+# '(annotation1) (annotation2) ...' return a list of annotations of the form
+# [ (name1, value1), (name2, value2) ... ].  Not all annotations have values so
+# the values in the list of tuples could be empty ('').
+def get_annotation_list(annotations):
+    annotation_list = []
+    while annotations:
+        match = annotation_lead_pattern.match(annotations)
+        if match:
+            annotation_contents = match.group(1)
+            name, split, value = annotation_contents.strip().partition(' ')
+            annotation_list.append((name, value))
+            # Remove first occurrence to continue processing.
+            annotations = annotation_lead_pattern.sub('', annotations)
+        else:
+            break
+    return annotation_list
+
+# Given a currently read line, test that line and continue reading until the
+# beginning of a comment block is found or eof is reached.  Return the last
+# read line.
+def skip_to_comment_block(fp, line):
+    while line:
+        if comment_start_pattern.match(line):
+            break
+        line = fp.readline()
+    return line
+
+# Given the current line in a comment block, continue skipping lines until a
+# non-blank line in the comment block is found or until the end of the block
+# (or eof) is reached.  Returns the line where reading stopped.
+def skip_to_nonblank(fp, line):
+    while line:
+        if not comment_empty_line_pattern.match(line):
+            break
+        line = fp.readline()
+        # Stop processing if eof or end of comment block is reached.
+        if not line or comment_end_pattern.match(line):
+            break
+    return line
+
+# Given the first line of a comment block (the '/**'), see if the next
+# non-blank line is the identifier of the comment block.  Stop processing if
+# the end of the block or eof is reached.  Store the identifier (if there is
+# one) and its type ('function', 'signal' or 'property') in the given GtkDoc.
+# Return the line where the identifier is found or the line that stops the
+# processing (if eof or the end of the comment block is found first).
+def skip_to_identifier(fp, line, cur_doc):
+    # Skip the initial comment block line ('/**') if not eof.
+    if line: line = fp.readline()
+
+    # Now skip empty lines.
+    line = skip_to_nonblank(fp, line)
+
+    # See if the first non-blank line is the identifier.
+    if line and not comment_end_pattern.match(line):
+        # Remove the initial ' * ' in comment block line and see if there is an
+        # identifier.
+        line = comment_line_lead_pattern.sub('', line)
+        for pattern in identifier_patterns:
+            match = pattern.match(line)
+            if match:
+                # Set the GtkDoc name.
+                cur_doc.set_name(match.group(1))
+                # Get annotations and add them to the GtkDoc.
+                annotations = get_annotation_list(match.group(2))
+                for annotation in annotations:
+                    cur_doc.add_annotation(annotation)
+                # Set the GtkDoc type.
+                if pattern == signal_name_pattern:
+                    cur_doc.set_type('signal')
+                elif pattern == property_name_pattern:
+                    cur_doc.set_type('property')
+                elif pattern == function_name_pattern:
+                    cur_doc.set_type('function')
+                return line
+    return line
+
+# Given a currently read line (presumably the identifier line), read the next
+# lines, testing to see if the lines are part of parameter descriptions.  If
+# so, store the parameter descriptions in the given doc block.  Stop on eof and
+# return the last line that stops the processing.
+def process_params(fp, line, cur_doc):
+    # Skip the identifier line if not eof.  Also skip any blank lines in the
+    # comment block.  Return if eof or the end of the comment block are
+    # encountered.
+    if line: line = fp.readline()
+    line = skip_to_nonblank(fp, line)
+    if not line or comment_end_pattern.match(line):
+        return line
+
+    # Remove initial ' * ' in first non-empty comment block line.
+    line = comment_line_lead_pattern.sub('', line)
+
+    # Now process possible parameters as long as no eof or the end of the
+    # param section is not reached (which could be triggered by anything that
+    # doesn't match a '@param:..." line, even the end of the comment block).
+    match = param_pattern.match(line)
+    while line and match:
+        description = match.group(2)
+
+        # First extract the annotations from the description and save them.
+        annotations = []
+        annotation_match = annotations_pattern.match(description)
+        if annotation_match:
+            annotations = get_annotation_list(annotation_match.group(1))
+            # Remove the annotations from the description
+            description = annotations_pattern.sub('', description)
+
+        # Default to appending lines to current parameter.
+        append_func = cur_doc.append_to_last_param
+
+        # See if the return has been included as part of the parameter
+        # section and make sure that lines are added to the GtkDoc return if
+        # so.
+        if match.group(1).lower() == "returns":
+            cur_doc.add_return(description, annotations)
+            append_func = cur_doc.append_to_return
+        # If not, just add it as a regular parameter.
+        else:
+            cur_doc.add_param(match.group(1), description, annotations)
+
+        # Now read lines and append them until next parameter, beginning of
+        # description (an empty line), the end of the comment block or eof.
+        line = fp.readline()
+        while line:
+            # Stop processing if end of comment block or a blank comment line
+            # is encountered.
+            if comment_empty_line_pattern.match(line) or \
+                    comment_end_pattern.match(line):
+                break
+
+            # Remove initial ' * ' in comment block line.
+            line = comment_line_lead_pattern.sub('', line)
+
+            # Break from current param processing if a new one is
+            # encountered.
+            if param_pattern.match(line): break;
+
+            # Otherwise, just append the current line and get the next line.
+            append_func(line)
+            line = fp.readline()
+
+        # Re-evaluate match for while condition
+        match = param_pattern.match(line)
+
+    # End by returning the current line.
+    return line
+
+# Having processed parameters, read the following lines into the description of
+# the current doc block until the end of the comment block, the end of file or
+# a return section is encountered.
+def process_description(fp, line, cur_doc):
+    # First skip empty lines returning on eof or end of comment block.
+    line = skip_to_nonblank(fp, line)
+    if not line or comment_end_pattern.match(line):
+        return line
+
+    # Remove initial ' * ' in non-empty comment block line.
+    line = comment_line_lead_pattern.sub('', line)
+
+    # Also remove possible 'Description:' prefix.
+    if line[:12] == 'Description:': line = line[12:]
+
+    # Used to tell if the previous line was blank and a return section
+    # uncommonly marked with 'Returns ...' instead of 'Returns: ...'  has
+    # started (assume it is non-empty to begin with).
+    prev_line = 'non-empty'
+
+    # Now read lines until a new section (like a return or a since section) is
+    # encountered.
+    while line:
+        # See if the description section has ended (if the line begins with
+        # 'Returns ...' and the previous line was empty -- this loop replaces
+        # empty lines with a newline).
+        if no_colon_return_pattern.match(line) and prev_line == '\n':
+            return line
+        # Or if one of the patterns of the final sections match
+        for pattern in final_section_patterns:
+            if pattern.match(line):
+                return line
+
+        # If not, append lines to description in the doc comment block.
+        cur_doc.append_to_description(line)
+
+        prev_line = line
+        line = fp.readline()
+
+        # Stop processing on eof or at the end of comment block.
+        if not line or comment_end_pattern.match(line):
+            return line
+
+        # Remove initial ' * ' in line so that the text can be appended to the
+        # description of the comment block and make sure that if the line is
+        # empty it be interpreted as a newline.
+        line = comment_line_lead_pattern.sub('', line)
+        if not line: line = '\n'
+
+# Given the line that ended the description (the first line of one of the final
+# sections) process the final sections ('Returns:', 'Since:', etc.) until the
+# end of the comment block or eof.  Return the line that ends the processing.
+def process_final_sections(fp, line, cur_doc):
+    while line and not comment_end_pattern.match(line):
+        # Remove leading ' * ' from current non-empty comment line.
+        line = comment_line_lead_pattern.sub('', line)
+        # Temporarily append the no colon return pattern to the final section
+        # patterns now that the description has been processed.  It will be
+        # removed after the for loop below executes so that future descriptions
+        # that begin with 'Returns ...' are not interpreted as a return
+        # section.
+        final_section_patterns.append(no_colon_return_pattern)
+        for pattern in final_section_patterns:
+            match = pattern.match(line)
+            if match:
+                if pattern == return_pattern or \
+                        pattern == no_colon_return_pattern:
+                    # Dealing with a 'Returns:' so first extract the
+                    # annotations from the description and save them.
+                    description = match.group(2)
+                    annotations = []
+                    annotation_match = \
+                            annotations_pattern.match(description)
+                    if annotation_match:
+                        annotations = \
+                                get_annotation_list(annotation_match.group(1))
+                        # Remove the annotations from the description
+                        description = annotations_pattern.sub('', description)
+
+                    # Now add the return.
+                    cur_doc.add_return(description, annotations)
+                    # In case more lines need to be appended.
+                    append_func = cur_doc.append_to_return
+                elif pattern == rename_to_pattern:
+                    # Dealing with a 'Rename to:' section (GObjectIntrospection
+                    # annotation) so no further lines will be appended but this
+                    # single one (and only to the annotations).
+                    append_func = None
+                    cur_doc.add_annotation((match.group(1),
+                            match.group(2)))
+                else:
+                    # For all others ('Since:' and 'Deprecated:') just append
+                    # the line to the description for now.
+                    cur_doc.append_to_description(line)
+                    # In case more lines need to be appended.
+                    append_func = cur_doc.append_to_description
+
+                # Stop final section pattern matching for loop since a match
+                # has already been found.
+                break
+
+        # Remove the no colon return pattern (which was temporarily added in
+        # the just executed loop) from the list of final section patterns.
+        final_section_patterns.pop()
+
+        line = fp.readline()
+
+        # Now continue appending lines to current section until a new one is
+        # found or an eof or the end of the comment block is encountered.
+        finished = False
+        while not finished and line and \
+                not comment_end_pattern.match(line):
+            # Remove leading ' * ' from line and make sure that if it is empty,
+            # it be interpreted as a newline.
+            line = comment_line_lead_pattern.sub('', line)
+            if not line: line = '\n'
+
+            for pattern in final_section_patterns:
+                if pattern.match(line):
+                    finished = True
+                    break
+
+            # Break out of loop if a new section is found (determined in above
+            # inner loop).
+            if finished: break
+
+            # Now it's safe to append line.
+            if append_func: append_func(line)
+
+            # Get the next line to continue processing.
+            line = fp.readline()
+
+    return line
+
+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':
+            sys.stderr.write("Processing " + path + '\n')
+            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_pattern = re.compile(r'^<!-- ##### (\w+) (\w+) ##### -->$')
+def parse_tmpl(fp, doc_dict):
+    cur_doc = None
+
+    line = fp.readline()
+    while line:
+        match = tmpl_section_pattern.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 = GtkDoc()
+                    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_to_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_to_description(line)
+            else:
+                cur_doc.append_to_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
diff --git a/codegen/docextract_to_xml.py b/codegen/docextract_to_xml.py
new file mode 100755 (executable)
index 0000000..f41c839
--- /dev/null
@@ -0,0 +1,139 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+#
+# This litte script outputs the C doc comments to an XML format.
+# So far it's only used by gtkmm (The C++ bindings). Murray Cumming.
+# Usage example:
+# # ./docextract_to_xml.py -s /gnome/head/cvs/gtk+/gtk/ -s /gnome/head/cvs/gtk+/docs/reference/gtk/tmpl/ > gtk_docs.xml
+
+import getopt
+import re
+import string
+import sys
+
+import docextract
+
+def usage():
+    sys.stderr.write('usage: docextract_to_xml.py ' +
+        '[-s /src/dir | --source-dir=/src/dir] ' +
+        '[-a | --with-annotations] [-p | --with-properties] ' +
+        '[-i | --with-signals ]\n')
+    sys.exit(1)
+
+# Translates special texts to &... HTML acceptable format.  Also replace
+# occurrences of '/*' and '*/' with '/ *' and '* /' respectively to avoid
+# comment errors (note the spaces).  Some function descriptions include C++
+# multi-line comments which cause errors when the description is included in a
+# C++ Doxygen comment block.
+def escape_text(unescaped_text):
+    # Escape every "&" not part of an entity reference
+    escaped_text = re.sub(r'&(?![A-Za-z]+;)', '&amp;', unescaped_text)
+
+    # These weird entities turn up in the output...
+    escaped_text = string.replace(escaped_text, '&mdash;', '&#8212;')
+    escaped_text = string.replace(escaped_text, '&ast;', '*')
+    escaped_text = string.replace(escaped_text, '&percnt;', '%')
+    escaped_text = string.replace(escaped_text, '&commat;', '@')
+    escaped_text = string.replace(escaped_text, '&num;', '&#35;')
+    escaped_text = string.replace(escaped_text, '&nbsp;', '&#160;')
+    # This represents a '/' before or after an '*' so replace with slash but
+    # with spaces.
+    escaped_text = string.replace(escaped_text, '&sol;', ' / ')
+
+    # Escape for both tag contents and attribute values
+    escaped_text = string.replace(escaped_text, '<', '&lt;')
+    escaped_text = string.replace(escaped_text, '>', '&gt;')
+    escaped_text = string.replace(escaped_text, '"', '&quot;')
+
+    # Replace C++ comment begin and ends to ones that don't affect Doxygen.
+    escaped_text = string.replace(escaped_text, '/*', '/ *')
+    escaped_text = string.replace(escaped_text, '*/', '* /')
+
+    return escaped_text
+
+def print_annotations(annotations):
+    for annotation in annotations:
+        print "<annotation name=" + annotation[0] +  ">" + \
+                escape_text(annotation[1]) + "</annotation>"
+
+if __name__ == '__main__':
+    try:
+        opts, args = getopt.getopt(sys.argv[1:], "d:s:o:api",
+                                   ["source-dir=", "with-annotations",
+                                     "with-properties", "with-signals"])
+    except getopt.error, e:
+        sys.stderr.write('docextract_to_xml.py: %s\n' % e)
+        usage()
+    source_dirs = []
+    with_annotations = False
+    with_signals = False
+    with_properties = False
+    for opt, arg in opts:
+        if opt in ('-s', '--source-dir'):
+            source_dirs.append(arg)
+        if opt in ('-a', '--with-annotations'):
+            with_annotations = True
+        if opt in ('-p', '--with-properties'):
+            with_properties = True
+        if opt in ('-i', '--with-signals'):
+            with_signals = True
+    if len(args) != 0:
+        usage()
+
+    docs = docextract.extract(source_dirs);
+    docextract.extract_tmpl(source_dirs, docs); #Try the tmpl sgml files too.
+
+    # print d.docs
+
+    if docs:
+
+        print "<root>"
+
+        for name, value in sorted(docs.items()):
+            # Get the type of comment block ('function', 'signal' or
+            # 'property') (the value is a GtkDoc).
+            block_type = value.get_type()
+
+            # Skip signals if the option was not specified.
+            if block_type == 'signal' and not with_signals:
+                continue
+            # Likewise for properties.
+            elif block_type == 'property' and not with_properties:
+                continue
+
+            print "<" + block_type + " name=\"" + escape_text(name) + "\">"
+
+            print "<description>"
+            print escape_text(value.get_description())
+            print "</description>"
+
+            # Loop through the parameters if not dealing with a property:
+            if block_type != 'property':
+                print "<parameters>"
+                for name, description, annotations in value.params:
+                        print "<parameter name=\"" + escape_text(name) + "\">"
+                        print "<parameter_description>" + escape_text(description) + "</parameter_description>"
+
+                        if with_annotations:
+                            print_annotations(annotations)
+
+                        print "</parameter>"
+
+                print "</parameters>"
+
+                # Show the return-type (also if not dealing with a property):
+                if with_annotations:
+                    print "<return>"
+                    print "<return_description>" + escape_text(value.ret[0]) + \
+                            "</return_description>"
+                    print_annotations(value.ret[1])
+                    print "</return>"
+                else:
+                    print "<return>" + escape_text(value.ret[0]) + "</return>"
+
+            if with_annotations:
+                print_annotations(value.get_annotations())
+
+            print "</" + block_type + ">\n"
+
+        print "</root>"
diff --git a/codegen/docgen.py b/codegen/docgen.py
new file mode 100755 (executable)
index 0000000..b9e2f67
--- /dev/null
@@ -0,0 +1,766 @@
+#!/usr/bin/env python
+import getopt
+import os
+import re
+import sys
+
+import definitions
+import defsparser
+import docextract
+import override
+
+
+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_name = obj_def.parent
+        if parent_name == 'GObject':
+            parent_name = None
+        parent_node = nodes[parent_name]
+        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):
+        self._fp = None
+        # 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 + self.parser.interfaces +
+                    self.parser.boxes + self.parser.pointers):
+            if not obj.c_name in self.classmap:
+                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)
+        self._fp = open(filename, 'w')
+        self.write_full_hierarchy(hierarchy)
+        self._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)
+            self._fp = open(filename, 'w')
+            if isinstance(obj_def, definitions.ObjectDef):
+                self.output_object_docs(obj_def)
+            elif isinstance(obj_def, definitions.InterfaceDef):
+                self.output_interface_docs(obj_def)
+            elif isinstance(obj_def, definitions.BoxedDef):
+                self.output_boxed_docs(obj_def)
+            elif isinstance(obj_def, definitions.PointerDef):
+                self.output_boxed_docs(obj_def)
+            self._fp.close()
+            files[os.path.basename(filename)] = obj_def
+
+        if not files:
+            return
+
+        output_filename = self.create_toc_filename(output_prefix)
+        self._fp = open(output_filename, 'w')
+        self.output_toc(files)
+        self._fp.close()
+
+    def output_object_docs(self, obj_def):
+        self.write_class_header(obj_def.c_name)
+
+        self.write_heading('Synopsis')
+        self.write_synopsis(obj_def)
+        self.close_section()
+
+        # 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')
+        self.write_hierarchy(obj_def.c_name, ancestry)
+        self.close_section()
+
+        constructor = self.parser.find_constructor(obj_def, self.overrides)
+        if constructor:
+            self.write_heading('Constructor')
+            self.write_constructor(constructor,
+                                   self.docs.get(constructor.c_name, None))
+            self.close_section()
+
+        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')
+            for method in methods:
+                self.write_method(method, self.docs.get(method.c_name, None))
+            self.close_section()
+
+        self.write_class_footer(obj_def.c_name)
+
+    def get_methods_for_object(self, obj_def):
+        methods = []
+        for method in self.parser.find_methods(obj_def):
+            if not self.overrides.is_ignored(method.c_name):
+                methods.append(method)
+        return methods
+
+    def output_interface_docs(self, int_def):
+        self.write_class_header(int_def.c_name)
+
+        self.write_heading('Synopsis')
+        self.write_synopsis(int_def)
+        self.close_section()
+
+        methods = self.get_methods_for_object(int_def)
+        if methods:
+            self.write_heading('Methods')
+            for method in methods:
+                self.write_method(method, self.docs.get(method.c_name, None))
+            self.close_section()
+        self.write_class_footer(int_def.c_name)
+
+    def output_boxed_docs(self, box_def):
+        self.write_class_header(box_def.c_name)
+
+        self.write_heading('Synopsis')
+        self.write_synopsis(box_def)
+        self.close_section()
+
+        constructor = self.parser.find_constructor(box_def, self.overrides)
+        if constructor:
+            self.write_heading('Constructor')
+            self.write_constructor(constructor,
+                                   self.docs.get(constructor.c_name, None))
+            self.close_section()
+
+        methods = self.get_methods_for_object(box_def)
+        if methods:
+            self.write_heading('Methods')
+            for method in methods:
+                self.write_method(method, self.docs.get(method.c_name, None))
+            self.close_section()
+
+        self.write_class_footer(box_def.c_name)
+
+    def output_toc(self, files):
+        self._fp.write('TOC\n\n')
+        for filename in sorted(files):
+            obj_def = files[filename]
+            self._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 + '-' + obj_name.lower() + '.txt'
+
+    def create_toc_filename(self, output_prefix):
+        return self.create_filename(self, 'docs', output_prefix)
+
+    def write_full_hierarchy(self, hierarchy):
+
+        def handle_node(node, indent=''):
+            for child in node.subclasses:
+                self._fp.write(indent + node.name)
+                if node.interfaces:
+                    self._fp.write(' (implements ')
+                    self._fp.write(', '.join(node.interfaces))
+                    self._fp.write(')\n')
+                else:
+                    self._fp.write('\n')
+                handle_node(child, indent + '  ')
+        handle_node(hierarchy)
+
+    def serialize_params(self, func_def):
+        params = []
+        for param in func_def.params:
+            params.append(param[1])
+        return ', '.join(params)
+
+    # these need to handle default args ...
+
+    def create_constructor_prototype(self, func_def):
+        return '%s(%s)' % (func_def.is_constructor_of,
+                           self.serialize_params(func_def))
+
+    def create_function_prototype(self, func_def):
+        return '%s(%s)' % (func_def.name,
+                           self.serialize_params(func_def))
+
+    def create_method_prototype(self, meth_def):
+        return '%s.%s(%s)' % (meth_def.of_object,
+                              meth_def.name,
+                              self.serialize_params(meth_def))
+
+    def write_class_header(self, obj_name):
+        self._fp.write('Class %s\n' % obj_name)
+        self._fp.write('======%s\n\n' % ('=' * len(obj_name)))
+
+    def write_class_footer(self, obj_name):
+        pass
+
+    def write_heading(self, text):
+        self._fp.write('\n' + text + '\n' + ('-' * len(text)) + '\n')
+
+    def close_section(self):
+        pass
+
+    def write_synopsis(self, obj_def):
+        self._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:
+                self._fp.write('(%s)' % ', '.join(bases, ))
+        self._fp.write(':\n')
+
+        constructor = self.parser.find_constructor(obj_def, self.overrides)
+        if constructor:
+            prototype = self.create_constructor_prototype(constructor)
+            self._fp.write('    def %s\n' % prototype)
+
+        for method in self.get_methods_for_object(obj_def):
+            prototype = self.create_method_prototype(method)
+            self._fp.write('    def %s\n' % prototype)
+
+    def write_hierarchy(self, obj_name, ancestry):
+        indent = ''
+        for name, interfaces in ancestry:
+            self._fp.write(indent + '+-- ' + name)
+            if interfaces:
+                self._fp.write(' (implements ')
+                self._fp.write(', '.join(interfaces))
+                self._fp.write(')\n')
+            else:
+                self._fp.write('\n')
+            indent = indent + '  '
+        self._fp.write('\n')
+
+    def write_constructor(self, func_def, func_doc):
+        prototype = self.create_constructor_prototype(func_def)
+        self._fp.write(prototype + '\n\n')
+        for type, name, dflt, null in func_def.params:
+            self.write_parameter(name, func_doc)
+        self.write_return_value(func_def, func_doc)
+        if func_doc and func_doc.description:
+            self._fp.write(func_doc.description)
+        self._fp.write('\n\n\n')
+
+    def write_method(self, meth_def, func_doc):
+        prototype = self.create_method_prototype(meth_def)
+        self._fp.write(prototype + '\n\n')
+        for type, name, dflt, null in meth_def.params:
+            self.write_parameter(name, func_doc)
+        self.write_return_value(meth_def, func_doc)
+        if func_doc and func_doc.description:
+            self._fp.write('\n')
+            self._fp.write(func_doc.description)
+        self._fp.write('\n\n')
+
+    def write_parameter(self, param_name, func_doc):
+        if func_doc:
+            descr = func_doc.get_param_description(param_name)
+        else:
+            descr = 'a ' + type
+        self._fp.write('  ' + param_name + ': ' + descr + '\n')
+
+    def write_return_value(self, meth_def, func_doc):
+        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
+            self._fp.write('  Returns: ' + descr + '\n')
+
+CLASS_HEADER_TEMPLATE = """<refentry id="%(entryid)s">
+  <refmeta>
+    <refentrytitle>%(name)s</refentrytitle>
+    <manvolnum>3</manvolnum>
+    <refmiscinfo>%(miscinfo)s</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname>%(name)s</refname><refpurpose></refpurpose>
+  </refnamediv>
+
+"""
+VARIABLE_TEMPLATE = """<varlistentry>
+      <term><parameter>%(parameter)s</parameter>&nbsp;:</term>
+      <listitem><simpara>%(description)s</simpara></listitem>
+    </varlistentry>
+"""
+
+DOCBOOK_HEADER = """<?xml version="1.0" standalone="no"?>
+<!DOCTYPE synopsis PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+"""
+
+
+class DocbookDocWriter(DocWriter):
+
+    def __init__(self):
+        DocWriter.__init__(self)
+
+        self._function_pat = re.compile(r'(\w+)\s*\(\)')
+        self._parameter_pat = re.compile(r'\@(\w+)')
+        self._constant_pat = re.compile(r'\%(-?\w+)')
+        self._symbol_pat = re.compile(r'#([\w-]+)')
+
+        self._transtable = ['-'] * 256
+        # make string -> reference translation func
+        for digit in '0123456789':
+            self._transtable[ord(digit)] = digit
+
+        for letter in 'abcdefghijklmnopqrstuvwxyz':
+            self._transtable[ord(letter)] = letter
+            self._transtable[ord(letter.upper())] = letter
+        self._transtable = ''.join(self._transtable)
+
+    def create_filename(self, obj_name, output_prefix):
+        '''Create output filename for this particular object'''
+        stem = output_prefix + '-' + obj_name.lower()
+        return stem + '.xml'
+
+    def create_toc_filename(self, output_prefix):
+        return self.create_filename('classes', output_prefix)
+
+    def make_class_ref(self, obj_name):
+        return 'class-' + obj_name.translate(self._transtable)
+
+    def make_method_ref(self, meth_def):
+        return 'method-%s--%s' % (
+            meth_def.of_object.translate(self._transtable),
+            meth_def.name.translate(self._transtable))
+
+    def _format_function(self, match):
+        info = self.parser.c_name.get(match.group(1), None)
+        if info:
+            if isinstance(info, defsparser.FunctionDef):
+                return self._format_funcdef(info)
+            if isinstance(info, defsparser.MethodDef):
+                return self._format_method(info)
+
+        # fall through through
+        return '<function>%s()</function>' % (match.group(1), )
+
+    def _format_funcdef(self, info):
+        if info.is_constructor_of is not None:
+            # should have a link here
+            return '<methodname>%s()</methodname>' % (
+                self.pyname(info.is_constructor_of), )
+        else:
+            return '<function>%s()</function>' % (info.name, )
+
+    def _format_param(self, match):
+        return '<parameter>%s</parameterdliteral>' % (match.group(1), )
+
+    def _format_const(self, match):
+        return '<literal>%s</literal>' % (match.group(1), )
+
+    def _format_method(self, info):
+        return ('<link linkend="%s">'
+                '<methodname>%s.%s</methodname>'
+                '</link>') % (self.make_method_ref(info),
+                              self.pyname(info.of_object),
+                              info.name)
+
+    def _format_object(self, info):
+        return ('<link linkend="%s">'
+                '<classname>%s</classname>'
+                '</link>') % (self.make_class_ref(info.c_name),
+                              self.pyname(info.c_name))
+
+    def _format_symbol(self, match):
+        info = self.parser.c_name.get(match.group(1), None)
+        if info:
+            if isinstance(info, defsparser.FunctionDef):
+                return self._format_funcdef(info)
+            elif isinstance(info, defsparser.MethodDef):
+                return self._format_method(info)
+            elif isinstance(info, (defsparser.ObjectDef,
+                                   defsparser.InterfaceDef,
+                                   defsparser.BoxedDef,
+                                   defsparser.PointerDef)):
+                return self._format_object(info)
+
+        # fall through through
+        return '<literal>%s</literal>' % (match.group(1), )
+
+    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 = text.strip().split('\n')
+        for index in range(len(lines)):
+            if lines[index].strip() == '':
+                lines[index] = '</para>\n<para>'
+                continue
+        return '<para>%s</para>' % ('\n'.join(lines), )
+
+    # write out hierarchy
+
+    def write_full_hierarchy(self, hierarchy):
+
+        def handle_node(node, indent=''):
+            if node.name:
+                self._fp.write('%s<link linkend="%s">%s</link>' %
+                         (indent, self.make_class_ref(node.name),
+                          self.pyname(node.name)))
+                if node.interfaces:
+                    self._fp.write(' (implements ')
+                    for i in range(len(node.interfaces)):
+                        self._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:
+                            self._fp.write(', ')
+                    self._fp.write(')\n')
+                else:
+                    self._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, indent)
+
+        self._fp.write(DOCBOOK_HEADER)
+        self._fp.write('<synopsis>')
+        handle_node(hierarchy)
+        self._fp.write('</synopsis>\n')
+
+    # these need to handle default args ...
+
+    def create_constructor_prototype(self, func_def):
+        xml = ['<constructorsynopsis language="python">\n']
+        xml.append('    <methodname>__init__</methodname>\n')
+        for type, name, dflt, null in func_def.params:
+            xml.append('    <methodparam><parameter>')
+            xml.append(name)
+            xml.append('</parameter>')
+            if dflt:
+                xml.append('<initializer>')
+                xml.append(dflt)
+                xml.append('</initializer>')
+            xml.append('</methodparam>\n')
+        if not func_def.params:
+            xml.append('    <methodparam></methodparam>')
+        xml.append('  </constructorsynopsis>')
+        return ''.join(xml)
+
+    def create_function_prototype(self, func_def):
+        xml = ['<funcsynopsis language="python">\n    <funcprototype>\n']
+        xml.append('      <funcdef><function>')
+        xml.append(func_def.name)
+        xml.append('</function></funcdef>\n')
+        for type, name, dflt, null in func_def.params:
+            xml.append('      <paramdef><parameter>')
+            xml.append(name)
+            xml.append('</parameter>')
+            if dflt:
+                xml.append('<initializer>')
+                xml.append(dflt)
+                xml.append('</initializer>')
+            xml.append('</paramdef>\n')
+        if not func_def.params:
+            xml.append('      <paramdef></paramdef')
+        xml.append('    </funcprototype>\n  </funcsynopsis>')
+        return ''.join(xml)
+
+    def create_method_prototype(self, meth_def, addlink=0):
+        xml = ['<methodsynopsis language="python">\n']
+        xml.append('    <methodname>')
+        if addlink:
+            xml.append('<link linkend="%s">' % self.make_method_ref(meth_def))
+        xml.append(self.pyname(meth_def.name))
+        if addlink:
+            xml.append('</link>')
+        xml.append('</methodname>\n')
+        for type, name, dflt, null in meth_def.params:
+            xml.append('    <methodparam><parameter>')
+            xml.append(name)
+            xml.append('</parameter>')
+            if dflt:
+                xml.append('<initializer>')
+                xml.append(dflt)
+                xml.append('</initializer>')
+            xml.append('</methodparam>\n')
+        if not meth_def.params:
+            xml.append('    <methodparam></methodparam>')
+        xml.append('  </methodsynopsis>')
+        return ''.join(xml)
+
+    def write_class_header(self, obj_name):
+        self._fp.write(DOCBOOK_HEADER)
+        self._fp.write(CLASS_HEADER_TEMPLATE % dict(
+            entryid=self.make_class_ref(obj_name),
+            name=self.pyname(obj_name),
+            miscinfo="PyGTK Docs"))
+
+    def write_class_footer(self, obj_name):
+        self._fp.write('</refentry>\n')
+
+    def write_heading(self, text):
+        self._fp.write('  <refsect1>\n')
+        self._fp.write('    <title>' + text + '</title>\n\n')
+
+    def close_section(self):
+        self._fp.write('  </refsect1>\n')
+
+    def write_synopsis(self, obj_def):
+        self._fp.write('<classsynopsis language="python">\n')
+        self._fp.write('  <ooclass><classname>%s</classname></ooclass>\n'
+                 % self.pyname(obj_def.c_name))
+        if isinstance(obj_def, definitions.ObjectDef):
+            if obj_def.parent:
+                self._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:
+                self._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):
+            self._fp.write('  <ooclass><classname>gobject.GInterface'
+                     '</classname></ooclass>\n')
+        elif isinstance(obj_def, definitions.BoxedDef):
+            self._fp.write('  <ooclass><classname>gobject.GBoxed'
+                     '</classname></ooclass>\n')
+        elif isinstance(obj_def, definitions.PointerDef):
+            self._fp.write('  <ooclass><classname>gobject.GPointer'
+                     '</classname></ooclass>\n')
+
+        constructor = self.parser.find_constructor(obj_def, self.overrides)
+        if constructor:
+            self._fp.write(
+                '%s\n' % self.create_constructor_prototype(constructor))
+        for method in self.get_methods_for_object(obj_def):
+            self._fp.write(
+                '%s\n' % self.create_method_prototype(method, addlink=1))
+        self._fp.write('</classsynopsis>\n\n')
+
+    def write_hierarchy(self, obj_name, ancestry):
+        self._fp.write('<synopsis>')
+        indent = ''
+        for name, interfaces in ancestry:
+            self._fp.write(
+                '%s+-- <link linkend="%s">%s</link>' %
+                (indent, self.make_class_ref(name), self.pyname(name)))
+            if interfaces:
+                self._fp.write(' (implements ')
+                for i in range(len(interfaces)):
+                    self._fp.write('<link linkend="%s">%s</link>' %
+                             (self.make_class_ref(interfaces[i]),
+                              self.pyname(interfaces[i])))
+                    if i != len(interfaces) - 1:
+                        self._fp.write(', ')
+                self._fp.write(')\n')
+            else:
+                self._fp.write('\n')
+            indent = indent + '  '
+        self._fp.write('</synopsis>\n\n')
+
+    def write_params(self, params, ret, func_doc):
+        if not params and (not ret or ret == 'none'):
+            return
+        self._fp.write('  <variablelist>\n')
+        for type, name, dflt, null in params:
+            if func_doc:
+                descr = func_doc.get_param_description(name).strip()
+            else:
+                descr = 'a ' + type
+            self._fp.write(VARIABLE_TEMPLATE % dict(
+                parameter=name,
+                description=self.reformat_text(descr, singleline=1)))
+        if ret and ret != 'none':
+            if func_doc and func_doc.ret:
+                descr = func_doc.ret.strip()
+            else:
+                descr = 'a ' + ret
+            self._fp.write(VARIABLE_TEMPLATE % dict(
+                parameter='Returns',
+                description=self.reformat_text(descr, singleline=1)))
+        self._fp.write('  </variablelist>\n')
+
+    def write_constructor(self, func_def, func_doc):
+        prototype = self.create_constructor_prototype(func_def)
+        self._fp.write('<programlisting>%s</programlisting>\n' % prototype)
+        self.write_params(func_def.params, func_def.ret, func_doc)
+
+        if func_doc and func_doc.description:
+            self._fp.write(self.reformat_text(func_doc.description))
+        self._fp.write('\n\n\n')
+
+    def write_method(self, meth_def, func_doc):
+        self._fp.write('  <refsect2 id="%s">\n' % (
+            self.make_method_ref(meth_def), ))
+        self._fp.write('    <title>%s.%s</title>\n\n' % (
+            self.pyname(meth_def.of_object),
+            meth_def.name))
+        prototype = self.create_method_prototype(meth_def)
+        self._fp.write('<programlisting>%s</programlisting>\n' % prototype)
+        self.write_params(meth_def.params, meth_def.ret, func_doc)
+        if func_doc and func_doc.description:
+            self._fp.write(self.reformat_text(func_doc.description))
+        self._fp.write('  </refsect2>\n\n\n')
+
+    def output_toc(self, files, fp=sys.stdout):
+        self._fp.write(DOCBOOK_HEADER)
+
+        #self._fp.write('<reference id="class-reference">\n')
+        #self._fp.write('  <title>Class Documentation</title>\n')
+        #for filename, obj_def in files:
+        #    self._fp.write('&' +
+        #                   obj_def.c_name.translate(self._transtable) + ';\n')
+        #self._fp.write('</reference>\n')
+
+        self._fp.write('<reference id="class-reference" '
+                       'xmlns:xi="http://www.w3.org/2001/XInclude">\n')
+        self._fp.write('  <title>Class Reference</title>\n')
+        for filename in sorted(files):
+            self._fp.write('  <xi:include href="%s"/>\n' % filename)
+        self._fp.write('</reference>\n')
+
+
+def main(args):
+    try:
+        opts, args = getopt.getopt(args[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')
+        return 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')
+        return 1
+
+    d = DocbookDocWriter()
+    d.add_sourcedirs(source_dirs)
+    d.add_docs(defs_file, overrides_file, 'gio')
+    d.output_docs(output_prefix)
+    return 0
+
+
+if __name__ == '__main__':
+    sys.exit(main(sys.argv))
diff --git a/codegen/h2def.py b/codegen/h2def.py
new file mode 100755 (executable)
index 0000000..17617fa
--- /dev/null
@@ -0,0 +1,631 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# 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://mail.gnome.org/archives/gtk-devel-list/2000-January/msg00070.html
+# Updated to be PEP-8 compatible and refactored to use OOP
+#
+# Scan the given public .h files of a GTK module (or module using
+# GTK object conventions) and generates a set of scheme defs.
+#
+# h2def searches through a header file looking for function prototypes and
+# generates a scheme style defenition for each prototype.
+# Basically the operation of h2def is:
+#
+# - read each .h file into a buffer which is scrubbed of extraneous data
+# - find all object defenitions:
+#   - find all structures that may represent a GtkObject
+#   - find all structures that might represent a class
+#   - find all structures that may represent a GtkObject subclass
+#   - find all structures that might represent a class/Iface inherited from
+#     GTypeInterface
+# - find all enum defenitions
+# - write out the defs
+#
+# The command line options are:
+#
+#   -s --separate    Create separate files for objects and function/method defs
+#                    using the given name as the base name (optional). If this
+#                    is not specified the combined object and function defs
+#                    will be output to sys.stdout.
+#   -f --defsfilter  Extract defs from the given file to filter the output defs
+#                    that is don't output defs that are defined in the
+#                    defsfile. More than one deffile may be specified.
+#   -m --modulename  The prefix to be stripped from the front of function names
+#                    for the given module
+#   -n --namespace   The module or namespace name to be used, for example
+#                    WebKit where h2def is unable to detect the module name
+#                    automatically. it also sets the gtype-id prefix.
+#   --onlyenums      Only produce defs for enums and flags
+#   --onlyobjdefs    Only produce defs for objects
+#   -v               Verbose output
+#
+# Examples:
+#
+# python h2def.py /usr/local/include/pango-1.0/pango/*.h >/tmp/pango.defs
+#
+# - Outputs all defs for the pango module.
+#
+# python h2def.py -m gdk -s /tmp/gdk-2.10 \
+#            -f /usr/tmp/pygtk/gtk/gdk-base.defs \
+#            /usr/local/include/gtk-2.0/gdk/*.h \
+#            /usr/local/include/gtk-2.0/gdk-pixbuf/*.h
+#
+# - Outputs the gdk module defs that are not contained in the defs file
+#   /usr/tmp/pygtk/gtk/gdk-base.defs. Two output files are created:
+#   /tmp/gdk-2.10-types.defs and /tmp/gdk-2.10.defs.
+#
+# python h2def.py -n WebKit /usr/incude/webkit-1.0/webkit/*.h \
+#            >/tmp/webkit.defs
+#
+# - Outputs all the defs for webkit module, setting the module name to WebKit
+#   and the gtype-id prefix to WEBKIT_ which can't be detected automatically.
+#
+
+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, namespace=None):
+    """create a typecode (eg. GTK_TYPE_WIDGET) from a typename"""
+    if namespace:
+      return string.replace(string.upper(namespace) + "_" + to_upper_str(typename[len(namespace):]), '_', '_TYPE_', 1)
+
+    return string.replace(to_upper_str(typename), '_', '_TYPE_', 1)
+
+
+# ------------------ Find object definitions -----------------
+# Strips the comments from buffer
+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, '')
+
+# Strips the dll API from buffer, for example WEBKIT_API
+def strip_dll_api(buf):
+    pat = re.compile("[A-Z]*_API ")
+    buf = pat.sub("", buf)
+    return buf
+
+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)
+
+    # filter out dll api
+    buf = strip_dll_api(buf)
+
+    maybeobjdefs = []  # contains all possible objects from file
+
+    # first find all structures that look like they may represent a GtkObject
+    pat = re.compile("struct\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(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(1)))
+        pos = m.end()
+
+    # now find all structures that look like they might represent a class:
+    pat = re.compile("struct\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(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\s+_(" + 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\s+_(" + 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)
+
+    # strip dll api macros
+    buf = strip_dll_api(buf)
+
+    # strip # directives
+    pat = re.compile(r"""^[#].*?$""", re.MULTILINE)
+    buf = pat.sub('', 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)
+
+    # dll api
+    buf = strip_dll_api(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 = re.sub(r'\s*\*\s*G_CONST_RETURN\s*\*\s*', '** ', buf)
+    buf = string.replace(buf, 'G_CONST_RETURN ', 'const-')
+    buf = string.replace(buf, 'const ', 'const-')
+
+    #strip GSEAL macros from the middle of function declarations:
+    pat = re.compile(r"""GSEAL""", re.VERBOSE)
+    buf = pat.sub('', buf)
+
+    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, ns=None, verbose=False,
+                 defsfilter=None):
+        if not fp:
+            fp = sys.stdout
+
+        self.fp = fp
+        self.prefix = prefix
+        self.namespace = ns
+        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] = obj
+            for obj in filter.enums:
+                self._enums[obj.c_name] = obj
+
+    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
+            if self.namespace:
+                module = self.namespace
+                name = cname[len(self.namespace):]
+            else:
+                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, self.namespace) + '")\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 ((len(prefix) and prefix[-1] != '_') or 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
+            if self.namespace:
+                cname = klass[len(self.namespace):]
+                cmodule = self.namespace
+            else:
+                m = split_prefix_pat.match(klass)
+                cname = klass
+                cmodule = None
+                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, self.namespace) + '")\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
+    namespace = None
+    defsfilter = None
+    opts, args = getopt.getopt(args[1:], 'vs:m:n:f:',
+                               ['onlyenums', 'onlyobjdefs',
+                                'modulename=', 'namespace=',
+                                '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 ('-n', '--namespace'):
+            namespace = 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, ns=namespace,
+                        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, ns=namespace,
+                        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))
diff --git a/codegen/mergedefs.py b/codegen/mergedefs.py
new file mode 100755 (executable)
index 0000000..773e499
--- /dev/null
@@ -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()
diff --git a/codegen/missingdefs.py b/codegen/missingdefs.py
new file mode 100755 (executable)
index 0000000..f0017e7
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+import sys
+import defsparser
+
+if len(sys.argv) < 3:
+    sys.stderr.write("Usage: missingdefs.py generated-defs old-defs\n")
+    sys.exit(1)
+
+newp = defsparser.DefsParser(sys.argv[1])
+oldp = defsparser.DefsParser(sys.argv[2])
+
+newp.startParsing()
+oldp.startParsing()
+
+newp.printMissing(oldp)
diff --git a/codegen/mkskel.py b/codegen/mkskel.py
new file mode 100755 (executable)
index 0000000..61f520b
--- /dev/null
@@ -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)
diff --git a/codegen/override.py b/codegen/override.py
new file mode 100644 (file)
index 0000000..bba5e42
--- /dev/null
@@ -0,0 +1,285 @@
+# -*- 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 python_type as c_name [for arg_type]
+# Last ('for') clause is optional.  If present, the type will be
+# imported only if given 'arg_type' is registered.
+import_pat = re.compile(r'\s*import\s+(\S+)\.([^\s.]+)\s+as\s+(\S+)(\s+for\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:
+                    module, pyname, cname, conditional, importing_for = match.groups()
+                    self.imports.append((module, pyname, cname, importing_for or None))
+        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
diff --git a/codegen/pygobject-codegen-2.0.in b/codegen/pygobject-codegen-2.0.in
new file mode 100644 (file)
index 0000000..c5c912e
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+prefix=@prefix@
+datarootdir=@datarootdir@
+datadir=@datadir@
+codegendir=${datadir}/pygobject/2.0/codegen
+
+PYTHONPATH=$codegendir
+export PYTHONPATH
+
+exec @PYTHON@ $codegendir/codegen.py "$@"
diff --git a/codegen/reversewrapper.py b/codegen/reversewrapper.py
new file mode 100644 (file)
index 0000000..b96e12e
--- /dev/null
@@ -0,0 +1,912 @@
+### -*- 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.check_exception_code = MemoryCodeSink()
+        self.cleanup_actions = []
+        self.pyargv_items = []
+        self.pyargv_optional_items = []
+        self.pyret_parse_items = [] # list of (format_spec, parameter)
+        self.code_sinks_stack = [self.body]
+
+    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 push_code_sink(self, code_sink):
+        self.code_sinks_stack.insert(0, code_sink)
+
+    def pop_code_sink(self):
+        return self.code_sinks_stack.pop(0)
+
+
+    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.code_sinks_stack[0]
+        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.push_code_sink(code_sink)
+            try:
+                self.return_type.write_error_return()
+            finally:
+                self.pop_code_sink()
+
+            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_XDECREF(py_retval);")
+            self.check_exception_code.flush_to(self.body)
+            self.write_code(None, 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_XDECREF(py_retval);")
+            self.check_exception_code.flush_to(self.body)
+            self.write_code(None, 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 self.pyret_parse_items == [("", "")]:
+            ## special case when there are no return parameters
+            self.write_code(
+                code=None,
+                failure_expression='py_retval != Py_None',
+                failure_exception=('PyErr_SetString(PyExc_TypeError, '
+                                   '"virtual method should return None");'))
+        else:    
+            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
+                params = ["py_retval",
+                          '"%s"' % "".join([format for format, param in self.pyret_parse_items])]
+                params.extend([param for format, param in self.pyret_parse_items if param])
+                self.write_code(code=None, failure_expression=(
+                    '!PyArg_ParseTuple(%s)' % (', '.join(params),)))
+
+        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):
+
+    supports_optional = False
+
+    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)
+        elif self.props.get('nullok', False):
+            self.wrapper.add_declaration("PyObject *py_%s;" % self.name)
+            self.wrapper.write_code(code=("if (%s)\n"
+                                          "    py_%s = PyString_FromString(%s);\n"
+                                          "else {\n"
+                                          "    Py_INCREF(Py_None);\n"
+                                          "    py_%s = Py_None;\n"
+                                          "}\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)
+        else:
+            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_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.add_pyret_parse_item("", "", prepend=True)
+
+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):
+
+    supports_optional = True
+
+    def get_c_type(self):
+        return self.props.get('c_type', 'GObject *')
+
+    def write_decl(self):
+        if not self.props.get('optional'):
+            self.wrapper.add_declaration("%s retval;" % self.get_c_type())
+        else:
+            self.wrapper.add_declaration("%s retval = NULL;" % self.get_c_type())
+
+    def write_error_return(self):
+        self.wrapper.write_code("return NULL;")
+
+    def write_conversion(self):
+        if not self.props.get('optional'):
+            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);")
+        else:
+            self.wrapper.write_code(
+                code=None,
+                failure_expression="py_retval != Py_None && !PyObject_TypeCheck(py_retval, &PyGObject_Type)",
+                failure_exception='PyErr_SetString(PyExc_TypeError, "retval should be None or a GObject");')
+            self.wrapper.write_code("if (py_retval != Py_None) {\n"
+                                    "    retval = (%s) pygobject_get(py_retval);\n"
+                                    "    g_object_ref((GObject *) retval);\n"
+                                    "}\n"
+                                    % self.get_c_type())
+
+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.add_pyret_parse_item("d", "&retval", prepend=True)
+
+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 GErrorParam(Parameter):
+    def get_c_type(self):
+        return self.props.get('c_type').replace('**', ' **')
+    def convert_c2py(self):
+        self.wrapper.write_code(code=None,
+            failure_expression=("pyg_gerror_exception_check(%s)" % self.name),
+                                code_sink=self.wrapper.check_exception_code)
+
+argtypes.matcher.register_reverse('GError**', GErrorParam)
+
+
+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()
diff --git a/codegen/scanvirtuals.py b/codegen/scanvirtuals.py
new file mode 100755 (executable)
index 0000000..c108737
--- /dev/null
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+import re
+import sys
+
+
+def main():
+    rx = re.compile(r'^\s*([\w\s\*]+)\(\s*\*\s*(\w+)\s*\)\s*\(([^()]*)\);',
+                    re.DOTALL|re.MULTILINE)
+    for f in sys.argv[1:]:
+        #print ";; From", f
+        buf = file(f).read()
+        for m in rx.findall(buf):
+            return_type =  m[0].strip()
+            if 'typedef' in return_type:
+                continue
+            if return_type == 'void':
+                return_type = 'none'
+            return_type = return_type.replace(' ', '')
+            virtual_name =  m[1]
+            if 'reserved' in virtual_name:
+                continue
+            params = []
+            if not m[2]:
+                print >> sys.stderr, repr(m)
+                continue
+            for param in map(str.strip, m[2].split(',')):
+                if '*' in param:
+                    tokens = param.split('*')
+                    ptype = tokens[0].strip() + '*'*(len(tokens) - 1)
+                    pname = tokens[-1].strip()
+                else:
+                    if param == 'void':
+                        continue
+                    ptype, pname = map(str.strip, param.split())
+                ptype = ptype.replace('const ', 'const-')
+                while '[]' in pname:
+                    pname = pname.replace('[]', '')
+                    ptype += '[]'
+                params.append((ptype, pname))
+            if not params:
+                continue
+            objname = params[0][0].replace('*', '')
+            print '(define-virtual', virtual_name
+            print '  (of-object "%s")' % objname
+            print '  (return-type "%s")' % return_type
+            if len(params) > 1:
+                print '  (parameters'
+                for param in params[1:]:
+                    print '    \'("%s" "%s")' % param
+                print '  )'
+            print ')'
+
+if __name__ == '__main__':
+    main()
diff --git a/codegen/scmexpr.py b/codegen/scmexpr.py
new file mode 100755 (executable)
index 0000000..02f2e4b
--- /dev/null
@@ -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`
diff --git a/compile b/compile
new file mode 100755 (executable)
index 0000000..c0096a7
--- /dev/null
+++ b/compile
@@ -0,0 +1,143 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2009-10-06.20; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
+# Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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, see <http://www.gnu.org/licenses/>.
+
+# 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.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+       # configure might choose to run compile as `compile cc -o foo foo.c'.
+       # So we strip `-o arg' only if arg is an object.
+       eat=1
+       case $2 in
+         *.o | *.obj)
+           ofile=$2
+           ;;
+         *)
+           set x "$@" -o "$2"
+           shift
+           ;;
+       esac
+       ;;
+      *.c)
+       cfile=$1
+       set x "$@" "$1"
+       shift
+       ;;
+      *)
+       set x "$@" "$1"
+       shift
+       ;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/config.guess b/config.guess
new file mode 100755 (executable)
index 0000000..dc84c68
--- /dev/null
@@ -0,0 +1,1501 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   Free Software Foundation, Inc.
+
+timestamp='2009-11-20'
+
+# This file 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 of the License, 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., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, 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.
+
+
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+       for c in cc gcc c89 c99 ; do
+         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+            CC_FOR_BUILD="$c"; break ;
+         fi ;
+       done ;
+       if test x"$CC_FOR_BUILD" = x ; then
+         CC_FOR_BUILD=no_compiler_found ;
+       fi
+       ;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+       PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+       # NetBSD (nbsd) targets should (where applicable) match one or
+       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+       # switched to ELF, *-*-netbsd* would select the old
+       # object file format.  This provides both forward
+       # compatibility and a consistent mechanism for selecting the
+       # object file format.
+       #
+       # Note: NetBSD doesn't particularly care about the vendor
+       # portion of the name.  We always set it to "unknown".
+       sysctl="sysctl -n hw.machine_arch"
+       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       case "${UNAME_MACHINE_ARCH}" in
+           armeb) machine=armeb-unknown ;;
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
+           sh5el) machine=sh5le-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+       # to ELF recently, or will in the future.
+       case "${UNAME_MACHINE_ARCH}" in
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+               eval $set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep -q __ELF__
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
+       # The OS release
+       # Debian GNU/NetBSD machines have a different userland, and
+       # thus, need a distinct triplet. However, they do not need
+       # kernel version information, so it can be replaced with a
+       # suitable tag, in the style of linux-gnu.
+       case "${UNAME_VERSION}" in
+           Debian*)
+               release='-gnu'
+               ;;
+           *)
+               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               ;;
+       esac
+       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+       # contains redundant information, the shorter form:
+       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+       echo "${machine}-${os}${release}"
+       exit ;;
+    *:OpenBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+       exit ;;
+    *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit ;;
+    *:SolidBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+       exit ;;
+    macppc:MirBSD:*:*)
+       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    alpha:OSF1:*:*)
+       case $UNAME_RELEASE in
+       *4.0)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
+       # According to Compaq, /usr/sbin/psrinfo has been available on
+       # OSF/1 and Tru64 systems produced since 1995.  I hope that
+       # covers most systems running today.  This code pipes the CPU
+       # types through head -n 1, so we only detect the type of CPU 0.
+       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+       case "$ALPHA_CPU_TYPE" in
+           "EV4 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "EV4.5 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "LCA4 (21066/21068)")
+               UNAME_MACHINE="alpha" ;;
+           "EV5 (21164)")
+               UNAME_MACHINE="alphaev5" ;;
+           "EV5.6 (21164A)")
+               UNAME_MACHINE="alphaev56" ;;
+           "EV5.6 (21164PC)")
+               UNAME_MACHINE="alphapca56" ;;
+           "EV5.7 (21164PC)")
+               UNAME_MACHINE="alphapca57" ;;
+           "EV6 (21264)")
+               UNAME_MACHINE="alphaev6" ;;
+           "EV6.7 (21264A)")
+               UNAME_MACHINE="alphaev67" ;;
+           "EV6.8CB (21264C)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8AL (21264B)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8CX (21264D)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.9A (21264/EV69A)")
+               UNAME_MACHINE="alphaev69" ;;
+           "EV7 (21364)")
+               UNAME_MACHINE="alphaev7" ;;
+           "EV7.9 (21364A)")
+               UNAME_MACHINE="alphaev79" ;;
+       esac
+       # A Pn.n version is a patched version.
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit ;;
+    Alpha\ *:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # Should we change UNAME_MACHINE based on the output of uname instead
+       # of the specific Alpha model?
+       echo alpha-pc-interix
+       exit ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-amigaos
+       exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-morphos
+       exit ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+       echo arm-unknown-riscos
+       exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit ;;
+    NILE*:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit ;;
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+       case `/usr/bin/uname -p` in
+           sparc) echo sparc-icl-nx7; exit ;;
+       esac ;;
+    s390x:SunOS:*:*)
+       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+       eval $set_cc_for_build
+       SUN_ARCH="i386"
+       # If there is a compiler, see if it is configured for 64-bit objects.
+       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+       # This test works for both compilers.
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               SUN_ARCH="x86_64"
+           fi
+       fi
+       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:6*:*)
+       # According to config.sub, this is the proper way to canonicalize
+       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+       # it's likely to be more like Solaris than SunOS4.
+       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:*:*)
+       case "`/usr/bin/arch -k`" in
+           Series*|S4*)
+               UNAME_RELEASE=`uname -v`
+               ;;
+       esac
+       # Japanese Language versions have a version number like `4.1.3-JL'.
+       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+       exit ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos${UNAME_RELEASE}
+       exit ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos${UNAME_RELEASE}
+       exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten${UNAME_RELEASE}
+       exit ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten${UNAME_RELEASE}
+       exit ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+       echo clipper-intergraph-clix${UNAME_RELEASE}
+       exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+       int main (int argc, char *argv[]) {
+#else
+       int main (argc, argv) int argc; char *argv[]; {
+#endif
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c &&
+         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+         SYSTEM_NAME=`$dummy $dummyarg` &&
+           { echo "$SYSTEM_NAME"; exit; }
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit ;;
+    Motorola:*:4.3:PL8-*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+       then
+           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+              [ ${TARGET_BINARY_INTERFACE}x = x ]
+           then
+               echo m88k-dg-dgux${UNAME_RELEASE}
+           else
+               echo m88k-dg-dguxbcs${UNAME_RELEASE}
+           fi
+       else
+           echo i586-dg-dgux${UNAME_RELEASE}
+       fi
+       exit ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+       echo i386-ibm-aix
+       exit ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               eval $set_cc_for_build
+               sed 's/^                //' << EOF >$dummy.c
+               #include <sys/systemcfg.h>
+
+               main()
+                       {
+                       if (!__power_pc())
+                               exit(1);
+                       puts("powerpc-ibm-aix3.2.5");
+                       exit(0);
+                       }
+EOF
+               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+               then
+                       echo "$SYSTEM_NAME"
+               else
+                       echo rs6000-ibm-aix3.2.5
+               fi
+       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+               echo rs6000-ibm-aix3.2.4
+       else
+               echo rs6000-ibm-aix3.2
+       fi
+       exit ;;
+    *:AIX:*:[456])
+       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+               IBM_ARCH=rs6000
+       else
+               IBM_ARCH=powerpc
+       fi
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+       echo romp-ibm-bsd4.4
+       exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+       exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit ;;
+    9000/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       case "${UNAME_MACHINE}" in
+           9000/31? )            HP_ARCH=m68000 ;;
+           9000/[34]?? )         HP_ARCH=m68k ;;
+           9000/[678][0-9][0-9])
+               if [ -x /usr/bin/getconf ]; then
+                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+               fi
+               if [ "${HP_ARCH}" = "" ]; then
+                   eval $set_cc_for_build
+                   sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+               {
+               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+               case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+                   switch (bits)
+                       {
+                       case 64: puts ("hppa2.0w"); break;
+                       case 32: puts ("hppa2.0n"); break;
+                       default: puts ("hppa2.0"); break;
+                       } break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+                   puts ("hppa2.0"); break;
+              #endif
+               default: puts ("hppa1.0"); break;
+               }
+                  exit (0);
+              }
+EOF
+                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   test -z "$HP_ARCH" && HP_ARCH=hppa
+               fi ;;
+       esac
+       if [ ${HP_ARCH} = "hppa2.0w" ]
+       then
+           eval $set_cc_for_build
+
+           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+           # generating 64-bit code.  GNU and HP use different nomenclature:
+           #
+           # $ CC_FOR_BUILD=cc ./config.guess
+           # => hppa2.0w-hp-hpux11.23
+           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+           # => hppa64-hp-hpux11.23
+
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+               grep -q __LP64__
+           then
+               HP_ARCH="hppa2.0w"
+           else
+               HP_ARCH="hppa64"
+           fi
+       fi
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit ;;
+    3050*:HI-UX:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <unistd.h>
+       int
+       main ()
+       {
+         long cpu = sysconf (_SC_CPU_VERSION);
+         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+            results, however.  */
+         if (CPU_IS_PA_RISC (cpu))
+           {
+             switch (cpu)
+               {
+                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+                 default: puts ("hppa-hitachi-hiuxwe2"); break;
+               }
+           }
+         else if (CPU_IS_HP_MC68K (cpu))
+           puts ("m68k-hitachi-hiuxwe2");
+         else puts ("unknown-hitachi-hiuxwe2");
+         exit (0);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+               { echo "$SYSTEM_NAME"; exit; }
+       echo unknown-hitachi-hiuxwe2
+       exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+       echo hppa1.1-hp-bsd
+       exit ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit ;;
+    i*86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo ${UNAME_MACHINE}-unknown-osf1mk
+       else
+           echo ${UNAME_MACHINE}-unknown-osf1
+       fi
+       exit ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*[A-Z]90:*:*:*)
+       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    *:UNICOS/mp:*:*)
+       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       exit ;;
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:FreeBSD:*:*)
+       case ${UNAME_MACHINE} in
+           pc98)
+               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+           amd64)
+               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+           *)
+               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+       esac
+       exit ;;
+    i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin
+       exit ;;
+    *:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit ;;
+    i*:windows32*:*)
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
+       exit ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit ;;
+    *:Interix*:*)
+       case ${UNAME_MACHINE} in
+           x86)
+               echo i586-pc-interix${UNAME_RELEASE}
+               exit ;;
+           authenticamd | genuineintel | EM64T)
+               echo x86_64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+           IA64)
+               echo ia64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+       esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+       echo i${UNAME_MACHINE}-pc-mks
+       exit ;;
+    8664:Windows_NT:*)
+       echo x86_64-pc-mks
+       exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+       # UNAME_MACHINE based on the output of uname instead of i386?
+       echo i586-pc-interix
+       exit ;;
+    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
+       exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+       echo x86_64-unknown-cygwin
+       exit ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin
+       exit ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    *:GNU:*:*)
+       # the GNU system
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
+    arm*:Linux:*:*)
+       eval $set_cc_for_build
+       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+           | grep -q __ARM_EABI__
+       then
+           echo ${UNAME_MACHINE}-unknown-linux-gnu
+       else
+           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+       fi
+       exit ;;
+    avr32*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit ;;
+    crisv32:Linux:*:*)
+       echo crisv32-axis-linux-gnu
+       exit ;;
+    frv:Linux:*:*)
+       echo frv-unknown-linux-gnu
+       exit ;;
+    i*86:Linux:*:*)
+       LIBC=gnu
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       exit ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m32r*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=${UNAME_MACHINE}el
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=${UNAME_MACHINE}
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    or32:Linux:*:*)
+       echo or32-unknown-linux-gnu
+       exit ;;
+    padre:Linux:*:*)
+       echo sparc-unknown-linux-gnu
+       exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit ;;
+    sh64*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    vax:Linux:*:*)
+       echo ${UNAME_MACHINE}-dec-linux-gnu
+       exit ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit ;;
+    xtensa*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    i*86:DYNIX/ptx:4*:*)
+       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+       # earlier versions are messed up and put the nodename in both
+       # sysname and nodename.
+       echo i386-sequent-sysv4
+       exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo ${UNAME_MACHINE}-pc-os2-emx
+       exit ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit ;;
+    i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+       echo i386-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    i*86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+       else
+               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+       fi
+       exit ;;
+    i*86:*:5:[678]*)
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       exit ;;
+    i*86:*:3.2:*)
+       if test -f /usr/options/cb.name; then
+               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+       else
+               echo ${UNAME_MACHINE}-pc-sysv32
+       fi
+       exit ;;
+    pc:*:*:*)
+       # Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i586.
+       # Note: whatever this is, it MUST be the same as what config.sub
+       # prints for the "djgpp" host, or else GDB configury will decide that
+       # this is a cross-build.
+       echo i586-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-mach3
+       exit ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit ;;
+    i860:*:4.*:*) # i860-SVR4
+       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+       else # Add other i860-SVR4 vendors below as they are discovered.
+         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+       fi
+       exit ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+       echo m68k-convergent-sysv
+       exit ;;
+    M680?0:D-NIX:5.3:*)
+       echo m68k-diab-dnix
+       exit ;;
+    M68*:*:R3V[5678]*:*)
+       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+       OS_REL=''
+       test -r /etc/.relid \
+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+       OS_REL='.3'
+       test -r /etc/.relid \
+           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    rs6000:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv${UNAME_RELEASE}
+       exit ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    *:SINIX-*:*:*)
+       if uname -p 2>/dev/null >/dev/null ; then
+               UNAME_MACHINE=`(uname -p) 2>/dev/null`
+               echo ${UNAME_MACHINE}-sni-sysv4
+       else
+               echo ns32k-sni-sysv
+       fi
+       exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo ${UNAME_MACHINE}-stratus-vos
+       exit ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit ;;
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv${UNAME_RELEASE}
+       else
+               echo mips-unknown-sysv${UNAME_RELEASE}
+       fi
+        exit ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit ;;
+    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
+       echo i586-pc-haiku
+       exit ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-7:SUPER-UX:*:*)
+       echo sx7-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8:SUPER-UX:*:*)
+       echo sx8-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8R:SUPER-UX:*:*)
+       echo sx8r-nec-superux${UNAME_RELEASE}
+       exit ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Rhapsody:*:*)
+       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Darwin:*:*)
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
+           i386)
+               eval $set_cc_for_build
+               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                     grep IS_64BIT_ARCH >/dev/null
+                 then
+                     UNAME_PROCESSOR="x86_64"
+                 fi
+               fi ;;
+           unknown) UNAME_PROCESSOR=powerpc ;;
+       esac
+       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+       exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+       UNAME_PROCESSOR=`uname -p`
+       if test "$UNAME_PROCESSOR" = "x86"; then
+               UNAME_PROCESSOR=i386
+               UNAME_MACHINE=pc
+       fi
+       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+       exit ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit ;;
+    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       exit ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       if test "$cputype" = "386"; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo ${UNAME_MACHINE}-unknown-plan9
+       exit ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+       exit ;;
+    *:DragonFly:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "${UNAME_MACHINE}" in
+           A*) echo alpha-dec-vms ; exit ;;
+           I*) echo ia64-dec-vms ; exit ;;
+           V*) echo vax-dec-vms ; exit ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       exit ;;
+    i*86:skyos:*:*)
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       exit ;;
+    i*86:rdos:*:*)
+       echo ${UNAME_MACHINE}-pc-rdos
+       exit ;;
+    i*86:AROS:*:*)
+       echo ${UNAME_MACHINE}-pc-aros
+       exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+         ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+       printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+       printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+       { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+       echo c1-convex-bsd
+       exit ;;
+    c2*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit ;;
+    c34*)
+       echo c34-convex-bsd
+       exit ;;
+    c38*)
+       echo c38-convex-bsd
+       exit ;;
+    c4*)
+       echo c4-convex-bsd
+       exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.h.in b/config.h.in
new file mode 100644 (file)
index 0000000..5ac6e15
--- /dev/null
@@ -0,0 +1,83 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Use introspection information */
+#undef ENABLE_INTROSPECTION
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Have libffi include files */
+#undef HAVE_FFI_H
+
+/* 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
+
+/* Define to 1 if PySignal_SetWakeupFd is available */
+#undef HAVE_PYSIGNAL_SETWAKEUPFD
+
+/* 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
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* 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 home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* pygobject major version */
+#undef PYGOBJECT_MAJOR_VERSION
+
+/* pygobject micro version */
+#undef PYGOBJECT_MICRO_VERSION
+
+/* pygobject minor version */
+#undef PYGOBJECT_MINOR_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
diff --git a/config.sub b/config.sub
new file mode 100755 (executable)
index 0000000..2a55a50
--- /dev/null
@@ -0,0 +1,1705 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   Free Software Foundation, Inc.
+
+timestamp='2009-11-20'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file 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 of the License, 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., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, 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.
+
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+       -sun*os*)
+               # Prevent following clause from handling this invalid input.
+               ;;
+       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+       -apple | -axis | -knuth | -cray | -microblaze)
+               os=
+               basic_machine=$1
+               ;;
+        -bluegene*)
+               os=-cnk
+               ;;
+       -sim | -cisco | -oki | -wec | -winbond)
+               os=
+               basic_machine=$1
+               ;;
+       -scout)
+               ;;
+       -wrs)
+               os=-vxworks
+               basic_machine=$1
+               ;;
+       -chorusos*)
+               os=-chorusos
+               basic_machine=$1
+               ;;
+       -chorusrdb)
+               os=-chorusrdb
+               basic_machine=$1
+               ;;
+       -hiux*)
+               os=-hiuxwe2
+               ;;
+       -sco6)
+               os=-sco5v6
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5)
+               os=-sco3.2v5
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco4)
+               os=-sco3.2v4
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2.[4-9]*)
+               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2v[4-9]*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5v6*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco*)
+               os=-sco3.2v2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -udk*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -isc)
+               os=-isc2.2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -clix*)
+               basic_machine=clipper-intergraph
+               ;;
+       -isc*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -lynx*)
+               os=-lynxos
+               ;;
+       -ptx*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+               ;;
+       -windowsnt*)
+               os=`echo $os | sed -e 's/windowsnt/winnt/'`
+               ;;
+       -psos*)
+               os=-psos
+               ;;
+       -mint | -mint[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+       # Recognize the basic CPU types without company name.
+       # Some are omitted here because they have special meanings below.
+       1750a | 580 \
+       | a29k \
+       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | am33_2.0 \
+       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+       | bfin \
+       | c4x | clipper \
+       | d10v | d30v | dlx | dsp16xx \
+       | fido | fr30 | frv \
+       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | i370 | i860 | i960 | ia64 \
+       | ip2k | iq2000 \
+       | lm32 \
+       | m32c | m32r | m32rle | m68000 | m68k | m88k \
+       | maxq | mb | microblaze | mcore | mep | metag \
+       | mips | mipsbe | mipseb | mipsel | mipsle \
+       | mips16 \
+       | mips64 | mips64el \
+       | mips64octeon | mips64octeonel \
+       | mips64orion | mips64orionel \
+       | mips64r5900 | mips64r5900el \
+       | mips64vr | mips64vrel \
+       | mips64vr4100 | mips64vr4100el \
+       | mips64vr4300 | mips64vr4300el \
+       | mips64vr5000 | mips64vr5000el \
+       | mips64vr5900 | mips64vr5900el \
+       | mipsisa32 | mipsisa32el \
+       | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa64 | mipsisa64el \
+       | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64sb1 | mipsisa64sb1el \
+       | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipstx39 | mipstx39el \
+       | mn10200 | mn10300 \
+       | moxie \
+       | mt \
+       | msp430 \
+       | nios | nios2 \
+       | ns16k | ns32k \
+       | or32 \
+       | pdp10 | pdp11 | pj | pjl \
+       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | pyramid \
+       | rx \
+       | score \
+       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh64 | sh64le \
+       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+       | spu | strongarm \
+       | tahoe | thumb | tic4x | tic80 | tron \
+       | ubicom32 \
+       | v850 | v850e \
+       | we32k \
+       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | z8k | z80)
+               basic_machine=$basic_machine-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+               # Motorola 68HC11/12.
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+               ;;
+       ms1)
+               basic_machine=mt-unknown
+               ;;
+
+       # We use `pc' rather than `unknown'
+       # because (1) that's what they normally are, and
+       # (2) the word "unknown" tends to confuse beginning users.
+       i*86 | x86_64)
+         basic_machine=$basic_machine-pc
+         ;;
+       # Object if more than one company name word.
+       *-*-*)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+       # Recognize the basic CPU types with company name.
+       580-* \
+       | a29k-* \
+       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+       | avr-* | avr32-* \
+       | bfin-* | bs2000-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | clipper-* | craynv-* | cydra-* \
+       | d10v-* | d30v-* | dlx-* \
+       | elxsi-* \
+       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+       | h8300-* | h8500-* \
+       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | i*86-* | i860-* | i960-* | ia64-* \
+       | ip2k-* | iq2000-* \
+       | lm32-* \
+       | m32c-* | m32r-* | m32rle-* \
+       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+       | mips16-* \
+       | mips64-* | mips64el-* \
+       | mips64octeon-* | mips64octeonel-* \
+       | mips64orion-* | mips64orionel-* \
+       | mips64r5900-* | mips64r5900el-* \
+       | mips64vr-* | mips64vrel-* \
+       | mips64vr4100-* | mips64vr4100el-* \
+       | mips64vr4300-* | mips64vr4300el-* \
+       | mips64vr5000-* | mips64vr5000el-* \
+       | mips64vr5900-* | mips64vr5900el-* \
+       | mipsisa32-* | mipsisa32el-* \
+       | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa64-* | mipsisa64el-* \
+       | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64sb1-* | mipsisa64sb1el-* \
+       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipstx39-* | mipstx39el-* \
+       | mmix-* \
+       | mt-* \
+       | msp430-* \
+       | nios-* | nios2-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
+       | orion-* \
+       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | pyramid-* \
+       | romp-* | rs6000-* | rx-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+       | sparclite-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+       | tahoe-* | thumb-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | tron-* \
+       | ubicom32-* \
+       | v850-* | v850e-* | vax-* \
+       | we32k-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa*-* \
+       | ymp-* \
+       | z8k-* | z80-*)
+               ;;
+       # Recognize the basic CPU types without company name, with glob match.
+       xtensa*)
+               basic_machine=$basic_machine-unknown
+               ;;
+       # Recognize the various machine names and aliases which stand
+       # for a CPU type and a company and sometimes even an OS.
+       386bsd)
+               basic_machine=i386-unknown
+               os=-bsd
+               ;;
+       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+               basic_machine=m68000-att
+               ;;
+       3b*)
+               basic_machine=we32k-att
+               ;;
+       a29khif)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       abacus)
+               basic_machine=abacus-unknown
+               ;;
+       adobe68k)
+               basic_machine=m68010-adobe
+               os=-scout
+               ;;
+       alliant | fx80)
+               basic_machine=fx80-alliant
+               ;;
+       altos | altos3068)
+               basic_machine=m68k-altos
+               ;;
+       am29k)
+               basic_machine=a29k-none
+               os=-bsd
+               ;;
+       amd64)
+               basic_machine=x86_64-pc
+               ;;
+       amd64-*)
+               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       amdahl)
+               basic_machine=580-amdahl
+               os=-sysv
+               ;;
+       amiga | amiga-*)
+               basic_machine=m68k-unknown
+               ;;
+       amigaos | amigados)
+               basic_machine=m68k-unknown
+               os=-amigaos
+               ;;
+       amigaunix | amix)
+               basic_machine=m68k-unknown
+               os=-sysv4
+               ;;
+       apollo68)
+               basic_machine=m68k-apollo
+               os=-sysv
+               ;;
+       apollo68bsd)
+               basic_machine=m68k-apollo
+               os=-bsd
+               ;;
+       aros)
+               basic_machine=i386-pc
+               os=-aros
+               ;;
+       aux)
+               basic_machine=m68k-apple
+               os=-aux
+               ;;
+       balance)
+               basic_machine=ns32k-sequent
+               os=-dynix
+               ;;
+       blackfin)
+               basic_machine=bfin-unknown
+               os=-linux
+               ;;
+       blackfin-*)
+               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       bluegene*)
+               basic_machine=powerpc-ibm
+               os=-cnk
+               ;;
+       c90)
+               basic_machine=c90-cray
+               os=-unicos
+               ;;
+        cegcc)
+               basic_machine=arm-unknown
+               os=-cegcc
+               ;;
+       convex-c1)
+               basic_machine=c1-convex
+               os=-bsd
+               ;;
+       convex-c2)
+               basic_machine=c2-convex
+               os=-bsd
+               ;;
+       convex-c32)
+               basic_machine=c32-convex
+               os=-bsd
+               ;;
+       convex-c34)
+               basic_machine=c34-convex
+               os=-bsd
+               ;;
+       convex-c38)
+               basic_machine=c38-convex
+               os=-bsd
+               ;;
+       cray | j90)
+               basic_machine=j90-cray
+               os=-unicos
+               ;;
+       craynv)
+               basic_machine=craynv-cray
+               os=-unicosmp
+               ;;
+       cr16)
+               basic_machine=cr16-unknown
+               os=-elf
+               ;;
+       crds | unos)
+               basic_machine=m68k-crds
+               ;;
+       crisv32 | crisv32-* | etraxfs*)
+               basic_machine=crisv32-axis
+               ;;
+       cris | cris-* | etrax*)
+               basic_machine=cris-axis
+               ;;
+       crx)
+               basic_machine=crx-unknown
+               os=-elf
+               ;;
+       da30 | da30-*)
+               basic_machine=m68k-da30
+               ;;
+       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+               basic_machine=mips-dec
+               ;;
+       decsystem10* | dec10*)
+               basic_machine=pdp10-dec
+               os=-tops10
+               ;;
+       decsystem20* | dec20*)
+               basic_machine=pdp10-dec
+               os=-tops20
+               ;;
+       delta | 3300 | motorola-3300 | motorola-delta \
+             | 3300-motorola | delta-motorola)
+               basic_machine=m68k-motorola
+               ;;
+       delta88)
+               basic_machine=m88k-motorola
+               os=-sysv3
+               ;;
+       dicos)
+               basic_machine=i686-pc
+               os=-dicos
+               ;;
+       djgpp)
+               basic_machine=i586-pc
+               os=-msdosdjgpp
+               ;;
+       dpx20 | dpx20-*)
+               basic_machine=rs6000-bull
+               os=-bosx
+               ;;
+       dpx2* | dpx2*-bull)
+               basic_machine=m68k-bull
+               os=-sysv3
+               ;;
+       ebmon29k)
+               basic_machine=a29k-amd
+               os=-ebmon
+               ;;
+       elxsi)
+               basic_machine=elxsi-elxsi
+               os=-bsd
+               ;;
+       encore | umax | mmax)
+               basic_machine=ns32k-encore
+               ;;
+       es1800 | OSE68k | ose68k | ose | OSE)
+               basic_machine=m68k-ericsson
+               os=-ose
+               ;;
+       fx2800)
+               basic_machine=i860-alliant
+               ;;
+       genix)
+               basic_machine=ns32k-ns
+               ;;
+       gmicro)
+               basic_machine=tron-gmicro
+               os=-sysv
+               ;;
+       go32)
+               basic_machine=i386-pc
+               os=-go32
+               ;;
+       h3050r* | hiux*)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       h8300hms)
+               basic_machine=h8300-hitachi
+               os=-hms
+               ;;
+       h8300xray)
+               basic_machine=h8300-hitachi
+               os=-xray
+               ;;
+       h8500hms)
+               basic_machine=h8500-hitachi
+               os=-hms
+               ;;
+       harris)
+               basic_machine=m88k-harris
+               os=-sysv3
+               ;;
+       hp300-*)
+               basic_machine=m68k-hp
+               ;;
+       hp300bsd)
+               basic_machine=m68k-hp
+               os=-bsd
+               ;;
+       hp300hpux)
+               basic_machine=m68k-hp
+               os=-hpux
+               ;;
+       hp3k9[0-9][0-9] | hp9[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k2[0-9][0-9] | hp9k31[0-9])
+               basic_machine=m68000-hp
+               ;;
+       hp9k3[2-9][0-9])
+               basic_machine=m68k-hp
+               ;;
+       hp9k6[0-9][0-9] | hp6[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k7[0-79][0-9] | hp7[0-79][0-9])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k78[0-9] | hp78[0-9])
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][13679] | hp8[0-9][13679])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][0-9] | hp8[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hppa-next)
+               os=-nextstep3
+               ;;
+       hppaosf)
+               basic_machine=hppa1.1-hp
+               os=-osf
+               ;;
+       hppro)
+               basic_machine=hppa1.1-hp
+               os=-proelf
+               ;;
+       i370-ibm* | ibm*)
+               basic_machine=i370-ibm
+               ;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+       i*86v32)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv32
+               ;;
+       i*86v4*)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv4
+               ;;
+       i*86v)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv
+               ;;
+       i*86sol2)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-solaris2
+               ;;
+       i386mach)
+               basic_machine=i386-mach
+               os=-mach
+               ;;
+       i386-vsta | vsta)
+               basic_machine=i386-unknown
+               os=-vsta
+               ;;
+       iris | iris4d)
+               basic_machine=mips-sgi
+               case $os in
+                   -irix*)
+                       ;;
+                   *)
+                       os=-irix4
+                       ;;
+               esac
+               ;;
+       isi68 | isi)
+               basic_machine=m68k-isi
+               os=-sysv
+               ;;
+       m68knommu)
+               basic_machine=m68k-unknown
+               os=-linux
+               ;;
+       m68knommu-*)
+               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       m88k-omron*)
+               basic_machine=m88k-omron
+               ;;
+       magnum | m3230)
+               basic_machine=mips-mips
+               os=-sysv
+               ;;
+       merlin)
+               basic_machine=ns32k-utek
+               os=-sysv
+               ;;
+        microblaze)
+               basic_machine=microblaze-xilinx
+               ;;
+       mingw32)
+               basic_machine=i386-pc
+               os=-mingw32
+               ;;
+       mingw32ce)
+               basic_machine=arm-unknown
+               os=-mingw32ce
+               ;;
+       miniframe)
+               basic_machine=m68000-convergent
+               ;;
+       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+       mips3*-*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+               ;;
+       mips3*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+               ;;
+       monitor)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       morphos)
+               basic_machine=powerpc-unknown
+               os=-morphos
+               ;;
+       msdos)
+               basic_machine=i386-pc
+               os=-msdos
+               ;;
+       ms1-*)
+               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+               ;;
+       mvs)
+               basic_machine=i370-ibm
+               os=-mvs
+               ;;
+       ncr3000)
+               basic_machine=i486-ncr
+               os=-sysv4
+               ;;
+       netbsd386)
+               basic_machine=i386-unknown
+               os=-netbsd
+               ;;
+       netwinder)
+               basic_machine=armv4l-rebel
+               os=-linux
+               ;;
+       news | news700 | news800 | news900)
+               basic_machine=m68k-sony
+               os=-newsos
+               ;;
+       news1000)
+               basic_machine=m68030-sony
+               os=-newsos
+               ;;
+       news-3600 | risc-news)
+               basic_machine=mips-sony
+               os=-newsos
+               ;;
+       necv70)
+               basic_machine=v70-nec
+               os=-sysv
+               ;;
+       next | m*-next )
+               basic_machine=m68k-next
+               case $os in
+                   -nextstep* )
+                       ;;
+                   -ns2*)
+                     os=-nextstep2
+                       ;;
+                   *)
+                     os=-nextstep3
+                       ;;
+               esac
+               ;;
+       nh3000)
+               basic_machine=m68k-harris
+               os=-cxux
+               ;;
+       nh[45]000)
+               basic_machine=m88k-harris
+               os=-cxux
+               ;;
+       nindy960)
+               basic_machine=i960-intel
+               os=-nindy
+               ;;
+       mon960)
+               basic_machine=i960-intel
+               os=-mon960
+               ;;
+       nonstopux)
+               basic_machine=mips-compaq
+               os=-nonstopux
+               ;;
+       np1)
+               basic_machine=np1-gould
+               ;;
+       nsr-tandem)
+               basic_machine=nsr-tandem
+               ;;
+       op50n-* | op60c-*)
+               basic_machine=hppa1.1-oki
+               os=-proelf
+               ;;
+       openrisc | openrisc-*)
+               basic_machine=or32-unknown
+               ;;
+       os400)
+               basic_machine=powerpc-ibm
+               os=-os400
+               ;;
+       OSE68000 | ose68000)
+               basic_machine=m68000-ericsson
+               os=-ose
+               ;;
+       os68k)
+               basic_machine=m68k-none
+               os=-os68k
+               ;;
+       pa-hitachi)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       paragon)
+               basic_machine=i860-intel
+               os=-osf
+               ;;
+       parisc)
+               basic_machine=hppa-unknown
+               os=-linux
+               ;;
+       parisc-*)
+               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       pbd)
+               basic_machine=sparc-tti
+               ;;
+       pbb)
+               basic_machine=m68k-tti
+               ;;
+       pc532 | pc532-*)
+               basic_machine=ns32k-pc532
+               ;;
+       pc98)
+               basic_machine=i386-pc
+               ;;
+       pc98-*)
+               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium | p5 | k5 | k6 | nexgen | viac3)
+               basic_machine=i586-pc
+               ;;
+       pentiumpro | p6 | 6x86 | athlon | athlon_*)
+               basic_machine=i686-pc
+               ;;
+       pentiumii | pentium2 | pentiumiii | pentium3)
+               basic_machine=i686-pc
+               ;;
+       pentium4)
+               basic_machine=i786-pc
+               ;;
+       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumpro-* | p6-* | 6x86-* | athlon-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium4-*)
+               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pn)
+               basic_machine=pn-gould
+               ;;
+       power)  basic_machine=power-ibm
+               ;;
+       ppc)    basic_machine=powerpc-unknown
+               ;;
+       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppcle | powerpclittle | ppc-le | powerpc-little)
+               basic_machine=powerpcle-unknown
+               ;;
+       ppcle-* | powerpclittle-*)
+               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64)  basic_machine=powerpc64-unknown
+               ;;
+       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+               basic_machine=powerpc64le-unknown
+               ;;
+       ppc64le-* | powerpc64little-*)
+               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ps2)
+               basic_machine=i386-ibm
+               ;;
+       pw32)
+               basic_machine=i586-unknown
+               os=-pw32
+               ;;
+       rdos)
+               basic_machine=i386-pc
+               os=-rdos
+               ;;
+       rom68k)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       rm[46]00)
+               basic_machine=mips-siemens
+               ;;
+       rtpc | rtpc-*)
+               basic_machine=romp-ibm
+               ;;
+       s390 | s390-*)
+               basic_machine=s390-ibm
+               ;;
+       s390x | s390x-*)
+               basic_machine=s390x-ibm
+               ;;
+       sa29200)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       sb1)
+               basic_machine=mipsisa64sb1-unknown
+               ;;
+       sb1el)
+               basic_machine=mipsisa64sb1el-unknown
+               ;;
+       sde)
+               basic_machine=mipsisa32-sde
+               os=-elf
+               ;;
+       sei)
+               basic_machine=mips-sei
+               os=-seiux
+               ;;
+       sequent)
+               basic_machine=i386-sequent
+               ;;
+       sh)
+               basic_machine=sh-hitachi
+               os=-hms
+               ;;
+       sh5el)
+               basic_machine=sh5le-unknown
+               ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
+       sparclite-wrs | simso-wrs)
+               basic_machine=sparclite-wrs
+               os=-vxworks
+               ;;
+       sps7)
+               basic_machine=m68k-bull
+               os=-sysv2
+               ;;
+       spur)
+               basic_machine=spur-unknown
+               ;;
+       st2000)
+               basic_machine=m68k-tandem
+               ;;
+       stratus)
+               basic_machine=i860-stratus
+               os=-sysv4
+               ;;
+       sun2)
+               basic_machine=m68000-sun
+               ;;
+       sun2os3)
+               basic_machine=m68000-sun
+               os=-sunos3
+               ;;
+       sun2os4)
+               basic_machine=m68000-sun
+               os=-sunos4
+               ;;
+       sun3os3)
+               basic_machine=m68k-sun
+               os=-sunos3
+               ;;
+       sun3os4)
+               basic_machine=m68k-sun
+               os=-sunos4
+               ;;
+       sun4os3)
+               basic_machine=sparc-sun
+               os=-sunos3
+               ;;
+       sun4os4)
+               basic_machine=sparc-sun
+               os=-sunos4
+               ;;
+       sun4sol2)
+               basic_machine=sparc-sun
+               os=-solaris2
+               ;;
+       sun3 | sun3-*)
+               basic_machine=m68k-sun
+               ;;
+       sun4)
+               basic_machine=sparc-sun
+               ;;
+       sun386 | sun386i | roadrunner)
+               basic_machine=i386-sun
+               ;;
+       sv1)
+               basic_machine=sv1-cray
+               os=-unicos
+               ;;
+       symmetry)
+               basic_machine=i386-sequent
+               os=-dynix
+               ;;
+       t3e)
+               basic_machine=alphaev5-cray
+               os=-unicos
+               ;;
+       t90)
+               basic_machine=t90-cray
+               os=-unicos
+               ;;
+       tic54x | c54x*)
+               basic_machine=tic54x-unknown
+               os=-coff
+               ;;
+       tic55x | c55x*)
+               basic_machine=tic55x-unknown
+               os=-coff
+               ;;
+       tic6x | c6x*)
+               basic_machine=tic6x-unknown
+               os=-coff
+               ;;
+       tile*)
+               basic_machine=tile-unknown
+               os=-linux-gnu
+               ;;
+       tx39)
+               basic_machine=mipstx39-unknown
+               ;;
+       tx39el)
+               basic_machine=mipstx39el-unknown
+               ;;
+       toad1)
+               basic_machine=pdp10-xkl
+               os=-tops20
+               ;;
+       tower | tower-32)
+               basic_machine=m68k-ncr
+               ;;
+       tpf)
+               basic_machine=s390x-ibm
+               os=-tpf
+               ;;
+       udi29k)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       ultra3)
+               basic_machine=a29k-nyu
+               os=-sym1
+               ;;
+       v810 | necv810)
+               basic_machine=v810-nec
+               os=-none
+               ;;
+       vaxv)
+               basic_machine=vax-dec
+               os=-sysv
+               ;;
+       vms)
+               basic_machine=vax-dec
+               os=-vms
+               ;;
+       vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+       vxworks960)
+               basic_machine=i960-wrs
+               os=-vxworks
+               ;;
+       vxworks68)
+               basic_machine=m68k-wrs
+               os=-vxworks
+               ;;
+       vxworks29k)
+               basic_machine=a29k-wrs
+               os=-vxworks
+               ;;
+       w65*)
+               basic_machine=w65-wdc
+               os=-none
+               ;;
+       w89k-*)
+               basic_machine=hppa1.1-winbond
+               os=-proelf
+               ;;
+       xbox)
+               basic_machine=i686-pc
+               os=-mingw32
+               ;;
+       xps | xps100)
+               basic_machine=xps100-honeywell
+               ;;
+       ymp)
+               basic_machine=ymp-cray
+               os=-unicos
+               ;;
+       z8k-*-coff)
+               basic_machine=z8k-unknown
+               os=-sim
+               ;;
+       z80-*-coff)
+               basic_machine=z80-unknown
+               os=-sim
+               ;;
+       none)
+               basic_machine=none-none
+               os=-none
+               ;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+       w89k)
+               basic_machine=hppa1.1-winbond
+               ;;
+       op50n)
+               basic_machine=hppa1.1-oki
+               ;;
+       op60c)
+               basic_machine=hppa1.1-oki
+               ;;
+       romp)
+               basic_machine=romp-ibm
+               ;;
+       mmix)
+               basic_machine=mmix-knuth
+               ;;
+       rs6000)
+               basic_machine=rs6000-ibm
+               ;;
+       vax)
+               basic_machine=vax-dec
+               ;;
+       pdp10)
+               # there are many clones, so DEC is not a safe bet
+               basic_machine=pdp10-unknown
+               ;;
+       pdp11)
+               basic_machine=pdp11-dec
+               ;;
+       we32k)
+               basic_machine=we32k-att
+               ;;
+       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+               basic_machine=sh-unknown
+               ;;
+       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+               basic_machine=sparc-sun
+               ;;
+       cydra)
+               basic_machine=cydra-cydrome
+               ;;
+       orion)
+               basic_machine=orion-highlevel
+               ;;
+       orion105)
+               basic_machine=clipper-highlevel
+               ;;
+       mac | mpw | mac-mpw)
+               basic_machine=m68k-apple
+               ;;
+       pmac | pmac-mpw)
+               basic_machine=powerpc-apple
+               ;;
+       *-unknown)
+               # Make sure to match an already-canonicalized machine name.
+               ;;
+       *)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+       *-digital*)
+               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+               ;;
+       *-commodore*)
+               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+               ;;
+       *)
+               ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+       # -solaris* is a basic system type, with this one exception.
+        -auroraux)
+               os=-auroraux
+               ;;
+       -solaris1 | -solaris1.*)
+               os=`echo $os | sed -e 's|solaris1|sunos4|'`
+               ;;
+       -solaris)
+               os=-solaris2
+               ;;
+       -svr4*)
+               os=-sysv4
+               ;;
+       -unixware*)
+               os=-sysv4.2uw
+               ;;
+       -gnu/linux*)
+               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+               ;;
+       # First accept the basic system types.
+       # The portable systems comes first.
+       # Each alternative MUST END IN A *, to match a version number.
+       # -sysv* is not here because it comes later, after sysvr4.
+       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* \
+             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+             | -aos* | -aros* \
+             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+             | -openbsd* | -solidbsd* \
+             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* | -cegcc* \
+             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+       # Remember, each alternative MUST END IN *, to match a version number.
+               ;;
+       -qnx*)
+               case $basic_machine in
+                   x86-* | i*86-*)
+                       ;;
+                   *)
+                       os=-nto$os
+                       ;;
+               esac
+               ;;
+       -nto-qnx*)
+               ;;
+       -nto*)
+               os=`echo $os | sed -e 's|nto|nto-qnx|'`
+               ;;
+       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+               ;;
+       -mac*)
+               os=`echo $os | sed -e 's|mac|macos|'`
+               ;;
+       -linux-dietlibc)
+               os=-linux-dietlibc
+               ;;
+       -linux*)
+               os=`echo $os | sed -e 's|linux|linux-gnu|'`
+               ;;
+       -sunos5*)
+               os=`echo $os | sed -e 's|sunos5|solaris2|'`
+               ;;
+       -sunos6*)
+               os=`echo $os | sed -e 's|sunos6|solaris3|'`
+               ;;
+       -opened*)
+               os=-openedition
+               ;;
+        -os400*)
+               os=-os400
+               ;;
+       -wince*)
+               os=-wince
+               ;;
+       -osfrose*)
+               os=-osfrose
+               ;;
+       -osf*)
+               os=-osf
+               ;;
+       -utek*)
+               os=-bsd
+               ;;
+       -dynix*)
+               os=-bsd
+               ;;
+       -acis*)
+               os=-aos
+               ;;
+       -atheos*)
+               os=-atheos
+               ;;
+       -syllable*)
+               os=-syllable
+               ;;
+       -386bsd)
+               os=-bsd
+               ;;
+       -ctix* | -uts*)
+               os=-sysv
+               ;;
+       -nova*)
+               os=-rtmk-nova
+               ;;
+       -ns2 )
+               os=-nextstep2
+               ;;
+       -nsk*)
+               os=-nsk
+               ;;
+       # Preserve the version number of sinix5.
+       -sinix5.*)
+               os=`echo $os | sed -e 's|sinix|sysv|'`
+               ;;
+       -sinix*)
+               os=-sysv4
+               ;;
+        -tpf*)
+               os=-tpf
+               ;;
+       -triton*)
+               os=-sysv3
+               ;;
+       -oss*)
+               os=-sysv3
+               ;;
+       -svr4)
+               os=-sysv4
+               ;;
+       -svr3)
+               os=-sysv3
+               ;;
+       -sysvr4)
+               os=-sysv4
+               ;;
+       # This must come after -sysvr4.
+       -sysv*)
+               ;;
+       -ose*)
+               os=-ose
+               ;;
+       -es1800*)
+               os=-ose
+               ;;
+       -xenix)
+               os=-xenix
+               ;;
+       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+               os=-mint
+               ;;
+       -aros*)
+               os=-aros
+               ;;
+       -kaos*)
+               os=-kaos
+               ;;
+       -zvmoe)
+               os=-zvmoe
+               ;;
+       -dicos*)
+               os=-dicos
+               ;;
+       -none)
+               ;;
+       *)
+               # Get rid of the `-' at the beginning of $os.
+               os=`echo $os | sed 's/[^-]*-//'`
+               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+        score-*)
+               os=-elf
+               ;;
+        spu-*)
+               os=-elf
+               ;;
+       *-acorn)
+               os=-riscix1.2
+               ;;
+       arm*-rebel)
+               os=-linux
+               ;;
+       arm*-semi)
+               os=-aout
+               ;;
+        c4x-* | tic4x-*)
+               os=-coff
+               ;;
+       # This must come before the *-dec entry.
+       pdp10-*)
+               os=-tops20
+               ;;
+       pdp11-*)
+               os=-none
+               ;;
+       *-dec | vax-*)
+               os=-ultrix4.2
+               ;;
+       m68*-apollo)
+               os=-domain
+               ;;
+       i386-sun)
+               os=-sunos4.0.2
+               ;;
+       m68000-sun)
+               os=-sunos3
+               # This also exists in the configure program, but was not the
+               # default.
+               # os=-sunos4
+               ;;
+       m68*-cisco)
+               os=-aout
+               ;;
+        mep-*)
+               os=-elf
+               ;;
+       mips*-cisco)
+               os=-elf
+               ;;
+       mips*-*)
+               os=-elf
+               ;;
+       or32-*)
+               os=-coff
+               ;;
+       *-tti)  # must be before sparc entry or we get the wrong os.
+               os=-sysv3
+               ;;
+       sparc-* | *-sun)
+               os=-sunos4.1.1
+               ;;
+       *-be)
+               os=-beos
+               ;;
+       *-haiku)
+               os=-haiku
+               ;;
+       *-ibm)
+               os=-aix
+               ;;
+       *-knuth)
+               os=-mmixware
+               ;;
+       *-wec)
+               os=-proelf
+               ;;
+       *-winbond)
+               os=-proelf
+               ;;
+       *-oki)
+               os=-proelf
+               ;;
+       *-hp)
+               os=-hpux
+               ;;
+       *-hitachi)
+               os=-hiux
+               ;;
+       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+               os=-sysv
+               ;;
+       *-cbm)
+               os=-amigaos
+               ;;
+       *-dg)
+               os=-dgux
+               ;;
+       *-dolphin)
+               os=-sysv3
+               ;;
+       m68k-ccur)
+               os=-rtu
+               ;;
+       m88k-omron*)
+               os=-luna
+               ;;
+       *-next )
+               os=-nextstep
+               ;;
+       *-sequent)
+               os=-ptx
+               ;;
+       *-crds)
+               os=-unos
+               ;;
+       *-ns)
+               os=-genix
+               ;;
+       i370-*)
+               os=-mvs
+               ;;
+       *-next)
+               os=-nextstep3
+               ;;
+       *-gould)
+               os=-sysv
+               ;;
+       *-highlevel)
+               os=-bsd
+               ;;
+       *-encore)
+               os=-bsd
+               ;;
+       *-sgi)
+               os=-irix
+               ;;
+       *-siemens)
+               os=-sysv4
+               ;;
+       *-masscomp)
+               os=-rtu
+               ;;
+       f30[01]-fujitsu | f700-fujitsu)
+               os=-uxpv
+               ;;
+       *-rom68k)
+               os=-coff
+               ;;
+       *-*bug)
+               os=-coff
+               ;;
+       *-apple)
+               os=-macos
+               ;;
+       *-atari*)
+               os=-mint
+               ;;
+       *)
+               os=-none
+               ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+       *-unknown)
+               case $os in
+                       -riscix*)
+                               vendor=acorn
+                               ;;
+                       -sunos*)
+                               vendor=sun
+                               ;;
+                       -cnk*|-aix*)
+                               vendor=ibm
+                               ;;
+                       -beos*)
+                               vendor=be
+                               ;;
+                       -hpux*)
+                               vendor=hp
+                               ;;
+                       -mpeix*)
+                               vendor=hp
+                               ;;
+                       -hiux*)
+                               vendor=hitachi
+                               ;;
+                       -unos*)
+                               vendor=crds
+                               ;;
+                       -dgux*)
+                               vendor=dg
+                               ;;
+                       -luna*)
+                               vendor=omron
+                               ;;
+                       -genix*)
+                               vendor=ns
+                               ;;
+                       -mvs* | -opened*)
+                               vendor=ibm
+                               ;;
+                       -os400*)
+                               vendor=ibm
+                               ;;
+                       -ptx*)
+                               vendor=sequent
+                               ;;
+                       -tpf*)
+                               vendor=ibm
+                               ;;
+                       -vxsim* | -vxworks* | -windiss*)
+                               vendor=wrs
+                               ;;
+                       -aux*)
+                               vendor=apple
+                               ;;
+                       -hms*)
+                               vendor=hitachi
+                               ;;
+                       -mpw* | -macos*)
+                               vendor=apple
+                               ;;
+                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+                               vendor=atari
+                               ;;
+                       -vos*)
+                               vendor=stratus
+                               ;;
+               esac
+               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+               ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..927e918
--- /dev/null
+++ b/configure
@@ -0,0 +1,18637 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for pygobject 2.28.6.
+#
+# Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject>.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+
+  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+        /*)
+          for as_base in sh bash ksh sh5; do
+            # Try only shells that exist, to save several forks.
+            as_shell=$as_dir/$as_base
+            if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+          done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  # We cannot yet assume a decent shell, so we have to provide a
+       # neutralization value for shells without unset; and this also
+       # works around shells that cannot unset nonexistent variables.
+       # Preserve -v and -x to the replacement shell.
+       BASH_ENV=/dev/null
+       ENV=/dev/null
+       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+       export CONFIG_SHELL
+       case $- in # ((((
+         *v*x* | *x*v* ) as_opts=-vx ;;
+         *v* ) as_opts=-v ;;
+         *x* ) as_opts=-x ;;
+         * ) as_opts= ;;
+       esac
+       exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='pygobject'
+PACKAGE_TARNAME='pygobject'
+PACKAGE_VERSION='2.28.6'
+PACKAGE_STRING='pygobject 2.28.6'
+PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject'
+PACKAGE_URL=''
+
+ac_unique_file="gobject/gobjectmodule.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+INTROSPECTION_COMPILER
+INTROSPECTION_SCANNER
+ENABLE_CAIRO_FALSE
+ENABLE_CAIRO_TRUE
+ENABLE_INTROSPECTION_FALSE
+ENABLE_INTROSPECTION_TRUE
+PYCAIRO_LIBS
+PYCAIRO_CFLAGS
+GI_DATADIR
+GI_LIBS
+GI_CFLAGS
+BUILD_GIOUNIX_FALSE
+BUILD_GIOUNIX_TRUE
+GIOUNIX_LIBS
+GIOUNIX_CFLAGS
+BUILD_GIO_FALSE
+BUILD_GIO_TRUE
+GIO_LIBS
+GIO_CFLAGS
+LIBFFI_PC
+HAVE_LIBFFI_FALSE
+HAVE_LIBFFI_TRUE
+FFI_LIBS
+FFI_CFLAGS
+DATADIR
+pygobject_CODEGEN_DEFINES
+PYTHON_BASENAME
+GLIB_MKENUMS
+GOBJECT_QUERY
+GLIB_GENMARSHAL
+GLIB_LIBS
+GLIB_CFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+THREADING_CFLAGS
+ENABLE_DOCS_FALSE
+ENABLE_DOCS_TRUE
+XSLTPROC
+PLATFORM
+PYTHON_INCLUDES
+pkgpyexecdir
+pyexecdir
+pkgpythondir
+pythondir
+PYTHON_PLATFORM
+PYTHON_EXEC_PREFIX
+PYTHON_PREFIX
+PYTHON_VERSION
+PYTHON
+CPP
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+RANLIB
+ac_ct_AR
+AR
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+LIBTOOL
+OBJDUMP
+DLLTOOL
+AS
+OS_WIN32_FALSE
+OS_WIN32_TRUE
+PLATFORM_WIN32_FALSE
+PLATFORM_WIN32_TRUE
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+PYGOBJECT_MICRO_VERSION
+PYGOBJECT_MINOR_VERSION
+PYGOBJECT_MAJOR_VERSION
+ACLOCAL_AMFLAGS
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_maintainer_mode
+enable_static
+enable_shared
+with_pic
+enable_fast_install
+enable_dependency_tracking
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+enable_thread
+enable_docs
+enable_glibtest
+with_ffi
+enable_cairo
+enable_introspection
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+FFI_CFLAGS
+FFI_LIBS
+GIO_CFLAGS
+GIO_LIBS
+GIOUNIX_CFLAGS
+GIOUNIX_LIBS
+GI_CFLAGS
+GI_LIBS
+PYCAIRO_CFLAGS
+PYCAIRO_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
+               datadir sysconfdir sharedstatedir localstatedir includedir \
+               oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+               libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used" >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_myself" : 'X\(//\)[^/]' \| \
+        X"$as_myself" : 'X\(//\)$' \| \
+        X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+       pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures pygobject 2.28.6 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/pygobject]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of pygobject 2.28.6:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
+  --enable-maintainer-mode  enable make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer
+  --enable-static[=PKGS]  build static libraries [default=no]
+  --enable-shared[=PKGS]  build shared libraries [default=yes]
+  --enable-fast-install[=PKGS]
+                          optimize for fast installation [default=yes]
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --disable-thread        Disable pygobject threading support
+  --enable-docs           Enable documentation building
+  --disable-glibtest      do not try to compile and run a test GLIB program
+  --enable-cairo          Enable Cairo bindings using introspection
+                          information
+  --enable-introspection  Use introspection information
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-pic              try to use only PIC/non-PIC objects [default=use
+                          both]
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-sysroot=DIR Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).
+  --without-ffi           Disable libffi support
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  PKG_CONFIG  path to pkg-config utility
+  PKG_CONFIG_PATH
+              directories to add to pkg-config's search path
+  PKG_CONFIG_LIBDIR
+              path overriding pkg-config's built-in search path
+  FFI_CFLAGS  C compiler flags for FFI, overriding pkg-config
+  FFI_LIBS    linker flags for FFI, overriding pkg-config
+  GIO_CFLAGS  C compiler flags for GIO, overriding pkg-config
+  GIO_LIBS    linker flags for GIO, overriding pkg-config
+  GIOUNIX_CFLAGS
+              C compiler flags for GIOUNIX, overriding pkg-config
+  GIOUNIX_LIBS
+              linker flags for GIOUNIX, overriding pkg-config
+  GI_CFLAGS   C compiler flags for GI, overriding pkg-config
+  GI_LIBS     linker flags for GI, overriding pkg-config
+  PYCAIRO_CFLAGS
+              C compiler flags for PYCAIRO, overriding pkg-config
+  PYCAIRO_LIBS
+              linker flags for PYCAIRO, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+pygobject configure 2.28.6
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by pygobject $as_me 2.28.6, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+       ac_must_keep_next=false # Got value, back to normal.
+      else
+       case $ac_arg in
+         *=* | --config-cache | -C | -disable-* | --disable-* \
+         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+         | -with-* | --with-* | -without-* | --without-* | --x)
+           case "$ac_configure_args0 " in
+             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+           esac
+           ;;
+         -* ) ac_must_keep_next=true ;;
+       esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+       "s/'\''/'\''\\\\'\'''\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+       # differences in whitespace do not lead to failure.
+       ac_old_val_w=`echo x $ac_old_val`
+       ac_new_val_w=`echo x $ac_new_val`
+       if test "$ac_old_val_w" != "$ac_new_val_w"; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+         ac_cache_corrupted=:
+       else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+         eval $ac_var=\$ac_old_val
+       fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ACLOCAL_AMFLAGS="-I m4 -I ."
+
+
+
+
+
+$as_echo "#define PYGOBJECT_MAJOR_VERSION 2" >>confdefs.h
+
+PYGOBJECT_MAJOR_VERSION=2
+
+
+$as_echo "#define PYGOBJECT_MINOR_VERSION 28" >>confdefs.h
+
+PYGOBJECT_MINOR_VERSION=28
+
+
+$as_echo "#define PYGOBJECT_MICRO_VERSION 6" >>confdefs.h
+
+PYGOBJECT_MICRO_VERSION=6
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
+
+am__api_version='1.11'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+         if test $ac_prog = install &&
+           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           :
+         elif test $ac_prog = install &&
+           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # program-specific install script used by HP pwplus--don't use.
+           :
+         else
+           rm -rf conftest.one conftest.two conftest.dir
+           echo one > conftest.one
+           echo two > conftest.two
+           mkdir conftest.dir
+           if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+             test -s conftest.one && test -s conftest.two &&
+             test -s conftest.dir/conftest.one &&
+             test -s conftest.dir/conftest.two
+           then
+             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+             break 3
+           fi
+         fi
+       fi
+      done
+    done
+    ;;
+esac
+
+  done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='pygobject'
+ VERSION='2.28.6'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+    # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for some Win32 platform" >&5
+$as_echo_n "checking for some Win32 platform... " >&6; }
+case "$host" in
+  *-*-mingw*|*-*-cygwin*)
+    platform_win32=yes
+    ;;
+  *)
+    platform_win32=no
+    ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $platform_win32" >&5
+$as_echo "$platform_win32" >&6; }
+ if test "$platform_win32" = "yes"; then
+  PLATFORM_WIN32_TRUE=
+  PLATFORM_WIN32_FALSE='#'
+else
+  PLATFORM_WIN32_TRUE='#'
+  PLATFORM_WIN32_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native Win32" >&5
+$as_echo_n "checking for native Win32... " >&6; }
+case "$host" in
+  *-*-mingw*)
+    os_win32=yes
+    ;;
+  *)
+    os_win32=no
+    ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $os_win32" >&5
+$as_echo "$os_win32" >&6; }
+ if test "$os_win32" = "yes"; then
+  OS_WIN32_TRUE=
+  OS_WIN32_FALSE='#'
+else
+  OS_WIN32_TRUE='#'
+  OS_WIN32_FALSE=
+fi
+
+
+# Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+  enableval=$enable_static; 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
+else
+  enable_static=no
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AS"; then
+  ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AS="${ac_tool_prefix}as"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+  ac_ct_AS=$AS
+  # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AS"; then
+  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_AS="as"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AS" = x; then
+    AS="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AS=$ac_ct_AS
+  fi
+else
+  AS="$ac_cv_prog_AS"
+fi
+
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+  ac_ct_DLLTOOL=$DLLTOOL
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DLLTOOL"; then
+  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DLLTOOL" = x; then
+    DLLTOOL="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DLLTOOL=$ac_ct_DLLTOOL
+  fi
+else
+  DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+  ac_ct_OBJDUMP=$OBJDUMP
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OBJDUMP="objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+  ;;
+esac
+
+test -z "$AS" && AS=as
+
+
+
+
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+case `pwd` in
+  *\ * | *\    *)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4'
+macro_revision='1.3293'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+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 delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
+else
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO ""
+}
+
+case "$ECHO" in
+  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+       ;;
+    [ab].out )
+       # We found the default executable, but exeext='' is most
+       # certainly right.
+       break;;
+    *.* )
+       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       then :; else
+          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       fi
+       # We set ac_cv_exeext here because the later test for it is not
+       # safe: cross compilers may not add the suffix if given an `-o'
+       # argument, so we may need to know it at that point already.
+       # Even if this section looks crufty: it has the advantage of
+       # actually working.
+       break;;
+    * )
+       break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if ${ac_cv_path_FGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+   then ac_cv_path_FGREP="$GREP -F"
+   else
+     if test -z "$FGREP"; then
+  ac_path_FGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in fgrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+  # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'FGREP' >> "conftest.nl"
+    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_FGREP="$ac_path_FGREP"
+      ac_path_FGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_FGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_FGREP"; then
+    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_FGREP=$FGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${lt_cv_path_LD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # 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
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if ${lt_cv_path_NM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in dumpbin "link -dump"
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DUMPBIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DUMPBIN"; then
+  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$DUMPBIN" && break
+  done
+fi
+if test -z "$DUMPBIN"; then
+  ac_ct_DUMPBIN=$DUMPBIN
+  for ac_prog in dumpbin "link -dump"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DUMPBIN"; then
+  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_DUMPBIN" && break
+done
+
+  if test "x$ac_ct_DUMPBIN" = x; then
+    DUMPBIN=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DUMPBIN=$ac_ct_DUMPBIN
+  fi
+fi
+
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
+
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if ${lt_cv_nm_interface+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
+  cat conftest.out >&5
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if ${lt_cv_sys_max_cmd_len+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    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* | cegcc*)
+    # 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;
+    ;;
+
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    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
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      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`
+    else
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # 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.
+      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+                = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+             test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      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`
+    fi
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
+    ;;
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if ${lt_cv_ld_reload_flag+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+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
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
+  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
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+  ac_ct_OBJDUMP=$OBJDUMP
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OBJDUMP="objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if ${lt_cv_deplibs_check_method+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+aix[4-9]*)
+  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',
+  # unless we find 'file', for example because we are cross-compiling.
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    # Keep this pattern in sync with the one in func_win32_libid.
+    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+cegcc*)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | 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
+  ;;
+
+haiku*)
+  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])(-bit)?( [LM]SB)? 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
+  ;;
+
+interix[3-9]*)
+  # 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* | k*bsd*-gnu | kopensolaris*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  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=pass_all
+  ;;
+
+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
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  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
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+  ac_ct_DLLTOOL=$DLLTOOL
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DLLTOOL"; then
+  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DLLTOOL" = x; then
+    DLLTOOL="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DLLTOOL=$ac_ct_DLLTOOL
+  fi
+else
+  DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$AR" && break
+  done
+fi
+if test -z "$AR"; then
+  ac_ct_AR=$AR
+  for ac_prog in ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_AR" && break
+done
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ar_at_file=no
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test "$ac_status" -eq 0; then
+       # Ensure the archiver fails upon bogus file names.
+       rm -f conftest.$ac_objext libconftest.a
+       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+       if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+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
+
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 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
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK '"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[     ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+       mv -f "$nlist"T "$nlist"
+      else
+       rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+       if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+         cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+         # Now generate the symbol file.
+         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+         cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+LT_DLSYM_CONST struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+         cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+         # Now try linking the two files.
+         mv conftest.$ac_objext conftstm.$ac_objext
+         lt_globsym_save_LIBS=$LIBS
+         lt_globsym_save_CFLAGS=$CFLAGS
+         LIBS="conftstm.$ac_objext"
+         CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+           pipe_works=yes
+         fi
+         LIBS=$lt_globsym_save_LIBS
+         CFLAGS=$lt_globsym_save_CFLAGS
+       else
+         echo "cannot find nm_test_func in $nlist" >&5
+       fi
+      else
+       echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+  withval=$with_sysroot;
+else
+  with_sysroot=no
+fi
+
+
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+   if test "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
+   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+   ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+  enableval=$enable_libtool_lock;
+fi
+
+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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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 '$LINENO' "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+       case $host in
+         x86_64-*kfreebsd*-gnu)
+           LD="${LD-ld} -m elf_i386_fbsd"
+           ;;
+         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-*kfreebsd*-gnu)
+           LD="${LD-ld} -m elf_x86_64_fbsd"
+           ;;
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_x86_64"
+           ;;
+         ppc*-*linux*|powerpc*-*linux*)
+           LD="${LD-ld} -m elf64ppc"
+           ;;
+         s390*-*linux*|s390*-*tpf*)
+           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"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if ${lt_cv_cc_needs_belf+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_cc_needs_belf=yes
+else
+  lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+  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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+       if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+         LD="${LD-ld} -64"
+       fi
+       ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MANIFEST_TOOL"; then
+  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+  # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_MANIFEST_TOOL"; then
+  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_MANIFEST_TOOL" = x; then
+    MANIFEST_TOOL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+  fi
+else
+  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&5
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
+  case $host_os in
+    rhapsody* | darwin*)
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DSYMUTIL"; then
+  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+  ac_ct_DSYMUTIL=$DSYMUTIL
+  # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DSYMUTIL"; then
+  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DSYMUTIL" = x; then
+    DSYMUTIL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DSYMUTIL=$ac_ct_DSYMUTIL
+  fi
+else
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NMEDIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NMEDIT"; then
+  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+  ac_ct_NMEDIT=$NMEDIT
+  # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_NMEDIT"; then
+  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_NMEDIT="nmedit"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_NMEDIT" = x; then
+    NMEDIT=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    NMEDIT=$ac_ct_NMEDIT
+  fi
+else
+  NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LIPO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LIPO"; then
+  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+  ac_ct_LIPO=$LIPO
+  # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_LIPO"; then
+  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_LIPO="lipo"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_LIPO" = x; then
+    LIPO=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    LIPO=$ac_ct_LIPO
+  fi
+else
+  LIPO="$ac_cv_prog_LIPO"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL"; then
+  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+  ac_ct_OTOOL=$OTOOL
+  # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL"; then
+  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL="otool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL" = x; then
+    OTOOL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OTOOL=$ac_ct_OTOOL
+  fi
+else
+  OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL64"; then
+  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+  ac_ct_OTOOL64=$OTOOL64
+  # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL64"; then
+  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL64="otool64"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL64" = x; then
+    OTOOL64=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OTOOL64=$ac_ct_OTOOL64
+  fi
+else
+  OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if ${lt_cv_apple_cc_single_mod+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+       # By default we will add the -single_module flag. You can override
+       # by either setting the environment variable LT_MULTI_MODULE
+       # non-empty at configure time, or by adding -multi_module to the
+       # link flags.
+       rm -rf libconftest.dylib*
+       echo "int foo(void){return 1;}" > conftest.c
+       echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+       $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+         -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+       if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+         lt_cv_apple_cc_single_mod=yes
+       else
+         cat conftest.err >&5
+       fi
+       rm -rf libconftest.dylib*
+       rm -f conftest.*
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_ld_exported_symbols_list=yes
+else
+  lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+       LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+      echo "$AR cru libconftest.a conftest.o" >&5
+      $AR cru libconftest.a conftest.o 2>&5
+      echo "$RANLIB libconftest.a" >&5
+      $RANLIB libconftest.a 2>&5
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+       lt_cv_ld_force_load=yes
+      else
+       cat conftest.err >&5
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
+    case $host_os in
+    rhapsody* | darwin1.[012])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+       10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+       10.[012]*)
+         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+       10.*)
+         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                  (('a' <= (c) && (c) <= 'i') \
+                    || ('j' <= (c) && (c) <= 'r') \
+                    || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                 inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in dlfcn.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+# Set options
+
+
+
+        enable_dlopen=no
+
+
+
+            # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; 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
+else
+  enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+  withval=$with_pic; pic_mode="$withval"
+else
+  pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+  # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+  enableval=$enable_fast_install; 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
+else
+  enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if ${lt_cv_objdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+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
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      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 <<_LT_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
+
+_LT_EOF
+         fi ;;
+       esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      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 <<_LT_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
+
+_LT_EOF
+         fi ;;
+       esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# 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
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$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*
+
+ac_outfile=conftest.$ac_objext
+echo "$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 -r conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  case $cc_basename in
+  nvcc*)
+    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+  *)
+    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+  esac
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # 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:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+
+
+
+
+
+  lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      lt_prog_compiler_static=
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+       # +Z the default
+       ;;
+      *)
+       lt_prog_compiler_pic='-fPIC'
+       ;;
+      esac
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      lt_prog_compiler_wl='-Xlinker '
+      lt_prog_compiler_pic='-Xcompiler -fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static='-Bstatic'
+      else
+       lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       lt_prog_compiler_pic='+Z'
+       ;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-KPIC'
+       lt_prog_compiler_static='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-fPIC'
+       lt_prog_compiler_static='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='--shared'
+       lt_prog_compiler_static='--static'
+       ;;
+      nagfor*)
+       # NAG Fortran compiler
+       lt_prog_compiler_wl='-Wl,-Wl,,'
+       lt_prog_compiler_pic='-PIC'
+       lt_prog_compiler_static='-Bstatic'
+       ;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-fpic'
+       lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      xl* | bgxl* | bgf* | mpixl*)
+       # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-qpic'
+       lt_prog_compiler_static='-qstaticlink'
+       ;;
+      *)
+       case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ F* | *Sun*Fortran*)
+         # Sun Fortran 8.3 passes all unrecognized flags to the linker
+         lt_prog_compiler_pic='-KPIC'
+         lt_prog_compiler_static='-Bstatic'
+         lt_prog_compiler_wl=''
+         ;;
+       *Sun\ C*)
+         # Sun C 5.9
+         lt_prog_compiler_pic='-KPIC'
+         lt_prog_compiler_static='-Bstatic'
+         lt_prog_compiler_wl='-Wl,'
+         ;;
+       esac
+       ;;
+      esac
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+       lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+       lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+       lt_prog_compiler_pic='-Kconform_pic'
+       lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # 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:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if ${lt_cv_prog_compiler_static_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$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>&5
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$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:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   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 "$_lt_compiler_boilerplate" | $SED '/^$/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_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $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 ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$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:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   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 "$_lt_compiler_boilerplate" | $SED '/^$/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_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $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 ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+  runpath_var=
+  allow_undefined_flag=
+  always_export_symbols=no
+  archive_cmds=
+  archive_expsym_cmds=
+  compiler_needs_object=no
+  enable_shared_with_static_runtimes=no
+  export_dynamic_flag_spec=
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic=no
+  hardcode_direct=no
+  hardcode_direct_absolute=no
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  inherit_rpath=no
+  link_all_deplibs=unknown
+  module_cmds=
+  module_expsym_cmds=
+  old_archive_from_new_cmds=
+  old_archive_from_expsyms_cmds=
+  thread_safe_flag_spec=
+  whole_archive_flag_spec=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
+  if test "$with_gnu_ld" = yes; then
+    case $host_os in
+      aix*)
+       # The AIX port of GNU ld has always aspired to compatibility
+       # with the native linker.  However, as the warning in the GNU ld
+       # block says, versions before 2.19.5* couldn't really create working
+       # shared libraries, regardless of the interface used.
+       case `$LD -v 2>&1` in
+         *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+         *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+         *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+         *)
+           lt_use_gnu_ld_interface=yes
+           ;;
+       esac
+       ;;
+      *)
+       lt_use_gnu_ld_interface=yes
+       ;;
+    esac
+  fi
+
+  if test "$lt_use_gnu_ld_interface" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+       ld_shlibs=no
+       cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       allow_undefined_flag=unsupported
+       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+       # support --undefined.  This deserves some investigation.  FIXME
+       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      export_dynamic_flag_spec='${wl}--export-all-symbols'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $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...
+       archive_expsym_cmds='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 $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+
+    haiku*)
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      link_all_deplibs=yes
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${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.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='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'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+       case $cc_basename in
+         diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
+       esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+        && test "$tmp_diet" = no
+      then
+       tmp_addflag=' $pic_flag'
+       tmp_sharedflag='-shared'
+       case $cc_basename,$host_cpu in
+        pgcc*)                         # Portland Group C compiler
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag'
+         ;;
+       pgf77* | pgf90* | pgf95* | pgfortran*)
+                                       # Portland Group f77 and f90 compilers
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag -Mnomain' ;;
+       ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
+         tmp_addflag=' -i_dynamic' ;;
+       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
+         tmp_addflag=' -i_dynamic -nofor_main' ;;
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
+       lf95*)                          # Lahey Fortran 8.1
+         whole_archive_flag_spec=
+         tmp_sharedflag='--shared' ;;
+       xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+         tmp_sharedflag='-qmkshrobj'
+         tmp_addflag= ;;
+       nvcc*)  # Cuda Compiler Driver 2.2
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         compiler_needs_object=yes
+         ;;
+       esac
+       case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ C*)                       # Sun C 5.9
+         whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         compiler_needs_object=yes
+         tmp_sharedflag='-G' ;;
+       *Sun\ F*)                       # Sun Fortran 8.3
+         tmp_sharedflag='-G' ;;
+       esac
+       archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+           cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+           echo "local: *; };" >> $output_objdir/$libname.ver~
+           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+       case $cc_basename in
+       xlf* | bgf* | bgxlf* | mpixlf*)
+         # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+         whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+         hardcode_libdir_flag_spec=
+         hardcode_libdir_flag_spec_ld='-rpath $libdir'
+         archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+         if test "x$supports_anon_versioning" = xyes; then
+           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+             echo "local: *; };" >> $output_objdir/$libname.ver~
+             $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+         fi
+         ;;
+       esac
+      else
+        ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+      else
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+       ld_shlibs=no
+       cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+       ld_shlibs=no
+       cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+       ;;
+       *)
+         # For security reasons, it is highly recommended that you always
+         # use absolute paths for naming shared libraries, and exclude the
+         # DT_RUNPATH tag from executables and libraries.  But doing so
+         # requires that you compile everything twice, which is a pain.
+         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+           hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+           archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+           archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+         else
+           ld_shlibs=no
+         fi
+       ;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       hardcode_direct=unsupported
+      fi
+      ;;
+
+    aix[4-9]*)
+      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
+       # If we're using GNU nm, then we don't want the "-C" option.
+       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       # Also, AIX nm treats weak defined symbols like other global
+       # defined symbols, whereas GNU nm marks them as "W".
+       if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+       else
+         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+       fi
+       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].*|aix[5-9]*)
+         for ld_flag in $LDFLAGS; do
+         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+           aix_use_runtimelinking=yes
+           break
+         fi
+         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.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_direct_absolute=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      file_list_spec='${wl}-f,'
+
+      if test "$GCC" = 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
+         :
+         else
+         # We have old collect2
+         hardcode_direct=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
+         hardcode_minus_L=yes
+         hardcode_libdir_flag_spec='-L$libdir'
+         hardcode_libdir_separator=
+         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
+
+      export_dynamic_flag_spec='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=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.
+       allow_undefined_flag='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+         /^0/ {
+             s/^0  *\([^ ]*\) *$/\1/
+             p
+         }
+      }'
+  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_="/usr/lib:/lib"
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
+
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+       if test "$host_cpu" = ia64; then
+         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+         allow_undefined_flag="-z nodefs"
+         archive_expsym_cmds="\$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.
+        if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+         /^0/ {
+             s/^0  *\([^ ]*\) *$/\1/
+             p
+         }
+      }'
+  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_="/usr/lib:/lib"
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
+
+        hardcode_libdir_flag_spec='${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.
+         no_undefined_flag=' ${wl}-bernotok'
+         allow_undefined_flag=' ${wl}-berok'
+         if test "$with_gnu_ld" = yes; then
+           # We only use this code for GNU lds that support --whole-archive.
+           whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+         else
+           # Exported symbols can be pulled into shared objects from archives
+           whole_archive_flag_spec='$convenience'
+         fi
+         archive_cmds_need_lc=yes
+         # This is similar to how AIX traditionally builds its shared libraries.
+         archive_expsym_cmds="\$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
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      case $cc_basename in
+      cl*)
+       # Native MSVC
+       hardcode_libdir_flag_spec=' '
+       allow_undefined_flag=unsupported
+       always_export_symbols=yes
+       file_list_spec='@'
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=".dll"
+       # FIXME: Setting linknames here is a bad hack.
+       archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+           sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+         else
+           sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+         fi~
+         $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+         linknames='
+       # The linker will not automatically build a static lib if we build a DLL.
+       # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+       enable_shared_with_static_runtimes=yes
+       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+       # Don't use ranlib
+       old_postinstall_cmds='chmod 644 $oldlib'
+       postlink_cmds='lt_outputfile="@OUTPUT@"~
+         lt_tool_outputfile="@TOOL_OUTPUT@"~
+         case $lt_outputfile in
+           *.exe|*.EXE) ;;
+           *)
+             lt_outputfile="$lt_outputfile.exe"
+             lt_tool_outputfile="$lt_tool_outputfile.exe"
+             ;;
+         esac~
+         if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+           $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+           $RM "$lt_outputfile.manifest";
+         fi'
+       ;;
+      *)
+       # Assume MSVC wrapper
+       hardcode_libdir_flag_spec=' '
+       allow_undefined_flag=unsupported
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=".dll"
+       # FIXME: Setting linknames here is a bad hack.
+       archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+       # The linker will automatically build a .lib file if we build a DLL.
+       old_archive_from_new_cmds='true'
+       # FIXME: Should let the user specify the lib program.
+       old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+       enable_shared_with_static_runtimes=yes
+       ;;
+      esac
+      ;;
+
+    darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc=no
+  hardcode_direct=no
+  hardcode_automatic=yes
+  hardcode_shlibpath_var=unsupported
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  else
+    whole_archive_flag_spec=''
+  fi
+  link_all_deplibs=yes
+  allow_undefined_flag="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=func_echo_all
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+  else
+  ld_shlibs=no
+  fi
+
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+       archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+       archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+       archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+       hardcode_libdir_flag_spec_ld='+b $libdir'
+       hardcode_libdir_separator=:
+       hardcode_direct=yes
+       hardcode_direct_absolute=yes
+       export_dynamic_flag_spec='${wl}-E'
+       # hardcode_minus_L: Not really in the search PATH,
+       # but as the default location of the library.
+       hardcode_minus_L=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*)
+         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      else
+       case $host_cpu in
+       hppa*64*)
+         archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+
+         # Older versions of the 11.00 compiler do not understand -b yet
+         # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+$as_echo_n "checking if $CC understands -b... " >&6; }
+if ${lt_cv_prog_compiler__b+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler__b=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS -b"
+   echo "$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>&5
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler__b=yes
+       fi
+     else
+       lt_cv_prog_compiler__b=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+$as_echo "$lt_cv_prog_compiler__b" >&6; }
+
+if test x"$lt_cv_prog_compiler__b" = xyes; then
+    archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
+         ;;
+       esac
+      fi
+      if test "$with_gnu_ld" = no; then
+       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+       hardcode_libdir_separator=:
+
+       case $host_cpu in
+       hppa*64*|ia64*)
+         hardcode_direct=no
+         hardcode_shlibpath_var=no
+         ;;
+       *)
+         hardcode_direct=yes
+         hardcode_direct_absolute=yes
+         export_dynamic_flag_spec='${wl}-E'
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         hardcode_minus_L=yes
+         ;;
+       esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       # Try to use the -exported_symbol ld option, if it does not
+       # work, assume that -exports_file does not work either and
+       # implicitly export all symbols.
+       # This should be the same for all languages, so no per-tag cache variable.
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_LDFLAGS="$LDFLAGS"
+          LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int foo (void) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_irix_exported_symbol=yes
+else
+  lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+           LDFLAGS="$save_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+       if test "$lt_cv_irix_exported_symbol" = yes; then
+          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+       fi
+      else
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      inherit_rpath=yes
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+       hardcode_direct=yes
+       hardcode_shlibpath_var=no
+       hardcode_direct_absolute=yes
+       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+         export_dynamic_flag_spec='${wl}-E'
+       else
+         case $host_os in
+          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+            hardcode_libdir_flag_spec='-R$libdir'
+            ;;
+          *)
+            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+            ;;
+         esac
+       fi
+      else
+       ld_shlibs=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       allow_undefined_flag=' -expect_unresolved \*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+
+    osf4* | osf5*)     # as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+       allow_undefined_flag=' -expect_unresolved \*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+       # Both c and cxx compiler support -rpath directly
+       hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_separator=:
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z defs'
+      if test "$GCC" = yes; then
+       wlarc='${wl}'
+       archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+       case `$CC -V 2>&1` in
+       *"Compilers 5.0"*)
+         wlarc=''
+         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+         ;;
+       *)
+         wlarc='${wl}'
+         archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+         ;;
+       esac
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+       # The compiler driver will combine and reorder linker options,
+       # but understands `-z linker_flag'.  GCC discards it without `$wl',
+       # but is careful enough not to reorder.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+       if test "$GCC" = yes; then
+         whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+       else
+         whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+       fi
+       ;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+       # Use $CC to link under sequent, because it throws in some extra .o
+       # files that make .init and .fini sections work.
+       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+       sni)
+         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
+         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+         reload_cmds='$CC -r -o $output$reload_objs'
+         hardcode_direct=no
+        ;;
+       motorola)
+         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+       ;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       hardcode_shlibpath_var=no
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+       export_dynamic_flag_spec='${wl}-Blargedynsym'
+       ;;
+      esac
+    fi
+  fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+         soname=conftest
+         lib=conftest
+         libobjs=conftest.$ac_objext
+         deplibs=
+         wl=$lt_prog_compiler_wl
+         pic_flag=$lt_prog_compiler_pic
+         compiler_flags=-v
+         linker_flags=-v
+         verstring=
+         output_objdir=.
+         libname=conftest
+         lt_save_allow_undefined_flag=$allow_undefined_flag
+         allow_undefined_flag=
+         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+         then
+           lt_cv_archive_cmds_need_lc=no
+         else
+           lt_cv_archive_cmds_need_lc=yes
+         fi
+         allow_undefined_flag=$lt_save_allow_undefined_flag
+       else
+         cat conftest.err 1>&5
+       fi
+       $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  case $host_os in
+    mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
+    *) lt_sed_strip_eq="s,=/,/,g" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+  case $lt_search_path_spec in
+  *\;*)
+    # 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.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+    ;;
+  *)
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+    ;;
+  esac
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[lt_foo]++; }
+  if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+  esac
+  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+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"
+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'
+  ;;
+
+aix[4-9]*)
+  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*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    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=`func_echo_all "$lib" | $SED '\''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'
+    ;;
+  esac
+  ;;
+
+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* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
+    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~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    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="$sys_lib_search_path_spec /usr/lib/w32api"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    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
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec="$LIB"
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH.
+        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
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # 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'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
+    ;;
+
+  *)
+    # Assume MSVC wrapper
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
+    ;;
+  esac
+  # 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}${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`'
+
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  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
+  ;;
+
+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
+    ;;
+  *) # from 4.6 on, and DragonFly
+    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
+  ;;
+
+haiku*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  dynamic_linker="$host_os runtime_loader"
+  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=LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  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'
+  # or fails outright, so override atomically:
+  install_override_mode=555
+  ;;
+
+interix[3-9]*)
+  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* | k*bsd*-gnu | kopensolaris*-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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+
+  # Some binutils ld are patched to set DT_RUNPATH
+  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+        LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+  lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+  # 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
+
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+  # 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>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[      ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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'
+  ;;
+
+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=qnx
+  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='ldqnx.so'
+  ;;
+
+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"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+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
+      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
+  shlibpath_overrides_runpath=yes
+  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'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    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'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/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}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+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
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+   test -n "$runpath_var" ||
+   test "X$hardcode_automatic" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct" != 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_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+   test "$inherit_rpath" = yes; 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
+
+
+
+
+
+
+  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* | cegcc*)
+    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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+    ;;
+
+  *)
+    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes; then :
+  lt_cv_dlopen="shl_load"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_shl_load=yes
+else
+  ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes; then :
+  lt_cv_dlopen="dlopen"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if ${ac_cv_lib_svld_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_svld_dlopen=yes
+else
+  ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if ${ac_cv_lib_dld_dld_link+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_dld_link=yes
+else
+  ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  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"
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+         if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "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
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 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;
+          else puts (dlerror ());
+       }
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self_static+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+         if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "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
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 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;
+          else puts (dlerror ());
+       }
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+    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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+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"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+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"
+      old_striplib="$STRIP -S"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    fi
+    ;;
+  *)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    ;;
+  esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+  # Report which library types will actually be built
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+  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
+    ;;
+
+  aix[4-9]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+        ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+: ${CONFIG_LT=./config.lt}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_LT" >&5
+$as_echo "$as_me: creating $CONFIG_LT" >&6;}
+as_write_fail=0
+cat >"$CONFIG_LT" <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>"$CONFIG_LT" <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## --------------------------------- ##
+## Main body of "$CONFIG_LT" script. ##
+## --------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x "$CONFIG_LT"
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $0 [OPTIONS]
+
+  -h, --help      print this help, then exit
+  -V, --version   print version number, then exit
+  -q, --quiet     do not print progress messages
+  -d, --debug     don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+pygobject config.lt 2.28.6
+configured by $0, generated by GNU Autoconf 2.68.
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $# != 0
+do
+  case $1 in
+    --version | --v* | -V )
+      echo "$lt_cl_version"; exit 0 ;;
+    --help | --h* | -h )
+      echo "$lt_cl_help"; exit 0 ;;
+    --debug | --d* | -d )
+      debug=: ;;
+    --quiet | --q* | --silent | --s* | -q )
+      lt_cl_silent=: ;;
+
+    -*) as_fn_error $? "unrecognized option: $1
+Try \`$0 --help' for more information." "$LINENO" 5 ;;
+
+    *) as_fn_error $? "unrecognized argument: $1
+Try \`$0 --help' for more information." "$LINENO" 5 ;;
+  esac
+  shift
+done
+
+if $lt_cl_silent; then
+  exec 6>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+
+
+# 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
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in AS \
+DLLTOOL \
+OBJDUMP \
+SHELL \
+ECHO \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+nm_file_list_spec \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postlink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'
+
+
+
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
+$as_echo "$as_me: creating $ofile" >&6;}
+
+
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+#                 Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool 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 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Assembler program.
+AS=$lt_AS
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$lt_OBJDUMP
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking.  This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_EOF >> "$cfgfile"
+# 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
+_LT_EOF
+    ;;
+  esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+
+  if test x"$xsi_shell" = xyes; then
+  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\    # positional parameters, so assign one to ordinary parameter first.\
+\    func_stripname_result=${3}\
+\    func_stripname_result=${func_stripname_result#"${1}"}\
+\    func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\    func_split_long_opt_name=${1%%=*}\
+\    func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\    func_split_short_opt_arg=${1#??}\
+\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\    case ${1} in\
+\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\      *)    func_lo2o_result=${1} ;;\
+\    esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+    func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+    func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+    func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+    eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\    func_quote_for_eval "${2}"\
+\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+   mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+
+as_fn_exit 0
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure.  Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test "$silent" = yes &&
+  lt_config_lt_args="$lt_config_lt_args --quiet"
+exec 5>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec 5>>config.log
+$lt_cl_success || as_fn_exit 1
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
+$as_echo_n "checking for library containing strerror... " >&6; }
+if ${ac_cv_search_strerror+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strerror ();
+int
+main ()
+{
+return strerror ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' cposix; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_strerror=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_strerror+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_strerror+:} false; then :
+
+else
+  ac_cv_search_strerror=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
+$as_echo "$ac_cv_search_strerror" >&6; }
+ac_res=$ac_cv_search_strerror
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+
+am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
+
+if test "x$CC" != xcc; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+                     sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+   test -f conftest2.$ac_objext && { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+      rm -f conftest2.*
+      if { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+        test -f conftest2.$ac_objext && { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
+      then
+       # cc works too.
+       :
+      else
+       # cc exists but doesn't like -o.
+       eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+
+
+
+# check that we have the minimum version of python necisary to build
+
+
+
+
+        if test -n "$PYTHON"; then
+      # If the user set $PYTHON, use it and don't search something else.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.5.2" >&5
+$as_echo_n "checking whether $PYTHON version >= 2.5.2... " >&6; }
+      prog="import sys
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '2.5.2'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
+   ($PYTHON -c "$prog") >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  as_fn_error $? "too old" "$LINENO" 5
+fi
+      am_display_PYTHON=$PYTHON
+    else
+      # Otherwise, try each interpreter until we find one that satisfies
+      # VERSION.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.5.2" >&5
+$as_echo_n "checking for a Python interpreter with version >= 2.5.2... " >&6; }
+if ${am_cv_pathless_PYTHON+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       for am_cv_pathless_PYTHON in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
+         test "$am_cv_pathless_PYTHON" = none && break
+         prog="import sys
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '2.5.2'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
+   ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then :
+  break
+fi
+       done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5
+$as_echo "$am_cv_pathless_PYTHON" >&6; }
+      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+      if test "$am_cv_pathless_PYTHON" = none; then
+       PYTHON=:
+      else
+        # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
+set dummy $am_cv_pathless_PYTHON; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PYTHON+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PYTHON in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+$as_echo "$PYTHON" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+      fi
+      am_display_PYTHON=$am_cv_pathless_PYTHON
+    fi
+
+
+  if test "$PYTHON" = :; then
+      as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5
+  else
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5
+$as_echo_n "checking for $am_display_PYTHON version... " >&6; }
+if ${am_cv_python_version+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
+$as_echo "$am_cv_python_version" >&6; }
+  PYTHON_VERSION=$am_cv_python_version
+
+
+
+  PYTHON_PREFIX='${prefix}'
+
+  PYTHON_EXEC_PREFIX='${exec_prefix}'
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5
+$as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
+if ${am_cv_python_platform+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5
+$as_echo "$am_cv_python_platform" >&6; }
+  PYTHON_PLATFORM=$am_cv_python_platform
+
+
+
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5
+$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; }
+if ${am_cv_python_pythondir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX'))" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5
+$as_echo "$am_cv_python_pythondir" >&6; }
+  pythondir=$am_cv_python_pythondir
+
+
+
+  pkgpythondir=\${pythondir}/$PACKAGE
+
+
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5
+$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; }
+if ${am_cv_python_pyexecdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX'))" 2>/dev/null ||
+     echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5
+$as_echo "$am_cv_python_pyexecdir" >&6; }
+  pyexecdir=$am_cv_python_pyexecdir
+
+
+
+  pkgpyexecdir=\${pyexecdir}/$PACKAGE
+
+
+
+  fi
+
+
+
+# check if we are building for python 3
+prog="import sys
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '3.0'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
+   ($PYTHON -c "$prog") >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then :
+  build_py3k=true
+else
+  build_py3k=false
+fi
+
+# if building for python 3 make sure we have the minimum version supported
+if test $build_py3k = true ; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON >= 3.1" >&5
+$as_echo_n "checking for $PYTHON >= 3.1... " >&6; }
+  prog="import sys
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '3.1'.split('.'))) + [0, 0, 0]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
+   ($PYTHON -c "$prog") >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  as_fn_error $? "too old" "$LINENO" 5
+fi
+fi
+
+
+
+
+
+        # Find any Python interpreter.
+    if test -z "$PYTHON"; then
+      for ac_prog in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PYTHON+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PYTHON in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+$as_echo "$PYTHON" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$PYTHON" && break
+done
+test -n "$PYTHON" || PYTHON=":"
+
+    fi
+    am_display_PYTHON=python
+
+
+  if test "$PYTHON" = :; then
+      as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5
+  else
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5
+$as_echo_n "checking for $am_display_PYTHON version... " >&6; }
+if ${am_cv_python_version+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
+$as_echo "$am_cv_python_version" >&6; }
+  PYTHON_VERSION=$am_cv_python_version
+
+
+
+  PYTHON_PREFIX='${prefix}'
+
+  PYTHON_EXEC_PREFIX='${exec_prefix}'
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5
+$as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
+if ${am_cv_python_platform+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5
+$as_echo "$am_cv_python_platform" >&6; }
+  PYTHON_PLATFORM=$am_cv_python_platform
+
+
+
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5
+$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; }
+if ${am_cv_python_pythondir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$prefix" = xNONE
+     then
+       am_py_prefix=$ac_default_prefix
+     else
+       am_py_prefix=$prefix
+     fi
+     am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+     case $am_cv_python_pythondir in
+     $am_py_prefix*)
+       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
+       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
+       ;;
+     *)
+       case $am_py_prefix in
+         /usr|/System*) ;;
+         *)
+         am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
+         ;;
+       esac
+       ;;
+     esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5
+$as_echo "$am_cv_python_pythondir" >&6; }
+  pythondir=$am_cv_python_pythondir
+
+
+
+  pkgpythondir=\${pythondir}/$PACKAGE
+
+
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5
+$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; }
+if ${am_cv_python_pyexecdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$exec_prefix" = xNONE
+     then
+       am_py_exec_prefix=$am_py_prefix
+     else
+       am_py_exec_prefix=$exec_prefix
+     fi
+     am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
+     echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+     case $am_cv_python_pyexecdir in
+     $am_py_exec_prefix*)
+       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
+       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
+       ;;
+     *)
+       case $am_py_exec_prefix in
+         /usr|/System*) ;;
+         *)
+          am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
+          ;;
+       esac
+       ;;
+     esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5
+$as_echo "$am_cv_python_pyexecdir" >&6; }
+  pyexecdir=$am_cv_python_pyexecdir
+
+
+
+  pkgpyexecdir=\${pyexecdir}/$PACKAGE
+
+
+
+  fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for headers required to compile python extensions" >&5
+$as_echo_n "checking for headers required to compile python extensions... " >&6; }
+py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
+py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
+PYTHON_CONFIG=`which $PYTHON`-config
+if test -x "$PYTHON_CONFIG"; then
+PYTHON_INCLUDES=`$PYTHON_CONFIG --includes 2>/dev/null`
+else
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+  PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+fi
+fi
+
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <Python.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+as_fn_error $? "could not find Python headers" "$LINENO" 5
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+CPPFLAGS="$save_CPPFLAGS"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PySignal_SetWakeupFd in Python.h" >&5
+$as_echo_n "checking for PySignal_SetWakeupFd in Python.h... " >&6; }
+old_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="-Wall -Werror $PYTHON_INCLUDES"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <Python.h>
+int
+main ()
+{
+PySignal_SetWakeupFd(0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  setwakeupfd_ok=yes
+else
+  setwakeupfd_ok=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $setwakeupfd_ok" >&5
+$as_echo "$setwakeupfd_ok" >&6; }
+if test "x$setwakeupfd_ok" != xno; then
+
+$as_echo "#define HAVE_PYSIGNAL_SETWAKEUPFD 1" >>confdefs.h
+
+fi
+CPPFLAGS=$old_CPPFLAGS
+
+PLATFORM=`$PYTHON -c "import sys; from distutils import util; sys.stdout.write(util.get_platform())"`
+
+
+# Check whether --enable-thread was given.
+if test "${enable_thread+set}" = set; then :
+  enableval=$enable_thread;
+else
+  enable_thread=yes
+fi
+
+
+# Check whether --enable-docs was given.
+if test "${enable_docs+set}" = set; then :
+  enableval=$enable_docs; enable_docs=$enableval
+else
+  enable_docs=no
+fi
+
+if test "${enable_docs}" != no; then
+        # Extract the first word of "xsltproc", so it can be a program name with args.
+set dummy xsltproc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_XSLTPROC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $XSLTPROC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+XSLTPROC=$ac_cv_path_XSLTPROC
+if test -n "$XSLTPROC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
+$as_echo "$XSLTPROC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  if test -z "$XSLTPROC"; then
+    enable_docs=no
+  fi
+
+          fi
+
+ if test x$enable_docs != xno; then
+  ENABLE_DOCS_TRUE=
+  ENABLE_DOCS_FALSE='#'
+else
+  ENABLE_DOCS_TRUE='#'
+  ENABLE_DOCS_FALSE=
+fi
+
+
+
+py_mod_var=`echo thread'_' | sed 'y%./+-%__p_%'`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module thread" >&5
+$as_echo_n "checking for python module thread... " >&6; }
+if eval \${py_cv_mod_$py_mod_var+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+prog="
+import sys
+try:
+        import thread
+except ImportError:
+        sys.exit(1)
+except:
+        sys.exit(0)
+sys.exit(0)"
+if $PYTHON -c "$prog" 1>&5 2>&5
+  then
+    eval "py_cv_mod_$py_mod_var=yes"
+  else
+    eval "py_cv_mod_$py_mod_var=no"
+  fi
+
+fi
+
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
+if test "x$py_val" != xno; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  enable_thread=check_for_py3_module
+fi
+
+if test "x$enable_thread" = xcheck_for_py3_module; then
+
+py_mod_var=`echo _thread'_' | sed 'y%./+-%__p_%'`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module _thread" >&5
+$as_echo_n "checking for python module _thread... " >&6; }
+if eval \${py_cv_mod_$py_mod_var+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+prog="
+import sys
+try:
+        import _thread
+except ImportError:
+        sys.exit(1)
+except:
+        sys.exit(0)
+sys.exit(0)"
+if $PYTHON -c "$prog" 1>&5 2>&5
+  then
+    eval "py_cv_mod_$py_mod_var=yes"
+  else
+    eval "py_cv_mod_$py_mod_var=no"
+  fi
+
+fi
+
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
+if test "x$py_val" != xno; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  enable_thread=no
+fi
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable threading in pygobject" >&5
+$as_echo_n "checking whether to enable threading in pygobject... " >&6; }
+if test "x$enable_thread" != xno; then
+  extra_mods=gthread
+  THREADING_CFLAGS=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  extra_mods=
+  THREADING_CFLAGS="-DDISABLE_THREADING"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+CPPFLAGS="${CPPFLAGS} $THREADING_CFLAGS"
+
+export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+
+# Check whether --enable-glibtest was given.
+if test "${enable_glibtest+set}" = set; then :
+  enableval=$enable_glibtest;
+else
+  enable_glibtest=yes
+fi
+
+
+  pkg_config_args=glib-2.0
+  for module in . gobject $extra_mods
+  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"
+         ;;
+         gio*)
+             pkg_config_args="$pkg_config_args $module-2.0"
+         ;;
+      esac
+  done
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=0.16
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               PKG_CONFIG=""
+       fi
+fi
+
+  no_glib=""
+
+  if test "x$PKG_CONFIG" = x ; then
+    no_glib=yes
+    PKG_CONFIG=no
+  fi
+
+  min_glib_version=2.24.0
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB - version >= $min_glib_version" >&5
+$as_echo_n "checking for GLIB - version >= $min_glib_version... " >&6; }
+
+  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"
+      rm -f conf.glibtest
+      if test "$cross_compiling" = yes; then :
+  echo $ac_n "cross compiling; assumed OK... $ac_c"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+  unsigned int major, minor, micro;
+  char *tmp_version;
+
+  fclose (fopen ("conf.glibtest", "w"));
+
+  /* HP/UX 9 (%@#!) writes to sscanf strings */
+  tmp_version = g_strdup("$min_glib_version");
+  if (sscanf(tmp_version, "%u.%u.%u", &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 (%u.%u.%u) was found.\n",
+               glib_major_version, glib_minor_version, glib_micro_version);
+        printf("*** You need a version of GLIB newer than %u.%u.%u. 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;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  no_glib=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+       CFLAGS="$ac_save_CFLAGS"
+       LIBS="$ac_save_LIBS"
+     fi
+  fi
+  if test "x$no_glib" = x ; then
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5
+$as_echo "yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6; }
+     :
+  else
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+     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"
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <glib.h>
+#include <stdio.h>
+
+int
+main ()
+{
+ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+   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"
+else
+   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."
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+          CFLAGS="$ac_save_CFLAGS"
+          LIBS="$ac_save_LIBS"
+       fi
+     fi
+     GLIB_CFLAGS=""
+     GLIB_LIBS=""
+     GLIB_GENMARSHAL=""
+     GOBJECT_QUERY=""
+     GLIB_MKENUMS=""
+     as_fn_error $? "maybe you want the pygobject-2-4 branch?" "$LINENO" 5
+  fi
+
+
+
+
+
+  rm -f conf.glibtest
+
+if test -n "$export_dynamic"; then
+  GLIB_LIBS=`echo $GLIB_LIBS | sed -e "s/$export_dynamic//"`
+fi
+PYTHON_BASENAME=`basename $PYTHON`
+
+
+pygobject_CODEGEN_DEFINES=""
+
+
+
+  EXP_VAR=DATADIR
+  FROM_VAR=$datadir
+
+    prefix_save=$prefix
+  exec_prefix_save=$exec_prefix
+
+    if test "x$prefix" = "xNONE"; then
+    prefix=$ac_default_prefix
+  fi
+    if test "x$exec_prefix" = "xNONE"; then
+    exec_prefix=$prefix
+  fi
+
+  full_var="$FROM_VAR"
+    while true; do
+    new_full_var="`eval echo $full_var`"
+    if test "x$new_full_var"="x$full_var"; then break; fi
+    full_var=$new_full_var
+  done
+
+    full_var=$new_full_var
+  DATADIR="$full_var"
+
+
+    prefix=$prefix_save
+  exec_prefix=$exec_prefix_save
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffi" >&5
+$as_echo_n "checking for ffi... " >&6; }
+
+# Check whether --with-ffi was given.
+if test "${with_ffi+set}" = set; then :
+  withval=$with_ffi; with_libffi=$withval
+else
+  with_libffi=auto
+fi
+
+if test x"$with_libffi" = xno ; then
+  have_libffi=false
+else
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFI" >&5
+$as_echo_n "checking for FFI... " >&6; }
+
+if test -n "$FFI_CFLAGS"; then
+    pkg_cv_FFI_CFLAGS="$FFI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi >= 3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libffi >= 3.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_FFI_CFLAGS=`$PKG_CONFIG --cflags "libffi >= 3.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$FFI_LIBS"; then
+    pkg_cv_FFI_LIBS="$FFI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi >= 3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libffi >= 3.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_FFI_LIBS=`$PKG_CONFIG --libs "libffi >= 3.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               FFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi >= 3.0" 2>&1`
+        else
+               FFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi >= 3.0" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$FFI_PKG_ERRORS" >&5
+
+       have_libffi=no
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       have_libffi=no
+else
+       FFI_CFLAGS=$pkg_cv_FFI_CFLAGS
+       FFI_LIBS=$pkg_cv_FFI_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       have_libffi=yes
+fi
+fi
+if test x"$with_libffi" = xyes && test x"$have_libffi" = xno ; then
+  as_fn_error $? "ffi requested, but not found" "$LINENO" 5
+fi
+if test x"$have_libffi" = xyes; then
+
+$as_echo "#define HAVE_FFI_H 1" >>confdefs.h
+
+  LIBFFI_PC=libffi
+fi
+ if test "$have_libffi" = "yes"; then
+  HAVE_LIBFFI_TRUE=
+  HAVE_LIBFFI_FALSE='#'
+else
+  HAVE_LIBFFI_TRUE='#'
+  HAVE_LIBFFI_FALSE=
+fi
+
+
+
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIO" >&5
+$as_echo_n "checking for GIO... " >&6; }
+
+if test -n "$GIO_CFLAGS"; then
+    pkg_cv_GIO_CFLAGS="$GIO_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.24.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.24.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.24.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GIO_LIBS"; then
+    pkg_cv_GIO_LIBS="$GIO_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.24.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.24.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.24.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gio-2.0 >= 2.24.0" 2>&1`
+        else
+               GIO_PKG_ERRORS=`$PKG_CONFIG --print-errors "gio-2.0 >= 2.24.0" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$GIO_PKG_ERRORS" >&5
+
+       have_gio=false
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       have_gio=false
+else
+       GIO_CFLAGS=$pkg_cv_GIO_CFLAGS
+       GIO_LIBS=$pkg_cv_GIO_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       have_gio=true
+fi
+
+
+
+# Do not build GIO if the python version >= 3.0
+# We use GI to access GIO in python 3
+ if test $have_gio = true -a $build_py3k = false; then
+  BUILD_GIO_TRUE=
+  BUILD_GIO_FALSE='#'
+else
+  BUILD_GIO_TRUE='#'
+  BUILD_GIO_FALSE=
+fi
+
+
+if test -n "$export_dynamic"; then
+  GIO_LIBS=`echo $GIO_LIBS | sed -e "s/$export_dynamic//"`
+fi
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIOUNIX" >&5
+$as_echo_n "checking for GIOUNIX... " >&6; }
+
+if test -n "$GIOUNIX_CFLAGS"; then
+    pkg_cv_GIOUNIX_CFLAGS="$GIOUNIX_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 >= 2.22.4\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 >= 2.22.4") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GIOUNIX_CFLAGS=`$PKG_CONFIG --cflags "gio-unix-2.0 >= 2.22.4" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GIOUNIX_LIBS"; then
+    pkg_cv_GIOUNIX_LIBS="$GIOUNIX_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 >= 2.22.4\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 >= 2.22.4") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GIOUNIX_LIBS=`$PKG_CONFIG --libs "gio-unix-2.0 >= 2.22.4" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               GIOUNIX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gio-unix-2.0 >= 2.22.4" 2>&1`
+        else
+               GIOUNIX_PKG_ERRORS=`$PKG_CONFIG --print-errors "gio-unix-2.0 >= 2.22.4" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$GIOUNIX_PKG_ERRORS" >&5
+
+       have_giounix=false
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       have_giounix=false
+else
+       GIOUNIX_CFLAGS=$pkg_cv_GIOUNIX_CFLAGS
+       GIOUNIX_LIBS=$pkg_cv_GIOUNIX_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       have_giounix=true
+fi
+
+
+ if test $have_giounix = true -a $build_py3k = false; then
+  BUILD_GIOUNIX_TRUE=
+  BUILD_GIOUNIX_FALSE='#'
+else
+  BUILD_GIOUNIX_TRUE='#'
+  BUILD_GIOUNIX_FALSE=
+fi
+
+if test -n "$export_dynamic"; then
+  GIOUNIX_LIBS=`echo $GIOUNIX_LIBS | sed -e "s/$export_dynamic//"`
+fi
+
+# Check whether --enable-cairo was given.
+if test "${enable_cairo+set}" = set; then :
+  enableval=$enable_cairo; enable_cairo=$enableval
+else
+  enable_cairo=yes
+fi
+
+
+# Check whether --enable-introspection was given.
+if test "${enable_introspection+set}" = set; then :
+  enableval=$enable_introspection; enable_introspection=$enableval
+else
+  enable_introspection=yes
+fi
+
+if test "$enable_introspection" != no; then
+
+$as_echo "#define ENABLE_INTROSPECTION 1" >>confdefs.h
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GI" >&5
+$as_echo_n "checking for GI... " >&6; }
+
+if test -n "$GI_CFLAGS"; then
+    pkg_cv_GI_CFLAGS="$GI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0
+        gobject-introspection-1.0 >= 0.10.2
+    \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0
+        gobject-introspection-1.0 >= 0.10.2
+    ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GI_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.24.0
+        gobject-introspection-1.0 >= 0.10.2
+    " 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GI_LIBS"; then
+    pkg_cv_GI_LIBS="$GI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0
+        gobject-introspection-1.0 >= 0.10.2
+    \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0
+        gobject-introspection-1.0 >= 0.10.2
+    ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GI_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.24.0
+        gobject-introspection-1.0 >= 0.10.2
+    " 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               GI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.24.0
+        gobject-introspection-1.0 >= 0.10.2
+    " 2>&1`
+        else
+               GI_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.24.0
+        gobject-introspection-1.0 >= 0.10.2
+    " 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$GI_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (glib-2.0 >= 2.24.0
+        gobject-introspection-1.0 >= 0.10.2
+    ) were not met:
+
+$GI_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables GI_CFLAGS
+and GI_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables GI_CFLAGS
+and GI_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+
+else
+       GI_CFLAGS=$pkg_cv_GI_CFLAGS
+       GI_LIBS=$pkg_cv_GI_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+    GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
+
+
+    if test "$enable_cairo" != no; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYCAIRO" >&5
+$as_echo_n "checking for PYCAIRO... " >&6; }
+
+if test -n "$PYCAIRO_CFLAGS"; then
+    pkg_cv_PYCAIRO_CFLAGS="$PYCAIRO_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pycairo >= 1.2.0
+        \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "pycairo >= 1.2.0
+        ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_PYCAIRO_CFLAGS=`$PKG_CONFIG --cflags "pycairo >= 1.2.0
+        " 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$PYCAIRO_LIBS"; then
+    pkg_cv_PYCAIRO_LIBS="$PYCAIRO_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pycairo >= 1.2.0
+        \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "pycairo >= 1.2.0
+        ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_PYCAIRO_LIBS=`$PKG_CONFIG --libs "pycairo >= 1.2.0
+        " 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               PYCAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pycairo >= 1.2.0
+        " 2>&1`
+        else
+               PYCAIRO_PKG_ERRORS=`$PKG_CONFIG --print-errors "pycairo >= 1.2.0
+        " 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$PYCAIRO_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (pycairo >= 1.2.0
+        ) were not met:
+
+$PYCAIRO_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables PYCAIRO_CFLAGS
+and PYCAIRO_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables PYCAIRO_CFLAGS
+and PYCAIRO_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+
+else
+       PYCAIRO_CFLAGS=$pkg_cv_PYCAIRO_CFLAGS
+       PYCAIRO_LIBS=$pkg_cv_PYCAIRO_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+    fi
+fi
+ if test "$enable_introspection" = "yes"; then
+  ENABLE_INTROSPECTION_TRUE=
+  ENABLE_INTROSPECTION_FALSE='#'
+else
+  ENABLE_INTROSPECTION_TRUE='#'
+  ENABLE_INTROSPECTION_FALSE=
+fi
+
+ if test "$enable_cairo" = "yes"; then
+  ENABLE_CAIRO_TRUE=
+  ENABLE_CAIRO_FALSE='#'
+else
+  ENABLE_CAIRO_TRUE='#'
+  ENABLE_CAIRO_FALSE=
+fi
+
+
+INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+
+
+
+
+if test "x$GCC" = "xyes"; then
+
+case " $CFLAGS " in
+*[\    \ ]-Wall[\      \ ]*)
+  ;;
+*)
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -Wall"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -Wall" >&5
+$as_echo_n "checking whether $CC understands -Wall... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  jh_has_option=yes
+else
+  jh_has_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jh_has_option" >&5
+$as_echo "$jh_has_option" >&6; }
+  if test $jh_has_option = no; then
+    CFLAGS="$save_CFLAGS"
+  fi
+  ;;
+esac
+
+case " $CFLAGS " in
+*[\    \ ]-fno-strict-aliasing[\       \ ]*)
+  ;;
+*)
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -fno-strict-aliasing"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -fno-strict-aliasing" >&5
+$as_echo_n "checking whether $CC understands -fno-strict-aliasing... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  jh_has_option=yes
+else
+  jh_has_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jh_has_option" >&5
+$as_echo "$jh_has_option" >&6; }
+  if test $jh_has_option = no; then
+    CFLAGS="$save_CFLAGS"
+  fi
+  ;;
+esac
+
+  case $host_os in
+  solaris*)
+    ;;
+  *)
+
+case " $CFLAGS " in
+*[\    \ ]-std=c9x[\   \ ]*)
+  ;;
+*)
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -std=c9x"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -std=c9x" >&5
+$as_echo_n "checking whether $CC understands -std=c9x... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  jh_has_option=yes
+else
+  jh_has_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jh_has_option" >&5
+$as_echo "$jh_has_option" >&6; }
+  if test $jh_has_option = no; then
+    CFLAGS="$save_CFLAGS"
+  fi
+  ;;
+esac
+    ;;
+  esac
+
+fi
+
+ac_config_files="$ac_config_files Makefile pygobject-2.0.pc pygobject-2.0-uninstalled.pc codegen/Makefile codegen/pygobject-codegen-2.0 docs/Makefile docs/reference/entities.docbook docs/xsl/fixxref.py gi/Makefile gi/repository/Makefile gi/overrides/Makefile glib/Makefile gobject/Makefile gio/Makefile examples/Makefile tests/Makefile PKG-INFO"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+       "s/'/'\\\\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+       cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+         mv -f confcache "$cache_file"$$ &&
+         mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+         mv -f confcache "$cache_file" ;;
+       esac
+      fi
+    fi
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${PLATFORM_WIN32_TRUE}" && test -z "${PLATFORM_WIN32_FALSE}"; then
+  as_fn_error $? "conditional \"PLATFORM_WIN32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then
+  as_fn_error $? "conditional \"OS_WIN32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_DOCS_TRUE}" && test -z "${ENABLE_DOCS_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_DOCS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_LIBFFI_TRUE}" && test -z "${HAVE_LIBFFI_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_LIBFFI\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_GIO_TRUE}" && test -z "${BUILD_GIO_FALSE}"; then
+  as_fn_error $? "conditional \"BUILD_GIO\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_GIOUNIX_TRUE}" && test -z "${BUILD_GIOUNIX_FALSE}"; then
+  as_fn_error $? "conditional \"BUILD_GIOUNIX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_INTROSPECTION_TRUE}" && test -z "${ENABLE_INTROSPECTION_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_INTROSPECTION\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_CAIRO_TRUE}" && test -z "${ENABLE_CAIRO_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_CAIRO\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by pygobject $as_me 2.28.6, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+pygobject config.status 2.28.6
+configured by $0, generated by GNU Autoconf 2.68,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=?*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# 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
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in AS \
+DLLTOOL \
+OBJDUMP \
+SHELL \
+ECHO \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+nm_file_list_spec \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postlink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'
+
+ac_aux_dir='$ac_aux_dir'
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "pygobject-2.0.pc") CONFIG_FILES="$CONFIG_FILES pygobject-2.0.pc" ;;
+    "pygobject-2.0-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pygobject-2.0-uninstalled.pc" ;;
+    "codegen/Makefile") CONFIG_FILES="$CONFIG_FILES codegen/Makefile" ;;
+    "codegen/pygobject-codegen-2.0") CONFIG_FILES="$CONFIG_FILES codegen/pygobject-codegen-2.0" ;;
+    "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
+    "docs/reference/entities.docbook") CONFIG_FILES="$CONFIG_FILES docs/reference/entities.docbook" ;;
+    "docs/xsl/fixxref.py") CONFIG_FILES="$CONFIG_FILES docs/xsl/fixxref.py" ;;
+    "gi/Makefile") CONFIG_FILES="$CONFIG_FILES gi/Makefile" ;;
+    "gi/repository/Makefile") CONFIG_FILES="$CONFIG_FILES gi/repository/Makefile" ;;
+    "gi/overrides/Makefile") CONFIG_FILES="$CONFIG_FILES gi/overrides/Makefile" ;;
+    "glib/Makefile") CONFIG_FILES="$CONFIG_FILES glib/Makefile" ;;
+    "gobject/Makefile") CONFIG_FILES="$CONFIG_FILES gobject/Makefile" ;;
+    "gio/Makefile") CONFIG_FILES="$CONFIG_FILES gio/Makefile" ;;
+    "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
+    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+    "PKG-INFO") CONFIG_FILES="$CONFIG_FILES PKG-INFO" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = "\a"
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[         ]*VPATH[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[      ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[    ]*#[    ]*define[       ][      ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = "\a"
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+        # (if the path is not absolute).  The absolute path cannot be DOS-style,
+        # because $ac_f cannot contain `:'.
+        test -f "$ac_f" ||
+          case $ac_f in
+          [\\/$]*) false;;
+          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+          esac ||
+          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+       `' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$ac_tmp/config.h" "$ac_file" \
+       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$_am_arg" : 'X\(//\)[^/]' \| \
+        X"$_am_arg" : 'X\(//\)$' \| \
+        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$mf" : 'X\(//\)[^/]' \| \
+        X"$mf" : 'X\(//\)$' \| \
+        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$file" : 'X\(//\)[^/]' \| \
+        X"$file" : 'X\(//\)$' \| \
+        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+    "libtool":C)
+
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+#                 Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool 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 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Assembler program.
+AS=$lt_AS
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$lt_OBJDUMP
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking.  This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_EOF >> "$cfgfile"
+# 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
+_LT_EOF
+    ;;
+  esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+
+  if test x"$xsi_shell" = xyes; then
+  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\    # positional parameters, so assign one to ordinary parameter first.\
+\    func_stripname_result=${3}\
+\    func_stripname_result=${func_stripname_result#"${1}"}\
+\    func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\    func_split_long_opt_name=${1%%=*}\
+\    func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\    func_split_short_opt_arg=${1#??}\
+\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\    case ${1} in\
+\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\      *)    func_lo2o_result=${1} ;;\
+\    esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+    func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+    func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+    func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+    eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\    func_quote_for_eval "${2}"\
+\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+   mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+ ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+echo
+echo "libffi support: $have_libffi"
+echo "introspection support: $enable_introspection"
+echo
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..1b923b4
--- /dev/null
@@ -0,0 +1,303 @@
+-*- mode: m4 -*-
+AC_PREREQ(2.52)
+
+# The version of python used is determined by the executable pointed to by
+# the PYTHON environment variable.  For instance if your system installs
+# Python 3 as python3 to configure to compile pygobject under Python 3
+# you would do this:
+# $> PYTHON=python3 ./configure
+m4_define(python_min_ver, 2.5.2)
+m4_define(python3_min_ver, 3.1)
+
+dnl the pygobject version number
+m4_define(pygobject_major_version, 2)
+m4_define(pygobject_minor_version, 28)
+m4_define(pygobject_micro_version, 6)
+m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version)
+
+dnl versions of packages we require ...
+m4_define(introspection_required_version, 0.10.2)
+m4_define(pycairo_required_version, 1.2.0)
+m4_define(glib_required_version, 2.24.0)
+m4_define(gio_required_version, 2.24.0)
+m4_define(giounix_required_version, 2.22.4)
+
+AC_INIT(pygobject, pygobject_version,
+        [http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject])
+AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I .")
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_SRCDIR([gobject/gobjectmodule.c])
+
+AC_DEFINE(PYGOBJECT_MAJOR_VERSION, pygobject_major_version, [pygobject major version])
+AC_SUBST(PYGOBJECT_MAJOR_VERSION, pygobject_major_version)
+AC_DEFINE(PYGOBJECT_MINOR_VERSION, pygobject_minor_version, [pygobject minor version])
+AC_SUBST(PYGOBJECT_MINOR_VERSION, pygobject_minor_version)
+AC_DEFINE(PYGOBJECT_MICRO_VERSION, pygobject_micro_version, [pygobject micro version])
+AC_SUBST(PYGOBJECT_MICRO_VERSION, pygobject_micro_version)
+
+AM_CONFIG_HEADER(config.h)
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
+AM_INIT_AUTOMAKE(foreign)
+AM_MAINTAINER_MODE
+
+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
+dnl when using libtool 2.x create libtool early, because it's used in configure
+m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
+AC_ISC_POSIX
+AC_PROG_CC
+AM_PROG_CC_STDC
+AM_PROG_CC_C_O
+
+# check that we have the minimum version of python necisary to build
+JD_PATH_PYTHON(python_min_ver)
+
+# check if we are building for python 3
+JD_PYTHON_CHECK_VERSION([$PYTHON], [3.0],
+                        build_py3k=true,
+                        build_py3k=false)
+
+# if building for python 3 make sure we have the minimum version supported
+if test $build_py3k = true ; then
+  AC_MSG_CHECKING([for $PYTHON >=] python3_min_ver)
+  JD_PYTHON_CHECK_VERSION([$PYTHON], python3_min_ver,
+                         [AC_MSG_RESULT(yes)],
+                         [AC_MSG_ERROR(too old)])
+fi
+
+AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
+
+AC_MSG_CHECKING([for PySignal_SetWakeupFd in Python.h])
+old_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="-Wall -Werror $PYTHON_INCLUDES"
+AC_TRY_COMPILE([#include <Python.h>],
+  [PySignal_SetWakeupFd(0);],
+  setwakeupfd_ok=yes,
+  setwakeupfd_ok=no)
+AC_MSG_RESULT($setwakeupfd_ok)
+if test "x$setwakeupfd_ok" != xno; then
+  AC_DEFINE(HAVE_PYSIGNAL_SETWAKEUPFD, 1,
+                [Define to 1 if PySignal_SetWakeupFd is available])
+fi
+CPPFLAGS=$old_CPPFLAGS
+
+PLATFORM=`$PYTHON -c "import sys; from distutils import util; sys.stdout.write(util.get_platform())"`
+AC_SUBST(PLATFORM)
+
+AC_ARG_ENABLE(thread,
+  AC_HELP_STRING([--disable-thread], [Disable pygobject threading support]),,
+  enable_thread=yes)
+
+dnl Building documentation
+AC_ARG_ENABLE(docs,
+  AC_HELP_STRING([--enable-docs], [Enable documentation building]),enable_docs=$enableval,
+  enable_docs=no)
+if test "${enable_docs}" != no; then
+  dnl
+  dnl Check for xsltproc
+  dnl
+  AC_PATH_PROG([XSLTPROC], [xsltproc])
+  if test -z "$XSLTPROC"; then
+    enable_docs=no
+  fi
+
+  dnl check for DocBook DTD and stylesheets in the local catalog.
+  dnl JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
+  dnl   [DocBook XML DTD V4.1.2],,enable_docs=no)
+  dnl JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
+  dnl   [DocBook XSL Stylesheets],,enable_docs=no)
+fi
+
+AM_CONDITIONAL(ENABLE_DOCS, test x$enable_docs != xno)
+
+AM_CHECK_PYMOD(thread,,,enable_thread=check_for_py3_module)
+if test "x$enable_thread" = xcheck_for_py3_module; then
+  dnl Python 3 uses the _thread module so check for that
+  AM_CHECK_PYMOD(_thread,,,enable_thread=no)
+fi
+
+AC_MSG_CHECKING(whether to enable threading in pygobject)
+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(maybe you want the pygobject-2-4 branch?)],gobject $extra_mods)
+if test -n "$export_dynamic"; then
+  GLIB_LIBS=`echo $GLIB_LIBS | sed -e "s/$export_dynamic//"`
+fi
+PYTHON_BASENAME=`basename $PYTHON`
+AC_SUBST([PYTHON_BASENAME])
+
+pygobject_CODEGEN_DEFINES=""
+AC_SUBST([pygobject_CODEGEN_DEFINES])
+
+AS_AC_EXPAND(DATADIR, $datadir)
+
+dnl libffi
+AC_MSG_CHECKING(for ffi)
+AC_ARG_WITH(ffi,
+  AC_HELP_STRING([--without-ffi], [Disable libffi support]),
+  with_libffi=$withval,
+  with_libffi=auto)
+if test x"$with_libffi" = xno ; then
+  have_libffi=false
+else
+  PKG_CHECK_MODULES(FFI, libffi >= 3.0, have_libffi=yes, have_libffi=no)
+fi
+if test x"$with_libffi" = xyes && test x"$have_libffi" = xno ; then
+  AC_MSG_ERROR([ffi requested, but not found])
+fi
+if test x"$have_libffi" = xyes; then
+  AC_DEFINE(HAVE_FFI_H,1,[Have libffi include files])
+  LIBFFI_PC=libffi
+fi
+AM_CONDITIONAL(HAVE_LIBFFI, test "$have_libffi" = "yes")
+AC_SUBST(FFI_CFLAGS)
+AC_SUBST(FFI_LIBS)
+AC_SUBST(LIBFFI_PC)
+
+dnl gio
+PKG_CHECK_MODULES(GIO, gio-2.0 >= gio_required_version,
+       have_gio=true, have_gio=false)
+AC_SUBST(GIO_CFLAGS)
+AC_SUBST(GIO_LIBS)
+
+# Do not build GIO if the python version >= 3.0
+# We use GI to access GIO in python 3
+AM_CONDITIONAL(BUILD_GIO, test $have_gio = true -a $build_py3k = false)
+
+if test -n "$export_dynamic"; then
+  GIO_LIBS=`echo $GIO_LIBS | sed -e "s/$export_dynamic//"`
+fi
+
+dnl giounix
+PKG_CHECK_MODULES(GIOUNIX, gio-unix-2.0 >= giounix_required_version,
+       have_giounix=true, have_giounix=false)
+AC_SUBST(GIOUNIX_CFLAGS)
+AC_SUBST(GIOUNIX_LIBS)
+AM_CONDITIONAL(BUILD_GIOUNIX, test $have_giounix = true -a $build_py3k = false)
+if test -n "$export_dynamic"; then
+  GIOUNIX_LIBS=`echo $GIOUNIX_LIBS | sed -e "s/$export_dynamic//"`
+fi
+
+AC_ARG_ENABLE(cairo,
+    AC_HELP_STRING([--enable-cairo], [Enable Cairo bindings using introspection information]),
+    enable_cairo=$enableval,
+    enable_cairo=yes)
+
+AC_ARG_ENABLE(introspection,
+  AC_HELP_STRING([--enable-introspection], [Use introspection information]),
+  enable_introspection=$enableval,
+  enable_introspection=yes)
+if test "$enable_introspection" != no; then
+    AC_DEFINE(ENABLE_INTROSPECTION,1,Use introspection information)
+    PKG_CHECK_MODULES(GI,
+        glib-2.0 >= glib_required_version
+        gobject-introspection-1.0 >= introspection_required_version
+    )
+
+    GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
+    AC_SUBST(GI_DATADIR)
+
+    if test "$enable_cairo" != no; then
+        PKG_CHECK_MODULES(PYCAIRO,
+            pycairo >= pycairo_required_version
+        )
+    fi
+fi
+AM_CONDITIONAL(ENABLE_INTROSPECTION, test "$enable_introspection" = "yes")
+AM_CONDITIONAL(ENABLE_CAIRO, test "$enable_cairo" = "yes")
+
+INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+
+AC_SUBST(INTROSPECTION_SCANNER)
+AC_SUBST(INTROSPECTION_COMPILER)
+
+dnl add required cflags ...
+if test "x$GCC" = "xyes"; then
+  JH_ADD_CFLAG([-Wall])
+  JH_ADD_CFLAG([-fno-strict-aliasing])
+
+  case $host_os in
+  solaris*)
+    ;;
+  *)
+    JH_ADD_CFLAG([-std=c9x])
+    ;;
+  esac
+
+fi
+
+AC_CONFIG_FILES(
+  Makefile
+  pygobject-2.0.pc
+  pygobject-2.0-uninstalled.pc
+  codegen/Makefile
+  codegen/pygobject-codegen-2.0
+  docs/Makefile
+  docs/reference/entities.docbook
+  docs/xsl/fixxref.py
+  gi/Makefile
+  gi/repository/Makefile
+  gi/overrides/Makefile
+  glib/Makefile
+  gobject/Makefile
+  gio/Makefile
+  examples/Makefile
+  tests/Makefile
+  PKG-INFO)
+AC_OUTPUT
+
+echo
+echo "libffi support: $have_libffi"
+echo "introspection support: $enable_introspection"
+echo
diff --git a/depcomp b/depcomp
new file mode 100755 (executable)
index 0000000..df8eea7
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,630 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
+
+# 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, see <http://www.gnu.org/licenses/>.
+
+# 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.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u="sed s,\\\\\\\\,/,g"
+   depmode=msvisualcpp
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> "$depfile"
+    echo >> "$depfile"
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
+    "$@" -Wc,-M
+  else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
+    "$@" -M
+  fi
+  stat=$?
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${
+              s/^ *//
+              s/ \\*$//
+              s/$/:/
+              p
+            }' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no eat=no
+  for arg
+  do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+       set fnord "$@"
+       shift
+       shift
+       ;;
+    *)
+       set fnord "$@" "$arg"
+       shift
+       shift
+       ;;
+    esac
+  done
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::     \1 \\:p' >> "$depfile"
+  echo "       " >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644 (file)
index 0000000..418df8a
--- /dev/null
@@ -0,0 +1,197 @@
+REF_VERSION = $(PYGOBJECT_MAJOR_VERSION).$(PYGOBJECT_MINOR_VERSION)
+FULL_VERSION = $(REF_VERSION).$(PYGOBJECT_MICRO_VERSION)
+
+BUILDDIR = $(top_builddir)/docs
+
+CSS_FILES = style.css
+
+HTML_FILES =                                   \
+       html/class-gobjectgboxed.html           \
+       html/class-gobjectginterface.html       \
+       html/class-gobjectgpointer.html         \
+       html/class-gobject.html                 \
+       html/class-glibmaincontext.html         \
+       html/class-glibmainloop.html            \
+       html/glib-constants.html                \
+       html/glib-functions.html                \
+       html/gobject-class-reference.html       \
+       html/glib-class-reference.html          \
+       html/class-gioapplaunchcontext.html     \
+       html/class-gioappinfo.html              \
+       html/class-gioasyncresult.html          \
+       html/class-giobufferedinputstream.html  \
+       html/class-giobufferedoutputstream.html \
+       html/class-giocancellable.html          \
+       html/class-giodatainputstream.html      \
+       html/class-giodataoutputstream.html     \
+       html/class-giodrive.html                \
+       html/class-gioemblem.html               \
+       html/class-gioemblemedicon.html         \
+       html/class-giofile.html                 \
+       html/class-giofileattributeinfo.html    \
+       html/class-giofileenumerator.html       \
+       html/class-giofileicon.html             \
+       html/class-giofileinfo.html             \
+       html/class-giofileinputstream.html      \
+       html/class-giofilemonitor.html          \
+       html/class-giofileoutputstream.html     \
+       html/class-giofilterinputstream.html    \
+       html/class-giofilteroutputstream.html   \
+       html/class-gioicon.html                 \
+       html/class-gioinputstream.html          \
+       html/class-gioloadableicon.html         \
+       html/class-giomemoryinputstream.html    \
+       html/class-giomemoryoutputstream.html   \
+       html/class-giomount.html                \
+       html/class-giomountoperation.html       \
+       html/class-giooutputstream.html         \
+       html/class-gioseekable.html             \
+       html/class-giosimpleasyncresult.html    \
+       html/class-giothemedicon.html           \
+       html/class-giounixinputstream.html      \
+       html/class-giounixoutputstream.html     \
+       html/class-giovolume.html               \
+       html/class-giovolumemonitor.html        \
+       html/gio-constants.html                 \
+       html/gio-functions.html                 \
+       html/gio-class-reference.html           \
+       html/giounix-class-reference.html       \
+       html/gobject-constants.html             \
+       html/gobject-functions.html             \
+       html/index.html                         \
+       html/index.sgml                         \
+       html/pygobject.devhelp                  \
+       html/pygobject-introduction.html
+
+
+XML_FILES =                                            \
+       reference/pygobject.xml                         \
+       reference/pygobject-introduction.xml            \
+       reference/pygobject-classes.xml                 \
+       reference/pygobject-constants.xml               \
+       reference/pygobject-ref.xml                     \
+       reference/pygobject-functions.xml               \
+       reference/pygobject-gboxed.xml                  \
+       reference/pygobject-ginterface.xml              \
+       reference/pygobject-gpointer.xml                \
+       reference/pyglib-classes.xml                    \
+       reference/pyglib-constants.xml                  \
+       reference/pyglib-functions.xml                  \
+       reference/pyglib-maincontext.xml                \
+       reference/pyglib-mainloop.xml                   \
+       reference/pygio-classes.xml                     \
+       reference/pygiounix-classes.xml                 \
+       reference/pygio-constants.xml                   \
+       reference/pygio-functions.xml                   \
+       reference/pygio-applaunchcontext.xml            \
+       reference/pygio-appinfo.xml                     \
+       reference/pygio-asyncresult.xml                 \
+       reference/pygio-bufferedinputstream.xml         \
+       reference/pygio-bufferedoutputstream.xml        \
+       reference/pygio-cancellable.xml                 \
+       reference/pygio-datainputstream.xml             \
+       reference/pygio-dataoutputstream.xml            \
+       reference/pygio-drive.xml                       \
+       reference/pygio-emblem.xml                      \
+       reference/pygio-emblemedicon.xml                \
+       reference/pygio-file.xml                        \
+       reference/pygio-fileattributeinfo.xml           \
+       reference/pygio-fileenumerator.xml              \
+       reference/pygio-fileicon.xml                    \
+       reference/pygio-fileinfo.xml                    \
+       reference/pygio-fileinputstream.xml             \
+       reference/pygio-filemonitor.xml                 \
+       reference/pygio-fileoutputstream.xml            \
+       reference/pygio-filterinputstream.xml           \
+       reference/pygio-filteroutputstream.xml          \
+       reference/pygio-icon.xml                        \
+       reference/pygio-inputstream.xml                 \
+       reference/pygio-loadableicon.xml                \
+       reference/pygio-memoryinputstream.xml           \
+       reference/pygio-memoryoutputstream.xml          \
+       reference/pygio-mount.xml                       \
+       reference/pygio-mountoperation.xml              \
+       reference/pygio-outputstream.xml                \
+       reference/pygio-seekable.xml                    \
+       reference/pygio-simpleasyncresult.xml           \
+       reference/pygio-themedicon.xml                  \
+       reference/pygio-unixinputstream.xml             \
+       reference/pygio-unixoutputstream.xml            \
+       reference/pygio-volume.xml                      \
+       reference/pygio-volumemonitor.xml
+
+XSL_FILES =                    \
+       xsl/common.xsl          \
+       xsl/devhelp.xsl         \
+       xsl/html.xsl            \
+       xsl/pdf-style.xsl       \
+       xsl/pdf.xsl             \
+       xsl/ref-html-style.xsl
+
+# fixxref cannot be included in XSL_FILES, because automake is touching it
+# so the date is newer then the files in HTML_FILES
+FIXXREF = xsl/fixxref.py
+
+TARGET_DIR = $(datadir)/gtk-doc/html/pygobject
+CSSdir = $(TARGET_DIR)
+CSS_DATA = $(CSS_FILES)
+
+
+install-data-local:
+       installfiles=`echo $(srcdir)/html/*`; \
+       if test "$$installfiles" = '$(srcdir)/html/*'; \
+       then echo '-- Nothing to install' ; \
+       else \
+         $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
+         for i in $$installfiles; do \
+           echo '-- Installing '$$i ; \
+           $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+         done; \
+         echo '-- Installing $(srcdir)/html/index.sgml' ; \
+         $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+       fi
+
+uninstall-local:
+       rm -f $(DESTDIR)$(TARGET_DIR)/*
+
+
+XSLdir = $(datadir)/pygobject/xsl
+XSL_DATA = $(XSL_FILES) $(FIXXREF)
+
+EXTRA_DIST =           \
+       $(HTML_FILES)   \
+       $(XML_FILES)    \
+       $(XSL_FILES)    \
+       $(FIXXREF)      \
+       $(CSS_FILES)
+
+reference/builddate.xml:
+       @$(PYTHON) -c 'import datetime; print datetime.date.today()' > $@
+
+
+if ENABLE_DOCS
+
+BUILT_SOURCES = reference/builddate.xml $(HTML_FILES)
+CLEANFILES = reference/builddate.xml $(HTML_FILES)
+
+
+# Do not add a builddate.xml dependency here, because the generated html 
+# documentation will be included in the tarball so xsltproc is not needed to 
+# install the documentation. Adding a builddate.xml dependency will force 
+# the documentation to be rebuilt when it doesn't need to be.
+$(HTML_FILES): $(XML_FILES) $(XSL_FILES)
+       @xsltproc --nonet --xinclude -o $(BUILDDIR)/html/ \
+                --path $(BUILDDIR)/reference:$(srcdir)/reference \
+                 --stringparam gtkdoc.bookname "pygobject" \
+                 --stringparam gtkdoc.version ${REF_VERSION} \
+                 $(srcdir)/xsl/ref-html-style.xsl \
+                 $(srcdir)/reference/pygobject-ref.xml
+
+# pdf: $(REFERENCE_DEPS) reference/builddate.xml
+#      xsltproc --nonet --xinclude -o pygobject-ref.fo xsl/pdf-style.xsl \
+#              reference/pygobject-ref.xml
+#      pdfxmltex pygobject-ref.fo >output </dev/null
+
+endif
+
+-include $(top_srcdir)/git.mk
diff --git a/docs/Makefile.in b/docs/Makefile.in
new file mode 100644 (file)
index 0000000..acb75a7
--- /dev/null
@@ -0,0 +1,662 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = docs
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+       $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(CSSdir)" "$(DESTDIR)$(XSLdir)"
+DATA = $(CSS_DATA) $(XSL_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
+GI_LIBS = @GI_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PLATFORM = @PLATFORM@
+PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
+PYCAIRO_LIBS = @PYCAIRO_LIBS@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+REF_VERSION = $(PYGOBJECT_MAJOR_VERSION).$(PYGOBJECT_MINOR_VERSION)
+FULL_VERSION = $(REF_VERSION).$(PYGOBJECT_MICRO_VERSION)
+BUILDDIR = $(top_builddir)/docs
+CSS_FILES = style.css
+HTML_FILES = \
+       html/class-gobjectgboxed.html           \
+       html/class-gobjectginterface.html       \
+       html/class-gobjectgpointer.html         \
+       html/class-gobject.html                 \
+       html/class-glibmaincontext.html         \
+       html/class-glibmainloop.html            \
+       html/glib-constants.html                \
+       html/glib-functions.html                \
+       html/gobject-class-reference.html       \
+       html/glib-class-reference.html          \
+       html/class-gioapplaunchcontext.html     \
+       html/class-gioappinfo.html              \
+       html/class-gioasyncresult.html          \
+       html/class-giobufferedinputstream.html  \
+       html/class-giobufferedoutputstream.html \
+       html/class-giocancellable.html          \
+       html/class-giodatainputstream.html      \
+       html/class-giodataoutputstream.html     \
+       html/class-giodrive.html                \
+       html/class-gioemblem.html               \
+       html/class-gioemblemedicon.html         \
+       html/class-giofile.html                 \
+       html/class-giofileattributeinfo.html    \
+       html/class-giofileenumerator.html       \
+       html/class-giofileicon.html             \
+       html/class-giofileinfo.html             \
+       html/class-giofileinputstream.html      \
+       html/class-giofilemonitor.html          \
+       html/class-giofileoutputstream.html     \
+       html/class-giofilterinputstream.html    \
+       html/class-giofilteroutputstream.html   \
+       html/class-gioicon.html                 \
+       html/class-gioinputstream.html          \
+       html/class-gioloadableicon.html         \
+       html/class-giomemoryinputstream.html    \
+       html/class-giomemoryoutputstream.html   \
+       html/class-giomount.html                \
+       html/class-giomountoperation.html       \
+       html/class-giooutputstream.html         \
+       html/class-gioseekable.html             \
+       html/class-giosimpleasyncresult.html    \
+       html/class-giothemedicon.html           \
+       html/class-giounixinputstream.html      \
+       html/class-giounixoutputstream.html     \
+       html/class-giovolume.html               \
+       html/class-giovolumemonitor.html        \
+       html/gio-constants.html                 \
+       html/gio-functions.html                 \
+       html/gio-class-reference.html           \
+       html/giounix-class-reference.html       \
+       html/gobject-constants.html             \
+       html/gobject-functions.html             \
+       html/index.html                         \
+       html/index.sgml                         \
+       html/pygobject.devhelp                  \
+       html/pygobject-introduction.html
+
+XML_FILES = \
+       reference/pygobject.xml                         \
+       reference/pygobject-introduction.xml            \
+       reference/pygobject-classes.xml                 \
+       reference/pygobject-constants.xml               \
+       reference/pygobject-ref.xml                     \
+       reference/pygobject-functions.xml               \
+       reference/pygobject-gboxed.xml                  \
+       reference/pygobject-ginterface.xml              \
+       reference/pygobject-gpointer.xml                \
+       reference/pyglib-classes.xml                    \
+       reference/pyglib-constants.xml                  \
+       reference/pyglib-functions.xml                  \
+       reference/pyglib-maincontext.xml                \
+       reference/pyglib-mainloop.xml                   \
+       reference/pygio-classes.xml                     \
+       reference/pygiounix-classes.xml                 \
+       reference/pygio-constants.xml                   \
+       reference/pygio-functions.xml                   \
+       reference/pygio-applaunchcontext.xml            \
+       reference/pygio-appinfo.xml                     \
+       reference/pygio-asyncresult.xml                 \
+       reference/pygio-bufferedinputstream.xml         \
+       reference/pygio-bufferedoutputstream.xml        \
+       reference/pygio-cancellable.xml                 \
+       reference/pygio-datainputstream.xml             \
+       reference/pygio-dataoutputstream.xml            \
+       reference/pygio-drive.xml                       \
+       reference/pygio-emblem.xml                      \
+       reference/pygio-emblemedicon.xml                \
+       reference/pygio-file.xml                        \
+       reference/pygio-fileattributeinfo.xml           \
+       reference/pygio-fileenumerator.xml              \
+       reference/pygio-fileicon.xml                    \
+       reference/pygio-fileinfo.xml                    \
+       reference/pygio-fileinputstream.xml             \
+       reference/pygio-filemonitor.xml                 \
+       reference/pygio-fileoutputstream.xml            \
+       reference/pygio-filterinputstream.xml           \
+       reference/pygio-filteroutputstream.xml          \
+       reference/pygio-icon.xml                        \
+       reference/pygio-inputstream.xml                 \
+       reference/pygio-loadableicon.xml                \
+       reference/pygio-memoryinputstream.xml           \
+       reference/pygio-memoryoutputstream.xml          \
+       reference/pygio-mount.xml                       \
+       reference/pygio-mountoperation.xml              \
+       reference/pygio-outputstream.xml                \
+       reference/pygio-seekable.xml                    \
+       reference/pygio-simpleasyncresult.xml           \
+       reference/pygio-themedicon.xml                  \
+       reference/pygio-unixinputstream.xml             \
+       reference/pygio-unixoutputstream.xml            \
+       reference/pygio-volume.xml                      \
+       reference/pygio-volumemonitor.xml
+
+XSL_FILES = \
+       xsl/common.xsl          \
+       xsl/devhelp.xsl         \
+       xsl/html.xsl            \
+       xsl/pdf-style.xsl       \
+       xsl/pdf.xsl             \
+       xsl/ref-html-style.xsl
+
+
+# fixxref cannot be included in XSL_FILES, because automake is touching it
+# so the date is newer then the files in HTML_FILES
+FIXXREF = xsl/fixxref.py
+TARGET_DIR = $(datadir)/gtk-doc/html/pygobject
+CSSdir = $(TARGET_DIR)
+CSS_DATA = $(CSS_FILES)
+XSLdir = $(datadir)/pygobject/xsl
+XSL_DATA = $(XSL_FILES) $(FIXXREF)
+EXTRA_DIST = \
+       $(HTML_FILES)   \
+       $(XML_FILES)    \
+       $(XSL_FILES)    \
+       $(FIXXREF)      \
+       $(CSS_FILES)
+
+@ENABLE_DOCS_TRUE@BUILT_SOURCES = reference/builddate.xml $(HTML_FILES)
+@ENABLE_DOCS_TRUE@CLEANFILES = reference/builddate.xml $(HTML_FILES)
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign docs/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-CSSDATA: $(CSS_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(CSSdir)" || $(MKDIR_P) "$(DESTDIR)$(CSSdir)"
+       @list='$(CSS_DATA)'; test -n "$(CSSdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(CSSdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(CSSdir)" || exit $$?; \
+       done
+
+uninstall-CSSDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(CSS_DATA)'; test -n "$(CSSdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(CSSdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(CSSdir)" && rm -f $$files
+install-XSLDATA: $(XSL_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(XSLdir)" || $(MKDIR_P) "$(DESTDIR)$(XSLdir)"
+       @list='$(XSL_DATA)'; test -n "$(XSLdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(XSLdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(XSLdir)" || exit $$?; \
+       done
+
+uninstall-XSLDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(XSL_DATA)'; test -n "$(XSLdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(XSLdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(XSLdir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$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: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(DATA)
+installdirs:
+       for dir in "$(DESTDIR)$(CSSdir)" "$(DESTDIR)$(XSLdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) 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:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-CSSDATA install-XSLDATA install-data-local
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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-CSSDATA uninstall-XSLDATA uninstall-local
+
+.MAKE: all check install install-am install-strip
+
+.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-CSSDATA \
+       install-XSLDATA install-am install-data install-data-am \
+       install-data-local install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am uninstall \
+       uninstall-CSSDATA uninstall-XSLDATA uninstall-am \
+       uninstall-local
+
+
+install-data-local:
+       installfiles=`echo $(srcdir)/html/*`; \
+       if test "$$installfiles" = '$(srcdir)/html/*'; \
+       then echo '-- Nothing to install' ; \
+       else \
+         $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
+         for i in $$installfiles; do \
+           echo '-- Installing '$$i ; \
+           $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+         done; \
+         echo '-- Installing $(srcdir)/html/index.sgml' ; \
+         $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+       fi
+
+uninstall-local:
+       rm -f $(DESTDIR)$(TARGET_DIR)/*
+
+reference/builddate.xml:
+       @$(PYTHON) -c 'import datetime; print datetime.date.today()' > $@
+
+# Do not add a builddate.xml dependency here, because the generated html 
+# documentation will be included in the tarball so xsltproc is not needed to 
+# install the documentation. Adding a builddate.xml dependency will force 
+# the documentation to be rebuilt when it doesn't need to be.
+@ENABLE_DOCS_TRUE@$(HTML_FILES): $(XML_FILES) $(XSL_FILES)
+@ENABLE_DOCS_TRUE@     @xsltproc --nonet --xinclude -o $(BUILDDIR)/html/ \
+@ENABLE_DOCS_TRUE@              --path $(BUILDDIR)/reference:$(srcdir)/reference \
+@ENABLE_DOCS_TRUE@                 --stringparam gtkdoc.bookname "pygobject" \
+@ENABLE_DOCS_TRUE@                 --stringparam gtkdoc.version ${REF_VERSION} \
+@ENABLE_DOCS_TRUE@                 $(srcdir)/xsl/ref-html-style.xsl \
+@ENABLE_DOCS_TRUE@                 $(srcdir)/reference/pygobject-ref.xml
+
+# pdf: $(REFERENCE_DEPS) reference/builddate.xml
+#      xsltproc --nonet --xinclude -o pygobject-ref.fo xsl/pdf-style.xsl \
+#              reference/pygobject-ref.xml
+#      pdfxmltex pygobject-ref.fo >output </dev/null
+
+-include $(top_srcdir)/git.mk
+
+# 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:
diff --git a/docs/html/class-gioappinfo.html b/docs/html/class-gioappinfo.html
new file mode 100644 (file)
index 0000000..e8d134f
--- /dev/null
@@ -0,0 +1,210 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.AppInfo</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="next" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.AppInfo</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gio-class-reference.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioapplaunchcontext.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.AppInfo"><a name="class-gioappinfo"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.AppInfo</h2><p>gio.AppInfo â€” Information about an installed application and methods to launch it (with file arguments).</p></div><div class="refsect1" title="Synopsis"><a name="id509673"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.AppInfo</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gioappinfo.html#constructor-gioappinfo" title="Constructor">gio.AppInfo</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>commandline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>application_name</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.APP_INFO_CREATE_NONE</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--add-supports-type" title="gio.AppInfo.add_supports_type">add_supports_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--can-delete" title="gio.AppInfo.can_delete">can_delete</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--can-remove-supports-type" title="gio.AppInfo.can_remove_supports_type">can_remove_supports_type</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--delete" title="gio.AppInfo.delete">delete</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--dup" title="gio.AppInfo.dup">dup</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--equal" title="gio.AppInfo.equal">equal</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>appinfo2</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-commandline" title="gio.AppInfo.get_commandline">get_commandline</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-description" title="gio.AppInfo.get_description">get_description</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-executable" title="gio.AppInfo.get_executable">get_executable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-icon" title="gio.AppInfo.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-id" title="gio.AppInfo.get_id">get_id</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--get-name" title="gio.AppInfo.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--launch" title="gio.AppInfo.launch">launch</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>launch_context</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--launch-uris" title="gio.AppInfo.launch_uris">launch_uris</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uris</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>launch_context</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--remove-supports-type" title="gio.AppInfo.remove_supports_type">remove_supports_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--set-as-default-for-extension" title="gio.AppInfo.set_as_default_for_extension">set_as_default_for_extension</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>extension</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--set-as-default-for-type" title="gio.AppInfo.set_as_default_for_type">set_as_default_for_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--should-show" title="gio.AppInfo.should_show">should_show</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--supports-files" title="gio.AppInfo.supports_files">supports_files</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--supports-uris" title="gio.AppInfo.supports_uris">supports_uris</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-get-all" title="gio.app_info_get_all">gio.app_info_get_all</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-get-all-for-type" title="gio.app_info_get_all_for_type">gio.app_info_get_all_for_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-get-default-for-type" title="gio.app_info_get_default_for_type">gio.app_info_get_default_for_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>must_support_uris</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-get-default-for-uri-scheme" title="gio.app_info_get_default_for_uri_scheme">gio.app_info_get_default_for_uri_scheme</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri_scheme</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioappinfo.html#function-gio--app-info-reset-type-association" title="gio.app_info_reset_type_association">gio.app_info_reset_type_association</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id509140"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+  +-- <a class="link" href="class-gioappinfo.html" title="gio.AppInfo">gio.AppInfo</a>
+</pre></div><div class="refsect1" title="Known Implementation"><a name="id509121"></a><h2>Known Implementation</h2><p>
+            <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a> is implemented by
+            <PYGTKDOCLINK HREF="class-giodesktopappinfo"><code class="classname">gio.DesktopAppInfo</code></PYGTKDOCLINK>
+        </p></div><div class="refsect1" title="Description"><a name="id509100"></a><h2>Description</h2><p>
+            <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+            and <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>
+            are used for describing and launching applications installed on the system.
+        </p><p>
+            As of GLib 2.20, URIs will always be converted to POSIX paths (using
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-path" title="gio.File.get_path">gio.File.get_path</a></code>()) when using
+            <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--launch" title="gio.AppInfo.launch">gio.AppInfo.launch</a></code>()
+            even if the application requested an URI and not a POSIX path. For example for an desktop-file
+            based application with Exec key totem %U and a single URI, sftp://foo/file.avi, then /home/user/.gvfs/sftp
+            on foo/file.avi will be passed. This will only work if a set of suitable GIO extensions (such as gvfs 2.26
+            compiled with FUSE support), is available and operational; if this is not the case, the URI will be passed
+            unmodified to the application. Some URIs, such as mailto:, of course cannot be mapped to a POSIX path
+            (in gvfs there's no FUSE mount for it); such URIs will be passed unmodified to the application. 
+        </p><p>
+            Specifically for gvfs 2.26 and later, the POSIX URI will be mapped back to the GIO URI in the
+            <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> constructors
+            (since gvfs implements the GVfs extension point). As such, if the application needs to examine the URI,
+            it needs to use
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri" title="gio.File.get_uri">gio.File.get_uri</a></code>()
+            or similar on
+            <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+            In other words, an application cannot assume that the URI passed to e.g.
+            <code class="methodname"><a class="link" href="class-giofile.html#constructor-giofile" title="Constructor">gio.File</a></code>() constructor
+            is equal to the result of
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri" title="gio.File.get_uri">gio.File.get_uri</a></code>().
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-gioappinfo"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.AppInfo</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>commandline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>application_name</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.APP_INFO_CREATE_NONE</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>commandline</code></em> :</span></p></td><td>the commandline to use 
+                </td></tr><tr><td><p><span class="term"><em class="parameter"><code>application_name</code></em> :</span></p></td><td>the application name, or <code class="literal">None</code> to use commandline.
+                </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>flags that can specify details of the created,
+                from <a class="xref" href="gio-constants.html#gio-app-info-constants" title="Gio AppInfo Create Flags Constants">Gio AppInfo Create Flags Constants</a>
+                </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+                for given command.
+                </td></tr></tbody></table><p>
+            Creates a new <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+            from the given information.
+        </p></div><div class="refsect1" title="Methods"><a name="id508887"></a><h2>Methods</h2><div class="refsect2" title="gio.AppInfo.add_supports_type"><a name="method-gioappinfo--add-supports-type"></a><h3>gio.AppInfo.add_supports_type</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">add_supports_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>A string.</td></tr></tbody></table><p>
+                The <code class="methodname">add_supports_type</code>() method adds a content type
+                to the application information to indicate the application is capable of
+                opening files with the given content type.
+            </p></div><div class="refsect2" title="gio.AppInfo.can_delete"><a name="method-gioappinfo--can-delete"></a><h3>gio.AppInfo.can_delete</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">can_delete</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if appinfo can be deleted.
+                   </td></tr></tbody></table><p>
+                The <code class="methodname">can_delete</code>() method obtains the information
+               whether the <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+               can be deleted. See
+               <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--delete" title="gio.AppInfo.delete">gio.AppInfo.delete</a></code>().
+            </p></div><div class="refsect2" title="gio.AppInfo.can_remove_supports_type"><a name="method-gioappinfo--can-remove-supports-type"></a><h3>gio.AppInfo.can_remove_supports_type</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">can_remove_supports_type</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if it is possible to remove
+                    supported content types from a given appinfo, <code class="literal">False</code>
+                    if not. </td></tr></tbody></table><p>
+                The <code class="methodname">can_remove_supports_type</code>() method checks if a
+                supported content type can be removed from an application.
+            </p></div><div class="refsect2" title="gio.AppInfo.delete"><a name="method-gioappinfo--delete"></a><h3>gio.AppInfo.delete</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">delete</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if appinfo has been deleted.
+                   </td></tr></tbody></table><p>
+                The <code class="methodname">delete</code>() method tries to delete an
+               <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>.
+            </p><p>
+               On some platforms, there may be a difference between user-defined
+               <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s
+               which can be deleted, and system-wide ones which cannot. See
+               <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--can-delete" title="gio.AppInfo.can_delete">gio.AppInfo.can_delete</a></code>().
+           </p></div><div class="refsect2" title="gio.AppInfo.dup"><a name="method-gioappinfo--dup"></a><h3>gio.AppInfo.dup</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">dup</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A duplicate of appinfo.</td></tr></tbody></table><p>
+                The <code class="methodname">dup</code>() method creates a duplicate of a
+                <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>.
+            </p></div><div class="refsect2" title="gio.AppInfo.equal"><a name="method-gioappinfo--equal"></a><h3>gio.AppInfo.equal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">equal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>appinfo2</code></em> :</span></p></td><td>the second
+                    <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if appinfo1 is equal to appinfo2.
+                    <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
+                The <code class="methodname">equal</code>() method checks if two
+                <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s are equal.
+            </p></div><div class="refsect2" title="gio.AppInfo.get_commandline"><a name="method-gioappinfo--get-commandline"></a><h3>gio.AppInfo.get_commandline</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_commandline</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the appinfo's commandline, or
+                   <code class="literal">None</code> if this information is not available.
+                   </td></tr></tbody></table><p>
+                The <code class="methodname">get_commandline</code>() method gets the
+               commandline with which the application will be started.
+            </p></div><div class="refsect2" title="gio.AppInfo.get_description"><a name="method-gioappinfo--get-description"></a><h3>gio.AppInfo.get_description</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_description</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing a description of the application
+                    appinfo, or <code class="literal">None</code> if none.</td></tr></tbody></table><p>
+                The <code class="methodname">get_description</code>() method gets a human-readable
+                description of an installed application.
+            </p></div><div class="refsect2" title="gio.AppInfo.get_executable"><a name="method-gioappinfo--get-executable"></a><h3>gio.AppInfo.get_executable</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_executable</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the appinfo's application
+                    binary's name.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_description</code>() method gets the executable's
+                name for the installed application.
+            </p></div><div class="refsect2" title="gio.AppInfo.get_icon"><a name="method-gioappinfo--get-icon"></a><h3>gio.AppInfo.get_icon</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the default
+                    <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a> for appinfo.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_icon</code>() method gets the icon for the application.
+            </p></div><div class="refsect2" title="gio.AppInfo.get_id"><a name="method-gioappinfo--get-id"></a><h3>gio.AppInfo.get_id</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_id</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the application's ID.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_id</code>() method gets the ID of an application.
+                An id is a string that identifies the application. The exact format of the
+                id is platform dependent. For instance, on Unix this is the desktop file id
+                from the xdg menu specification. 
+            </p><p>
+                Note that the returned ID may be <code class="literal">None</code>, depending on
+                how the appinfo has been constructed.
+            </p></div><div class="refsect2" title="gio.AppInfo.get_name"><a name="method-gioappinfo--get-name"></a><h3>gio.AppInfo.get_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name of the application for appinfo.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_name</code>() method gets the installed
+                name of the application.
+            </p></div><div class="refsect2" title="gio.AppInfo.launch"><a name="method-gioappinfo--launch"></a><h3>gio.AppInfo.launch</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">launch</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>launch_context</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>files</code></em> :</span></p></td><td>a list of <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> objects.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>launch_context</code></em> :</span></p></td><td>a <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>
+                    or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful launch,
+                    <code class="literal">False</code> otherwise.                      
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">launch</code>() method launches the application.
+                Passes files to the launched application as arguments, using the optional
+                launch_context to get information about the details of the launcher
+                (like what screen it is on). On error, error will be set accordingly. 
+            </p><p>
+                To lauch the application without arguments pass a <code class="literal">None</code> for files list. 
+            </p><p>
+                Note that even if the launch is successful the application launched can fail
+                to start if it runs into problems during startup. There is no way to detect this. 
+            </p><p>
+                Some URIs can be changed when passed through a
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                (for instance unsupported uris with strange formats like mailto:), so
+                if you have a textual uri you want to pass in as argument, consider using
+                <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--launch-uris" title="gio.AppInfo.launch_uris">gio.File.launch_uris</a></code>()
+                instead.
+            </p></div><div class="refsect2" title="gio.AppInfo.launch_uris"><a name="method-gioappinfo--launch-uris"></a><h3>gio.AppInfo.launch_uris</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">launch_uris</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uris</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>launch_context</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>uris</code></em> :</span></p></td><td>a list containing URIs to launch.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>launch_context</code></em> :</span></p></td><td>a <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>
+                    or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful launch,
+                    <code class="literal">False</code> otherwise.                      
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">launch_uris</code>() method launches the application.
+                Passes uris to the launched application as arguments, using the optional
+                launch_context to get information about the details of the launcher
+                (like what screen it is on). On error, error will be set accordingly. 
+            </p><p>
+                To lauch the application without arguments pass a <code class="literal">None</code> for files list. 
+            </p><p>
+                Note that even if the launch is successful the application launched can fail
+                to start if it runs into problems during startup. There is no way to detect this. 
+            </p></div><div class="refsect2" title="gio.AppInfo.remove_supports_type"><a name="method-gioappinfo--remove-supports-type"></a><h3>gio.AppInfo.remove_supports_type</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">remove_supports_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>A string.</td></tr></tbody></table><p>
+                The <code class="methodname">remove_supports_type</code>() method removes a
+                supported type from an application, if possible.
+            </p></div><div class="refsect2" title="gio.AppInfo.set_as_default_for_extension"><a name="method-gioappinfo--set-as-default-for-extension"></a><h3>gio.AppInfo.set_as_default_for_extension</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_as_default_for_extension</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>extension</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>extension</code></em> :</span></p></td><td>A string containing the file extension (without the dot).
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_as_default_for_extension</code>() method sets the
+                application as the default handler for the given file extention.
+            </p></div><div class="refsect2" title="gio.AppInfo.set_as_default_for_type"><a name="method-gioappinfo--set-as-default-for-type"></a><h3>gio.AppInfo.set_as_default_for_type</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_as_default_for_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>The content type.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_as_default_for_type</code>() method sets the
+                application as the default handler for a given type.
+            </p></div><div class="refsect2" title="gio.AppInfo.should_show"><a name="method-gioappinfo--should-show"></a><h3>gio.AppInfo.should_show</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">should_show</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the appinfo should be shown,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">should_show</code>() method checks if the application
+                info should be shown in menus that list available applications.
+            </p></div><div class="refsect2" title="gio.AppInfo.supports_files"><a name="method-gioappinfo--supports-files"></a><h3>gio.AppInfo.supports_files</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">supports_files</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the appinfo supports files. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">supports_files</code>() method checks if the application
+                accepts files as arguments.
+            </p></div><div class="refsect2" title="gio.AppInfo.supports_uris"><a name="method-gioappinfo--supports-uris"></a><h3>gio.AppInfo.supports_uris</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">supports_uris</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the appinfo supports uris. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">supports_uris</code>() method checks if the application
+                accepts uris as arguments.
+            </p></div></div><div class="refsect1" title="Functions"><a name="id507387"></a><h2>Functions</h2><div class="refsect2" title="gio.app_info_get_all"><a name="function-gio--app-info-get-all"></a><h3>gio.app_info_get_all</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">app_info_get_all</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">app_info_get_all</code>() function gets a list of all of
+                the applications currently registered on this system. 
+            </p><p>
+                For desktop files, this includes applications that have NoDisplay=true set or are
+                excluded from display by means of OnlyShowIn or NotShowIn. See
+                <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--should-show" title="gio.AppInfo.should_show">gio.AppInfo.should_show</a></code>().
+                The returned list does not include applications which have the Hidden key set.
+            </p></div><div class="refsect2" title="gio.app_info_get_all_for_type"><a name="function-gio--app-info-get-all-for-type"></a><h3>gio.app_info_get_all_for_type</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">app_info_get_all_for_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>the content type to find a
+                    <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+                    for.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s
+                    for a given content type or <code class="literal">None</code> on error. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">app_info_get_all_for_type</code>() function gets a list of all
+                <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>s
+                for a given content type.
+            </p></div><div class="refsect2" title="gio.app_info_get_default_for_type"><a name="function-gio--app-info-get-default-for-type"></a><h3>gio.app_info_get_default_for_type</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">app_info_get_default_for_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>must_support_uris</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>the content type to find a
+                    <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+                    for.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>must_support_uris</code></em> :</span></p></td><td>if <code class="literal">True</code>, the
+                    <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+                    is expected to support URIs </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+                    for given content_type or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">app_info_get_default_for_type</code>() function gets the
+                <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+                that correspond to a given content type.
+            </p></div><div class="refsect2" title="gio.app_info_get_default_for_uri_scheme"><a name="function-gio--app-info-get-default-for-uri-scheme"></a><h3>gio.app_info_get_default_for_uri_scheme</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">app_info_get_default_for_uri_scheme</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri_scheme</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>uri_scheme</code></em> :</span></p></td><td>a string containing a URI scheme.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+                    for given uri_scheme or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">app_info_get_default_for_uri_scheme</code>() function gets
+                the default application for launching applications using this URI scheme. A URI
+                scheme is the initial part of the URI, up to but not including the
+                ':', e.g. "http", "ftp" or "sip".
+            </p></div><div class="refsect2" title="gio.app_info_reset_type_association"><a name="function-gio--app-info-reset-type-association"></a><h3>gio.app_info_reset_type_association</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">app_info_reset_type_association</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td><td>a content type</td></tr></tbody></table><p>
+                The <code class="methodname">app_info_reset_type_association</code>() function
+               removes all changes to the type associations done by
+               <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--set-as-default-for-type" title="gio.AppInfo.set_as_default_for_type">set_as_default_for_type</a></code>(),
+               <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--set-as-default-for-extension" title="gio.AppInfo.set_as_default_for_extension">set_as_default_for_extension</a></code>(),
+               <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--add-supports-type" title="gio.AppInfo.add_supports_type">add_supports_type</a></code>() or
+               <code class="methodname"><a class="link" href="class-gioappinfo.html#method-gioappinfo--remove-supports-type" title="gio.AppInfo.remove_supports_type">remove_supports_type</a></code>().
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gio-class-reference.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioapplaunchcontext.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PyGio Class Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.AppLaunchContext</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioapplaunchcontext.html b/docs/html/class-gioapplaunchcontext.html
new file mode 100644 (file)
index 0000000..2d1d3df
--- /dev/null
@@ -0,0 +1,44 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.AppLaunchContext</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioappinfo.html" title="gio.AppInfo"><link rel="next" href="class-gioasyncresult.html" title="gio.AsyncResult"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.AppLaunchContext</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioappinfo.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioasyncresult.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.AppLaunchContext"><a name="class-gioapplaunchcontext"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.AppLaunchContext</h2><p>gio.AppLaunchContext â€” Application launch context.</p></div><div class="refsect1" title="Synopsis"><a name="id503788"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.AppLaunchContext</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gioapplaunchcontext.html#constructor-gioapplaunchcontext" title="Constructor">gio.AppLaunchContext</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-display" title="gio.AppLaunchContext.get_display">get_display</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id" title="gio.AppLaunchContext.get_startup_notify_id">get_startup_notify_id</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--launch-failed" title="gio.AppLaunchContext.launch_failed">launch_failed</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>startup_notify_id</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id495731"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext">gio.AppLaunchContext</a>
+</pre></div><div class="refsect1" title="Description"><a name="id495717"></a><h2>Description</h2><p>
+            The <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>
+            is used for integrating the launch with the launching application. This is used to handle for
+            instance startup notification and launching the new application on the same screen as the launching window.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-gioapplaunchcontext"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.AppLaunchContext</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><code class="classname">gio.AppLaunchContext</code></a>.
+                </td></tr></tbody></table><p>
+            Creates a new application launch context. This is not normally used, instead
+            you instantiate a subclass of this, such as
+            <PYGTKDOCLINK HREF="class-gdkapplaunchcontext"><code class="classname">gtk.gdk.AppLaunchContext</code></PYGTKDOCLINK>.
+        </p></div><div class="refsect1" title="Methods"><a name="id495640"></a><h2>Methods</h2><div class="refsect2" title="gio.AppLaunchContext.get_display"><a name="method-gioapplaunchcontext--get-display"></a><h3>gio.AppLaunchContext.get_display</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_display</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td><td>a
+                    <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>files</code></em> :</span></p></td><td>a list of
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                    objects.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a display string for the display. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_display</code>() method gets the display
+                string for the display. This is used to ensure new applications
+                are started on the same display as the launching application.
+            </p></div><div class="refsect2" title="gio.AppLaunchContext.get_startup_notify_id"><a name="method-gioapplaunchcontext--get-startup-notify-id"></a><h3>gio.AppLaunchContext.get_startup_notify_id</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_startup_notify_id</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>files</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td><td>a
+                    <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>files</code></em> :</span></p></td><td>a list of
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                    objects.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a startup notification ID for the application,
+                    or <code class="literal">None</code> if not supported. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_startup_notify_id</code>() method initiates
+                startup notification for the application and returns the DESKTOP_STARTUP_ID
+                for the launched operation, if supported. 
+            </p><p>
+                Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard.
+            </p></div><div class="refsect2" title="gio.AppLaunchContext.launch_failed"><a name="method-gioapplaunchcontext--launch-failed"></a><h3>gio.AppLaunchContext.launch_failed</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">launch_failed</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>startup_notify_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>startup_notify_id</code></em> :</span></p></td><td>the startup notification id that was returned by
+                    <code class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id" title="gio.AppLaunchContext.get_startup_notify_id">get_startup_notify_id</a></code>.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a startup notification ID for the application,
+                    or <code class="literal">None</code> if not supported. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_startup_notify_id</code>() method is called
+                when an application has failed to launch, so that it can cancel the application
+                startup notification started in
+                <code class="methodname"><a class="link" href="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id" title="gio.AppLaunchContext.get_startup_notify_id">get_startup_notify_id</a></code>
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioappinfo.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioasyncresult.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.AppInfo </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.AsyncResult</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioasyncresult.html b/docs/html/class-gioasyncresult.html
new file mode 100644 (file)
index 0000000..ea06247
--- /dev/null
@@ -0,0 +1,44 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.AsyncResult</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioapplaunchcontext.html" title="gio.AppLaunchContext"><link rel="next" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.AsyncResult</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioapplaunchcontext.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giobufferedinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.AsyncResult"><a name="class-gioasyncresult"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.AsyncResult</h2><p>gio.AsyncResult â€” Asynchronous Function Results.</p></div><div class="refsect1" title="Synopsis"><a name="id504044"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.AsyncResult</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioasyncresult.html#method-gioasyncresult--get-source-object" title="gio.AsyncResult.get_source_object">get_source_object</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id504001"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+  +-- <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult">gio.AsyncResult</a>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id503975"></a><h2>Prerequisites</h2><p>
+            <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a> is required by
+            <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>.
+        </p></div><div class="refsect1" title="Known Implementation"><a name="id503938"></a><h2>Known Implementation</h2><p>
+            <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a> is implemented by
+            <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><code class="classname">gio.SimpleAsyncResult</code></a>.
+        </p></div><div class="refsect1" title="Description"><a name="id440594"></a><h2>Description</h2><p>
+            <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+            provides a base class for implementing asynchronous function results.
+        </p><p>
+            Asynchronous operations are broken up into two separate operations which are chained
+            together by a GAsyncReadyCallback. To begin an asynchronous operation, provide a
+            GAsyncReadyCallback to the asynchronous function. This callback will be triggered when
+            the operation has completed, and will be passed a GAsyncResult instance filled with the
+            details of the operation's success or failure, the object the asynchronous function was
+            started for and any error codes returned. The asynchronous callback function is then expected
+            to call the corresponding "_finish()" function with the object the function was called for,
+            and the <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+            instance, and optionally, an error to grab any error conditions that may have occurred. 
+        </p><p>
+            The purpose of the "_finish()" function is to take the generic result of type GAsyncResult and
+            return the specific result that the operation in question yields (e.g. a
+            <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+            for a "enumerate children" operation). If the result or error status of the operation is not needed,
+            there is no need to call the "_finish()" function, GIO will take care of cleaning up the result and error
+            information after the GAsyncReadyCallback returns. It is also allowed to take a reference to the
+            <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+            and call "_finish()" later. 
+        </p><p>
+            The callback for an asynchronous operation is called only once, and is always called, even
+            in the case of a cancelled operation. On cancellation the result is a gio.ERROR_CANCELLED error. 
+        </p><p>
+            Some ascynchronous operations are implemented using synchronous calls. These are run in a
+            separate thread, if GThread has been initialized, but otherwise they are sent to the Main Event
+            Loop and processed in an idle function. So, if you truly need asynchronous operations, make
+            sure to initialize GThread.
+        </p></div><div class="refsect1" title="Methods"><a name="id437501"></a><h2>Methods</h2><div class="refsect2" title="gio.AsyncResult.get_source_object"><a name="method-gioasyncresult--get-source-object"></a><h3>gio.AsyncResult.get_source_object</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_source_object</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the source object for the res.                        
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_source_object</code>() method gets the source object
+                from a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioapplaunchcontext.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giobufferedinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.AppLaunchContext </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.BufferedInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giobufferedinputstream.html b/docs/html/class-giobufferedinputstream.html
new file mode 100644 (file)
index 0000000..7fc25b4
--- /dev/null
@@ -0,0 +1,133 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.BufferedInputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioasyncresult.html" title="gio.AsyncResult"><link rel="next" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.BufferedInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioasyncresult.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giobufferedoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.BufferedInputStream"><a name="class-giobufferedinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.BufferedInputStream</h2><p>gio.BufferedInputStream â€” Buffered Input Stream</p></div><div class="refsect1" title="Synopsis"><a name="id449200"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.BufferedInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream">gio.FilterInputStream</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#constructor-giobufferedinputstream" title="Constructor">gio.BufferedInputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill" title="gio.BufferedInputStream.fill">fill</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async" title="gio.BufferedInputStream.fill_async">fill_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-finish" title="gio.BufferedInputStream.fill_finish">fill_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--get-available" title="gio.BufferedInputStream.get_available">get_available</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--get-buffer-size" title="gio.BufferedInputStream.get_buffer_size">get_buffer_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--read-byte" title="gio.BufferedInputStream.read_byte">read_byte</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--set-buffer-size" title="gio.BufferedInputStream.set_buffer_size">set_buffer_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giobufferedinputstream.html#function-gio--buffered-input-stream-new-sized" title="gio.buffered_input_stream_new_sized">gio.buffered_input_stream_new_sized</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id448121"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+    +-- <a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream">gio.FilterInputStream</a>
+      +-- <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream">gio.BufferedInputStream</a>
+</pre></div><div class="refsect1" title="gio.BufferedInputStream Properties"><a name="properties-giobufferedinputstream"></a><h2>gio.BufferedInputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"buffer-size"</td><td valign="top">Read - Write - Construct</td><td valign="top">The size of the backend buffer. Allowed values: &gt;= 1. Default value: 4096.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id500482"></a><h2>Description</h2><p>
+            <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"><code class="classname">gio.BufferedInputStream</code></a>
+            implements <a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream"><code class="classname">gio.FilterInputStream</code></a>
+            and provides for buffered reads.
+        </p><p>
+            By default,
+            <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"><code class="classname">gio.BufferedInputStream</code></a>'s
+            buffer size is set at 4 kilobytes.
+        </p><p>
+            To create a buffered input stream, use
+            <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#constructor-giobufferedinputstream" title="Constructor">gio.BufferedInputStream</a></code>(),
+            or <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#function-gio--buffered-input-stream-new-sized" title="gio.buffered_input_stream_new_sized">gio.buffered_input_stream_new_sized</a></code>()
+            to specify the buffer's size at construction.
+        </p><p>
+            To get the size of a buffer within a buffered input stream, use
+            <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--get-buffer-size" title="gio.BufferedInputStream.get_buffer_size">get_buffer_size</a></code>().
+            To change the size of a buffered input stream's buffer, use
+            <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--set-buffer-size" title="gio.BufferedInputStream.set_buffer_size">set_buffer_size</a></code>().
+            Note that the buffer's size cannot be reduced below the size of the data within the buffer.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giobufferedinputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.BufferedInputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>base_stream</code></em> :</span></p></td><td>a
+                <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>.
+                </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+                for the given base_stream.
+                </td></tr></tbody></table><p>
+            Creates a new <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+            from the given base_stream, with a buffer set to the default size (4 kilobytes).
+        </p></div><div class="refsect1" title="Methods"><a name="id449318"></a><h2>Methods</h2><div class="refsect2" title="gio.BufferedInputStream.fill"><a name="method-giobufferedinputstream--fill"></a><h3>gio.BufferedInputStream.fill</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">fill</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of bytes that will be read from the stream.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the number of bytes read into stream's buffer,
+                    up to count, or -1 on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">fill</code>() method tries to read count bytes
+                from the stream into the buffer. Will block during this read.
+            </p><p>
+                If count is zero, returns zero and does nothing. A value of count
+                larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+            </p><p>
+                On success, the number of bytes read into the buffer is returned. It
+                is not an error if this is not the same as the requested size, as it can
+                happen e.g. near the end of a file. Zero is returned on end of file
+                (or if count is zero), but never otherwise.
+            </p><p>
+                If count is -1 then the attempted read size is equal to the number
+                of bytes that are required to fill the buffer.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can
+                be cancelled by triggering the cancellable object from another thread.
+                If the operation was cancelled, the error gio.ERROR_CANCELLED will be
+                returned. If an operation was partially finished when the operation was
+                cancelled the partial result will be returned, without an error.
+            </p><p>
+                On error -1 is returned and error is set accordingly.
+            </p><p>
+                For the asynchronous, non-blocking, version of this function, see
+                <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async" title="gio.BufferedInputStream.fill_async">gio.BufferedInputStream.fill_async</a></code>().
+            </p></div><div class="refsect2" title="gio.BufferedInputStream.fill_async"><a name="method-giobufferedinputstream--fill-async"></a><h3>gio.BufferedInputStream.fill_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">fill_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of bytes that will be read from the stream.
+                  </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">fill_async</code>() method reads data into stream's
+                buffer asynchronously, up to count size. io_priority can be used to
+                prioritize reads.
+            </p><p>
+                For the synchronous version of this function, see
+                <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill" title="gio.BufferedInputStream.fill">gio.BufferedInputStream.fill</a></code>().
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was
+                cancelled, the error gio.ERROR_CANCELLED will be set
+            </p><p>
+                If count is -1 then the attempted read size is equal to the number of bytes
+                that are required to fill the buffer.
+            </p></div><div class="refsect2" title="gio.BufferedInputStream.fill_finish"><a name="method-giobufferedinputstream--fill-finish"></a><h3>gio.BufferedInputStream.fill_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">fill_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the size of the read stream, or -1 on an error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">fill_finish</code>() method finishes an asynchronous
+                file append operation started with
+                <code class="methodname"><a class="link" href="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async" title="gio.BufferedInputStream.fill_async">gio.BufferedInputStream.fill_async</a></code>().
+            </p></div><div class="refsect2" title="gio.BufferedInputStream.get_available"><a name="method-giobufferedinputstream--get-available"></a><h3>gio.BufferedInputStream.get_available</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_available</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>size of the available stream.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_available</code>() method gets the size of
+                the available data within the stream.
+            </p></div><div class="refsect2" title="gio.BufferedInputStream.get_buffer_size"><a name="method-giobufferedinputstream--get-buffer-size"></a><h3>gio.BufferedInputStream.get_buffer_size</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_buffer_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the current buffer size.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_buffer_size</code>() method gets the size
+                of the input buffer.
+            </p></div><div class="refsect2" title="gio.BufferedInputStream.read_byte"><a name="method-giobufferedinputstream--read-byte"></a><h3>gio.BufferedInputStream.read_byte</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_byte</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the byte read from the stream, or -1 on end of stream or error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_byte</code>() method tries to read a single
+                byte from the stream or the buffer. Will block during this read.
+            </p><p>
+                On success, the byte read from the stream is returned. On end of stream -1
+                is returned but it's not an exceptional error and error is not set.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can
+                be cancelled by triggering the cancellable object from another thread.
+                If the operation was cancelled, the error gio.ERROR_CANCELLED will be
+                returned. If an operation was partially finished when the operation was
+                cancelled the partial result will be returned, without an error.
+            </p><p>
+                On error -1 is returned and error is set accordingly.
+            </p></div><div class="refsect2" title="gio.BufferedInputStream.set_buffer_size"><a name="method-giobufferedinputstream--set-buffer-size"></a><h3>gio.BufferedInputStream.set_buffer_size</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_buffer_size</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td>the new buffer size.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">set_buffer_size</code>() method sets the size
+                of the internal buffer of stream to size, or to the size of the contents
+                of the buffer. The buffer can never be resized smaller than its current contents.
+            </p></div></div><div class="refsect1" title="Functions"><a name="id353937"></a><h2>Functions</h2><div class="refsect2" title="gio.buffered_input_stream_new_sized"><a name="function-gio--buffered-input-stream-new-sized"></a><h3>gio.buffered_input_stream_new_sized</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">buffered_input_stream_new_sized</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td><td>the requested buffer size.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A new
+                    <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">buffered_input_stream_new_sized</code>() function creates
+                a new <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"><code class="classname">gio.BufferedInputStream</code></a>
+                from the given base_stream, with a buffer set to size.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioasyncresult.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giobufferedoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.AsyncResult </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.BufferedOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giobufferedoutputstream.html b/docs/html/class-giobufferedoutputstream.html
new file mode 100644 (file)
index 0000000..a77139f
--- /dev/null
@@ -0,0 +1,62 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.BufferedOutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream"><link rel="next" href="class-giocancellable.html" title="gio.Cancellable"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.BufferedOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giobufferedinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giocancellable.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.BufferedOutputStream"><a name="class-giobufferedoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.BufferedOutputStream</h2><p>gio.BufferedOutputStream â€” Buffered Output Stream</p></div><div class="refsect1" title="Synopsis"><a name="id470769"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.BufferedOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream">gio.FilterOutputStream</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#constructor-giobufferedoutputstream" title="Constructor">gio.BufferedOutputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-auto-grow" title="gio.BufferedOutputStream.get_auto_grow">get_auto_grow</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-buffer-size" title="gio.BufferedOutputStream.get_buffer_size">get_buffer_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-auto-grow" title="gio.BufferedOutputStream.set_auto_grow">set_auto_grow</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>auto_grow</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-buffer-size" title="gio.BufferedOutputStream.set_buffer_size">set_buffer_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giobufferedoutputstream.html#function-gio--buffered-output-stream-new-sized" title="gio.buffered_output_stream_new_sized">gio.buffered_output_stream_new_sized</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id435166"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+    +-- <a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream">gio.FilterOutputStream</a>
+      +-- <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream">gio.BufferedOutputStream</a>
+</pre></div><div class="refsect1" title="gio.BufferedOutputStream Properties"><a name="properties-giobufferedoutputstream"></a><h2>gio.BufferedOutputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"auto-grow"</td><td valign="top">Read - Write</td><td valign="top">Whether the buffer should automatically grow. Default value: <code class="literal">False</code>.</td></tr><tr valign="top"><td valign="top">"buffer-size"</td><td valign="top">Read - Write - Construct</td><td valign="top">The size of the backend buffer. Allowed values: &gt;= 1. Default value: 4096.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id367442"></a><h2>Description</h2><p>
+            <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"><code class="classname">gio.BufferedOutputStream</code></a>
+            implements <a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream"><code class="classname">gio.FilterOutputStream</code></a>
+            and provides for buffered writes.
+        </p><p>
+            By default,
+            <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"><code class="classname">gio.BufferedOutputStream</code></a>'s
+            buffer size is set at 4 kilobytes.
+        </p><p>
+            To create a buffered output stream, use
+            <code class="methodname"><a class="link" href="class-giobufferedoutputstream.html#constructor-giobufferedoutputstream" title="Constructor">gio.BufferedOutputStream</a></code>(),
+            or <code class="methodname"><a class="link" href="class-giobufferedoutputstream.html#function-gio--buffered-output-stream-new-sized" title="gio.buffered_output_stream_new_sized">gio.buffered_output_stream_new_sized</a></code>()
+            to specify the buffer's size at construction.
+        </p><p>
+            To get the size of a buffer within a buffered output stream, use
+            <code class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-buffer-size" title="gio.BufferedOutputStream.get_buffer_size">gio.BufferedOutputStream.get_buffer_size</a></code>().
+            To change the size of a buffered output stream's buffer, use
+            <code class="methodname"><a class="link" href="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-buffer-size" title="gio.BufferedOutputStream.set_buffer_size">gio.BufferedOutputStream.set_buffer_size</a></code>().
+            Note that the buffer's size cannot be reduced below the size of the data within the buffer.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giobufferedoutputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.BufferedOutputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>base_stream</code></em> :</span></p></td><td>a
+                <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>.
+                </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
+                for the given base_stream.
+                </td></tr></tbody></table><p>
+            Creates a new buffered output stream for a base stream.
+        </p></div><div class="refsect1" title="Methods"><a name="id442713"></a><h2>Methods</h2><div class="refsect2" title="gio.BufferedOutputStream.get_auto_grow"><a name="method-giobufferedoutputstream--get-auto-grow"></a><h3>gio.BufferedOutputStream.get_auto_grow</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_auto_grow</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the stream's
+                   buffer automatically grows, <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_auto_grow</code>() method checks if the
+               buffer automatically grows as data is added.
+            </p></div><div class="refsect2" title="gio.BufferedOutputStream.get_buffer_size"><a name="method-giobufferedoutputstream--get-buffer-size"></a><h3>gio.BufferedOutputStream.get_buffer_size</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_buffer_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the current buffer size.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_buffer_size</code>() method gets the size
+                of the buffer in the stream.
+            </p></div><div class="refsect2" title="gio.BufferedOutputStream.set_auto_grow"><a name="method-giobufferedoutputstream--set-auto-grow"></a><h3>gio.BufferedOutputStream.set_auto_grow</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_auto_grow</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>auto_grow</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>auto_grow</code></strong> :</span></p></td><td>a boolean.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">set_auto_grow</code>() method sets whether or not
+               the stream's buffer should automatically grow. If auto_grow is true,
+               then each write will just make the buffer larger, and you must manually
+               flush the buffer to actually write out the data to the underlying stream.
+            </p></div><div class="refsect2" title="gio.BufferedOutputStream.set_buffer_size"><a name="method-giobufferedoutputstream--set-buffer-size"></a><h3>gio.BufferedOutputStream.set_buffer_size</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_buffer_size</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td>the new buffer size.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">set_buffer_size</code>() method sets the size of
+               the internal buffer to size.
+            </p></div></div><div class="refsect1" title="Functions"><a name="id416016"></a><h2>Functions</h2><div class="refsect2" title="gio.buffered_output_stream_new_sized"><a name="function-gio--buffered-output-stream-new-sized"></a><h3>gio.buffered_output_stream_new_sized</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">buffered_output_stream_new_sized</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td><td>the requested buffer size.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A new
+                    <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
+                   with an internal buffer set to size..
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">buffered_output_stream_new_sized</code>() function creates
+                a new <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"><code class="classname">gio.BufferedOutputStream</code></a>
+                from the given base_stream, with a buffer set to size.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giobufferedinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giocancellable.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.BufferedInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Cancellable</td></tr></table></div></body></html>
diff --git a/docs/html/class-giocancellable.html b/docs/html/class-giocancellable.html
new file mode 100644 (file)
index 0000000..54c8bf5
--- /dev/null
@@ -0,0 +1,61 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Cancellable</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream"><link rel="next" href="class-giodatainputstream.html" title="gio.DataInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Cancellable</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giobufferedoutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giodatainputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Cancellable"><a name="class-giocancellable"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Cancellable</h2><p>gio.Cancellable â€” Thread-safe Operation Cancellation Stack.</p></div><div class="refsect1" title="Synopsis"><a name="id312088"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Cancellable</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giocancellable.html#constructor-giocancellable" title="Constructor">gio.Cancellable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--cancel" title="gio.Cancellable.cancel">cancel</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--get-fd" title="gio.Cancellable.get_fd">get_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--is-cancelled" title="gio.Cancellable.is_cancelled">is_cancelled</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--pop-current" title="gio.Cancellable.pop_current">pop_current</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--push-current" title="gio.Cancellable.push_current">push_current</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--reset" title="gio.Cancellable.reset">reset</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giocancellable.html#method-giocancellable--set-error-if-cancelled" title="gio.Cancellable.set_error_if_cancelled">set_error_if_cancelled</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giocancellable.html#function-gio--cancellable-get-current" title="gio.cancellable_get_current">gio.cancellable_get_current</a></span>(<span class="methodparam"></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id459303"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giocancellable.html" title="gio.Cancellable">gio.Cancellable</a>
+</pre></div><div class="refsect1" title="Description"><a name="id440909"></a><h2>Description</h2><p>
+            The <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+            is a thread-safe operation cancellation stack used throughout GIO to allow for
+            cancellation of synchronous and asynchronous operations.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giocancellable"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.Cancellable</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>.
+                </td></tr></tbody></table><p>
+            Creates a new <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a> object.
+        </p><p>
+            Applications that want to start one or more operations that should be cancellable should create a
+            <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+            and pass it to the operations. 
+        </p><p>
+            One <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+            can be used in multiple consecutive operations, but not in multiple concurrent operations.
+        </p></div><div class="refsect1" title="Methods"><a name="id386832"></a><h2>Methods</h2><div class="refsect2" title="gio.Cancellable.cancel"><a name="method-giocancellable--cancel"></a><h3>gio.Cancellable.cancel</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">cancel</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+                The <code class="methodname">cancel</code>() method will set cancellable to cancelled,
+                and will emit the "cancelled" signal. (However, see the warning about race conditions
+                in the documentation for that signal if you are planning to connect to it.) 
+            </p><p>
+                This function is thread-safe. In other words, you can safely call it from a thread
+                other than the one running the operation that was passed the cancellable. 
+            </p><p>
+                The convention within gio is that cancelling an asynchronous operation causes it
+                to complete asynchronously. That is, if you cancel the operation from the same thread
+                in which it is running, then the operation's GAsyncReadyCallback will not be invoked
+                until the application returns to the main loop.
+            </p></div><div class="refsect2" title="gio.Cancellable.get_fd"><a name="method-giocancellable--get-fd"></a><h3>gio.Cancellable.get_fd</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A valid file descriptor. -1 if the file descriptor
+                is not supported, or on errors.</td></tr></tbody></table><p>
+                The <code class="methodname">get_fd</code>() method gets the file descriptor
+                for a cancellable job. This can be used to implement cancellable operations
+                on Unix systems. The returned fd will turn readable when cancellable is cancelled. 
+            </p></div><div class="refsect2" title="gio.Cancellable.is_cancelled"><a name="method-giocancellable--is-cancelled"></a><h3>gio.Cancellable.is_cancelled</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">is_cancelled</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if cancellable is cancelled,
+                <code class="literal">False</code> if called with <code class="literal">None</code> or if
+                item is not cancelled. </td></tr></tbody></table><p>
+                The <code class="methodname">get_fd</code>() method gets the file descriptor
+                for a cancellable job. This can be used to implement cancellable operations
+                on Unix systems. The returned fd will turn readable when cancellable is cancelled. 
+            </p></div><div class="refsect2" title="gio.Cancellable.pop_current"><a name="method-giocancellable--pop-current"></a><h3>gio.Cancellable.pop_current</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pop_current</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+                The <code class="methodname">pop_current</code>() method pops cancellable off
+                the cancellable stack (verifying that cancellable is on the top of the stack).
+            </p></div><div class="refsect2" title="gio.Cancellable.push_current"><a name="method-giocancellable--push-current"></a><h3>gio.Cancellable.push_current</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">push_current</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+                The <code class="methodname">push_current</code>() method pushes cancellable onto
+                the cancellable stack. The current cancllable can then be recieved using
+                <code class="methodname"><a class="link" href="class-giocancellable.html#function-gio--cancellable-get-current" title="gio.cancellable_get_current">gio.cancellable_get_current</a></code>(). 
+            </p></div><div class="refsect2" title="gio.Cancellable.reset"><a name="method-giocancellable--reset"></a><h3>gio.Cancellable.reset</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">reset</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+                The <code class="methodname">reset</code>() method resets cancellable to its uncancelled state.
+            </p></div><div class="refsect2" title="gio.Cancellable.set_error_if_cancelled"><a name="method-giocancellable--set-error-if-cancelled"></a><h3>gio.Cancellable.set_error_if_cancelled</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_error_if_cancelled</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if cancellable was cancelled,
+                    <code class="literal">False</code> if it was not.</td></tr></tbody></table><p>
+                The <code class="methodname">set_error_if_cancelled</code>() method, if the cancellable
+                is cancelled, sets the error to notify that the operation was cancelled.
+            </p></div></div><div class="refsect1" title="Functions"><a name="id432204"></a><h2>Functions</h2><div class="refsect2" title="gio.cancellable_get_current"><a name="function-gio--cancellable-get-current"></a><h3>gio.cancellable_get_current</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">cancellable_get_current</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    from the top of the stack, or <code class="literal">None</code> if the stack is empty.</td></tr></tbody></table><p>
+                The <code class="methodname">cancellable_get_current</code>() function gets the top cancellable from the stack.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giobufferedoutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giodatainputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.BufferedOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.DataInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giodatainputstream.html b/docs/html/class-giodatainputstream.html
new file mode 100644 (file)
index 0000000..67fb819
--- /dev/null
@@ -0,0 +1,223 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.DataInputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giocancellable.html" title="gio.Cancellable"><link rel="next" href="class-giodataoutputstream.html" title="gio.DataOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.DataInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giocancellable.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giodataoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.DataInputStream"><a name="class-giodatainputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.DataInputStream</h2><p>gio.DataInputStream â€” Data Input Stream</p></div><div class="refsect1" title="Synopsis"><a name="id464053"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.DataInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream">gio.BufferedInputStream</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giodatainputstream.html#constructor-giodatainputstream" title="Constructor">gio.DataInputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--get-byte-order" title="gio.DataInputStream.get_byte_order">get_byte_order</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--get-newline-type" title="gio.DataInputStream.get_newline_type">get_newline_type</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-byte" title="gio.DataInputStream.read_byte">read_byte</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-int16" title="gio.DataInputStream.read_int16">read_int16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-int32" title="gio.DataInputStream.read_int32">read_int32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-int64" title="gio.DataInputStream.read_int64">read_int64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line" title="gio.DataInputStream.read_line">read_line</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line-async" title="gio.DataInputStream.read_line_async">read_line_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line-finish" title="gio.DataInputStream.read_line_finish">read_line_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-uint16" title="gio.DataInputStream.read_uint16">read_uint16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-uint32" title="gio.DataInputStream.read_uint32">read_uint32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-uint64" title="gio.DataInputStream.read_uint64">read_uint64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until" title="gio.DataInputStream.read_until">read_until</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stop_chars</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until-async" title="gio.DataInputStream.read_until_async">read_until_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stop_chars</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until-finish" title="gio.DataInputStream.read_until_finish">read_until_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--set-byte-order" title="gio.DataInputStream.set_byte_order">set_byte_order</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--set-newline-type" title="gio.DataInputStream.set_newline_type">set_newline_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id439747"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+    +-- <a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream">gio.FilterInputStream</a>
+      +-- <a class="link" href="class-giobufferedinputstream.html" title="gio.BufferedInputStream">gio.BufferedInputStream</a>
+        +-- <a class="link" href="class-giodatainputstream.html" title="gio.DataInputStream">gio.DataInputStream</a>
+</pre></div><div class="refsect1" title="gio.DataInputStream Properties"><a name="properties-giodatainputstream"></a><h2>gio.DataInputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"byte-order"</td><td valign="top">Read - Write</td><td valign="top">The byte order. Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</td></tr><tr valign="top"><td valign="top">"newline-type"</td><td valign="top">Read - Write</td><td valign="top">The accepted types of line ending. Default value: gio.DATA_STREAM_NEWLINE_TYPE_LF.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id464009"></a><h2>Description</h2><p>
+            <a class="link" href="class-giodatainputstream.html" title="gio.DataInputStream"><code class="classname">gio.DataInputStream</code></a>
+            implements <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+            and includes functions for reading structured data directly from a binary input stream.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giodatainputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.DataInputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>base_stream</code></em> :</span></p></td><td>a
+                <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>.
+                </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-giodatainputstream.html" title="gio.DataInputStream"><code class="classname">gio.DataInputStream</code></a>
+                </td></tr></tbody></table><p>
+            Creates a new <a class="link" href="class-giodatainputstream.html" title="gio.DataInputStream"><code class="classname">gio.DataInputStream</code></a>
+            from the given base_stream.
+        </p></div><div class="refsect1" title="Methods"><a name="id433976"></a><h2>Methods</h2><div class="refsect2" title="gio.DataInputStream.get_byte_order"><a name="method-giodatainputstream--get-byte-order"></a><h3>gio.DataInputStream.get_byte_order</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_byte_order</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the stream's current
+                    <a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a>.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_byte_order</code>() method gets the byte
+                order for the data input stream.
+            </p></div><div class="refsect2" title="gio.DataInputStream.get_newline_type"><a name="method-giodatainputstream--get-newline-type"></a><h3>gio.DataInputStream.get_newline_type</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_newline_type</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="xref" href="gio-constants.html#gio-data-stream-newline-type-constants" title="Gio Data Stream Newline Type Constants">Gio Data Stream Newline Type Constants</a>
+                    for the given stream.                    
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_newline_type</code>() method gets the current
+                newline type for the stream.
+            </p></div><div class="refsect2" title="gio.DataInputStream.read_byte"><a name="method-giodatainputstream--read-byte"></a><h3>gio.DataInputStream.read_byte</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_byte</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an unsigned 8-bit/1-byte value read from the
+                    stream or 0 if an error occurred.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_byte</code>() method reads an unsigned 8-bit/1-byte value from stream.
+            </p></div><div class="refsect2" title="gio.DataInputStream.read_int16"><a name="method-giodatainputstream--read-int16"></a><h3>gio.DataInputStream.read_int16</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_int16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 16-bit/2-byte value read from stream or 0 if an error occurred.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_int16</code>() method reads a 16-bit/2-byte value from stream.
+            </p><p>
+                In order to get the correct byte order for this read operation, see
+                <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
+                and
+                <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataInputStream.read_int32"><a name="method-giodatainputstream--read-int32"></a><h3>gio.DataInputStream.read_int32</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_int32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 32-bit/4-byte value read from the stream
+                    or 0 if an error occurred.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_int32</code>() method reads a signed 32-bit/4-byte value from stream.
+            </p><p>
+                In order to get the correct byte order for this read operation, see
+                <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
+                and
+                <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataInputStream.read_int64"><a name="method-giodatainputstream--read-int64"></a><h3>gio.DataInputStream.read_int64</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_int64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 64-bit/8-byte value read from the stream
+                    or 0 if an error occurred.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_int64</code>() method reads a signed 64-bit/8-byte value from stream.
+            </p><p>
+                In order to get the correct byte order for this read operation, see
+                <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
+                and
+                <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataInputStream.read_line"><a name="method-giodatainputstream--read-line"></a><h3>gio.DataInputStream.read_line</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_line</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string with the line that was read in (without the newlines).
+                    Set length to a gsize to get the length of the read line. On an error, it will return
+                    <code class="literal">None</code> and error will be set. If there's no content to read, it
+                    will still return <code class="literal">None</code>, but error won't be set.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_line</code>() reads a line from the data input stream.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can
+                be cancelled by triggering the cancellable object from another thread.
+                If the operation was cancelled, the error gio.ERROR_CANCELLED will be
+                returned. If an operation was partially finished when the operation was
+                cancelled the partial result will be returned, without an error.
+            </p></div><div class="refsect2" title="gio.DataInputStream.read_line_async"><a name="method-giodatainputstream--read-line-async"></a><h3>gio.DataInputStream.read_line_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_line_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_line_async</code>() method is the asynchronous version of
+                <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line" title="gio.DataInputStream.read_line">gio.DataInputStream.read_line</a></code>().
+                It is an error to have two outstanding calls to this function.
+            </p><p>
+                For the synchronous version of this function, see
+                <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line" title="gio.DataInputStream.read_line">gio.DataInputStream.read_line</a></code>().
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was
+                cancelled, the error gio.ERROR_CANCELLED will be set
+            </p></div><div class="refsect2" title="gio.DataInputStream.read_line_finish"><a name="method-giodatainputstream--read-line-finish"></a><h3>gio.DataInputStream.read_line_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_line_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string with the line that was read in (without the newlines).
+                    On an error, it will return <code class="literal">None</code> and error will be set.
+                    If there's no content to read, it will still return <code class="literal">None</code>,
+                    but error won't be set.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_line_finish</code>() method finishes an asynchronous
+                file append operation started with
+                <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-line-async" title="gio.DataInputStream.read_line_async">gio.DataInputStream.read_line_async</a></code>().
+            </p></div><div class="refsect2" title="gio.DataInputStream.read_uint16"><a name="method-giodatainputstream--read-uint16"></a><h3>gio.DataInputStream.read_uint16</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_uint16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 16-bit/2-byte value read from stream or 0 if an error occurred.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_uint16</code>() method reads a 16-bit/2-byte value from stream.
+            </p><p>
+                In order to get the correct byte order for this read operation, see
+                <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
+                and
+                <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataInputStream.read_uint32"><a name="method-giodatainputstream--read-uint32"></a><h3>gio.DataInputStream.read_uint32</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_uint32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 32-bit/4-byte value read from the stream
+                    or 0 if an error occurred.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_uint32</code>() method reads a signed 32-bit/4-byte value from stream.
+            </p><p>
+                In order to get the correct byte order for this read operation, see
+                <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
+                and
+                <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataInputStream.read_uint64"><a name="method-giodatainputstream--read-uint64"></a><h3>gio.DataInputStream.read_uint64</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_uint64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a signed 64-bit/8-byte value read from the stream
+                    or 0 if an error occurred.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_uint64</code>() method reads a signed 64-bit/8-byte value from stream.
+            </p><p>
+                In order to get the correct byte order for this read operation, see
+                <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</PYGTKDOCLINK></code>()
+                and
+                <code class="methodname"><PYGTKDOCLINK HREF="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</PYGTKDOCLINK></code>().
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataInputStream.read_until"><a name="method-giodatainputstream--read-until"></a><h3>gio.DataInputStream.read_until</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_until</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stop_chars</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>stop_chars</code></strong> :</span></p></td><td>characters to terminate the read.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string with the data that was read before encountering
+                    any of the stop characters. This function will return NULL on an error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_until</code>() reads a string from the data input
+                stream, up to the first occurrence of any of the stop characters.
+            </p></div><div class="refsect2" title="gio.DataInputStream.read_until_async"><a name="method-giodatainputstream--read-until-async"></a><h3>gio.DataInputStream.read_until_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_until_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stop_chars</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>stop_chars</code></strong> :</span></p></td><td>characters to terminate the read.
+                  </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_until_async</code>() method it's the asynchronous version of
+                <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until" title="gio.DataInputStream.read_until">gio.DataInputStream.read_until</a></code>().
+                It is an error to have two outstanding calls to this function.
+            </p><p>
+                For the synchronous version of this function, see
+                <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until" title="gio.DataInputStream.read_until">gio.DataInputStream.read_until</a></code>().
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was
+                cancelled, the error gio.ERROR_CANCELLED will be set
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until-finish" title="gio.DataInputStream.read_until_finish">gio.DataInputStream.read_until_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.DataInputStream.read_until_finish"><a name="method-giodatainputstream--read-until-finish"></a><h3>gio.DataInputStream.read_until_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_until_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string with the data that was read before encountering
+                    any of the stop characters. This function will return <code class="literal">None</code> on an error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_until_finish</code>() method finishes an asynchronous
+                file append operation started with
+                <code class="methodname"><a class="link" href="class-giodatainputstream.html#method-giodatainputstream--read-until-async" title="gio.DataInputStream.read_until_async">gio.DataInputStream.read_until_async</a></code>().
+            </p></div><div class="refsect2" title="gio.DataInputStream.set_byte_order"><a name="method-giodatainputstream--set-byte-order"></a><h3>gio.DataInputStream.set_byte_order</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_byte_order</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>order</code></strong> :</span></p></td><td>a
+                  <a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a> to set.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">set_byte_order</code>() method sets the byte order for
+                the given stream. All subsequent reads from the stream will be read in the given order.
+            </p></div><div class="refsect2" title="gio.DataInputStream.set_newline_type"><a name="method-giodatainputstream--set-newline-type"></a><h3>gio.DataInputStream.set_newline_type</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_newline_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>a
+                  <a class="xref" href="gio-constants.html#gio-data-stream-newline-type-constants" title="Gio Data Stream Newline Type Constants">Gio Data Stream Newline Type Constants</a> to set.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">set_newline_type</code>() method sets the newline type for the stream.
+            </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
+                Note that using gio.DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a
+                read chunk ends in "CR" we must read an additional byte to know if this is
+                "CR" or "CR LF", and this might block if there is no more data availible.
+            </div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giocancellable.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giodataoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Cancellable </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.DataOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giodataoutputstream.html b/docs/html/class-giodataoutputstream.html
new file mode 100644 (file)
index 0000000..a681efe
--- /dev/null
@@ -0,0 +1,118 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.DataOutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giodatainputstream.html" title="gio.DataInputStream"><link rel="next" href="class-giodrive.html" title="gio.Drive"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.DataOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giodatainputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giodrive.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.DataOutputStream"><a name="class-giodataoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.DataOutputStream</h2><p>gio.DataOutputStream â€” Data Output Stream</p></div><div class="refsect1" title="Synopsis"><a name="id432940"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.DataOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream">gio.BufferedOutputStream</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giodataoutputstream.html#constructor-giodataoutputstream" title="Constructor">gio.DataOutputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--get-byte-order" title="gio.DataOutputStream.get_byte_order">get_byte_order</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-byte" title="gio.DataOutputStream.put_byte">put_byte</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-int16" title="gio.DataOutputStream.put_int16">put_int16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-int32" title="gio.DataOutputStream.put_int32">put_int32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-int64" title="gio.DataOutputStream.put_int64">put_int64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-string" title="gio.DataOutputStream.put_string">put_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-uint16" title="gio.DataOutputStream.put_uint16">put_uint16</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-uint32" title="gio.DataOutputStream.put_uint32">put_uint32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--put-uint64" title="gio.DataOutputStream.put_uint64">put_uint64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodataoutputstream.html#method-giodataoutputstream--set-byte-order" title="gio.DataOutputStream.set_byte_order">set_byte_order</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id396268"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+    +-- <a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream">gio.FilterOutputStream</a>
+      +-- <a class="link" href="class-giobufferedoutputstream.html" title="gio.BufferedOutputStream">gio.BufferedOutputStream</a>
+        +-- <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream">gio.DataOutputStream</a>
+</pre></div><div class="refsect1" title="gio.DataOutputStream Properties"><a name="properties-giodataoutputstream"></a><h2>gio.DataOutputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"byte-order"</td><td valign="top">Read - Write</td><td valign="top">Determines the byte ordering that is used when writing
+                           multi-byte entities (such as integers) to the stream.
+                           Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id409238"></a><h2>Description</h2><p>
+            <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><code class="classname">gio.DataOutputStream</code></a>
+            implements <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+            and includes functions for writing data directly to an output stream.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giodataoutputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.DataOutputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_stream</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>base_stream</code></em> :</span></p></td><td>a
+                <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>.
+                </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><code class="classname">gio.DataOutputStream</code></a>
+                </td></tr></tbody></table><p>
+            Creates a new <a class="link" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><code class="classname">gio.DataOutputStream</code></a>
+            from the given base_stream.
+        </p></div><div class="refsect1" title="Methods"><a name="id441772"></a><h2>Methods</h2><div class="refsect2" title="gio.DataOutputStream.get_byte_order"><a name="method-giodataoutputstream--get-byte-order"></a><h3>gio.DataOutputStream.get_byte_order</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_byte_order</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the stream's current
+                    <a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a>.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_byte_order</code>() method gets the byte
+                order for the stream.
+            </p></div><div class="refsect2" title="gio.DataOutputStream.put_byte"><a name="method-giodataoutputstream--put-byte"></a><h3>gio.DataOutputStream.put_byte</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">put_byte</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a char.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">put_byte</code>() method puts a byte into the output stream.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataOutputStream.put_int16"><a name="method-giodataoutputstream--put-int16"></a><h3>gio.DataOutputStream.put_int16</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">put_int16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a gint16.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">put_int16</code>() method puts a signed 16-bit integer into the output stream.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataOutputStream.put_int32"><a name="method-giodataoutputstream--put-int32"></a><h3>gio.DataOutputStream.put_int32</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">put_int32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a gint32.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">put_int32</code>() method puts a signed 32-bit integer into the output stream.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataOutputStream.put_int64"><a name="method-giodataoutputstream--put-int64"></a><h3>gio.DataOutputStream.put_int64</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">put_int64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a gint64.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">put_int64</code>() method puts a signed 64-bit integer into the output stream.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataOutputStream.put_string"><a name="method-giodataoutputstream--put-string"></a><h3>gio.DataOutputStream.put_string</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">put_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>str</code></strong> :</span></p></td><td>a string.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if string was successfully added to the stream. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">put_string</code>() method puts a string into the output stream.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataOutputStream.put_uint16"><a name="method-giodataoutputstream--put-uint16"></a><h3>gio.DataOutputStream.put_uint16</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">put_uint16</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a guint16.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">put_uint16</code>() method puts an unsigned 16-bit integer into the output stream.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataOutputStream.put_uint32"><a name="method-giodataoutputstream--put-uint32"></a><h3>gio.DataOutputStream.put_uint32</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">put_uint32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a guint32.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">put_uint32</code>() method puts an unsigned 32-bit integer into the output stream.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataOutputStream.put_uint64"><a name="method-giodataoutputstream--put-uint64"></a><h3>gio.DataOutputStream.put_uint64</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">put_uint64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>a guint64.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if data was successfully added to the stream.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">put_uint64</code>() method puts an unsigned 64-bit integer into the output stream.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.DataOutputStream.set_byte_order"><a name="method-giodataoutputstream--set-byte-order"></a><h3>gio.DataOutputStream.set_byte_order</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_byte_order</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>order</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>order</code></strong> :</span></p></td><td>a
+                  <a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a> to set.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">set_byte_order</code>() method sets the byte order for
+                the given stream. All subsequent reads from the stream will be read in the given order.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giodatainputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giodrive.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.DataInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Drive</td></tr></table></div></body></html>
diff --git a/docs/html/class-giodrive.html b/docs/html/class-giodrive.html
new file mode 100644 (file)
index 0000000..be54893
--- /dev/null
@@ -0,0 +1,117 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Drive</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giodataoutputstream.html" title="gio.DataOutputStream"><link rel="next" href="class-gioemblem.html" title="gio.Emblem"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Drive</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giodataoutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioemblem.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Drive"><a name="class-giodrive"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Drive</h2><p>gio.Drive â€” Virtual File System drive management.</p></div><div class="refsect1" title="Synopsis"><a name="id439146"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Drive</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--can-eject" title="gio.Drive.can_eject">can_eject</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--can-poll-for-media" title="gio.Drive.can_poll_for_media">can_poll_for_media</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--eject" title="gio.Drive.eject">eject</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--eject-finish" title="gio.Drive.eject_finish">eject_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--enumerate-identifiers" title="gio.Drive.enumerate_identifiers">enumerate_identifiers</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-icon" title="gio.Drive.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-identifier" title="gio.Drive.get_identifier">get_identifier</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-name" title="gio.Drive.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-volumes" title="gio.Drive.get_volumes">get_volumes</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--has-media" title="gio.Drive.has_media">has_media</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--has-volumes" title="gio.Drive.has_volumes">has_volumes</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--is-media-check-automatic" title="gio.Drive.is_media_check_automatic">is_media_check_automatic</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--is-media-removable" title="gio.Drive.is_media_removable">is_media_removable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--poll-for-media" title="gio.Drive.poll_for_media">poll_for_media</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--poll-for-media-finish" title="gio.Drive.poll_for_media_finish">poll_for_media_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id440047"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+  +-- <a class="link" href="class-giodrive.html" title="gio.Drive">gio.Drive</a>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id408094"></a><h2>Prerequisites</h2><p>
+            <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a> requires
+            <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+        </p></div><div class="refsect1" title="Description"><a name="id412009"></a><h2>Description</h2><p>
+            <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+            - this represent a piece of hardware connected to the machine. Its generally
+            only created for removable hardware or hardware with removable media. 
+        </p><p>
+            <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+            is a container class for GVolume objects that stem from the same piece of media.
+            As such, <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+            abstracts a drive with (or without) removable media and provides operations for
+            querying whether media is available, determing whether media change is automatically
+            detected and ejecting the media. 
+        </p><p>
+            If the <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+            reports that media isn't automatically detected, one can poll for media; typically
+            one should not do this periodically as a poll for media operation is potententially
+            expensive and may spin up the drive creating noise. 
+        </p><p>
+            For porting from GnomeVFS note that there is no equivalent of
+            <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+            in that API.
+        </p></div><div class="refsect1" title="Methods"><a name="id431819"></a><h2>Methods</h2><div class="refsect2" title="gio.Drive.can_eject"><a name="method-giodrive--can-eject"></a><h3>gio.Drive.can_eject</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">can_eject</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the drive can be ejected,
+                    <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">can_eject</code>() method checks if a drive can be ejected.
+            </p></div><div class="refsect2" title="gio.Drive.can_poll_for_media"><a name="method-giodrive--can-poll-for-media"></a><h3>gio.Drive.can_poll_for_media</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">can_poll_for_media</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the drive can be polled
+                    for media changes, <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">can_poll_for_media</code>() method checks if a drive
+                can be polled for media changes.
+            </p></div><div class="refsect2" title="gio.Drive.eject"><a name="method-giodrive--eject"></a><h3>gio.Drive.eject</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">eject</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+                  <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                  object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">eject</code>() method asynchronously ejects a drive. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--eject-finish" title="gio.Drive.eject_finish">gio.Drive.eject_finish</a></code>()
+                to obtain the result of the operation.
+            </p></div><div class="refsect2" title="gio.Drive.eject_finish"><a name="method-giodrive--eject-finish"></a><h3>gio.Drive.eject_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">eject_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the drive has been ejected
+                    successfully, <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">eject_finish</code>() method finishes ejecting a drive.
+            </p></div><div class="refsect2" title="gio.Drive.enumerate_identifiers"><a name="method-giodrive--enumerate-identifiers"></a><h3>gio.Drive.enumerate_identifiers</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">enumerate_identifiers</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of strings containing kinds of identifiers.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">enumerate_identifiers</code>() method gets the kinds
+                of identifiers that drive has. Use
+                <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--get-identifier" title="gio.Drive.get_identifier">gio.Drive.get_identifier</a></code>()
+                to obtain the identifiers themselves.
+            </p></div><div class="refsect2" title="gio.Drive.get_icon"><a name="method-giodrive--get-icon"></a><h3>gio.Drive.get_icon</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+                    for the drive.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_icon</code>() method gets the icon for drive.
+            </p></div><div class="refsect2" title="gio.Drive.get_identifier"><a name="method-giodrive--get-identifier"></a><h3>gio.Drive.get_identifier</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_identifier</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing the requested identfier, or
+                    <code class="literal">None</code> if the
+                    <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+                    doesn't have this kind of identifier. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_identifier</code>() method gets the identifier of
+                the given kind for drive.
+            </p></div><div class="refsect2" title="gio.Drive.get_name"><a name="method-giodrive--get-name"></a><h3>gio.Drive.get_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing drive's name.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_name</code>() method gets the name of drive.
+            </p></div><div class="refsect2" title="gio.Drive.get_volumes"><a name="method-giodrive--get-volumes"></a><h3>gio.Drive.get_volumes</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_volumes</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list containing any
+                    <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                    objects on the given drive. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_volumes</code>() method get a list of mountable
+                volumes for drive. 
+            </p></div><div class="refsect2" title="gio.Drive.has_media"><a name="method-giodrive--has-media"></a><h3>gio.Drive.has_media</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">has_media</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if drive has media,
+                    <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
+                The <code class="methodname">has_media</code>() method checks if the drive
+                has media. Note that the OS may not be polling the drive for media changes; see
+                <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--is-media-check-automatic" title="gio.Drive.is_media_check_automatic">gio.Drive.is_media_check_automatic</a></code>()
+                for more details.
+            </p></div><div class="refsect2" title="gio.Drive.has_volumes"><a name="method-giodrive--has-volumes"></a><h3>gio.Drive.has_volumes</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">has_volumes</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if drive contains volumes,
+                    <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
+                The <code class="methodname">has_volumes</code>() method check if drive has any mountable volumes.
+            </p></div><div class="refsect2" title="gio.Drive.is_media_check_automatic"><a name="method-giodrive--is-media-check-automatic"></a><h3>gio.Drive.is_media_check_automatic</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">is_media_check_automatic</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if drive is capabable
+                    of automatically detecting media changes,
+                    <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
+                The <code class="methodname">is_media_check_automatic</code>() method checks if
+                drive is capabable of automatically detecting media changes.
+            </p></div><div class="refsect2" title="gio.Drive.is_media_removable"><a name="method-giodrive--is-media-removable"></a><h3>gio.Drive.is_media_removable</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">is_media_removable</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if drive supports removable media,
+                    <code class="literal">False</code> otherwise.</td></tr></tbody></table><p>
+                The <code class="methodname">is_media_removable</code>() method checks if the
+                drive supports removable media.
+            </p></div><div class="refsect2" title="gio.Drive.poll_for_media"><a name="method-giodrive--poll-for-media"></a><h3>gio.Drive.poll_for_media</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">poll_for_media</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+                  <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                  object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">poll_for_media</code>() method asynchronously polls
+                drive to see if media has been inserted or removed. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--poll-for-media-finish" title="gio.Drive.poll_for_media_finish">gio.Drive.poll_for_media_finish</a></code>()
+                to obtain the result of the operation.
+            </p></div><div class="refsect2" title="gio.Drive.poll_for_media_finish"><a name="method-giodrive--poll-for-media-finish"></a><h3>gio.Drive.poll_for_media_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">poll_for_media_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the drive has been poll_for_mediaed
+                    successfully, <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">poll_for_media_finish</code>() method finishes
+                an operation started with
+                <code class="methodname"><a class="link" href="class-giodrive.html#method-giodrive--poll-for-media" title="gio.Drive.poll_for_media">gio.Drive.poll_for_media</a></code>()
+                on a drive.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giodataoutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioemblem.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.DataOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Emblem</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioemblem.html b/docs/html/class-gioemblem.html
new file mode 100644 (file)
index 0000000..451f288
--- /dev/null
@@ -0,0 +1,46 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Emblem</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giodrive.html" title="gio.Drive"><link rel="next" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Emblem</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giodrive.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioemblemedicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Emblem"><a name="class-gioemblem"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Emblem</h2><p>gio.Emblem â€” An object for emblems.</p></div><div class="refsect1" title="Synopsis"><a name="id431946"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Emblem</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gioemblem.html#constructor-gioemblem" title="Constructor">gio.Emblem</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>origin</code></strong></span><span class="initializer">=gio.EMBLEM_ORIGIN_UNKNOWN</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioemblem.html#method-gioemblem--get-icon" title="gio.Emblem.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioemblem.html#method-gioemblem--get-origin" title="gio.Emblem.get_origin">get_origin</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioemblem.html#function-gio--emblem-new-with-origin" title="gio.emblem_new_with_origin">gio.emblem_new_with_origin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>origin</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id421408"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-gioemblem.html" title="gio.Emblem">gio.Emblem</a>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id354264"></a><h2>Implemented Interfaces</h2><p>
+            <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
+            implements
+            <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+        </p></div><div class="refsect1" title="gio.Emblem Properties"><a name="properties-gioemblem"></a><h2>gio.Emblem Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"icon"</td><td valign="top">Read - Write - Construct Only</td><td valign="top">The actual icon of the emblem.</td></tr><tr valign="top"><td valign="top">"origin"</td><td valign="top">Read - Write - Construct Only</td><td valign="top">Tells which origin the emblem is derived from.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id432212"></a><h2>Description</h2><p>
+            The <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
+            class is an implementation of <code class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></code>
+            that supports having an emblem, which is an icon with additional properties.
+            It can then be added to a
+            <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>.
+        </p><p>
+            Currently, only metainformation about the emblem's origin is supported.
+            More may be added in the future.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-gioemblem"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.Emblem</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>origin</code></strong></span><span class="initializer">=gio.EMBLEM_ORIGIN_UNKNOWN</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td><td>a
+                <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a> containing the icon.
+                </td></tr><tr><td><p><span class="term"><em class="parameter"><code>origin</code></em> :</span></p></td><td>
+                <a class="link" href="gio-constants.html#gio-emblem-origin-constants" title="Gio Emblem Origin Constants">origin</a> of the emblem.
+                </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>.
+                </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
+          Parameter <em class="parameter"><code>origin</code></em> is available since PyGObject 2.20.
+        </div><p>
+            Creates a new <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a> for icon.
+        </p></div><div class="refsect1" title="Methods"><a name="id495382"></a><h2>Methods</h2><div class="refsect2" title="gio.Emblem.get_icon"><a name="method-gioemblem--get-icon"></a><h3>gio.Emblem.get_icon</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+                    <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_icon</code>() method gives back the icon from emblem.
+            </p></div><div class="refsect2" title="gio.Emblem.get_origin"><a name="method-gioemblem--get-origin"></a><h3>gio.Emblem.get_origin</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_origin</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the origin of the emblem.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_origin</code>() method gets the origin of the emblem.
+            </p></div></div><div class="refsect1" title="Functions"><a name="id382610"></a><h2>Functions</h2><div class="refsect2" title="gio.emblem_new_with_origin"><a name="function-gio--emblem-new-with-origin"></a><h3>gio.emblem_new_with_origin</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">emblem_new_with_origin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>origin</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>origin</code></em> :</span></p></td><td>a <a class="xref" href="gio-constants.html#gio-emblem-origin-constants" title="Gio Emblem Origin Constants">Gio Emblem Origin Constants</a>
+                    defining the emblem's origin.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>.
+                    </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
+              While this method is not deprecated, with 2.20 and up it is recommended
+              to use the constructor instead.
+            </div><p>
+                The <code class="methodname">emblem_new_with_origin</code>() function creates
+                a new emblem for icon.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giodrive.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioemblemedicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Drive </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.EmblemedIcon</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioemblemedicon.html b/docs/html/class-gioemblemedicon.html
new file mode 100644 (file)
index 0000000..12b7277
--- /dev/null
@@ -0,0 +1,38 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.EmblemedIcon</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioemblem.html" title="gio.Emblem"><link rel="next" href="class-giofile.html" title="gio.File"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.EmblemedIcon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioemblem.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofile.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.EmblemedIcon"><a name="class-gioemblemedicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.EmblemedIcon</h2><p>gio.EmblemedIcon â€” Icon with emblems.</p></div><div class="refsect1" title="Synopsis"><a name="id435196"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.EmblemedIcon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gioemblemedicon.html#constructor-gioemblemedicon" title="Constructor">gio.EmblemedIcon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>emblem</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioemblemedicon.html#method-gioemblemedicon--add-emblem" title="gio.EmblemedIcon.add_emblem">add_emblem</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>emblem</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioemblemedicon.html#method-gioemblemedicon--get-icon" title="gio.EmblemedIcon.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id434379"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon">gio.EmblemedIcon</a>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id359522"></a><h2>Implemented Interfaces</h2><p>
+            <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>
+            implements
+            <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+        </p></div><div class="refsect1" title="Description"><a name="id434774"></a><h2>Description</h2><p>
+            The <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>
+            class is an implementation of <code class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></code>
+            that supports adding an emblem to an icon. Adding multiple emblems to an icon is ensured via
+            <code class="methodname"><a class="link" href="class-gioemblemedicon.html#method-gioemblemedicon--add-emblem" title="gio.EmblemedIcon.add_emblem">gio.EmblemedIcon.add_emblem</a></code>().
+        </p><p>
+            Note that
+            <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>
+            allows no control over the position of the emblems. See also
+            <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
+            for more information.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-gioemblemedicon"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.EmblemedIcon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>emblem</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td><td>a
+                <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>.
+                </td></tr><tr><td><p><span class="term"><em class="parameter"><code>emblem</code></em> :</span></p></td><td>a
+                <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>.
+                </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>.
+                </td></tr></tbody></table><p>
+            Creates a new <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+            for icon with the emblem emblem.
+        </p></div><div class="refsect1" title="Methods"><a name="id440198"></a><h2>Methods</h2><div class="refsect2" title="gio.EmblemedIcon.add_emblem"><a name="method-gioemblemedicon--add-emblem"></a><h3>gio.EmblemedIcon.add_emblem</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">add_emblem</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>emblem</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>emblem</code></em> :</span></p></td><td>a
+                    <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">add_emblem</code>() method adds emblem to the
+                list of <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>s.
+            </p></div><div class="refsect2" title="gio.EmblemedIcon.get_icon"><a name="method-gioemblemedicon--get-icon"></a><h3>gio.EmblemedIcon.get_icon</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+                    <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+                    that is owned by emblemed.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_icon</code>() method gets the main icon for emblemed.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioemblem.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofile.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Emblem </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.File</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofile.html b/docs/html/class-giofile.html
new file mode 100644 (file)
index 0000000..9f40126
--- /dev/null
@@ -0,0 +1,1436 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.File</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><link rel="next" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.File</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioemblemedicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileattributeinfo.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.File"><a name="class-giofile"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.File</h2><p>gio.File â€” File and Directory Handling.</p></div><div class="refsect1" title="Synopsis"><a name="id418550"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.File</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giofile.html#constructor-giofile" title="Constructor">gio.File</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>commandline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to" title="gio.File.append_to">append_to</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to-async" title="gio.File.append_to_async">append_to_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to-finish" title="gio.File.append_to_finish">append_to_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy" title="gio.File.copy">copy</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-async" title="gio.File.copy_async">copy_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-attributes" title="gio.File.copy_attributes">copy_attributes</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-finish" title="gio.File.copy_finish">copy_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--create" title="gio.File.create">create</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-async" title="gio.File.create_async">create_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-finish" title="gio.File.create_finish">create_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--delete" title="gio.File.delete">delete</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--dup" title="gio.File.dup">dup</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--eject-mountable" title="gio.File.eject_mountable">eject_mountable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--eject-mountable-finish" title="gio.File.eject_mountable_finish">eject_mountable_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children" title="gio.File.enumerate_children">enumerate_children</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children-async" title="gio.File.enumerate_children_async">enumerate_children_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children-finish" title="gio.File.eject_mountable_finish">enumerate_children_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--equal" title="gio.File.equal">equal</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file2</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount" title="gio.File.find_enclosing_mount">find_enclosing_mount</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount-async" title="gio.File.find_enclosing_mount_async">find_enclosing_mount_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount-finish" title="gio.File.find_enclosing_mount_finish">find_enclosing_mount_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-basename" title="gio.File.get_basename">get_basename</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-child" title="gio.File.get_child">get_child</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-child-for-display-name" title="gio.File.get_child_for_display_name">get_child_for_display_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parent" title="gio.File.get_parent">get_parent</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parse-name" title="gio.File.get_parse_name">get_parse_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-path" title="gio.File.get_path">get_path</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-relative-path" title="gio.File.get_relative_path">get_relative_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>descendant</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri" title="gio.File.get_uri">get_uri</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri-scheme" title="gio.File.get_uri_scheme">get_uri_scheme</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--has-prefix" title="gio.File.has_prefix">has_prefix</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>prefix</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--has-uri-scheme" title="gio.File.has_uri_scheme">has_uri_scheme</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri_scheme</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--is-native" title="gio.File.is_native">is_native</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents" title="gio.File.load_contents">load_contents</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents-async" title="gio.File.load_contents_async">load_contents_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents-finish" title="gio.File.load_contents_finish">load_contents_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--make-directory" title="gio.File.make_directory">make_directory</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--make-directory-with-parents" title="gio.File.make_directory_with_parents">make_directory_with_parents</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--make-symbolic-link" title="gio.File.make_symbolic_link">make_symbolic_link</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>symlink_value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor" title="gio.File.monitor">monitor</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor-directory" title="gio.File.monitor_directory">monitor_directory</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor-file" title="gio.File.monitor_file">monitor_file</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-enclosing-volume" title="gio.File.mount_enclosing_volume">mount_enclosing_volume</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_MOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-enclosing-volume-finish" title="gio.File.mount_enclosing_volume_finish">mount_enclosing_volume_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable" title="gio.File.mount_mountable">mount_mountable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_MOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable-finish" title="gio.File.mount_mountable_finish">mount_mountable_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--move" title="gio.File.move">move</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-default-handler" title="gio.File.query_default_handler">query_default_handler</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-exists" title="gio.File.query_exists">query_exists</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-file-type" title="gio.File.query_file_type">query_file_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info" title="gio.File.query_filesystem_info">query_filesystem_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info-async" title="gio.File.query_filesystem_info_async">query_filesystem_info_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info-finish" title="gio.File.query_filesystem_info_finish">query_filesystem_info_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">query_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info-async" title="gio.File.query_info_async">query_info_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info-finish" title="gio.File.query_info_finish">query_info_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-settable-attributes" title="gio.File.query_settable_attributes">query_settable_attributes</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-writable-namespace" title="gio.File.query_writable_namespace">query_writable_namespace</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--read" title="gio.File.read">read</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--read-async" title="gio.File.read_async">read_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--read-finish" title="gio.File.read_finish">read_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace" title="gio.File.replace">replace</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-async" title="gio.File.replace_async">replace_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents" title="gio.File.replace_contents">replace_contents</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>contents</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents-async" title="gio.File.replace_contents_async">replace_contents_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>contents</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents-finish" title="gio.File.replace_contents_finish">replace_contents_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-finish" title="gio.File.replace_finish">replace_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--resolve-relative-path" title="gio.File.resolve_relative_path">resolve_relative_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>relative_path</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute" title="gio.File.set_attribute">set_attribute</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value_p</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-byte-string" title="gio.File.set_attribute_byte_string">set_attribute_byte_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-int32" title="gio.File.set_attribute_int32">set_attribute_int32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-int64" title="gio.File.set_attribute_int64">set_attribute_int64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-string" title="gio.File.set_attribute_string">set_attribute_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-uint32" title="gio.File.set_attribute_uint32">set_attribute_uint32</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attribute-uint64" title="gio.File.set_attribute_uint64">set_attribute_uint64</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-async" title="gio.File.set_attributes_async">set_attributes_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-finish" title="gio.File.set_attributes_finish">set_attributes_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-from-info" title="gio.File.set_attributes_from_info">set_attributes_from_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name" title="gio.File.set_display_name">set_dispay_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name-async" title="gio.File.set_display_name_async">set_display_name_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name-finish" title="gio.File.set_display_name_finish">set_display_name_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--trash" title="gio.File.trash">trash</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable" title="gio.File.unmount_mountable">unmount_mountable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable-finish" title="gio.File.unmount_mountable_finish">unmount_mountable_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofile.html#function-gio--file-parse-name" title="gio.file_parse_name">gio.file_parse_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>parse_name</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id442206"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+  +-- <a class="link" href="class-giofile.html" title="gio.File">gio.File</a>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id441365"></a><h2>Prerequisites</h2><p>
+            <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is implemented by
+            <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+        </p></div><div class="refsect1" title="Description"><a name="id417179"></a><h2>Description</h2><p>
+            <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is a high
+            level abstraction for manipulating files on a virtual file system.
+            <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s are lightweight,
+            immutable objects that do no I/O upon creation. It is necessary to understand that
+            <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+            objects do not represent files, merely an identifier for a file. All file content
+            I/O is implemented as streaming operations (see
+            <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a> and
+            <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>). 
+        </p><p>
+            To construct a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>, you can use
+            it's constructor either with a path, an uri or a commandline argument.
+            <code class="methodname"><a class="link" href="class-giofile.html#function-gio--file-parse-name" title="gio.file_parse_name">gio.file_parse_name</a></code>()
+            from a utf8 string gotten from
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parse-name" title="gio.File.get_parse_name">gio.File.get_parse_name</a></code>().
+        </p><p>
+            One way to think of a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is as
+            an abstraction of a pathname. For normal files the system pathname is what is stored internally,
+            but as <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s are extensible it
+            could also be something else that corresponds to a pathname in a userspace implementation of a filesystem. 
+        </p><p>
+            <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s make up hierarchies of
+            directories and files that correspond to the files on a filesystem. You can move through the
+            file system with GFile using
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parent" title="gio.File.get_parent">gio.File.get_parent</a></code>()
+            to get an identifier for the parent directory,
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-child" title="gio.File.get_child">gio.File.get_child</a></code>()
+            to get a child within a directory,
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--resolve-relative-path" title="gio.File.resolve_relative_path">gio.File.resolve_relative_path</a></code>()
+            to resolve a relative path between two <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s.
+            There can be multiple hierarchies, so you may not end up at the same root if you repeatedly call
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-parent" title="gio.File.get_parent">gio.File.get_parent</a></code>()
+            on two different files. 
+        </p><p>
+            All <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s have a basename (get with
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-basename" title="gio.File.get_basename">gio.File.get_basename</a></code>()
+            ). These names are byte strings that are used to identify the file on the filesystem
+            (relative to its parent directory) and there is no guarantees that they have any particular charset
+            encoding or even make any sense at all. If you want to use filenames in a user interface you should
+            use the display name that you can get by requesting the gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>().
+            This is guaranteed to be in utf8 and can be used in a user interface. But always store the real basename or the
+            GFile to use to actually access the file, because there is no way to go from a display name to the actual name. 
+        </p><p>
+            Using <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> as an identifier has the same
+            weaknesses as using a path in that there may be multiple aliases for the same file. For instance,
+            hard or soft links may cause two different <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s
+            to refer to the same file. Other possible causes for aliases are: case insensitive filesystems, short and
+            long names on Fat/NTFS, or bind mounts in Linux. If you want to check if two GFiles point to the same file
+            you can query for the gio.FILE_ATTRIBUTE_ID_FILE attribute. Note that
+            <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> does some trivial canonicalization
+            of pathnames passed in, so that trivial differences in the path string used at creation
+            (duplicated slashes, slash at end of path, "." or ".." path segments, etc) does not create different
+            <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s. 
+        </p><p>
+            Many <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> operations have both synchronous
+            and asynchronous versions to suit your application. Asynchronous versions of synchronous functions simply
+            have _async() appended to their function names. The asynchronous I/O functions call a
+            GAsyncReadyCallback which is then used to finalize the operation, producing a GAsyncResult
+            which is then passed to the function's matching _finish() operation. 
+        </p><p>
+            Some <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> operations do not have
+            synchronous analogs, as they may take a very long time to finish, and blocking may leave an application
+            unusable. Notable cases include:
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable" title="gio.File.mount_mountable">gio.File.mount_mountable</a></code>()
+            to mount a mountable file.
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable" title="gio.File.unmount_mountable">gio.File.unmount_mountable</a></code>()
+            to unmount a mountable file.
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--eject-mountable" title="gio.File.eject_mountable">gio.File.eject_mountable</a></code>()
+            to eject a mountable file. 
+        </p><p>
+            One notable feature of <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s are
+            entity tags, or "etags" for short. Entity tags are somewhat like a more abstract
+            version of the traditional mtime, and can be used to quickly determine if the file
+            has been modified from the version on the file system. See the HTTP 1.1
+            specification for HTTP Etag headers, which are a very similar concept. 
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giofile"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.File</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>commandline</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>commandline</code></em> :</span></p></td><td>a command line string. 
+                </td></tr><tr><td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td><td>a string containing a relative or absolute path.
+                </td></tr><tr><td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td><td>a string containing a URI.
+                </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+                </td></tr></tbody></table><p>
+            Creates a new <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> either from a commandline,
+            a path or an uri.
+        </p></div><div class="refsect1" title="Methods"><a name="id374828"></a><h2>Methods</h2><div class="refsect2" title="gio.File.append_to"><a name="method-giofile--append-to"></a><h3>gio.File.append_to</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">append_to</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+                    <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">append_to</code>() method gets an output stream for
+                appending data to the file. If the file doesn't already exist it is created. 
+            </p><p>
+                By default files created are generally readable by everyone, but if you pass
+                gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to the
+                current user, to the level that is supported on the target filesystem. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If
+                the operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </p><p>
+                Some file systems don't allow all file names, and may return an
+                gio.ERROR_INVALID_FILENAME error. If the file is a directory the
+                gio.ERROR_IS_DIRECTORY error will be returned. Other errors are possible too,
+                and depend on what kind of filesystem the file is on.
+            </p></div><div class="refsect2" title="gio.File.append_to_async"><a name="method-giofile--append-to-async"></a><h3>gio.File.append_to_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">append_to_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">append_to_async</code>() method asynchronously opens file for appending. 
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to" title="gio.File.append_to">gio.File.append_to</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to-finish" title="gio.File.append_to_finish">gio.File.append_to_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.File.append_to_finish"><a name="method-giofile--append-to-finish"></a><h3>gio.File.append_to_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">append_to_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a valid
+                    <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">append_to_finish</code>() method finishes an asynchronous
+                file append operation started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--append-to-async" title="gio.File.append_to_async">gio.File.append_to_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.copy"><a name="method-giofile--copy"></a><h3>gio.File.copy</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">copy</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>destination</code></em> :</span></p></td><td>destination <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>progress_callback</code></em> :</span></p></td><td>function to callback with progress information.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">copy</code>() method copies the file source to
+                the location specified by destination. Can not handle recursive copies of directories. 
+            </p><p>
+                If the flag gio.FILE_COPY_OVERWRITE is specified an already existing
+                destination file is overwritten. 
+            </p><p>
+                If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will
+                be copied as symlinks, otherwise the target of the source symlink will be copied. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. 
+            </p><p>
+                If progress_callback is not <code class="literal">None</code>, then the operation can be
+                monitored by setting this to a GFileProgressCallback function. user_data
+                will be passed to this function. It is guaranteed that this callback will be
+                called after all data has been transferred with the total number of bytes
+                copied during the operation. 
+            </p><p>
+                If the source file does not exist then the gio.ERROR_NOT_FOUND error is returned,
+                independent on the status of the destination. 
+            </p><p>
+                If gio.FILE_COPY_OVERWRITE is not specified and the target exists,
+                then the error gio.ERROR_EXISTS is returned. 
+            </p><p>
+                If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY error
+                is returned. If trying to overwrite a directory with a directory the
+                gio.ERROR_WOULD_MERGE error is returned. 
+            </p><p>
+                If the source is a directory and the target does not exist, or gio.FILE_COPY_OVERWRITE
+                is specified and the target is a file, then the gio.ERROR_WOULD_RECURSE error is returned. 
+            </p><p>
+                If you are interested in copying the
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> object
+                itself (not the on-disk file), see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--dup" title="gio.File.dup">gio.File.dup</a></code>().
+            </p></div><div class="refsect2" title="gio.File.copy_async"><a name="method-giofile--copy-async"></a><h3>gio.File.copy_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">append_to_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>destination</code></em> :</span></p></td><td>destination <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>progress_callback</code></em> :</span></p></td><td>function to callback with progress information.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>progress_callback_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">copy_async</code>() method copies the file source to
+                the location specified by destination asynchronously. For details of the behaviour,
+                see <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy" title="gio.File.copy">gio.File.copy</a></code>(). 
+            </p><p>
+                If progress_callback is not <code class="literal">None</code>, then that function that will
+                be called just like in
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy" title="gio.File.copy">gio.File.copy</a></code>(),
+                however the callback will run in the main loop, not in the thread that is doing the I/O operation. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-finish" title="gio.File.copy_finish">gio.File.copy_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.File.copy_attributes"><a name="method-giofile--copy-attributes"></a><h3>gio.File.copy_attributes</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">copy_attributes</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>destination</code></em> :</span></p></td><td>destination <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                    to copy attributes to.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attributes were copied successfully,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">copy_attributes</code>() method copies the file attributes
+                from source to destination. 
+            </p><p>
+                Normally only a subset of the file attributes are copied, those that are copies
+                in a normal file copy operation (which for instance does not include e.g. owner).
+                However if gio.FILE_COPY_ALL_METADATA is specified in flags, then all the metadata
+                that is possible to copy is copied. This is useful when implementing move by copy + delete source.
+            </p></div><div class="refsect2" title="gio.File.copy_finish"><a name="method-giofile--copy-finish"></a><h3>gio.File.copy_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">copy_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success,
+                    <code class="literal">False</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">copy_finish</code>() method finishes an asynchronous
+                copy operation started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy-async" title="gio.File.copy_async">gio.File.copy_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.create"><a name="method-giofile--create"></a><h3>gio.File.create</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">create</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+                    <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">create</code>() method creates a new file and returns
+                an output stream for writing to it. The file must not already exist. 
+            </p><p>
+                By default files created are generally readable by everyone, but if you pass
+                gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to the
+                current user, to the level that is supported on the target filesystem. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </p><p>
+                If a file or directory with this name already exists the gio.ERROR_EXISTS
+                error will be returned. Some file systems don't allow all file names, and
+                may return an gio.ERROR_INVALID_FILENAME error, and if the name is to long
+                gio.ERROR_FILENAME_TOO_LONG will be returned. Other errors are possible too,
+                and depend on what kind of filesystem the file is on.
+            </p></div><div class="refsect2" title="gio.File.create_async"><a name="method-giofile--create-async"></a><h3>gio.File.create_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">create_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">create_async</code>() method asynchronously creates a new
+                file and returns an output stream for writing to it. The file must not already exist. 
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create" title="gio.File.create">gio.File.create</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-finish" title="gio.File.create_finish">gio.File.create_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.File.create_finish"><a name="method-giofile--create-finish"></a><h3>gio.File.create_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">create_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+                    <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">create_finish</code>() method finishes an asynchronous
+                copy operation started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-async" title="gio.File.create_async">gio.File.create_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.delete"><a name="method-giofile--delete"></a><h3>gio.File.delete</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">delete</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file was deleted,
+                    <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">deleted</code>() method deletes a file. If the file is a
+                directory, it will only be deleted if it is empty. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was
+                cancelled, the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.File.dup"><a name="method-giofile--dup"></a><h3>gio.File.dup</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">dup</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                    that is a duplicate of the given <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">dup</code>() method duplicates a
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                handle. This operation does not duplicate the actual file or directory represented
+                by the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>; see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--copy" title="gio.File.copy">gio.File.copy</a></code>()
+                if attempting to copy a file. 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.eject_mountable"><a name="method-giofile--eject-mountable"></a><h3>gio.File.eject_mountable</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">eject_mountable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">eject_mountable</code>() method starts an asynchronous eject on a
+                mountable. When this operation has completed, callback will be called with
+                user_user data, and the operation can be finalized with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--eject-mountable-finish" title="gio.File.eject_mountable_finish">gio.File.eject_mountable_finish</a></code>(). 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.File.eject_mountable_finish"><a name="method-giofile--eject-mountable-finish"></a><h3>gio.File.eject_mountable_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">eject_mountable_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file was ejected successfully,
+                    <code class="literal">False</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">create_finish</code>() method finishes an asynchronous
+                copy operation started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create-async" title="gio.File.create_async">gio.File.create_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.enumerate_children"><a name="method-giofile--enumerate-children"></a><h3>gio.File.enumerate_children</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">enumerate_children</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+                    <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">enumerate_children</code>() method gets the requested information
+                about the files in a directory. The result is a GFileEnumerator object that will give out
+                <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a> objects
+                for all the files in the directory. 
+            </p><p>
+                The attribute value is a string that specifies the file attributes that should be gathered.
+                It is not an error if it's not possible to read a particular requested attribute from a file -
+                it just won't be set. attribute should be a comma-separated list of attribute or attribute
+                wildcards. The wildcard "*" means all attributes, and a wildcard like "standard::*" means all
+                attributes in the standard namespace. An example attribute query be "standard::*,owner::user".
+                The standard attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </p><p>
+                If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned. If the file
+                is not a directory, the gio.FILE_ERROR_NOTDIR error will be returned.
+                Other errors are possible too.
+            </p></div><div class="refsect2" title="gio.File.enumerate_children_async"><a name="method-giofile--enumerate-children-async"></a><h3>gio.File.enumerate_children_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">enumerate_children_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">enumerate_children_async</code>() method asynchronously gets the
+                requested information about the files in a directory. The result is a
+                <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+                object that will give out <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+                objects for all the files in the directory. 
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children" title="gio.File.enumerate_children">enumerate_children</a></code>()
+                which is the synchronous version of this call. 
+            </p></div><div class="refsect2" title="gio.File.eject_mountable_finish"><a name="method-giofile--enumerate-children-finish"></a><h3>gio.File.eject_mountable_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">enumerate_children_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+                    or <code class="literal">None</code> if an error occurred.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">enumerate_children_finish</code>() method finishes an asynchronous
+                copy operation started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children-async" title="gio.File.enumerate_children_async">gio.File.enumerate_children_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.equal"><a name="method-giofile--equal"></a><h3>gio.File.equal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">equal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>file2</code></strong> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if file1 and file2 are equal.
+                    <code class="literal">False</code> if either is not a
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">equal</code>() method checks equality of two given
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s.
+                Note that two <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s
+                that differ can still refer to the same file on the filesystem due to various
+                forms of filename aliasing. 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.find_enclosing_mount"><a name="method-giofile--find-enclosing-mount"></a><h3>gio.File.find_enclosing_mount</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">enumerate_children</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+                    <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">find_enclosing_mount</code>() method gets a
+                <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a> for the
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+            </p><p>
+                If the interface for file does not have a mount (e.g. possibly a remote share),
+                error will be set to gio.ERROR_NOT_FOUND and <code class="literal">None</code> will be returned. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.find_enclosing_mount_async"><a name="method-giofile--find-enclosing-mount-async"></a><h3>gio.File.find_enclosing_mount_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">find_enclosing_mount_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">find_enclosing_mount_async</code>() method asynchronously
+                gets the mount for the file. 
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount" title="gio.File.find_enclosing_mount">gio.File.find_enclosing_mount</a></code>()
+                which is the synchronous version of this call. 
+            </p></div><div class="refsect2" title="gio.File.find_enclosing_mount_finish"><a name="method-giofile--find-enclosing-mount-finish"></a><h3>gio.File.find_enclosing_mount_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">find_enclosing_mount_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+                    or <code class="literal">None</code> if an error occurred.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">find_enclosing_mount_finish</code>() method finishes an asynchronous
+                find mount started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--find-enclosing-mount-async" title="gio.File.find_enclosing_mount_async">gio.File.find_enclosing_mount_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.get_basename"><a name="method-giofile--get-basename"></a><h3>gio.File.get_basename</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_basename</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>string containing the
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s
+                    base name, or <code class="literal">None</code> if given
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is invalid.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_basename</code>() method gets the base name
+                (the last component of the path) for a given
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>. 
+            </p><p>
+                If called for the top level of a system (such as the filesystem root or
+                a uri like sftp://host/) it will return a single directory separator
+                (and on Windows, possibly a drive letter). 
+            </p><p>
+                The base name is a byte string (*not* UTF-8). It has no defined encoding
+                or rules other than it may not contain zero bytes. If you want to use filenames
+                in a user interface you should use the display name that you can get by requesting
+                the gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>(). 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.get_child"><a name="method-giofile--get-child"></a><h3>gio.File.get_child</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_child</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>string containing the child's basename.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                    to a child specified by name.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_child</code>() method gets a child of file
+                with basename equal to name. 
+            </p><p>
+                Note that the file with that specific name might not exist, but you can
+                still have a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                that points to it. You can use this for instance to create that file. 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.get_child_for_display_name"><a name="method-giofile--get-child-for-display-name"></a><h3>gio.File.get_child_for_display_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_child_for_display_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>display_name</code></strong> :</span></p></td><td>string to a possible child.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                    to the specified child or <code class="literal">None</code>
+                    if the display name couldn't be converted.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_child_for_display_name</code>() method gets the
+                child of file for a given display_name (i.e. a UTF8 version of the name).
+                If this function fails, it returns NULL and error will be set. This is very
+                useful when constructing a GFile for a new file and the user entered the filename
+                in the user interface, for instance when you select a directory and type a filename
+                in the file selector. 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.get_parent"><a name="method-giofile--get-parent"></a><h3>gio.File.get_parent</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_parent</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                    structure to the parent of the given
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> or
+                    <code class="literal">None</code> if there is no parent.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_parent</code>() method gets the parent directory for the file.
+                If the file represents the root directory of the file system, then <code class="literal">None</code>
+                will be returned. 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.get_parse_name"><a name="method-giofile--get-parse-name"></a><h3>gio.File.get_parse_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_parse_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s parse name.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_parse_name</code>() method gets the parse name
+                of the file. A parse name is a UTF-8 string that describes the file such
+                that one can get the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                back using
+                <code class="methodname"><a class="link" href="class-giofile.html#function-gio--file-parse-name" title="gio.file_parse_name">gio.file_parse_name</a></code>(). 
+            </p><p>
+                This is generally used to show the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                as a nice full-pathname kind of string in a user interface, like in a location entry. 
+            </p><p>
+                For local files with names that can safely be converted to UTF8 the pathname is used,
+                otherwise the IRI is used (a form of URI that allows UTF8 characters unescaped). 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.get_path"><a name="method-giofile--get-path"></a><h3>gio.File.get_path</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_path</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s path,
+                    or <code class="literal">None</code> if no such path exists.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_path</code>() method gets the local pathname for
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>, if one exists. 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.get_relative_path"><a name="method-giofile--get-relative-path"></a><h3>gio.File.get_relative_path</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_relative_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>descendant</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>descendant</code></strong> :</span></p></td><td>input <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>string with the relative path from descendant to parent,
+                    or <code class="literal">None</code> if descendant doesn't have parent as prefix.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_relative_path</code>() method gets the path for
+                descendant relative to parent. 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.get_uri"><a name="method-giofile--get-uri"></a><h3>gio.File.get_uri</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_uri</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s URI.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_uri</code>() method gets the URI for the file. 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.get_uri_scheme"><a name="method-giofile--get-uri-scheme"></a><h3>gio.File.get_uri_scheme</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_uri_scheme</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the URI scheme for the
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_uri_scheme</code>() method gets the URI scheme for a
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+                RFC 3986 decodes the scheme as: 
+            </p><pre class="programlisting">
+URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
+</pre><p>
+                Common schemes include "file", "http", "ftp", etc. 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.has_prefix"><a name="method-giofile--has-prefix"></a><h3>gio.File.has_prefix</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">has_prefix</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>prefix</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>prefix</code></strong> :</span></p></td><td>input <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the files's parent, grandparent,
+                    etc is prefix. <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">has_prefix</code>() method checks whether file has the prefix
+                specified by prefix. In other word, if the names of inital elements of files pathname
+                match prefix. Only full pathname elements are matched, so a path like /foo is not
+                considered a prefix of /foobar, only of /foo/bar. 
+            </p><p>
+                This call does no blocking i/o, as it works purely on names. As such it can sometimes
+                return <code class="literal">False</code> even if file is inside a prefix (from a filesystem point
+                of view), because the prefix of file is an alias of prefix.
+            </p></div><div class="refsect2" title="gio.File.has_uri_scheme"><a name="method-giofile--has-uri-scheme"></a><h3>gio.File.has_uri_scheme</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">has_uri_scheme</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uri_scheme</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>uri_scheme</code></strong> :</span></p></td><td>a string containing a URI scheme.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>'s
+                    backend supports the given URI scheme, <code class="literal">False</code> if URI scheme
+                    is <code class="literal">None</code>, not supported, or
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> is invalid. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">has_uri_scheme</code>() method checks to see if a
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                has a given URI scheme. 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.is_native"><a name="method-giofile--is-native"></a><h3>gio.File.is_native</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">is_native</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if file is native. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">is_native</code>() method checks to see if a file
+                is native to the platform. 
+            </p><p>
+                A native file s one expressed in the platform-native filename format, e.g.
+                "C:\Windows" or "/usr/bin/". This does not mean the file is local, as it
+                might be on a locally mounted remote filesystem. 
+            </p><p>
+                On some systems non-native files may be available using the native filesystem
+                via a userspace filesystem (FUSE), in these cases this call will return
+                <code class="literal">False</code>, but
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-path" title="gio.File.get_path">gio.File.get_path</a></code>()
+                will still return a native path. 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.load_contents"><a name="method-giofile--load-contents"></a><h3>gio.File.load_contents</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">load_contents</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a three tuple containing the contents of the file,
+                    the length of the contents of the file and the current entity tag for the file.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">load_contents</code>() method loads the content of the file into memory.
+                The data is always zero-terminated, but this is not included in the resultant length.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.load_contents_async"><a name="method-giofile--load-contents-async"></a><h3>gio.File.load_contents_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">load_contents_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">load_contents_async</code>() method starts an asynchronous load of the file's contents. 
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents" title="gio.File.load_contents">gio.File.load_contents</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the load operation has completed, callback will be called with user data. To finish
+                the operation, call
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents-finish" title="gio.File.load_contents_finish">gio.File.load_contents_finish</a></code>()
+                with the GAsyncResult returned by the callback. 
+            </p></div><div class="refsect2" title="gio.File.load_contents_finish"><a name="method-giofile--load-contents-finish"></a><h3>gio.File.load_contents_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">load_contents_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a three tuple containing the contents of the file,
+                    the length of the contents of the file and the current entity tag for the file.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">load_contents_finish</code>() method finishes an asynchronous
+                find mount started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--load-contents-async" title="gio.File.load_contents_async">gio.File.load_contents_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.make_directory"><a name="method-giofile--make-directory"></a><h3>gio.File.make_directory</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">make_directory</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful creation,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">make_directory</code>() method creates a directory.
+                Note that this will only create a child directory of the immediate parent directory
+                of the path or URI given by the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+                To recursively create directories, see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--make-directory-with-parents" title="gio.File.make_directory_with_parents">gio.File.make_directory_with_parents</a></code>().
+                This function will fail if the parent directory does not exist, setting error to
+                gio.ERROR_NOT_FOUND. If the file system doesn't support creating directories, this
+                function will fail, setting error to gio.ERROR_NOT_SUPPORTED. 
+            </p><p>
+                For a local <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> the newly
+                created directory will have the default (current) ownership and permissions of the current process. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.make_directory_with_parents"><a name="method-giofile--make-directory-with-parents"></a><h3>gio.File.make_directory_with_parents</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">make_directory_with_parents</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if all directories have been successfully created,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">make_directory_with_parents</code>() method creates a directory
+                and any parent directories that may not exist similar to 'mkdir -p'. If the file system
+                does not support creating directories, this function will fail, setting error to gio.ERROR_NOT_SUPPORTED. 
+            </p><p>
+                For a local <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a> the newly
+                created directories will have the default (current) ownership and permissions of the current process. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.make_symbolic_link"><a name="method-giofile--make-symbolic-link"></a><h3>gio.File.make_symbolic_link</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">make_symbolic_link</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>symlink_value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>symlink_value</code></em> :</span></p></td><td>a string with the value of the new symlink.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on the creation of a new symlink,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">make_symbolic_link</code>() method creates a symbolic link. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.monitor"><a name="method-giofile--monitor"></a><h3>gio.File.monitor</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">monitor</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
+                    a <a class="xref" href="gio-constants.html#gio-file-monitor-flags-constants" title="Gio File Monitor Flags Constants">Gio File Monitor Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
+                    for the given file, or <code class="literal">None</code> on error
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">monitor</code>() method obtains a file or directory
+                monitor for the given file, depending on the type of the file. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.monitor_directory"><a name="method-giofile--monitor-directory"></a><h3>gio.File.monitor_directory</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">monitor_directory</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
+                    a <a class="xref" href="gio-constants.html#gio-file-monitor-flags-constants" title="Gio File Monitor Flags Constants">Gio File Monitor Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
+                    for the given file, or <code class="literal">None</code> on error
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">monitor_directory</code>() method obtains a directory monitor
+                for the given file. This may fail if directory monitoring is not supported. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.monitor_file"><a name="method-giofile--monitor-file"></a><h3>gio.File.monitor_file</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">monitor_file</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
+                    a <a class="xref" href="gio-constants.html#gio-file-monitor-flags-constants" title="Gio File Monitor Flags Constants">Gio File Monitor Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
+                    for the given file, or <code class="literal">None</code> on error
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">monitor_file</code>() method obtains a file monitor for the
+                given file. If no file notification mechanism exists, then regular polling
+                of the file is used. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.mount_enclosing_volume"><a name="method-giofile--mount-enclosing-volume"></a><h3>gio.File.mount_enclosing_volume</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">mount_enclosing_volume</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount_operation</code></em> :</span></p></td><td>a
+                    <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+                    or <code class="literal">None</code> to avoid user interaction. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request
+                    is satisfied, or <code class="literal">None</code>. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-mount-mount-flags-constants" title="Gio Mount Mount Flags Constants">Gio Mount Mount Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">mount_enclosing_volume</code>() method starts a mount_operation,
+                mounting the volume that contains the file location. 
+            </p><p>
+                When this operation has completed, callback will be called with user_user data,
+                and the operation can be finalized with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-enclosing-volume-finish" title="gio.File.mount_enclosing_volume_finish">gio.File.mount_enclosing_volume_finish</a></code>(). 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.mount_enclosing_volume_finish"><a name="method-giofile--mount-enclosing-volume-finish"></a><h3>gio.File.mount_enclosing_volume_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">mount_enclosing_volume_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if successful. If an error has occurred,
+                    this function will return <code class="literal">False</code> and set error appropriately if present. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">mount_enclosing_volume_finish</code>() method finishes an asynchronous
+                find mount started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-enclosing-volume" title="gio.File.mount_enclosing_volume">gio.File.mount_enclosing_volume</a></code>().
+            </p></div><div class="refsect2" title="gio.File.mount_mountable"><a name="method-giofile--mount-mountable"></a><h3>gio.File.mount_mountable</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">mount_mountable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount_operation</code></em> :</span></p></td><td>a
+                    <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+                    or <code class="literal">None</code> to avoid user interaction. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request
+                    is satisfied, or <code class="literal">None</code>. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-mount-mount-flags-constants" title="Gio Mount Mount Flags Constants">Gio Mount Mount Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">mount_mountable</code>() method mounts a file of type
+                gio.FILE_TYPE_MOUNTABLE. Using mount_operation, you can request callbacks when,
+                for instance, passwords are needed during authentication. 
+            </p><p>
+                When this operation has completed, callback will be called with user_user data,
+                and the operation can be finalized with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable-finish" title="gio.File.mount_mountable_finish">gio.File.mount_mountable_finish</a></code>(). 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.mount_mountable_finish"><a name="method-giofile--mount-mountable-finish"></a><h3>gio.File.mount_mountable_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">mount_mountable_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">mount_mountable_finish</code>() method finishes an asynchronous
+                find mount started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--mount-mountable" title="gio.File.mount_mountable">gio.File.mount_mountable</a></code>().
+            </p></div><div class="refsect2" title="gio.File.move"><a name="method-giofile--move"></a><h3>gio.File.move</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">copy</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>destination</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>progress_callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_COPY_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>destination</code></em> :</span></p></td><td>destination <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>progress_callback</code></em> :</span></p></td><td>function to callback with progress information.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to the progress callback function.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">move</code>() method tries to move the file or directory
+                source to the location specified by destination. If native move operations are
+                supported then this is used, otherwise a copy + delete fallback is used. The native
+                implementation may support moving directories (for instance on moves inside the same
+                filesystem), but the fallback code does not. 
+            </p><p>
+                If the flag gio.FILE_COPY_OVERWRITE is specified an already existing destination file is overwritten. 
+            </p><p>
+                If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will be copied
+                as symlinks, otherwise the target of the source symlink will be copied. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. 
+            </p><p>
+                If progress_callback is not <code class="literal">None</code>, then the operation can be monitored
+                by setting this to a GFileProgressCallback function. progress_callback_data will be passed
+                to this function. It is guaranteed that this callback will be called after all data has been
+                transferred with the total number of bytes copied during the operation. 
+            </p><p>
+                If the source file does not exist then the gio.ERROR_NOT_FOUND error is returned,
+                independent on the status of the destination. 
+            </p><p>
+                If gio.FILE_COPY_OVERWRITE is not specified and the target exists, then the error
+                gio.ERROR_EXISTS is returned. 
+            </p><p>
+                If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY error is returned.
+                If trying to overwrite a directory with a directory the gio.ERROR_WOULD_MERGE error is returned. 
+            </p><p>
+                If the source is a directory and the target does not exist, or gio.FILE_COPY_OVERWRITE is specified
+                and the target is a file, then the gio.ERROR_WOULD_RECURSE error may be returned
+                (if the native move operation isn't available).
+            </p></div><div class="refsect2" title="gio.File.query_default_handler"><a name="method-giofile--query-default-handler"></a><h3>gio.File.query_default_handler</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_default_handler</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+                    if the handle was found, <code class="literal">None</code> if there were errors.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_default_handler</code>() method returns the
+                <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a> that
+                is registered as the default application to handle the file specified by file. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.query_exists"><a name="method-giofile--query-exists"></a><h3>gio.File.query_exists</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_exists</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file exists (and can be detected
+                    without error), <code class="literal">False</code> otherwise (or if cancelled). 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_exists</code>() method is an tility function to check
+                if a particular file exists. This is implemented using
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>()
+                and as such does blocking I/O. 
+            </p><p>
+                Note that in many cases it is racy to first check for file existence and then execute
+                something based on the outcome of that, because the file might have been created or
+                removed in between the operations. The general approach to handling that is to not check,
+                but just do the operation and handle the errors as they come. 
+            </p><p>
+                As an example of race-free checking, take the case of reading a file, and if it doesn't
+                exist, creating it. There are two racy versions: read it, and on error create it; and:
+                check if it exists, if not create it. These can both result in two processes creating the
+                file (with perhaps a partially written file as the result). The correct approach is to
+                always try to create the file with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--create" title="gio.File.create">gio.File.create</a></code>()
+                which will either atomically create the file or fail with a gio.ERROR_EXISTS error. 
+            </p><p>
+                However, in many cases an existence check is useful in a user interface, for instance
+                to make a menu item sensitive/insensitive, so that you don't have to fool users that
+                something is possible and then just show and error dialog. If you do this, you should
+                make sure to also handle the errors that can happen due to races when you execute the operation.
+            </p></div><div class="refsect2" title="gio.File.query_file_type"><a name="method-giofile--query-file-type"></a><h3>gio.File.query_file_type</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_file_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_MONITOR_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
+                    a <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
+                    <a class="xref" href="gio-constants.html#gio-file-type-constants" title="Gio File Type Constants">Gio File Type Constants</a>
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_file_type</code>() method it's an utility function to inspect
+                the <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                of a file. This is implemented using
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>()
+                and as such does blocking I/O. 
+            </p><p>
+                The primary use case of this method is to check if a file is a regular file, directory, or symlink.
+            </p></div><div class="refsect2" title="gio.File.query_filesystem_info"><a name="method-giofile--query-filesystem-info"></a><h3>gio.File.query_filesystem_info</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_filesystem_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.                    
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+                    or <code class="literal">None</code> if there was an error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_filesystem_info</code>() method it's similar to
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>(),
+                but obtains information about the filesystem the file is on, rather than the
+                file itself. For instance the amount of space available and the type of the filesystem. 
+            </p><p>
+                The attribute value is a string that specifies the file attributes that should be gathered.
+                It is not an error if it's not possible to read a particular requested attribute from a file -
+                it just won't be set. attribute should be a comma-separated list of attribute or attribute
+                wildcards. The wildcard "*" means all attributes, and a wildcard like "fs:*" means all attributes
+                in the fs namespace. The standard namespace for filesystem attributes is "fs". Common attributes
+                of interest are gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem in bytes),
+                gio.FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), and gio.FILE_ATTRIBUTE_FILESYSTEM_TYPE
+                (type of the filesystem). 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p><p>
+                If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned. Other errors
+                are possible too, and depend on what kind of filesystem the file is on.
+            </p></div><div class="refsect2" title="gio.File.query_filesystem_info_async"><a name="method-giofile--query-filesystem-info-async"></a><h3>gio.File.query_filesystem_info_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_filesystem_info_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_filesystem_info_async</code>() method asynchronously
+                gets the requested information about the filesystem that the specified file is on.
+                The result is a GFileInfo object that contains key-value attributes
+                (such as type or size for the file). 
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info" title="gio.File.query_filesystem_info">query_filesystem_info</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info-finish" title="gio.File.query_filesystem_info_finish">gio.File.query_filesystem_info_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.File.query_filesystem_info_finish"><a name="method-giofile--query-filesystem-info-finish"></a><h3>gio.File.query_filesystem_info_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_filesystem_info_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+                    or <code class="literal">None</code> if an error occurred.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_filesystem_info_finish</code>() method finishes an asynchronous
+                copy operation started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info-async" title="gio.File.query_filesystem_info_async">gio.File.query_filesystem_info_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.query_filesystem_info"><a name="method-giofile--query-info"></a><h3>gio.File.query_filesystem_info</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.                    
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
+                    a <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+                    for the given file or <code class="literal">None</code> if there was an error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_info</code>() method gets the requested
+                information about specified file. The result is a
+                <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+                object that contains key-value attributes (such as the type or size of the file). 
+            </p><p>
+                The attribute value is a string that specifies the file attributes that should
+                be gathered. It is not an error if it's not possible to read a particular
+                requested attribute from a file - it just won't be set. attribute should be
+                a comma-separated list of attribute or attribute wildcards. The wildcard "*"
+                means all attributes, and a wildcard like "standard::*" means all attributes
+                in the standard namespace. An example attribute query be "standard::*,owner::user".
+                The standard attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p><p>
+                For symlinks, normally the information about the target of the symlink is returned,
+                rather than information about the symlink itself. However if you pass
+                gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in flags the information about
+                the symlink itself will be returned. Also, for symlinks that point to non-existing
+                files the information about the symlink itself will be returned. 
+            </p><p>
+                If the file does not exist, the gio.ERROR_NOT_FOUND error will be
+                returned. Other errors are possible too, and depend on what kind of
+                filesystem the file is on.
+            </p></div><div class="refsect2" title="gio.File.query_info_async"><a name="method-giofile--query-info-async"></a><h3>gio.File.query_info_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_info_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td><td>an attribute query string.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>
+                    a <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_info_async</code>() method asynchronously gets the
+                requested information about specified file. The result is a
+                <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+                object that contains key-value attributes (such as type or size for the file). 
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">query_info</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info-finish" title="gio.File.query_info_finish">gio.File.query_info_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.File.query_info_finish"><a name="method-giofile--query-info-finish"></a><h3>gio.File.query_info_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_info_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+                    for the given file or <code class="literal">None</code> if an error occurred.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_info_finish</code>() method finishes an asynchronous
+                copy operation started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info-async" title="gio.File.query_info_async">gio.File.query_info_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.query_settable_attributes"><a name="method-giofile--query-settable-attributes"></a><h3>gio.File.query_settable_attributes</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_settable_attributes</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of
+                    <a class="link" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"><code class="classname">gio.FileAttributeInfo</code></a>
+                    describing the settable attributes.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_settable_attributes</code>() method obtain the
+                list of settable attributes for the file. 
+            </p><p>
+                Returns the type and full attribute name of all the attributes that can be
+                set on this file. This doesn't mean setting it will always succeed though,
+                you might get an access failure, or some specific file may not support a specific attribute. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.query_writable_namespace"><a name="method-giofile--query-writable-namespace"></a><h3>gio.File.query_writable_namespace</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_writable_namespace</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of
+                    <a class="link" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"><code class="classname">gio.FileAttributeInfo</code></a>
+                    describing the writable namespaces.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_writable_namespace</code>() method obtain the
+                list of attribute namespaces where new attributes can be created by a user.
+                An example of this is extended attributes (in the "xattr" namespace). 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.read"><a name="method-giofile--read"></a><h3>gio.File.read</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 
+                    <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read</code>() method opens a file for reading. The result
+                is a <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+                that can be used to read the contents of the file. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p><p>
+                If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned.
+                If the file is a directory, the gio.ERROR_IS_DIRECTORY error will be returned.
+                Other errors are possible too, and depend on what kind of filesystem the file is on.
+            </p></div><div class="refsect2" title="gio.File.read_async"><a name="method-giofile--read-async"></a><h3>gio.File.read_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_async</code>() method asynchronously opens file for reading. 
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--read" title="gio.File.read">read</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--read-finish" title="gio.File.read_finish">gio.File.read_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.File.read_finish"><a name="method-giofile--read-finish"></a><h3>gio.File.read_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+                    file or <code class="literal">None</code> if an error occurred.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_finish</code>() method finishes an asynchronous
+                copy operation started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--read-async" title="gio.File.read_async">gio.File.read_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.replace"><a name="method-giofile--replace"></a><h3>gio.File.replace</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">replace</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>etag</code></em> :</span></p></td><td>an optional entity tag for the current
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>,
+                    or <code class="literal">None</code> to ignore.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>make_backup</code></em> :</span></p></td><td><code class="literal">True</code> if a backup should be created. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 
+                    <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">replace</code>() method returns an output stream for
+                overwriting the file, possibly creating a backup copy of the file first.
+                If the file doesn't exist, it will be created. 
+            </p><p>
+                This will try to replace the file in the safest way possible so that any
+                errors during the writing will not affect an already existing copy of the file.
+                For instance, for local files it may write to a temporary file and then atomically
+                rename over the destination when the stream is closed. 
+            </p><p>
+                By default files created are generally readable by everyone, but if you pass
+                gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to
+                the current user, to the level that is supported on the target filesystem. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p><p>
+                If you pass in a non-<code class="literal">None</code> etag value, then this value is compared
+                to the current entity tag of the file, and if they differ an gio.ERROR_WRONG_ETAG error
+                is returned. This generally means that the file has been changed since you last read it.
+                You can get the new etag from
+                <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--get-etag" title="gio.FileOutputStream.get_etag">gio.FileOutputStream.get_etag</a></code>()
+                after you've finished writing and closed the GFileOutputStream. When you load a new file you can use
+                <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info" title="gio.FileInputStream.query_info">gio.FileInputStream.query_info</a></code>()
+                to get the etag of the file. 
+            </p><p>
+                If make_backup is <code class="literal">True</code>, this function will attempt to make a backup
+                of the current file before overwriting it. If this fails a gio.ERROR_CANT_CREATE_BACKUP
+                error will be returned. If you want to replace anyway, try again
+                with make_backup set to <code class="literal">False</code>. 
+            </p><p>
+                If the file is a directory the gio.ERROR_IS_DIRECTORY error will be returned, and
+                if the file is some other form of non-regular file then a gio.ERROR_NOT_REGULAR_FILE
+                error will be returned. Some file systems don't allow all file names, and may return an
+                gio.ERROR_INVALID_FILENAME error, and if the name is to long gio.ERROR_FILENAME_TOO_LONG
+                will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on.
+            </p></div><div class="refsect2" title="gio.File.replace_async"><a name="method-giofile--replace-async"></a><h3>gio.File.replace_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">replace_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>etag</code></em> :</span></p></td><td>an optional entity tag for the current
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>,
+                    or <code class="literal">None</code> to ignore.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>make_backup</code></em> :</span></p></td><td><code class="literal">True</code> if a backup should be created. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">replace_async</code>() method asynchronously overwrites the file,
+                replacing the contents, possibly creating a backup copy of the file first. 
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace" title="gio.File.replace">replace</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-finish" title="gio.File.replace_finish">gio.File.replace_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.File.replace_contents"><a name="method-giofile--replace-contents"></a><h3>gio.File.replace_contents</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">replace_contents</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>contents</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>contents</code></em> :</span></p></td><td>a string containing the new contents for file. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>etag</code></em> :</span></p></td><td>the old entity tag for the document
+                    or <code class="literal">None</code> to ignore.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>make_backup</code></em> :</span></p></td><td><code class="literal">True</code> if a backup should be created. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the new entity tag  for the document.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">replace_contents</code>() method replaces the contents
+                of file with contents of length bytes. If etag is specified (not NULL) any existing
+                file must have that etag, or the error gio.ERROR_WRONG_ETAG will be returned. 
+            </p><p>
+                If make_backup is <code class="literal">True</code>, this function will attempt to make a backup of file. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p><p>
+                The returned etag can be used to verify that the file hasn't changed the next time it is saved over.
+            </p></div><div class="refsect2" title="gio.File.replace_contents_async"><a name="method-giofile--replace-contents-async"></a><h3>gio.File.replace_contents_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">replace_contents_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>contents</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>etag</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>make_backup</code></strong></span><span class="initializer">=True</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_CREATE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>contents</code></em> :</span></p></td><td>a string containing the new contents for file. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>etag</code></em> :</span></p></td><td>an optional entity tag for the current
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>,
+                    or <code class="literal">None</code> to ignore.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>make_backup</code></em> :</span></p></td><td><code class="literal">True</code> if a backup should be created. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">replace_contents_async</code>() method starts an asynchronous
+                replacement of file with the given contents of length bytes. etag will
+                replace the document's current entity tag. 
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents" title="gio.File.replace_contents">replace_contents</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents-finish" title="gio.File.replace_contents_finish">gio.File.replace_contents_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.File.replace_contents_finish"><a name="method-giofile--replace-contents-finish"></a><h3>gio.File.replace_contents_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">replace_contents_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the new entity tag  for the document.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">replace_contents_finish</code>() method finishes an asynchronous
+                copy operation started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-contents-async" title="gio.File.replace_contents_async">gio.File.replace_contents_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.replace_finish"><a name="method-giofile--replace-finish"></a><h3>gio.File.replace_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">replace_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+                    or <code class="literal">None</code> if an error occurred.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">replace_finish</code>() method finishes an asynchronous
+                copy operation started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--replace-async" title="gio.File.replace_async">gio.File.replace_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.resolve_relative_path"><a name="method-giofile--resolve-relative-path"></a><h3>gio.File.resolve_relative_path</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">resolve_relative_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>relative_path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>relative_path</code></strong> :</span></p></td><td>a given relative path string. 
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                    to the resolved path. <code class="literal">None</code> if relative_path is <code class="literal">None</code>
+                    or if file is invalid.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">resolve_relative_path</code>() method resolves a
+                relative path for file to an absolute path. 
+            </p><p>
+                This call does no blocking i/o.
+            </p></div><div class="refsect2" title="gio.File.set_attribute"><a name="method-giofile--set-attribute"></a><h3>gio.File.set_attribute</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_attribute</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value_p</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>the type of the attribute .
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value_p</code></em> :</span></p></td><td>the value.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_attribute</code>() method sets an attribute in
+                the file with attribute name attribute to value. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.set_attribute_byte_string"><a name="method-giofile--set-attribute-byte-string"></a><h3>gio.File.set_attribute_byte_string</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_attribute_byte_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a string containing the attribute's new value.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_attribute_byte_string</code>() method Sets attribute of type
+                gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING to value. If attribute is of a different type,
+                this operation will fail, returning <code class="literal">False</code>. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.set_attribute_int32"><a name="method-giofile--set-attribute-int32"></a><h3>gio.File.set_attribute_int32</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_attribute_int32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>an int containing the attribute's new value.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_attribute_int32</code>() method sets attribute of type
+                gio.FILE_ATTRIBUTE_TYPE_INT32 to value. If attribute is of a different type,
+                this operation will fail. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.set_attribute_int64"><a name="method-giofile--set-attribute-int64"></a><h3>gio.File.set_attribute_int64</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_attribute_int64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a long containing the attribute's new value.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_attribute_int64</code>() method sets attribute of type
+                gio.FILE_ATTRIBUTE_TYPE_INT64 to value. If attribute is of a different type,
+                this operation will fail. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.set_attribute_string"><a name="method-giofile--set-attribute-string"></a><h3>gio.File.set_attribute_string</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_attribute_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a string containing the attribute's new value.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_attribute_string</code>() method sets attribute of type
+                gio.FILE_ATTRIBUTE_TYPE_STRING to value. If attribute is of a different type,
+                this operation will fail. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.set_attribute_uint32"><a name="method-giofile--set-attribute-uint32"></a><h3>gio.File.set_attribute_uint32</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_attribute_uint32</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>an int containing the attribute's new value.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_attribute_uint32</code>() method sets attribute of type
+                gio.FILE_ATTRIBUTE_TYPE_UINT32 to value. If attribute is of a different type,
+                this operation will fail. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.set_attribute_uint64"><a name="method-giofile--set-attribute-uint64"></a><h3>gio.File.set_attribute_uint64</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_attribute_uint64</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td>a string containing the attribute's name. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a long containing the attribute's new value.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attribute was set,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_attribute_uint64</code>() method sets attribute of type
+                gio.FILE_ATTRIBUTE_TYPE_UINT64 to value. If attribute is of a different type,
+                this operation will fail. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </p></div><div class="refsect2" title="gio.File.set_attributes_async"><a name="method-giofile--set-attributes-async"></a><h3>gio.File.set_attributes_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_attributes_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_attributes_async</code>() method asynchronously
+                sets the attributes of file with info. 
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-from-info" title="gio.File.set_attributes_from_info">set_attributes_from_info</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-finish" title="gio.File.set_attributes_finish">gio.File.set_attributes_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.File.set_attributes_finish"><a name="method-giofile--set-attributes-finish"></a><h3>gio.File.set_attributes_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_attributes_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attributes were set correctly,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_attributes_finish</code>() method finishes an asynchronous
+                copy operation started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-async" title="gio.File.set_attributes_async">gio.File.set_attributes_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.set_attributes_from_info"><a name="method-giofile--set-attributes-from-info"></a><h3>gio.File.set_attributes_from_info</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_attributes_from_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>info</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the attributes were set correctly,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_attributes_from_info</code>() method tries to set
+                all attributes in the GFileInfo on the target values, not stopping on the first error. 
+            </p>
+                If there is any error during this operation then error will be set to the
+                first error. Error on particular fields are flagged by setting the "status"
+                field in the attribute value to gio.FILE_ATTRIBUTE_STATUS_ERROR_SETTING,
+                which means you can also detect further errors. 
+            <p>
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.File.set_display_name"><a name="method-giofile--set-display-name"></a><h3>gio.File.set_display_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_display_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>display_name</code></em> :</span></p></td><td>a string conaining the name to display.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                    specifying what file was renamed to, or <code class="literal">None</code> if there was an error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_display_name</code>() method renames file to
+                the specified display name. 
+            </p><p>
+                The display name is converted from UTF8 to the correct encoding for the
+                target filesystem if possible and the file is renamed to this. 
+            </p><p>
+                If you want to implement a rename operation in the user interface the
+                edit name (gio.FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the
+                initial value in the rename widget, and then the result after editing
+                should be passed to
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name" title="gio.File.set_display_name">gio.File.set_dispay_name</a></code>(). 
+            </p><p>
+                On success the resulting converted filename is returned. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.File.set_display_name_async"><a name="method-giofile--set-display-name-async"></a><h3>gio.File.set_display_name_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_display_name_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>display_name</code></em> :</span></p></td><td>a string conaining the name to display.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_display_name_async</code>() method asynchronously
+                sets the display name for a given GFile. 
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name" title="gio.File.set_display_name">set_display_name</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name-finish" title="gio.File.set_display_name_finish">gio.File.set_display_name_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.File.set_display_name_finish"><a name="method-giofile--set-display-name-finish"></a><h3>gio.File.set_display_name_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_display_name_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_display_name_finish</code>() method finishes an asynchronous
+                copy operation started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-display-name-async" title="gio.File.set_display_name_async">gio.File.set_display_name_async</a></code>().
+            </p></div><div class="refsect2" title="gio.File.trash"><a name="method-giofile--trash"></a><h3>gio.File.trash</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">trash</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful trash, <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">trash</code>() method sends file to the "Trashcan", if possible.
+                This is similar to deleting it, but the user can recover it before emptying the trashcan.
+                Not all file systems support trashing, so this call can return the gio.ERROR_NOT_SUPPORTED error. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p></div><div class="refsect2" title="gio.File.unmount_mountable"><a name="method-giofile--unmount-mountable"></a><h3>gio.File.unmount_mountable</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">unmount_mountable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.FILE_QUERY_INFO_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">unmount_mountable</code>() method unmounts a file of type gio.FILE_TYPE_MOUNTABLE. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable-finish" title="gio.File.unmount_mountable_finish">gio.File.unmount_mountable_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.File.unmount_mountable_finish"><a name="method-giofile--unmount-mountable-finish"></a><h3>gio.File.unmount_mountable_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">unmount_mountable_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the operation finished successfully,
+                    <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">unmount_mountable_finish</code>() method finishes an asynchronous
+                copy operation started with
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--unmount-mountable" title="gio.File.unmount_mountable">gio.File.unmount_mountable</a></code>().
+            </p></div></div><div class="refsect1" title="Functions"><a name="id439674"></a><h2>Functions</h2><div class="refsect2" title="gio.file_parse_name"><a name="function-gio--file-parse-name"></a><h3>gio.file_parse_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">file_parse_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>parse_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>parse_name</code></em> :</span></p></td><td>a file name or path to be parsed.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">parse_name</code>() function constructs a
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                with the given parse_name (i.e. something given by g_file_get_parse_name()).
+                This operation never fails, but the returned object might not support any I/O
+                operation if the parse_name cannot be parsed.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioemblemedicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileattributeinfo.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.EmblemedIcon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileAttributeInfo</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileattributeinfo.html b/docs/html/class-giofileattributeinfo.html
new file mode 100644 (file)
index 0000000..8e69c3a
--- /dev/null
@@ -0,0 +1,11 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileAttributeInfo</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofile.html" title="gio.File"><link rel="next" href="class-giofileenumerator.html" title="gio.FileEnumerator"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileAttributeInfo</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofile.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileenumerator.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileAttributeInfo"><a name="class-giofileattributeinfo"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileAttributeInfo</h2><p>gio.FileAttributeInfo â€” Information about a specific attribute.</p></div><div class="refsect1" title="Synopsis"><a name="id359184"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileAttributeInfo</span></span>(<span class="ooclass"><span class="classname">__builtin__.object</span></span>):
+</pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id464225"></a><h2>Ancestry</h2><pre class="synopsis">+-- __builtin__.object
+  +-- <a class="link" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo">gio.FileAttributeInfo</a>
+</pre></div><div class="refsect1" title="Description"><a name="id464245"></a><h2>Description</h2><p>
+            The <a class="link" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"><code class="classname">gio.FileAttributeInfo</code></a>
+            contains information about a specific attribute.
+        </p></div><div class="refsect1" title="gio.FileAttributeInfo Attributes"><a name="attributes-giofileattributeinfo"></a><h2>gio.FileAttributeInfo Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"name"</td><td valign="top">Read</td><td valign="top">The name of the attribute.</td></tr><tr valign="top"><td valign="top">"type"</td><td valign="top">Read</td><td valign="top">the
+                            <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                            type of the attribute.</td></tr><tr valign="top"><td valign="top">"flags"</td><td valign="top">Read</td><td valign="top">a set of
+                            <a class="xref" href="gio-constants.html#gio-file-attribute-flags-constants" title="Gio File Attribute Flags Constants">Gio File Attribute Flags Constants</a>.
+                            </td></tr></tbody></table></div></td></tr></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofile.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileenumerator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.File </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileEnumerator</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileenumerator.html b/docs/html/class-giofileenumerator.html
new file mode 100644 (file)
index 0000000..d50118e
--- /dev/null
@@ -0,0 +1,126 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileEnumerator</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileattributeinfo.html" title="gio.FileAttributeInfo"><link rel="next" href="class-giofileicon.html" title="gio.FileIcon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileEnumerator</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileattributeinfo.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileEnumerator"><a name="class-giofileenumerator"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileEnumerator</h2><p>gio.FileEnumerator â€” Enumerated Files Routines.</p></div><div class="refsect1" title="Synopsis"><a name="id434308"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileEnumerator</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close" title="gio.FileEnumerator.close">close</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-async" title="gio.FileEnumerator.close_async">close_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-finish" title="gio.FileEnumerator.close_finish">close_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--get-container" title="gio.FileEnumerator.get_container">get_container</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--has-pending" title="gio.FileEnumerator.has_pending">has_pending</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--is-closed" title="gio.FileEnumerator.is_closed">is_closed</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-file" title="gio.FileEnumerator.next_file">next_file</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-files-async" title="gio.FileEnumerator.next_files_async">next_files_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>num_files</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-files-finish" title="gio.FileEnumerator.next_files_finish">next_files_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--set-pending" title="gio.FileEnumerator.set_pending">set_pending</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pending</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id366700"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator">gio.FileEnumerator</a>
+</pre></div><div class="refsect1" title="gio.FileEnumerator Properties"><a name="properties-giofileenumerator"></a><h2>gio.FileEnumerator Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"container"</td><td valign="top">Write - Construct only</td><td valign="top">The container that is being enumerated.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id415898"></a><h2>Description</h2><p>
+            The <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+            allows you to operate on a set of
+            <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>s
+            returning a
+            <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+            structure for each file enumerated (e.g.
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--enumerate-children" title="gio.File.enumerate_children">gio.File.enumerate_children</a></code>()
+            will return a The <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+            for each of the children within a directory).
+        </p><p>
+            To get the next file's information from a
+            The <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a> use
+            <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-file" title="gio.FileEnumerator.next_file">gio.FileEnumerator.next_file</a></code>()
+            or its asynchronous version,
+            <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-files-async" title="gio.FileEnumerator.next_files_async">gio.FileEnumerator.next_files_async</a></code>().
+            Note that the asynchronous version will return a list of
+            <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>s,
+            whereas the synchronous will only return the next file in the enumerator. 
+        </p><p>
+            To close a <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+            use <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close" title="gio.FileEnumerator.close">close</a></code>,
+            or its asynchronous version,
+            <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-async" title="gio.FileEnumerator.close_async">close_async</a></code>.
+            Once a <a class="link" href="class-giofileenumerator.html" title="gio.FileEnumerator"><code class="classname">gio.FileEnumerator</code></a>
+            is closed, no further actions may be performed on it.
+        </p></div><div class="refsect1" title="Methods"><a name="id491846"></a><h2>Methods</h2><div class="refsect2" title="gio.FileEnumerator.close"><a name="method-giofileenumerator--close"></a><h3>gio.FileEnumerator.close</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">close</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+                  <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                  object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success or
+                    <code class="literal">False</code> on error. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">close</code>() method releases all resources used by this
+                enumerator, making the
+                <a class="xref" href="gio-constants.html#gio-error-constants" title="Gio Error Constants">Gio Error Constants</a>
+                return gio.ERROR_CLOSED on all calls. 
+            </p><p>
+                This will be automatically called when the last reference is dropped,
+                but you might want to call this function to make sure resources are released
+                as early as possible.
+            </p></div><div class="refsect2" title="gio.FileEnumerator.close_async"><a name="method-giofileenumerator--close-async"></a><h3>gio.FileEnumerator.close_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">close_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>io_priority</code></strong> :</span></p></td><td>The
+                  <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a> of the request. 
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+                  <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                  object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">close_async</code>() method asynchronously closes the file enumerator. 
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned in
+                <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-finish" title="gio.FileEnumerator.close_finish">gio.FileEnumerator.close_finish</a></code>().
+            </p></div><div class="refsect2" title="gio.FileEnumerator.close_finish"><a name="method-giofileenumerator--close-finish"></a><h3>gio.FileEnumerator.close_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">close_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a GAsyncResult.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the close operation
+                    has finished successfully.</td></tr></tbody></table><p>
+                The <code class="methodname">close_finish</code>() method finishes closing a file enumerator, started from
+                <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-async" title="gio.FileEnumerator.close_async">gio.FileEnumerator.close_async</a></code>(). 
+            </p><p>
+                If the file enumerator was already closed when
+                <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--close-async" title="gio.FileEnumerator.close_async">gio.FileEnumerator.close_async</a></code>()
+                was called, then this function will report gio.ERROR_CLOSED in error, and return <code class="literal">False</code>.
+                If the file enumerator had pending operation when the close operation was started, then this function will report
+                gio.ERROR_PENDING, and return <code class="literal">False</code>. If cancellable was not <code class="literal">None</code>, then the operation
+                may have been cancelled by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be set, and <code class="literal">False</code> will be returned.
+            </p></div><div class="refsect2" title="gio.FileEnumerator.get_container"><a name="method-giofileenumerator--get-container"></a><h3>gio.FileEnumerator.get_container</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_container</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                    which is being enumerated. </td></tr></tbody></table><p>
+                The <code class="methodname">get_container</code>() method gets the
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                container which is being enumerated.
+            </p></div><div class="refsect2" title="gio.FileEnumerator.has_pending"><a name="method-giofileenumerator--has-pending"></a><h3>gio.FileEnumerator.has_pending</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">has_pending</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the enumerator has pending operations.</td></tr></tbody></table><p>
+                The <code class="methodname">has_pending</code>() method checks if the file enumerator has pending operations.
+            </p></div><div class="refsect2" title="gio.FileEnumerator.is_closed"><a name="method-giofileenumerator--is-closed"></a><h3>gio.FileEnumerator.is_closed</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">is_closed</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the enumerator is closed.</td></tr></tbody></table><p>
+                The <code class="methodname">is_closed</code>() method checks if the file enumerator has been closed.
+            </p></div><div class="refsect2" title="gio.FileEnumerator.next_file"><a name="method-giofileenumerator--next-file"></a><h3>gio.FileEnumerator.next_file</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">next_file</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+                  <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                  object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+                    or <code class="literal">None</code> on error or end of enumerator.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">next_file</code>() method returns information for the next
+                file in the enumerated object. Will block until the information is available.
+                The <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+                returned from this function will contain attributes that match the attribute string
+                that was passed when the GFileEnumerator was created. 
+            </p><p>
+                On error, returns <code class="literal">None</code> and sets error to the error. If the enumerator
+                is at the end, <code class="literal">None</code> will be returned and error will be unset.
+            </p></div><div class="refsect2" title="gio.FileEnumerator.next_files_async"><a name="method-giofileenumerator--next-files-async"></a><h3>gio.FileEnumerator.next_files_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">next_files_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>num_files</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>num_files</code></strong> :</span></p></td><td>The number of file info objects to request.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>io_priority</code></strong> :</span></p></td><td>The
+                  <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a> of the request. 
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+                  <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                  object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">next_files_async</code>() method requests information for a number
+                of files from the enumerator asynchronously. When all i/o for the operation is finished
+                the callback will be called with the requested information. 
+            </p><p>
+                The callback can be called with less than num_files files in case of error or at the
+                end of the enumerator. In case of a partial error the callback will be called with any
+                succeeding items and no error, and on the next request the error will be reported. If a
+                request is cancelled the callback will be called with gio.ERROR_CANCELLED. 
+            </p><p>
+                During an async request no other sync and async calls are allowed, and will result in gio.ERROR_PENDING errors. 
+            </p><p>
+                Any outstanding i/o request with higher priority (lower numerical value) will be executed
+                before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
+            </p></div><div class="refsect2" title="gio.FileEnumerator.next_files_finish"><a name="method-giofileenumerator--next-files-finish"></a><h3>gio.FileEnumerator.next_files_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">next_files_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a GAsyncResult.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of
+                    <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>s.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">next_files_finish</code>() method finishes the
+                asynchronous operation started with
+                <code class="methodname"><a class="link" href="class-giofileenumerator.html#method-giofileenumerator--next-files-async" title="gio.FileEnumerator.next_files_async">gio.FileEnumerator.next_files_async</a></code>().
+            </p></div><div class="refsect2" title="gio.FileEnumerator.set_pending"><a name="method-giofileenumerator--set-pending"></a><h3>gio.FileEnumerator.set_pending</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_pending</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pending</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pending</code></strong> :</span></p></td><td>A boolean value.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">push_current</code>() method sets the file enumerator as having pending operations.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileattributeinfo.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileAttributeInfo </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileIcon</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileicon.html b/docs/html/class-giofileicon.html
new file mode 100644 (file)
index 0000000..72c0dba
--- /dev/null
@@ -0,0 +1,21 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileIcon</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileenumerator.html" title="gio.FileEnumerator"><link rel="next" href="class-giofileinfo.html" title="gio.FileInfo"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileIcon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileenumerator.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileinfo.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileIcon"><a name="class-giofileicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileIcon</h2><p>gio.FileIcon â€” Icons pointing to an image file.</p></div><div class="refsect1" title="Synopsis"><a name="id498860"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileIcon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon">gio.LoadableIcon</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giofileicon.html#constructor-giofileicon" title="Constructor">gio.FileIcon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileicon.html#method-giofileicon--get-file" title="gio.FileIcon.get_file">get_file</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id498952"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giofileicon.html" title="gio.FileIcon">gio.FileIcon</a>
+</pre></div><div class="refsect1" title="Description"><a name="id498977"></a><h2>Description</h2><p>
+            The <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>
+            specifies an icon by pointing to an image file to be used as icon.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giofileicon"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.FileIcon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>file</code></em> :</span></p></td><td>a
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>
+                for the given file, or <code class="literal">None</code> on error.
+                </td></tr></tbody></table><p>
+            Creates a new icon for a file.
+        </p></div><div class="refsect1" title="Methods"><a name="id499092"></a><h2>Methods</h2><div class="refsect2" title="gio.FileIcon.get_file"><a name="method-giofileicon--get-file"></a><h3>gio.FileIcon.get_file</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_file</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+                    <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                    or <code class="literal">None</code>.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_file</code>() method gets the
+                <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+                associated with the given icon.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileenumerator.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileinfo.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileEnumerator </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileInfo</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileinfo.html b/docs/html/class-giofileinfo.html
new file mode 100644 (file)
index 0000000..d82427c
--- /dev/null
@@ -0,0 +1,42 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileInfo</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileicon.html" title="gio.FileIcon"><link rel="next" href="class-giofileinputstream.html" title="gio.FileInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileInfo</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileInfo"><a name="class-giofileinfo"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileInfo</h2><p>gio.FileInfo â€” File Information and Attributes</p></div><div class="refsect1" title="Synopsis"><a name="id499198"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileInfo</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giofileinfo.html#constructor-giofileinfo" title="Constructor">gio.FileInfo</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--clear-status">clear_status</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--copy-into">copy_into</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--dup">dup</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-as-string">get_attribute_as_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-boolean">get_attribute_boolean</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-byte-string">get_attribute_byte_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-data">get_attribute_data</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-int32">get_attribute_int32</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-int64">get_attribute_int64</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-object">get_attribute_object</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-status">get_attribute_status</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-string">get_attribute_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-type">get_attribute_type</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-uint32">get_attribute_uint32</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-attribute-uint64">get_attribute_uint64</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-content-type">get_content_type</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-display-name">get_display_name</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-edit-name">get_edit_name</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-etag">get_etag</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-file-type">get_file_type</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-icon">get_icon</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-is-backup">get_is_backup</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-is-hidden">get_is_hidden</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-is-symlink">get_is_symlink</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-modification-time">get_modification_time</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-name">get_name</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-size">get_size</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-sort-order">get_sort_order</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--get-symlink-target">get_symlink_target</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--has-attribute">has_attribute</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--list-attributes">list_attributes</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name_space</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--remove-attribute">remove_attribute</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute">set_attribute</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>value_p</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-boolean">set_attribute_boolean</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-byte-string">set_attribute_byte_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-data">set_attribute_data</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-int32">set_attribute_int32</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-int64">set_attribute_int64</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-int64">set_attribute_mask</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mask</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-object">set_attribute_object</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-status">set_attribute_status</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-string">set_attribute_string</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attr_value</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-uint32">set_attribute_uint32</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-attribute-uint64">set_attribute_uint64</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-content-type">set_content_type</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>content_type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-display-name">set_display_name</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display_name</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-edit-name">set_edit_name</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>edit_name</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-file-type">set_file_type</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-icon">set_icon</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-is-hidden">set_is_hidden</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_hidden</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-is-symlink">set_is_symlink</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_symlink</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-modification-time">set_modification_time</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mtime</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-name">set_name</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-size">set_size</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-sort-order">set_sort_order</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>sort_order</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-symlink-tarset">set_symlink_tarset</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>symlink_target</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--unset-attribute-mask">unset_attribute_mask</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id511611"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giofileinfo.html" title="gio.FileInfo">gio.FileInfo</a>
+</pre></div><div class="refsect1" title="Description"><a name="id511633"></a><h2>Description</h2><p>
+            Functionality for manipulating basic metadata for files.
+            <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+            implements methods for getting information that all files should contain,
+            and allows for manipulation of extended attributes.
+        </p><p>
+            See <PYGTKDOCLINK HREF="class-giofileattribute"><code class="classname">gio.FileAttribute</code></PYGTKDOCLINK>
+            for more information on how GIO handles file attributes.
+        </p><p>
+           To obtain a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+           for a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>, use
+           <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-info" title="gio.File.query_filesystem_info">gio.File.query_info</a></code>()
+           (or its async variant). To obtain a
+           <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+           for a file input or output stream, use
+           <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info" title="gio.FileInputStream.query_info">gio.FileInputStream.query_info</a></code>() or
+           <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info" title="gio.FileOutputStream.query_info">gio.FileOutputStream.query_info</a></code>()
+           (or their async variants).
+        </p><p>
+           To change the actual attributes of a file, you should then set the attribute in the
+           <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a> and call
+           <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-from-info" title="gio.File.set_attributes_from_info">gio.File.set_attributes_from_info</a></code>() or
+           <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--set-attributes-async" title="gio.File.set_attributes_async">gio.File.set_attributes_async</a></code>()
+           on a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+        </p><p>
+           However, not all attributes can be changed in the file. For instance, the
+           actual size of a file cannot be changed via
+           <code class="methodname"><PYGTKDOCLINK HREF="method-giofileinfo--set-size">gio.FileInfo.set_size</PYGTKDOCLINK></code>(). You may call
+           <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-settable-attributes" title="gio.File.query_settable_attributes">gio.File.query_settable_attributes</a></code>() and
+           <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-writable-namespace" title="gio.File.query_writable_namespace">gio.File.query_writable_namespace</a></code>()
+           to discover the settable attributes of a particular file at runtime.
+        </p><p>
+           <PYGTKDOCLINK HREF="class-giofileattributematcher"><code class="classname">gio.FileAttributeMatcher</code></PYGTKDOCLINK>
+           allows for searching through a GFileInfo for attributes.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giofileinfo"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.FileInfo</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+                </td></tr></tbody></table><p>
+            Creates a new <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>
+        </p></div><div class="refsect1" title="Methods"><a name="id511822"></a><h2>Methods</h2><p> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileIcon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileinputstream.html b/docs/html/class-giofileinputstream.html
new file mode 100644 (file)
index 0000000..a4aedc7
--- /dev/null
@@ -0,0 +1,65 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileInputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileinfo.html" title="gio.FileInfo"><link rel="next" href="class-giofilemonitor.html" title="gio.FileMonitor"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileinfo.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofilemonitor.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileInputStream"><a name="class-giofileinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileInputStream</h2><p>gio.FileInputStream â€” Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id511851"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info" title="gio.FileInputStream.query_info">query_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-async" title="gio.FileInputStream.query_info_async">query_info_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-finish" title="gio.FileInputStream.query_info_finish">query_info_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id512018"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+    +-- <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream">gio.FileInputStream</a>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id512045"></a><h2>Implemented Interfaces</h2><p>
+            <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+            implements
+            <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
+        </p></div><div class="refsect1" title="Description"><a name="id512067"></a><h2>Description</h2><p>
+            <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+            provides input streams that take their content from a file.
+        </p><p>
+            <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+            implements <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>,
+            which allows the input stream to jump to arbitrary positions in the file, provided the filesystem
+            of the file allows it. In addition to the generic g_seekable_ API,
+            <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a>
+            has its own API for seeking and positioning. To find the position of a file input stream, use
+            <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--tell" title="gio.Seekable.tell">gio.Seekable.tell</a></code>().
+            To find out if a file input stream supports seeking, use
+            <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_seek" title="gio.Seekable.can_seek">gio.Seekable.can_seek</a></code>().
+            To position a file input stream, use
+            <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--seek" title="gio.Seekable.seek">gio.Seekable.seek</a></code>().
+        </p></div><div class="refsect1" title="Methods"><a name="id512126"></a><h2>Methods</h2><div class="refsect2" title="gio.FileInputStream.query_info"><a name="method-giofileinputstream--query-info"></a><h3>gio.FileInputStream.query_info</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>attributes</code></strong> :</span></p></td><td>a file attribute query string.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>,
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_info</code>() method queries a file input stream
+                the given attributes. This function blocks while querying the stream.
+                For the asynchronous (non-blocking) version of this function, see
+                <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-async" title="gio.FileInputStream.query_info_async">gio.FileInputStream.query_info_async</a></code>().
+                While the stream is blocked, the stream will set the pending flag internally,
+                and any other operations on the stream will fail with gio.ERROR_PENDING.
+            </p></div><div class="refsect2" title="gio.FileInputStream.query_info_async"><a name="method-giofileinputstream--query-info-async"></a><h3>gio.FileInputStream.query_info_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_info_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>attributes</code></strong> :</span></p></td><td>a file attribute query string.
+                  </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_info_async</code>() method queries the stream
+                information asynchronously. When the operation is finished callback will be
+                called. You can then call
+                <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-finish" title="gio.FileInputStream.query_info_finish">gio.FileInputStream.query_info_finish</a></code>()
+                to get the result of the operation.
+            </p><p>
+                For the synchronous version of this function, see
+                <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info" title="gio.FileInputStream.query_info">gio.FileInputStream.query_info</a></code>().
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was
+                cancelled, the error gio.ERROR_CANCELLED will be set
+            </p></div><div class="refsect2" title="gio.FileInputStream.query_info_finish"><a name="method-giofileinputstream--query-info-finish"></a><h3>gio.FileInputStream.query_info_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_info_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>,
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_info_finish</code>() method finishes an asynchronous
+                file append operation started with
+                <code class="methodname"><a class="link" href="class-giofileinputstream.html#method-giofileinputstream--query-info-async" title="gio.FileInputStream.query_info_async">gio.FileInputStream.query_info_async</a></code>().
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileinfo.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofilemonitor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileInfo </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileMonitor</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofilemonitor.html b/docs/html/class-giofilemonitor.html
new file mode 100644 (file)
index 0000000..187d822
--- /dev/null
@@ -0,0 +1,21 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileMonitor</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileinputstream.html" title="gio.FileInputStream"><link rel="next" href="class-giofileoutputstream.html" title="gio.FileOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileMonitor</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofileoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileMonitor"><a name="class-giofilemonitor"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileMonitor</h2><p>gio.FileMonitor â€” File Monitor</p></div><div class="refsect1" title="Synopsis"><a name="id512602"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileMonitor</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofilemonitor--cancel">cancel</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofilemonitor--emit-event">emit_event</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>other_file</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>event_type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofilemonitor--is-cancelled">is_cancelled</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giofilemonitor--set-rate-limit">set_rate_limit</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>limit_msecs</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id512734"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor">gio.FileMonitor</a>
+</pre></div><div class="refsect1" title="gio.FileMonitor Properties"><a name="properties-giofilemonitor"></a><h2>gio.FileMonitor Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"cancelled"</td><td valign="top">Read</td><td valign="top">
+                                Whether the monitor has been cancelled. Default value: <code class="literal">False</code>.
+                            </td></tr><tr valign="top"><td valign="top">"rate-limit"</td><td valign="top">Read/Write</td><td valign="top">
+                                The limit of the monitor to watch for changes, in milliseconds.
+                                Allowed values: &gt;= 0. Default value: 800.
+                            </td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gio.FileMonitor Signal Prototypes"><a name="signal-prototypes-giofilemonitor"></a><h2>gio.FileMonitor Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><PYGTKDOCLINK HREF="signal-giofilemonitor--aborted">"changed"</PYGTKDOCLINK></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filemonitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>file</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>other_file</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event_type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id512941"></a><h2>Description</h2><p>
+            The <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
+            monitors a file or directory for changes.
+        </p><p>
+            To obtain a <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
+            for a file or directory, use
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor" title="gio.File.monitor">gio.FileMonitor.monitor</a></code>(),
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor-file" title="gio.File.monitor_file">gio.FileMonitor.monitor_file</a></code>(), or
+            <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--monitor-directory" title="gio.File.monitor_directory">gio.FileMonitor.monitor_directory</a></code>().
+        </p><p>
+            To get informed about changes to the file or directory you are monitoring,
+            connect to the "changed" signal.
+        </p></div><div class="refsect1" title="Methods"><a name="id512990"></a><h2>Methods</h2><p> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofileoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FileOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofileoutputstream.html b/docs/html/class-giofileoutputstream.html
new file mode 100644 (file)
index 0000000..f69c100
--- /dev/null
@@ -0,0 +1,84 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FileOutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofilemonitor.html" title="gio.FileMonitor"><link rel="next" href="class-giofilterinputstream.html" title="gio.FilterInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FileOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofilemonitor.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofilterinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FileOutputStream"><a name="class-giofileoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FileOutputStream</h2><p>gio.FileOutputStream â€” Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id513019"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FileOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--get-etag" title="gio.FileOutputStream.get_etag">get_etag</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info" title="gio.FileOutputStream.query_info">query_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-async" title="gio.FileOutputStream.query_info_async">query_info_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-finish" title="gio.FileOutputStream.query_info_finish">query_info_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id513203"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+    +-- <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream">gio.FileOutputStream</a>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id513230"></a><h2>Implemented Interfaces</h2><p>
+            <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+            implements
+            <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
+        </p></div><div class="refsect1" title="Description"><a name="id513252"></a><h2>Description</h2><p>
+            <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+            provides output streams that write their content to a file.
+        </p><p>
+            <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+            implements <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>,
+            which allows the output stream to jump to arbitrary positions in the file and to truncate
+            the file, provided the filesystem of the file supports these operations. In addition to the
+            generic gio.Seekable. API,
+            <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>
+            has its own API for seeking and positioning. To find the position of a file output stream, use
+            <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--tell" title="gio.Seekable.tell">gio.Seekable.tell</a></code>().
+            To find out if a file output stream supports seeking, use
+            <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_seek" title="gio.Seekable.can_seek">gio.Seekable.can_seek</a></code>().
+            To position a file output stream, use
+            <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--seek" title="gio.Seekable.seek">gio.Seekable.seek</a></code>().
+            To find out if a file output stream supports truncating, use
+            <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_truncate" title="gio.Seekable.can_truncate">gio.FileOutputStream.can_truncate</a></code>().
+            To truncate a file output stream, use
+            <code class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--truncate" title="gio.Seekable.truncate">gio.Seekable.truncate</a></code>().
+        </p></div><div class="refsect1" title="Methods"><a name="id513326"></a><h2>Methods</h2><div class="refsect2" title="gio.FileOutputStream.get_etag"><a name="method-giofileoutputstream--get-etag"></a><h3>gio.FileOutputStream.get_etag</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_etag</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the entity tag for the stream.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_etag</code>() method gets the entity tag
+                for the file when it has been written. This must be called after the
+                stream has been written and closed, as the etag can change while writing.
+            </p></div><div class="refsect2" title="gio.FileOutputStream.query_info"><a name="method-giofileoutputstream--query-info"></a><h3>gio.FileOutputStream.query_info</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>attributes</code></strong> :</span></p></td><td>a file attribute query string.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>,
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_info</code>() method queries a file input stream
+                the given attributes. This function blocks while querying the stream.
+                For the asynchronous (non-blocking) version of this function, see
+                <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-async" title="gio.FileOutputStream.query_info_async">gio.FileOutputStream.query_info_async</a></code>().
+                While the stream is blocked, the stream will set the pending flag internally,
+                and any other operations on the stream will fail with gio.ERROR_PENDING.
+            </p><p>
+                Can fail if the stream was already closed (with error being set to gio.ERROR_CLOSED),
+                the stream has pending operations (with error being set to gio.ERROR_PENDING), or
+                if querying info is not supported for the stream's interface (with error being set to
+                gio.ERROR_NOT_SUPPORTED). In all cases of failure, NULL will be returned.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be set, and <code class="literal">None</code> will be returned.
+            </p></div><div class="refsect2" title="gio.FileOutputStream.query_info_async"><a name="method-giofileoutputstream--query-info-async"></a><h3>gio.FileOutputStream.query_info_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_info_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>attributes</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>attributes</code></strong> :</span></p></td><td>a file attribute query string.
+                  </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_info_async</code>() method queries the stream
+                information asynchronously. When the operation is finished callback will be
+                called. You can then call
+                <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-finish" title="gio.FileOutputStream.query_info_finish">gio.FileOutputStream.query_info_finish</a></code>()
+                to get the result of the operation.
+            </p><p>
+                For the synchronous version of this function, see
+                <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info" title="gio.FileOutputStream.query_info">gio.FileOutputStream.query_info</a></code>().
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was
+                cancelled, the error gio.ERROR_CANCELLED will be set
+            </p></div><div class="refsect2" title="gio.FileOutputStream.query_info_finish"><a name="method-giofileoutputstream--query-info-finish"></a><h3>gio.FileOutputStream.query_info_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">query_info_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>,
+                    or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">query_info_finish</code>() method finishes an asynchronous
+                file append operation started with
+                <code class="methodname"><a class="link" href="class-giofileoutputstream.html#method-giofileoutputstream--query-info-async" title="gio.FileOutputStream.query_info_async">gio.FileOutputStream.query_info_async</a></code>().
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofilemonitor.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofilterinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileMonitor </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FilterInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofilterinputstream.html b/docs/html/class-giofilterinputstream.html
new file mode 100644 (file)
index 0000000..0cfcee6
--- /dev/null
@@ -0,0 +1,22 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FilterInputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><link rel="next" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FilterInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofileoutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giofilteroutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FilterInputStream"><a name="class-giofilterinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FilterInputStream</h2><p>gio.FilterInputStream â€” Filter Input Stream</p></div><div class="refsect1" title="Synopsis"><a name="id513874"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FilterInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofilterinputstream.html#method-giofilterinputstream--get-base-stream" title="gio.FilterInputStream.get_base_stream">get_base_stream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofilterinputstream.html#method-giofilterinputstream--get-close-base-stream" title="gio.FilterInputStream.get_close_base_stream">get_close_base_stream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofilterinputstream.html#method-giofilterinputstream--set-close-base-stream" title="gio.FilterInputStream.set_close_base_stream">set_close_base_stream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_base</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id513958"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+    +-- <a class="link" href="class-giofilterinputstream.html" title="gio.FilterInputStream">gio.FilterInputStream</a>
+</pre></div><div class="refsect1" title="gio.FilterInputStream Properties"><a name="properties-giofilterinputstream"></a><h2>gio.FilterInputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"base-stream"</td><td valign="top">Read - Write - Construct only</td><td valign="top">The underlying base stream on which the io ops will be done.</td></tr><tr valign="top"><td valign="top">"close-base-stream"</td><td valign="top">Read - Write - Construct only</td><td valign="top">If the base stream should be closed when the filter stream is closed.
+                            Default value: <code class="literal">True</code>.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id514069"></a><h2>Description</h2><p>
+            Filter Input Stream.
+        </p></div><div class="refsect1" title="Methods"><a name="id514078"></a><h2>Methods</h2><div class="refsect2" title="gio.FilterInputStream.get_base_stream"><a name="method-giofilterinputstream--get-base-stream"></a><h3>gio.FilterInputStream.get_base_stream</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_base_stream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
+                    <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_base_stream</code>() method gets the base
+                stream for the filter stream.
+            </p></div><div class="refsect2" title="gio.FilterInputStream.get_close_base_stream"><a name="method-giofilterinputstream--get-close-base-stream"></a><h3>gio.FilterInputStream.get_close_base_stream</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_close_base_stream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the base stream
+                    will be closed.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_close_base_stream</code>() method returns
+                whether the base stream will be closed when stream is closed.
+            </p></div><div class="refsect2" title="gio.FilterInputStream.set_close_base_stream"><a name="method-giofilterinputstream--set-close-base-stream"></a><h3>gio.FilterInputStream.set_close_base_stream</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_close_base_stream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_base</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>close_base</code></strong> :</span></p></td><td><code class="literal">True</code> to close the base stream.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">set_close_base_stream</code>() method sets whether
+                the base stream will be closed when stream is closed.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofileoutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giofilteroutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FileOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.FilterOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giofilteroutputstream.html b/docs/html/class-giofilteroutputstream.html
new file mode 100644 (file)
index 0000000..e8781a5
--- /dev/null
@@ -0,0 +1,22 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.FilterOutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofilterinputstream.html" title="gio.FilterInputStream"><link rel="next" href="class-gioicon.html" title="gio.Icon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.FilterOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofilterinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.FilterOutputStream"><a name="class-giofilteroutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.FilterOutputStream</h2><p>gio.FilterOutputStream â€” Filter Output Stream</p></div><div class="refsect1" title="Synopsis"><a name="id514276"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.FilterOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofilteroutputstream.html#method-giofilteroutputstream--get-base-stream" title="gio.FilterOutputStream.get_base_stream">get_base_stream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofilteroutputstream.html#method-giofilteroutputstream--get-close-base-stream" title="gio.FilterOutputStream.get_close_base_stream">get_close_base_stream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giofilteroutputstream.html#method-giofilteroutputstream--set-close-base-stream" title="gio.FilterOutputStream.set_close_base_stream">set_close_base_stream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_base</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id514360"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+    +-- <a class="link" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream">gio.FilterOutputStream</a>
+</pre></div><div class="refsect1" title="gio.FilterOutputStream Properties"><a name="properties-giofilteroutputstream"></a><h2>gio.FilterOutputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"base-stream"</td><td valign="top">Read - Write - Construct only</td><td valign="top">The underlying base stream on which the io ops will be done.</td></tr><tr valign="top"><td valign="top">"close-base-stream"</td><td valign="top">Read - Write - Construct only</td><td valign="top">If the base stream should be closed when the filter stream is closed.
+                            Default value: <code class="literal">True</code>.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id514470"></a><h2>Description</h2><p>
+            Filter Output Stream.
+        </p></div><div class="refsect1" title="Methods"><a name="id514480"></a><h2>Methods</h2><div class="refsect2" title="gio.FilterOutputStream.get_base_stream"><a name="method-giofilteroutputstream--get-base-stream"></a><h3>gio.FilterOutputStream.get_base_stream</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_base_stream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
+                    <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_base_stream</code>() method gets the base
+                stream for the filter stream.
+            </p></div><div class="refsect2" title="gio.FilterOutputStream.get_close_base_stream"><a name="method-giofilteroutputstream--get-close-base-stream"></a><h3>gio.FilterOutputStream.get_close_base_stream</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_close_base_stream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the base stream
+                    will be closed.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_close_base_stream</code>() method returns
+                whether the base stream will be closed when stream is closed.
+            </p></div><div class="refsect2" title="gio.FilterOutputStream.set_close_base_stream"><a name="method-giofilteroutputstream--set-close-base-stream"></a><h3>gio.FilterOutputStream.set_close_base_stream</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_close_base_stream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_base</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>close_base</code></strong> :</span></p></td><td><code class="literal">True</code> to close the base stream.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">set_close_base_stream</code>() method sets whether
+                the base stream will be closed when stream is closed.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofilterinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FilterInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Icon</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioicon.html b/docs/html/class-gioicon.html
new file mode 100644 (file)
index 0000000..4a15c7e
--- /dev/null
@@ -0,0 +1,81 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Icon</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giofilteroutputstream.html" title="gio.FilterOutputStream"><link rel="next" href="class-gioinputstream.html" title="gio.InputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Icon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giofilteroutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Icon"><a name="class-gioicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Icon</h2><p>gio.Icon â€” Interface for icons.</p></div><div class="refsect1" title="Synopsis"><a name="id514677"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Icon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--equal" title="gio.Icon.equal">equal</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon2</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--to-string" title="gio.Icon.to_string">to_string</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioicon.html#function-gio--icon-new-from-string" title="gio.icon_new_from_string">gio.icon_new_from_string</a></span>(<span class="methodparam"></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id514771"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+  +-- <a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a>
+</pre></div><div class="refsect1" title="Known Derived Interfaces"><a name="id514793"></a><h2>Known Derived Interfaces</h2><p>
+            <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a> is required by
+            <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a>.
+        </p></div><div class="refsect1" title="Known Implementation"><a name="id514815"></a><h2>Known Implementation</h2><p>
+            <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a> is implemented by
+            <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>,
+            <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>,
+            <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>,
+            <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>.
+        </p></div><div class="refsect1" title="Description"><a name="id514856"></a><h2>Description</h2><p>
+            <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+            is a very minimal interface for icons. It provides functions for checking
+            the equality of two icons, hashing of icons and serializing an icon to and from strings. 
+        </p><p>
+            <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+            does not provide the actual pixmap for the icon as this is out of GIO's
+            scope, however implementations of
+            <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+            may contain the name of an icon (see
+            <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>),
+            or the path to an icon (see
+            <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a>).
+        </p><p>
+            To check if two GIcons are equal, see
+            <code class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--equal" title="gio.Icon.equal">gio.Icon.equal</a></code>().
+        </p><p>
+            For serializing a <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>,
+            use <code class="methodname"><PYGTKDOCLINK HREF="method-gioicon-%20-to-string">gio.Icon.to_string</PYGTKDOCLINK></code>() and
+            <code class="methodname"><PYGTKDOCLINK HREF="method-gioicon-%20-new-from-string">gio.Icon.new_from_string</PYGTKDOCLINK></code>(). 
+        </p><p>
+            If your application or library provides one or more
+            <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+            implementations you need to ensure that each GType is registered
+            with the type system prior to calling
+            <code class="methodname"><PYGTKDOCLINK HREF="function-gioicon--new-from-string">gio.icon_new_from_string</PYGTKDOCLINK></code>(). 
+        </p></div><div class="refsect1" title="Methods"><a name="id514956"></a><h2>Methods</h2><div class="refsect2" title="gio.Icon.equal"><a name="method-gioicon--equal"></a><h3>gio.Icon.equal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">equal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>icon2</code></em> :</span></p></td><td>the second
+                    <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">equal</code>() method checks if two icons are equal.
+            </p></div><div class="refsect2" title="gio.Icon.to_string"><a name="method-gioicon--to-string"></a><h3>gio.Icon.to_string</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">to_string</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>An UTF8 string or <code class="literal">None</code>
+                   if icon can't be serialized.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">to_string</code>() method generates a textual
+               representation of icon that can be used for serialization such as when
+               passing icon to a different process or saving it to persistent storage. Use
+               <code class="methodname"><a class="link" href="class-gioicon.html#function-gio--icon-new-from-string" title="gio.icon_new_from_string">gio.icon_new_from_string</a></code>()
+               to get icon back from the returned string.
+            </p><p>
+               The encoding of the returned string is proprietary to GIcon except in the following two cases
+           </p><p>
+               If icon is a <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>,
+               the returned string is a native path (such as /path/to/my icon.png) without escaping
+               if the <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>
+               for icon is a native file. If the file is not native, the returned string is the result of
+               <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--get-uri" title="gio.File.get_uri">gio.File.get_uri</a></code>()
+               (such as sftp://path/to/my%20icon.png).
+           </p><p>
+               If icon is a <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>
+               with exactly one name, the encoding is simply the name (such as network-server).
+           </p></div></div><div class="refsect1" title="Functions"><a name="id515125"></a><h2>Functions</h2><div class="refsect2" title="gio.icon_new_from_string"><a name="function-gio--icon-new-from-string"></a><h3>gio.icon_new_from_string</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">icon_new_from_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td><td>A string obtained via
+                   <code class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--to-string" title="gio.Icon.to_string">gio.Icon.to_string</a></code>().
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>An object implementing the
+                   <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+                   interface or <code class="literal">None</code> if error is set.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">icon_new_from_string</code>() function generate a
+               <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+               instance from str. This function can fail if str is not valid - see
+               <code class="methodname"><a class="link" href="class-gioicon.html#method-gioicon--to-string" title="gio.Icon.to_string">gio.Icon.to_string</a></code>()
+               for discussion.
+            </p><p>
+                If your application or library provides one or more GIcon implementations you need
+               to ensure that each GType is registered with the type system prior to calling
+               <code class="methodname"><a class="link" href="class-gioicon.html#function-gio--icon-new-from-string" title="gio.icon_new_from_string">gio.icon_new_from_string</a></code>().
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giofilteroutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.FilterOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.InputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioinputstream.html b/docs/html/class-gioinputstream.html
new file mode 100644 (file)
index 0000000..7a4ee27
--- /dev/null
@@ -0,0 +1,242 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.InputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioicon.html" title="gio.Icon"><link rel="next" href="class-gioloadableicon.html" title="gio.LoadableIcon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.InputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioloadableicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.InputStream"><a name="class-gioinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.InputStream</h2><p>gio.InputStream â€” Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id515261"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.InputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--clear-pending" title="gio.InputStream.clear_pending">clear_pending</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close" title="gio.InputStream.close">close</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close-async" title="gio.InputStream.close_async">close_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close-finish" title="gio.InputStream.close_finish">close_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--has-pending" title="gio.InputStream.has_pending">has_pending</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--is-closed" title="gio.InputStream.is_closed">is_closed</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read" title="gio.InputStream.read">read</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-async" title="gio.InputStream.read_async">read_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-finish" title="gio.InputStream.read_finish">read_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-part" title="gio.InputStream.read_part">read_part</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--set-pending" title="gio.InputStream.set_pending">set_pending</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip" title="gio.InputStream.skip">skip</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip-async" title="gio.InputStream.skip_async">skip_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip-finish" title="gio.InputStream.skip_finish">skip_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id515798"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+</pre></div><div class="refsect1" title="Description"><a name="id515820"></a><h2>Description</h2><p>
+            <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+            has functions to read from a stream (
+            <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read" title="gio.InputStream.read">gio.InputStream.read</a></code>()
+            ), to close a stream (
+            <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close" title="gio.InputStream.close">gio.InputStream.close</a></code>()
+            ) and to skip some content (
+            <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip" title="gio.InputStream.skip">gio.InputStream.skip</a></code>()
+            ).
+        </p><p>
+            To copy the content of an input stream to an output stream without manually
+            handling the reads and writes, use
+            <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--skip">gio.OutputStream.splice</PYGTKDOCLINK></code>().
+        </p><p>
+            All of these functions have async variants too.
+        </p></div><div class="refsect1" title="Methods"><a name="id515868"></a><h2>Methods</h2><div class="refsect2" title="gio.InputStream.clear_pending"><a name="method-gioinputstream--clear-pending"></a><h3>gio.InputStream.clear_pending</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">clear_pending</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+                The <code class="methodname">clear_pending</code>() method clears the pending flag on stream.
+            </p></div><div class="refsect2" title="gio.InputStream.close"><a name="method-gioinputstream--close"></a><h3>gio.InputStream.close</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">close</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on success
+                    <code class="literal">False</code> on failure.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">close</code>() method closes the stream, releasing
+                resources related to it.
+            </p><p>
+                Once the stream is closed, all other operations will return gio.ERROR_CLOSED.
+                Closing a stream multiple times will not return an error.
+            </p><p>
+                Streams will be automatically closed when the last reference is dropped, but
+                you might want to call this function to make sure resources are released as
+                early as possible.
+            </p><p>
+                Some streams might keep the backing store of the stream (e.g. a file descriptor)
+                open after the stream is closed. See the documentation for the individual
+                stream for details.
+            </p><p>
+                On failure the first error that happened will be reported, but the close operation
+                will finish as much as possible. A stream that failed to close will still return
+                gio.ERROR_CLOSED for all operations. Still, it is important to check and report
+                the error to the user.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+                the stream closed, but some streams can use a faster close that doesn't block to e.g.
+                check errors.
+            </p></div><div class="refsect2" title="gio.InputStream.close_async"><a name="method-gioinputstream--close-async"></a><h3>gio.InputStream.close_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">close_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">close_async</code>() method asynchronously requests an
+                asynchronous closes of the stream, releasing resources related to it.
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close" title="gio.InputStream.close">gio.InputStream.close</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close-finish" title="gio.InputStream.close_finish">gio.InputStream.close_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.InputStream.close_finish"><a name="method-gioinputstream--close-finish"></a><h3>gio.InputStream.close_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">close_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the stream was closed successfully.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">close_finish</code>() method finishes an asynchronous
+                file append operation started with
+                <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--close-async" title="gio.InputStream.close_async">gio.InputStream.close_async</a></code>().
+            </p></div><div class="refsect2" title="gio.InputStream.has_pending"><a name="method-gioinputstream--has-pending"></a><h3>gio.InputStream.has_pending</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">has_pending</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if stream has pending actions.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">has_pending</code>() method checks if an input stream has pending actions.
+            </p></div><div class="refsect2" title="gio.InputStream.is_closed"><a name="method-gioinputstream--is-closed"></a><h3>gio.InputStream.is_closed</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">is_closed</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the stream is closed.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">is_closed</code>() method checks if an input stream is closed.
+            </p></div><div class="refsect2" title="gio.InputStream.read"><a name="method-gioinputstream--read"></a><h3>gio.InputStream.read</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>optionally the number of bytes that will be read from the stream.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes read, or -1 on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read</code>() method tries to read count bytes from
+                the stream into the buffer starting at buffer. Will block during this read.
+            </p><p>
+                This function is similar to
+                <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-part" title="gio.InputStream.read_part">gio.InputStream.read_part</a></code>(),
+                except it tries to read as many bytes as requested, only stopping on an error or end of stream.
+            </p><p>
+                On a successful read of count bytes, or if we reached the end of the stream,
+                <code class="literal">True</code> is returned, and bytes_read is set to the number of bytes read into buffer.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+                the stream closed, but some streams can use a faster close that doesn't block to e.g.
+                check errors.
+            </p><p>
+                If there is an error during the operation <code class="literal">False</code> is returned and error
+                is set to indicate the error status, bytes_read is updated to contain the number of
+                bytes read into buffer before the error occurred.
+            </p></div><div class="refsect2" title="gio.InputStream.read_async"><a name="method-gioinputstream--read-async"></a><h3>gio.InputStream.read_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td><td>the number of bytes that will be read from the stream.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_async</code>() method requests an asynchronous read
+                of count bytes from the stream into the buffer.
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read" title="gio.InputStream.read">gio.InputStream.read</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-finish" title="gio.InputStream.read_finish">gio.InputStream.read_finish</a></code>()
+                to get the result of the operation.
+            </p><p>
+                During an async request no other sync and async calls are allowed, and
+                will result in gio.ERROR_PENDING errors.
+            </p><p>
+                A value of count larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+            </p><p>
+                On success, the number of bytes read into the buffer will be passed to the callback.
+                It is not an error if this is not the same as the requested size, as it can happen e.g.
+                near the end of a file, but generally we try to read as many bytes as requested. Zero
+                is returned on end of file (or if count is zero), but never otherwise.
+            </p><p>
+                Any outstanding i/o request with higher priority (lower numerical value) will be
+                executed before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
+            </p><p>
+                The asyncronous methods have a default fallback that uses threads to implement asynchronicity, so
+                they are optional for inheriting classes. However, if you override one you must override all.
+            </p></div><div class="refsect2" title="gio.InputStream.read_finish"><a name="method-gioinputstream--read-finish"></a><h3>gio.InputStream.read_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes read in, or -1 on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_finish</code>() method finishes an asynchronous
+                stream read operation started by
+                <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read-async" title="gio.InputStream.read_async">gio.InputStream.read_async</a></code>().
+            </p></div><div class="refsect2" title="gio.InputStream.read_part"><a name="method-gioinputstream--read-part"></a><h3>gio.InputStream.read_part</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">read_part</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>optionally the number of bytes that will be read from the stream.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes read, or -1 on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">read_part</code>() method tries to read count bytes from
+                the stream into the buffer starting at buffer. Will block during this read.
+            </p><p>
+                If count is zero returns zero and does nothing. A value of count larger than
+                G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+            </p><p>
+                On success, the number of bytes read into the buffer is returned. It is
+                not an error if this is not the same as the requested size, as it can
+                happen e.g. near the end of a file. Zero is returned on end of file
+                (or if count is zero), but never otherwise.
+            </p><p>
+               If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+                the stream closed, but some streams can use a faster close that doesn't block to e.g.
+                check errors.
+            </p><p>
+                On error -1 is returned and error is set accordingly.
+            </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
+                This method roughly corresponds to C GIO g_input_stream_read.
+            </div></div><div class="refsect2" title="gio.InputStream.set_pending"><a name="method-gioinputstream--set-pending"></a><h3>gio.InputStream.set_pending</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_pending</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if pending was previously
+                    unset and is now set.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_pending</code>() method sets stream to have actions pending.
+                If the pending flag is already set or stream is closed,
+                it will return <code class="literal">False</code> and set error.
+            </p></div><div class="refsect2" title="gio.InputStream.skip"><a name="method-gioinputstream--skip"></a><h3>gio.InputStream.skip</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">skip</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>count</code></strong> :</span></p></td><td>the number of bytes that will be skipped from the stream.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes skipped, or -1 on error
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">skip</code>() method tries to skip count bytes
+                from the stream. Will block during the operation.
+            </p><p>
+                This is identical to
+                <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--read" title="gio.InputStream.read">read</a></code>(),
+                from a behaviour standpoint, but the bytes that are skipped are not
+                returned to the user. Some streams have an implementation that is more
+                efficient than reading the data.
+            </p><p>
+                This function is optional for inherited classes, as the default implementation emulates it using read.
+            </p><p>
+               If cancellable is not <code class="literal">None</code>, then the operation can be cancelled by
+                triggering the cancellable object from another thskip. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+                the stream closed, but some streams can use a faster close that doesn't block to e.g.
+                check errors.
+            </p></div><div class="refsect2" title="gio.InputStream.skip_async"><a name="method-gioinputstream--skip-async"></a><h3>gio.InputStream.skip_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">skip_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>count</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td><td>the number of bytes that will be skipped from the stream.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncskipyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td><td>the
+                    <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+                    of the request. 
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">skip_async</code>() method request an asynchronous
+                skip of count bytes from the stream.
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip" title="gio.InputStream.skip">gio.InputStream.skip</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip-finish" title="gio.InputStream.skip_finish">gio.InputStream.skip_finish</a></code>()
+                to get the result of the operation.
+            </p><p>
+                During an async request no other sync and async calls are allowed, and
+                will result in gio.ERROR_PENDING errors.
+            </p><p>
+                A value of count larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+            </p><p>
+                On success, the number of bytes skipped will be passed to the callback. It is
+                not an error if this is not the same as the requested size, as it can happen
+                e.g. near the end of a file, but generally we try to skip as many bytes as requested.
+                Zero is returned on end of file (or if count is zero), but never otherwise.
+            </p><p>
+                Any outstanding i/o request with higher priority (lower numerical value) will be
+                executed before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
+            </p><p>
+                The asyncronous methods have a default fallback that uses thskips to implement asynchronicity, so
+                they are optional for inheriting classes. However, if you override one you must override all.
+            </p></div><div class="refsect2" title="gio.InputStream.skip_finish"><a name="method-gioinputstream--skip-finish"></a><h3>gio.InputStream.skip_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">skip_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The number of bytes skipped in, or -1 on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">skip_finish</code>() method finishes an asynchronous
+                stream skip operation started by
+                <code class="methodname"><a class="link" href="class-gioinputstream.html#method-gioinputstream--skip-async" title="gio.InputStream.skip_async">gio.InputStream.skip_async</a></code>().
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioloadableicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Icon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.LoadableIcon</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioloadableicon.html b/docs/html/class-gioloadableicon.html
new file mode 100644 (file)
index 0000000..8f84331
--- /dev/null
@@ -0,0 +1,51 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.LoadableIcon</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioinputstream.html" title="gio.InputStream"><link rel="next" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.LoadableIcon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giomemoryinputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.LoadableIcon"><a name="class-gioloadableicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.LoadableIcon</h2><p>gio.LoadableIcon â€” Interface for icons.</p></div><div class="refsect1" title="Synopsis"><a name="id517587"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.LoadableIcon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load" title="gio.LoadableIcon.load">load</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-async" title="gio.LoadableIcon.load_async">load_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-finish" title="gio.LoadableIcon.load_finish">load_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>res</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id517752"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+  +-- <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon">gio.LoadableIcon</a>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id517774"></a><h2>Prerequisites</h2><p>
+            <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a> requires
+            <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>. and
+           <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+        </p></div><div class="refsect1" title="Known Implementation"><a name="id517803"></a><h2>Known Implementation</h2><p>
+            <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a> is implemented by
+            <a class="link" href="class-giofileicon.html" title="gio.FileIcon"><code class="classname">gio.FileIcon</code></a>
+        </p></div><div class="refsect1" title="Description"><a name="id517825"></a><h2>Description</h2><p>
+            <a class="link" href="class-gioloadableicon.html" title="gio.LoadableIcon"><code class="classname">gio.LoadableIcon</code></a>
+            extends the <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+           interface and adds the ability to load icons from streams.
+        </p></div><div class="refsect1" title="Methods"><a name="id517847"></a><h2>Methods</h2><div class="refsect2" title="gio.LoadableIcon.load"><a name="method-gioloadableicon--load"></a><h3>gio.LoadableIcon.load</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">load</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td><td>an integer
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 2 tuple containing a
+                   <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+                   to read the icon from and a string containing the icon type.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">load</code>() method loads a loadable icon.
+               For the asynchronous version of this function, see
+               <code class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-async" title="gio.LoadableIcon.load_async">gio.LoadableIcon.load_async</a></code>().
+            </p></div><div class="refsect2" title="gio.LoadableIcon.load_async"><a name="method-gioloadableicon--load-async"></a><h3>gio.LoadableIcon.load_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">load_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a GAsyncReadyCallback to call when the request is satisfied.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td><td>an integer
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>optional
+                    <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    object, <code class="literal">None</code> to ignore.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the data to pass to callback function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">load_async</code>() method loads an icon asynchronously.
+            </p><p>
+                For more details, see
+                <code class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load" title="gio.LoadableIcon.load">gio.LoadableIcon.load</a></code>()
+                which is the synchronous version of this call. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-finish" title="gio.LoadableIcon.load_finish">gio.LoadableIcon.load_finish</a></code>()
+                to get the result of the operation.
+            </p></div><div class="refsect2" title="gio.LoadableIcon.load_finish"><a name="method-gioloadableicon--load-finish"></a><h3>gio.LoadableIcon.load_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">load_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>res</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>res</code></em> :</span></p></td><td>a
+                   <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 2 tuple containing a
+                   <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+                   to read the icon from and a string containing the icon type.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">load_finish</code>() method finishes an asynchronous
+                icon load started in 
+                <code class="methodname"><a class="link" href="class-gioloadableicon.html#method-gioloadableicon--load-async" title="gio.LoadableIcon.load_async">gio.LoadableIcon.load_async</a></code>().
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giomemoryinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.InputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.MemoryInputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giomemoryinputstream.html b/docs/html/class-giomemoryinputstream.html
new file mode 100644 (file)
index 0000000..5068dea
--- /dev/null
@@ -0,0 +1,32 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.MemoryInputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioloadableicon.html" title="gio.LoadableIcon"><link rel="next" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.MemoryInputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioloadableicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giomemoryoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.MemoryInputStream"><a name="class-giomemoryinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.MemoryInputStream</h2><p>gio.MemoryInputStream â€” Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id518274"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.MemoryInputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giomemoryinputstream.html#constructor-giomemoryinputstream" title="Constructor">gio.MemoryInputStream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomemoryinputstream.html#method-giomemoryinputstream--add-data" title="gio.MemoryInputStream.add_data">add_data</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomemoryinputstream.html#function-gio--memory-input-stream-new-from-data" title="gio.memory_input_stream_new_from_data">gio.memory_input_stream_new_from_data</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id518373"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+    +-- <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream">gio.MemoryInputStream</a>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id518400"></a><h2>Implemented Interfaces</h2><p>
+            <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>
+            implements
+            <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
+        </p></div><div class="refsect1" title="Description"><a name="id518423"></a><h2>Description</h2><p>
+            <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>
+            is a class for using arbitrary memory chunks as input for GIO streaming input operations.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giomemoryinputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.MemoryInputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>.
+                </td></tr></tbody></table><p>
+            Creates an empty
+            <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>.
+        </p></div><div class="refsect1" title="Methods"><a name="id518503"></a><h2>Methods</h2><div class="refsect2" title="gio.MemoryInputStream.add_data"><a name="method-giomemoryinputstream--add-data"></a><h3>gio.MemoryInputStream.add_data</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">add_data</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>input data.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">add_data</code>() method appends data to data
+                that can be read from the input stream
+            </p></div></div><div class="refsect1" title="Functions"><a name="id518569"></a><h2>Functions</h2><div class="refsect2" title="gio.memory_input_stream_new_from_data"><a name="function-gio--memory-input-stream-new-from-data"></a><h3>gio.memory_input_stream_new_from_data</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">memory_input_stream_new_from_data</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td>input data.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A new
+                    <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>
+                    read from data
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">memory_input_stream_new_from_data</code>() function creates
+                a new <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>
+                with data in memory.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioloadableicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giomemoryoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.LoadableIcon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.MemoryOutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giomemoryoutputstream.html b/docs/html/class-giomemoryoutputstream.html
new file mode 100644 (file)
index 0000000..115bba7
--- /dev/null
@@ -0,0 +1,40 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.MemoryOutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><link rel="next" href="class-giomount.html" title="gio.Mount"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.MemoryOutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giomemoryinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giomount.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.MemoryOutputStream"><a name="class-giomemoryoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.MemoryOutputStream</h2><p>gio.MemoryOutputStream â€” Streaming output operations on memory chunks</p></div><div class="refsect1" title="Synopsis"><a name="id518676"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.MemoryOutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giomemoryoutputstream.html#constructor-giomemoryoutputstream" title="Constructor">gio.MemoryOutputStream</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-contents" title="gio.MemoryOutputStream.get_contents">get_contents</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-data-size" title="gio.MemoryOutputStream.get_data_size">get_data_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-size" title="gio.MemoryOutputStream.get_size">get_size</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id518772"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+    +-- <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream">gio.MemoryOutputStream</a>
+</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id518799"></a><h2>Implemented Interfaces</h2><p>
+            <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>
+            implements
+            <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
+        </p></div><div class="refsect1" title="Description"><a name="id518821"></a><h2>Description</h2><p>
+            <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>
+            is a class for using arbitrary memory chunks as output for GIO streaming output operations.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giomemoryoutputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.MemoryOutputStream</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>.
+                </td></tr></tbody></table><p>
+            Creates a new
+            <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>.
+        </p></div><div class="refsect1" title="Methods"><a name="id518896"></a><h2>Methods</h2><div class="refsect2" title="gio.MemoryOutputStream.get_contents"><a name="method-giomemoryoutputstream--get-contents"></a><h3>gio.MemoryOutputStream.get_contents</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_contents</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the stream's data
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_contents</code>() method gets any loaded data
+                from the ostream.
+            </p><p>
+                Note that the returned data may become invalid on the next write or truncate
+                operation on the stream.
+            </p></div><div class="refsect2" title="gio.MemoryOutputStream.get_data_size"><a name="method-giomemoryoutputstream--get-data-size"></a><h3>gio.MemoryOutputStream.get_data_size</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_data_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the number of bytes written to the stream
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_data_size</code>() method returns the number
+                of bytes from the start up to including the last byte written in the
+                stream that has not been truncated away.
+            </p></div><div class="refsect2" title="gio.MemoryOutputStream.get_size"><a name="method-giomemoryoutputstream--get-size"></a><h3>gio.MemoryOutputStream.get_size</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the number of bytes allocated for the data buffer
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_size</code>() method gets the size of the
+                currently allocated data area (availible from
+                <code class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-contents" title="gio.MemoryOutputStream.get_contents">gio.MemoryOutputStream.get_contents</a></code>()
+                ).
+            </p><p>
+                Note that for growable streams the returned size may become invalid on the next write or truncate operation on the stream.
+            </p><p>
+                If you want the number of bytes currently written to the stream, use
+                <code class="methodname"><a class="link" href="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-data-size" title="gio.MemoryOutputStream.get_data_size">gio.MemoryOutputStream.get_data_size</a></code>().
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giomemoryinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giomount.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.MemoryInputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Mount</td></tr></table></div></body></html>
diff --git a/docs/html/class-giomount.html b/docs/html/class-giomount.html
new file mode 100644 (file)
index 0000000..574ebfd
--- /dev/null
@@ -0,0 +1,242 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Mount</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><link rel="next" href="class-giomountoperation.html" title="gio.MountOperation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Mount</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giomemoryoutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giomountoperation.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Mount"><a name="class-giomount"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Mount</h2><p>gio.Mount â€” Mount management</p></div><div class="refsect1" title="Synopsis"><a name="id519095"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Mount</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--can-eject" title="gio.Mount.can_eject">can_eject</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--can-unmount" title="gio.Mount.can_unmount">can_unmount</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--eject" title="gio.Mount.eject">eject</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--eject-finish" title="gio.Mount.eject_finish">eject_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-drive" title="gio.Mount.get_drive">get_drive</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-icon" title="gio.Mount.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-name" title="gio.Mount.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-root" title="gio.Mount.get_root">get_root</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-uuid" title="gio.Mount.get_uuid">get_uuid</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-volume" title="gio.Mount.get_volume">get_volume</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type" title="gio.Mount.guess_content_type">guess_content_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>force_rescan</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type-finish" title="gio.Mount.guess_content_type_finish">guess_content_type_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type-sync" title="gio.Mount.guess_content_type_sync">guess_content_type_sync</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>force_rescan</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--is-shadowed" title="gio.Mount.is_shadowed">is_shadowed</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--remount" title="gio.Mount.remount">remount</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--remount-finish" title="gio.Mount.remount_finish">remount_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--shadow" title="gio.Mount.shadow">shadow</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--unmount" title="gio.Mount.unmount">unmount</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--unmount-finish" title="gio.Mount.unmount_finish">unmount_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomount.html#method-giomount--unshadow" title="gio.Mount.unshadow">unshadow</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id519766"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+  +-- <a class="link" href="class-giomount.html" title="gio.Mount">gio.Mount</a>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id519788"></a><h2>Prerequisites</h2><p>
+            <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a> requires
+            <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+        </p></div><div class="refsect1" title="gio.Mount Signal Prototypes"><a name="signal-prototypes-giomount"></a><h2>gio.Mount Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><a class="link" href="class-giomount.html#signal-giomount--aborted" title='The "aborted" gio.Mount Signal'>"aborted"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomount.html#signal-giomount--changed" title='The "changed" gio.Mount Signal'>"changed"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomount.html#signal-giomount--unmounted" title='The "unmounted" gio.Mount Signal'>"unmounted"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id519980"></a><h2>Description</h2><p>
+            The <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+            interface represents user-visible mounts. Note, when porting from GnomeVFS,
+            <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+            is the moral equivalent of GnomeVFSVolume.
+            
+        </p><p>
+            <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+            is a "mounted" filesystem that you can access. Mounted is in quotes because
+            it's not the same as a unix mount, it might be a gvfs mount, but you can still
+            access the files on it if you use GIO. Might or might not be related to a volume object.
+        </p><p>
+            Unmounting a GMount instance is an asynchronous operation. For more information
+            about asynchronous operations, see GAsyncReady and GSimpleAsyncReady. To unmount
+            a <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a> instance,
+            first call
+            g_mount_unmount()
+            with (at least) the GMount instance and a GAsyncReadyCallback. The callback will
+            be fired when the operation has resolved (either with success or failure), and a
+            GAsyncReady structure will be passed to the callback. That callback should then call
+            g_mount_unmount_finish()
+            with the GMount and the GAsyncReady data to see if the operation was completed successfully.
+            If an error is present when g_mount_unmount_finish() is called, then it will be filled
+            with any error information.
+        </p></div><div class="refsect1" title="Methods"><a name="id520032"></a><h2>Methods</h2><div class="refsect2" title="gio.Mount.can_eject"><a name="method-giomount--can-eject"></a><h3>gio.Mount.can_eject</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">can_eject</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount can be ejected,
+                    <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">can_eject</code>() method checks if a mount can be ejected.
+            </p></div><div class="refsect2" title="gio.Mount.can_unmount"><a name="method-giomount--can-unmount"></a><h3>gio.Mount.can_unmount</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">can_unmount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount can be unmounted,
+                    <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">can_eject</code>() method checks if a mount can be unmounted.
+            </p></div><div class="refsect2" title="gio.Mount.eject"><a name="method-giomount--eject"></a><h3>gio.Mount.eject</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">eject</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject
+                  <a class="xref" href="gio-constants.html#gio-mount-unmount-flags-constants" title="Gio Mount Unmount Flags Constants">Gio Mount Unmount Flags Constants</a>.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+                  <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                  object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">eject</code>() method asynchronously ejects a mount. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--eject-finish" title="gio.Mount.eject_finish">gio.Mount.eject_finish</a></code>()
+                to obtain the result of the operation.
+            </p></div><div class="refsect2" title="gio.Mount.eject_finish"><a name="method-giomount--eject-finish"></a><h3>gio.Mount.eject_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">eject_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount has been ejected
+                    successfully, <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">eject_finish</code>() method finishes ejecting a mount.
+            </p></div><div class="refsect2" title="gio.Mount.get_drive"><a name="method-giomount--get-drive"></a><h3>gio.Mount.get_drive</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_drive</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+                    or <code class="literal">None</code> if mount is not associated with a volume or a drive.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_drive</code>() method gets the drive for the mount.
+            </p><p>
+                This is a convenience method for getting the
+                <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                and then using that object to get the
+                <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>.
+            </p></div><div class="refsect2" title="gio.Mount.get_icon"><a name="method-giomount--get-icon"></a><h3>gio.Mount.get_icon</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+                    for the mount.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_icon</code>() method gets the icon for mount.
+            </p></div><div class="refsect2" title="gio.Mount.get_name"><a name="method-giomount--get-name"></a><h3>gio.Mount.get_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name for the given mount.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_name</code>() method gets the name of mount.
+            </p></div><div class="refsect2" title="gio.Mount.get_root"><a name="method-giomount--get-root"></a><h3>gio.Mount.get_root</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_root</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.File</code></a>.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_root</code>() method gets the root directory on mount.
+            </p></div><div class="refsect2" title="gio.Mount.get_uuid"><a name="method-giomount--get-uuid"></a><h3>gio.Mount.get_uuid</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_uuid</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the UUID for mount or <code class="literal">None</code>
+                    if no UUID can be computed.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_uuid</code>() method gets the UUID for the mount.
+                The reference is typically based on the file system UUID for the mount in
+                question and should be considered an opaque string. Returns <code class="literal">None</code>
+                if there is no UUID available
+            </p></div><div class="refsect2" title="gio.Mount.get_volume"><a name="method-giomount--get-volume"></a><h3>gio.Mount.get_volume</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_volume</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                    or <code class="literal">None</code> if mount is not associated with a volume.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_volume</code>() method gets the volume for the mount.
+            </p></div><div class="refsect2" title="gio.Mount.guess_content_type"><a name="method-giomount--guess-content-type"></a><h3>gio.Mount.guess_content_type</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">guess_content_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>force_rescan</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>force_rescan</code></strong> :</span></p></td><td>Whether to force a rescan of the content. Otherwise a cached result will be used if available.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+                  <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                  object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">guess_content_type</code>() method asynchronously tries to guess the type of
+                content stored on mount. Returns one or more textual identifiers of well-known content
+                types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory
+                cards. See the shared-mime-info specification for more on x-content types.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type-finish" title="gio.Mount.guess_content_type_finish">gio.Mount.guess_content_type_finish</a></code>()
+                to obtain the result of the operation.
+            </p></div><div class="refsect2" title="gio.Mount.guess_content_type_finish"><a name="method-giomount--guess-content-type-finish"></a><h3>gio.Mount.guess_content_type_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">guess_content_type_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of types or <code class="literal">None</code> on error.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">guess_content_type_finish</code>() method finishes guessing content
+                types of mount. If any errors occured during the operation, error will be set to
+                contain the errors and <code class="literal">False</code> will be returned. In particular, you may get an
+                gio.ERROR_NOT_SUPPORTED if the mount does not support content guessing.
+            </p></div><div class="refsect2" title="gio.Mount.guess_content_type_sync"><a name="method-giomount--guess-content-type-sync"></a><h3>gio.Mount.guess_content_type_sync</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">guess_content_type_sync</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>force_rescan</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>force_rescan</code></strong> :</span></p></td><td>Whether to force a rescan of the content. Otherwise a cached result will be used if available.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+                  <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                  object, <code class="literal">None</code> to ignore.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">guess_content_type_sync</code>() method tries to guess
+                the type of content stored on mount. Returns one or more textual identifiers
+                of well-known content types (typically prefixed with "x-content/"), e.g.
+                x-content/image-dcf for camera memory cards. See the shared-mime-info specification
+                for more on x-content types.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p><p>
+                This is an synchronous operation and as such may block doing IO; see
+                <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--guess-content-type" title="gio.Mount.guess_content_type">gio.Mount.guess_content_type</a></code>()
+                for the asynchronous version.
+            </p></div><div class="refsect2" title="gio.Mount.is_shadowed"><a name="method-giomount--is-shadowed"></a><h3>gio.Mount.is_shadowed</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">is_shadowed</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if mount is shadowed.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">is_shadowed</code>() method determines if mount
+                is shadowed. Applications or libraries should avoid displaying mount
+                in the user interface if it is shadowed.
+            </p><p>
+                A mount is said to be shadowed if there exists one or more user visible
+                objects (currently
+                <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+                objects) with a root that is inside the root of mount.
+            </p><p>
+                One application of shadow mounts is when exposing a single file system
+                that is used to address several logical volumes. In this situation, a
+                <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+                implementation would create two
+                <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                objects (for example, one for the camera functionality of the device
+                and one for a SD card reader on the device) with activation URIs
+                gphoto2://[usb:001,002]/store1/ and gphoto2://[usb:001,002]/store2/.
+                When the underlying mount (with root gphoto2://[usb:001,002]/) is
+                mounted, said
+                <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+                implementation would create two
+                <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+                objects (each with their root matching the corresponding volume
+                activation root) that would shadow the original mount.
+            </p><p>
+                The proxy monitor in GVfs 2.26 and later, automatically creates and
+                manage shadow mounts (and shadows the underlying mount) if the activation
+                root on a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                is set.
+            </p></div><div class="refsect2" title="gio.Mount.remount"><a name="method-giomount--remount"></a><h3>gio.Mount.remount</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">remount</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject
+                  <a class="xref" href="gio-constants.html#gio-mount-unmount-flags-constants" title="Gio Mount Unmount Flags Constants">Gio Mount Unmount Flags Constants</a>.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>mount_operation</code></strong> :</span></p></td><td>a <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+                  or <code class="literal">None</code> to avoid user interaction.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+                  <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                  object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">remount</code>() method asynchronously remounts a mount.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--remount-finish" title="gio.Mount.remount_finish">gio.Mount.remount_finish</a></code>()
+                to obtain the result of the operation.
+            </p></div><div class="refsect2" title="gio.Mount.remount_finish"><a name="method-giomount--remount-finish"></a><h3>gio.Mount.remount_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">remount_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount has been remounted
+                    successfully, <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">remount_finish</code>() method finishes remounting a mount.
+            </p></div><div class="refsect2" title="gio.Mount.shadow"><a name="method-giomount--shadow"></a><h3>gio.Mount.shadow</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">shadow</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+                The <code class="methodname">shadow</code>() method increments the shadow
+                count on mount. Usually used by
+                <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+                implementations when creating a shadow mount for mount, see
+                <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--is-shadowed" title="gio.Mount.is_shadowed">gio.Mount.is_shadowed</a></code>()
+                for more information. The caller will need to emit the "changed"
+                signal on mount manually.
+            </p></div><div class="refsect2" title="gio.Mount.unmount"><a name="method-giomount--unmount"></a><h3>gio.Mount.unmount</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">unmount</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject
+                  <a class="xref" href="gio-constants.html#gio-mount-unmount-flags-constants" title="Gio Mount Unmount Flags Constants">Gio Mount Unmount Flags Constants</a>.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+                  <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                  object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">unmount</code>() method asynchronously unmounts a mount.
+            </p><p>
+                If cancellable is not <code class="literal">None</code>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--unmount-finish" title="gio.Mount.unmount_finish">gio.Mount.unmount_finish</a></code>()
+                to obtain the result of the operation.
+            </p></div><div class="refsect2" title="gio.Mount.unmount_finish"><a name="method-giomount--unmount-finish"></a><h3>gio.Mount.unmount_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">unmount_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mount has been unmounted
+                    successfully, <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">unmount_finish</code>() method finishes unmounting a mount.
+            </p></div><div class="refsect2" title="gio.Mount.unshadow"><a name="method-giomount--unshadow"></a><h3>gio.Mount.unshadow</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">unshadow</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+                The <code class="methodname">unshadow</code>() method decrements the shadow
+                count on mount. Usually used by
+                <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+                implementations when destroying a shadow mount for mount, see
+                <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--is-shadowed" title="gio.Mount.is_shadowed">gio.Mount.is_shadowed</a></code>()
+                for more information. The caller will need to emit the "changed"
+                signal on mount manually.
+            </p></div></div><div class="refsect1" title="Signals"><a name="id522197"></a><h2>Signals</h2><div class="refsect2" title='The "aborted" gio.Mount Signal'><a name="signal-giomount--aborted"></a><h3>The "aborted" gio.Mount Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the mount</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted by the backend when e.g. a device becomes unavailable while a
+                mount operation is in progress.
+            </p><p>
+                Implementations of <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+                should handle this signal by dismissing open password dialogs.
+            </p></div><div class="refsect2" title='The "changed" gio.Mount Signal'><a name="signal-giomount--changed"></a><h3>The "changed" gio.Mount Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the mount</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted when the mount has been changed.
+            </p></div><div class="refsect2" title='The "unmounted" gio.Mount Signal'><a name="signal-giomount--unmounted"></a><h3>The "unmounted" gio.Mount Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the mount</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                This signal is emitted when the
+                <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+                have been unmounted.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giomemoryoutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giomountoperation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.MemoryOutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.MountOperation</td></tr></table></div></body></html>
diff --git a/docs/html/class-giomountoperation.html b/docs/html/class-giomountoperation.html
new file mode 100644 (file)
index 0000000..fddc13b
--- /dev/null
@@ -0,0 +1,123 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.MountOperation</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giomount.html" title="gio.Mount"><link rel="next" href="class-giooutputstream.html" title="gio.OutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.MountOperation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giomount.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giooutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.MountOperation"><a name="class-giomountoperation"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.MountOperation</h2><p>gio.MountOperation â€” Authentication methods for mountable locations.</p></div><div class="refsect1" title="Synopsis"><a name="id522624"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.MountOperation</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giomountoperation.html#constructor-giomountoperation" title="Constructor">gio.MountOperation</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-anonymous" title="gio.MountOperation.get_anonymous">get_anonymous</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-choice" title="gio.MountOperation.get_choice">get_choice</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-domain" title="gio.MountOperation.get_domain">get_domain</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-password" title="gio.MountOperation.get_password">get_password</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-password-save" title="gio.MountOperation.get_password_save">get_password_save</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--get-username" title="gio.MountOperation.get_username">get_username</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--reply" title="gio.MountOperation.reply">replay</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-anonymous" title="gio.MountOperation.set_anonymous">set_anonymous</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>anonymous</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-choice" title="gio.MountOperation.set_choice">set_choice</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>choice</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-domain" title="gio.MountOperation.set_domain">set_domain</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>domain</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-password" title="gio.MountOperation.set_password">set_password</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>password</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-password-save" title="gio.MountOperation.set_password_save">set_password_save</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>save</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giomountoperation.html#method-giomountoperation--set-username" title="gio.MountOperation.set_username">set_username</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>username</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id522983"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giomountoperation.html" title="gio.MountOperation">gio.MountOperation</a>
+</pre></div><div class="refsect1" title="gio.MountOperation Properties"><a name="properties-giomountoperation"></a><h2>gio.MountOperation Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"anonymous"</td><td valign="top">Read/Write</td><td valign="top">
+                                Whether to use an anonymous user when authenticating.
+                                Default value: <code class="literal">False</code>
+                            </td></tr><tr valign="top"><td valign="top">"choice"</td><td valign="top">Read/Write</td><td valign="top">
+                                The index of the user's choice when a question is asked during
+                                the mount operation. See the "ask-question" signal.
+                                Allowed values: &gt;= 0 Default value: 0
+                            </td></tr><tr valign="top"><td valign="top">"domain"</td><td valign="top">Read/Write</td><td valign="top">
+                                The domain to use for the mount operation. Default value: <code class="literal">None</code>
+                            </td></tr><tr valign="top"><td valign="top">"password"</td><td valign="top">Read/Write</td><td valign="top">
+                                The password that is used for authentication when carrying out the
+                                mount operation. Default value: <code class="literal">None</code>
+                            </td></tr><tr valign="top"><td valign="top">"password-save"</td><td valign="top">Read/Write</td><td valign="top">
+                                Determines if and how the password information should be saved.
+                                Default value: gio.PASSWORD_SAVE_NEVER
+                            </td></tr><tr valign="top"><td valign="top">"username"</td><td valign="top">Read/Write</td><td valign="top">
+                                The user name that is used for authentication when carrying out the
+                                mount operation. Default value: <code class="literal">None</code>
+                            </td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gio.MountOperation Signal Prototypes"><a name="signal-prototypes-giomountoperation"></a><h2>gio.MountOperation Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><a class="link" href="class-giomountoperation.html#signal-giomountoperation--aborted" title='The "aborted" gio.MountOperation Signal'>"aborted"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomountoperation.html#signal-giomountoperation--ask-password" title='The "ask-password" gio.MountOperation Signal'>"ask-password"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>message</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>default_user</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>default_domain</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>flags</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomountoperation.html#signal-giomountoperation--ask-question" title='The "ask-question" gio.MountOperation Signal'>"ask-question"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>message</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>choices</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giomountoperation.html#signal-giomountoperation--reply" title='The "reply" gio.MountOperation Signal'>"reply"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>result</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id523542"></a><h2>Description</h2><p>
+            The <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+        provides a mechanism for authenticating mountable operations, such as loop mounting files,
+        hard drive partitions or server locations.
+        </p><p>
+            Mounting operations are handed a
+            <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+            that then can use if they require any privileges or authentication for their volumes to be
+            mounted (e.g. a hard disk partition or an encrypted filesystem), or if they are implementing
+            a remote server protocol which requires user credentials such as FTP or WebDAV.
+        </p><p>
+            Users should instantiate a subclass of this that implements all the various callbacks
+            to show the required dialogs, such as
+            <PYGTKDOCLINK HREF="class-gtkmountoperation"><code class="classname">gtk.MountOperation</code></PYGTKDOCLINK>.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giomountoperation"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.MountOperation</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>.
+                </td></tr></tbody></table><p>
+            Creates a new mount operation.
+        </p></div><div class="refsect1" title="Methods"><a name="id523648"></a><h2>Methods</h2><div class="refsect2" title="gio.MountOperation.get_anonymous"><a name="method-giomountoperation--get-anonymous"></a><h3>gio.MountOperation.get_anonymous</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_anonymous</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if mount operation is anonymous.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_anonymous</code>() method check to see whether
+                the mount operation is being used for an anonymous user
+            </p></div><div class="refsect2" title="gio.MountOperation.get_choice"><a name="method-giomountoperation--get-choice"></a><h3>gio.MountOperation.get_choice</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_choice</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer containing an index of the user's
+                    choice from the choice's list, or 0.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_anonymous</code>() method gets a choice
+                from the mount operation.
+            </p></div><div class="refsect2" title="gio.MountOperation.get_domain"><a name="method-giomountoperation--get-domain"></a><h3>gio.MountOperation.get_domain</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_domain</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string set to the domain.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_domain</code>() method gets the domain
+                of the mount operation.
+            </p></div><div class="refsect2" title="gio.MountOperation.get_password"><a name="method-giomountoperation--get-password"></a><h3>gio.MountOperation.get_password</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_password</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the password within
+                    the mountoperation.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_password</code>() method gets a password
+                from the mount operation.
+            </p></div><div class="refsect2" title="gio.MountOperation.get_password_save"><a name="method-giomountoperation--get-password-save"></a><h3>gio.MountOperation.get_password_save</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_password_save</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+                    <a class="xref" href="gio-constants.html#gio-password-save-constants" title="Gio Password Save Constants">Gio Password Save Constants</a>
+                    flag.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_password_save</code>() method gets the state
+                of saving passwords for the mount operation.
+            </p></div><div class="refsect2" title="gio.MountOperation.get_username"><a name="method-giomountoperation--get-username"></a><h3>gio.MountOperation.get_username</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_username</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing the user name.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_username</code>() method get the user
+                name from the mount operation.
+            </p></div><div class="refsect2" title="gio.MountOperation.reply"><a name="method-giomountoperation--reply"></a><h3>gio.MountOperation.reply</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">reply</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td><td>a
+                    <a class="xref" href="gio-constants.html#gio-mount-operation-result-constants" title="Gio Mount Operation Result Constants">Gio Mount Operation Result Constants</a>
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">reply</code>() method emits the "reply" signal.
+            </p></div><div class="refsect2" title="gio.MountOperation.set_anonymous"><a name="method-giomountoperation--set-anonymous"></a><h3>gio.MountOperation.set_anonymous</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_anonymous</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>anonymous</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>anonymous</code></em> :</span></p></td><td>boolean value.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_anonymous</code>() method sets the mount operation
+                to use an anonymous user if anonymous is <code class="literal">True</code>.
+            </p></div><div class="refsect2" title="gio.MountOperation.set_choice"><a name="method-giomountoperation--set-choice"></a><h3>gio.MountOperation.set_choice</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_choice</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>choice</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>choice</code></em> :</span></p></td><td>an integer.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_choice</code>() method sets a default choice for the mount operation.
+            </p></div><div class="refsect2" title="gio.MountOperation.set_domain"><a name="method-giomountoperation--set-domain"></a><h3>gio.MountOperation.set_domain</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_domain</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>domain</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td><td>the domain to set.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_domain</code>() method sets the mount operation's domain.
+            </p></div><div class="refsect2" title="gio.MountOperation.set_password"><a name="method-giomountoperation--set-password"></a><h3>gio.MountOperation.set_password</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_password</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>password</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td><td>password to set.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_password</code>() method sets the mount
+                operation's password to password.
+            </p></div><div class="refsect2" title="gio.MountOperation.set_password_save"><a name="method-giomountoperation--set-password-save"></a><h3>gio.MountOperation.set_password_save</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_password_save</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>save</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>save</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-password-save-constants" title="Gio Password Save Constants">Gio Password Save Constants</a>
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_password_save</code>() method sets the state
+                of saving passwords for the mount operation.
+            </p></div><div class="refsect2" title="gio.MountOperation.set_username"><a name="method-giomountoperation--set-username"></a><h3>gio.MountOperation.set_username</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_username</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>username</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>username</code></em> :</span></p></td><td>input username.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">set_anonymous</code>() method sets the user
+                name within op to username.
+            </p></div></div><div class="refsect1" title="Signals"><a name="id524509"></a><h2>Signals</h2><div class="refsect2" title='The "aborted" gio.MountOperation Signal'><a name="signal-giomountoperation--aborted"></a><h3>The "aborted" gio.MountOperation Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mountoperation</code></em> :</span></p></td><td>the mountoperation</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted by the backend when e.g. a device becomes unavailable while a mount operation is in progress.
+                Implementations of <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+                should handle this signal by dismissing open password dialogs.
+            </p></div><div class="refsect2" title='The "ask-password" gio.MountOperation Signal'><a name="signal-giomountoperation--ask-password"></a><h3>The "ask-password" gio.MountOperation Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>message</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>default_user</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>default_domain</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>flags</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mountoperation</code></em> :</span></p></td><td>the mountoperation</td></tr><tr><td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td><td>string containing a message to display to the user.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>default_user</code></em> :</span></p></td><td>string containing the default user name.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>default_domain</code></em> :</span></p></td><td>string containing the default domain.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>a set of
+                    <a class="xref" href="gio-constants.html#gio-ask-password-flags-constants" title="Gio Ask Password Flags Constants">Gio Ask Password Flags Constants</a>
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                This signal is emitted when a mount operation asks the user for a password.
+                If the message contains a line break, the first line should be presented as a heading.
+                For example, it may be used as the primary text in a
+                <PYGTKDOCLINK HREF="class-gtkmessagedialog"><code class="classname">gtk.MessageDialog</code></PYGTKDOCLINK>.
+            </p></div><div class="refsect2" title='The "ask-question" gio.MountOperation Signal'><a name="signal-giomountoperation--ask-question"></a><h3>The "ask-question" gio.MountOperation Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>message</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>choices</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mountoperation</code></em> :</span></p></td><td>the mountoperation</td></tr><tr><td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td><td>string containing a message to display to the user.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>choices</code></em> :</span></p></td><td>a list of strings for each possible choice.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                This signal is emitted when asking the user a question and gives a list of choices
+                for the user to choose from. If the message contains a line break, the first line should be
+                presented as a heading. For example, it may be used as the primary text in a
+                <PYGTKDOCLINK HREF="class-gtkmessagedialog"><code class="classname">gtk.MessageDialog</code></PYGTKDOCLINK>.
+            </p></div><div class="refsect2" title='The "reply" gio.MountOperation Signal'><a name="signal-giomountoperation--reply"></a><h3>The "reply" gio.MountOperation Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>mountoperation</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>result</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mountoperation</code></em> :</span></p></td><td>the mountoperation</td></tr><tr><td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td><td>a
+                    <a class="xref" href="gio-constants.html#gio-mount-operation-result-constants" title="Gio Mount Operation Result Constants">Gio Mount Operation Result Constants</a>
+                    indicating how the request was handled</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                This signal is emitted when the user has replied to the mount operation.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giomount.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giooutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Mount </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.OutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giooutputstream.html b/docs/html/class-giooutputstream.html
new file mode 100644 (file)
index 0000000..d4df1ab
--- /dev/null
@@ -0,0 +1,19 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.OutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giomountoperation.html" title="gio.MountOperation"><link rel="next" href="class-gioseekable.html" title="gio.Seekable"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.OutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giomountoperation.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioseekable.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.OutputStream"><a name="class-giooutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.OutputStream</h2><p>gio.OutputStream â€” Base class for implementing streaming input</p></div><div class="refsect1" title="Synopsis"><a name="id525286"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.OutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--clear-pending">clear_pending</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--close">close</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--close-async">close_async</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--close-finish">close_finish</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--flush">flush</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--flush-async">flush_async</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--flush-finish">flush_finish</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--has-pending">has_pending</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--is-closed">is_closed</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--set-pending">set_pending</PYGTKDOCLINK></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--splice">splice</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.OUTPUT_STREAM_SPLICE_NONE</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--splice-async">splice_async</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>source</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.OUTPUT_STREAM_SPLICE_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--splice-finish">splice_finish</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--write">write</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--write-async">write_async</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>io_priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--write-finish">write_finish</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id525999"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+</pre></div><div class="refsect1" title="Description"><a name="id526024"></a><h2>Description</h2><p>
+            <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
+            has functions to write from a stream (
+            <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--write">gio.OutputStream.write</PYGTKDOCLINK></code>()
+            ), to close a stream (
+            <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--close">gio.OutputStream.close</PYGTKDOCLINK></code>()
+            ) and to flush pending writes (
+            <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--flush">gio.OutputStream.flush</PYGTKDOCLINK></code>()
+            ).
+        </p><p>
+            To copy the content of an input stream to an output stream without manually
+            handling the reads and writes, use
+            <code class="methodname"><PYGTKDOCLINK HREF="method-giooutputstream--splice">gio.OutputStream.splice</PYGTKDOCLINK></code>().
+        </p><p>
+            All of these functions have async variants too.
+        </p></div><div class="refsect1" title="Methods"><a name="id526082"></a><h2>Methods</h2><p> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giomountoperation.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioseekable.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.MountOperation </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Seekable</td></tr></table></div></body></html>
diff --git a/docs/html/class-gioseekable.html b/docs/html/class-gioseekable.html
new file mode 100644 (file)
index 0000000..e7fdf1b
--- /dev/null
@@ -0,0 +1,55 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Seekable</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giooutputstream.html" title="gio.OutputStream"><link rel="next" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Seekable</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giooutputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giosimpleasyncresult.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Seekable"><a name="class-gioseekable"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Seekable</h2><p>gio.Seekable â€” Stream seeking interface.</p></div><div class="refsect1" title="Synopsis"><a name="id526116"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Seekable</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--tell" title="gio.Seekable.tell">tell</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_seek" title="gio.Seekable.can_seek">can_seek</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--seek" title="gio.Seekable.seek">seek</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--can_truncate" title="gio.Seekable.can_truncate">can_truncate</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioseekable.html#method-gioseekable--truncate" title="gio.Seekable.truncate">truncate</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id526294"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+  +-- <a class="link" href="class-gioseekable.html" title="gio.Seekable">gio.Seekable</a>
+</pre></div><div class="refsect1" title="Known Implementation"><a name="id526320"></a><h2>Known Implementation</h2><p>
+            <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a> is implemented by
+            <a class="link" href="class-giofileoutputstream.html" title="gio.FileOutputStream"><code class="classname">gio.FileOutputStream</code></a>,
+            <a class="link" href="class-giomemoryinputstream.html" title="gio.MemoryInputStream"><code class="classname">gio.MemoryInputStream</code></a>,
+            <a class="link" href="class-giofileinputstream.html" title="gio.FileInputStream"><code class="classname">gio.FileInputStream</code></a> and
+            <a class="link" href="class-giomemoryoutputstream.html" title="gio.MemoryOutputStream"><code class="classname">gio.MemoryOutputStream</code></a>.
+        </p></div><div class="refsect1" title="Description"><a name="id526367"></a><h2>Description</h2><p>
+            <a class="link" href="class-gioseekable.html" title="gio.Seekable"><code class="classname">gio.Seekable</code></a>
+            is implemented by streams (implementations of 
+            <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a> or
+            <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>)
+            that support seeking.
+        </p></div><div class="refsect1" title="Methods"><a name="id526400"></a><h2>Methods</h2><div class="refsect2" title="gio.Seekable.tell"><a name="method-gioseekable--tell"></a><h3>gio.Seekable.tell</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">tell</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
+                            the offset from the beginning of the buffer
+                    </td></tr></tbody></table><p>
+                Tells the current position within the stream.
+            </p></div><div class="refsect2" title="gio.Seekable.can_seek"><a name="method-gioseekable--can_seek"></a><h3>gio.Seekable.can_seek</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">can_seek</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if this
+                    <code class="classname">gio.Seekable</code> can be seeked with
+                    the <code class="methodname">seek</code>() method, <code class="literal">False</code>
+                    if not. </td></tr></tbody></table><p>
+                The <code class="methodname">can_seek</code>() method checks if the
+                <a class="link" href="class-gioseekable.html#method-gioseekable--seek" title="gio.Seekable.seek"><code class="methodname">seek</code>()</a>
+                can be used on this <code class="classname">gio.Seekable</code>.
+            </p></div><div class="refsect2" title="gio.Seekable.seek"><a name="method-gioseekable--seek"></a><h3>gio.Seekable.seek</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">seek</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td><td>the offset that is added to the position determined by the <code class="literal">type</code> parameter.
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>0=current position, 1=start of the file, 2=end of the file.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>a <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> on successful seek,
+                    <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                Seeks in the stream by the given <code class="literal">offset</code>, modified by <code class="literal">type</code>.
+            </p><p>
+                If <code class="literal">cancellable</code> is not <code class="literal">None</code>, then the
+                operation can be cancelled by triggering the cancellable object from another thread.
+            </p></div><div class="refsect2" title="gio.Seekable.can_truncate"><a name="method-gioseekable--can_truncate"></a><h3>gio.Seekable.can_truncate</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">can_truncate</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if this
+                    <code class="classname">gio.Seekable</code> can be truncated with
+                    the <code class="methodname">truncate</code>() method, <code class="literal">False</code>
+                    if not. </td></tr></tbody></table><p>
+                The <code class="methodname">can_truncate</code>() method checks if the
+                <a class="link" href="class-gioseekable.html#method-gioseekable--truncate" title="gio.Seekable.truncate"><code class="methodname">truncate</code>()</a>
+                can be used on this <code class="classname">gio.Seekable</code>.
+            </p></div><div class="refsect2" title="gio.Seekable.truncate"><a name="method-gioseekable--truncate"></a><h3>gio.Seekable.truncate</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">truncate</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td><td>the offset at which the stream should be truncated
+                    </td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td>a <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                    or <code class="literal">None</code>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if successful,
+                    <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                Truncates a stream with a given <code class="literal">offset</code>.
+            </p><p>
+                If <code class="literal">cancellable</code> is not <code class="literal">None</code>, then the
+                operation can be cancelled by triggering the cancellable object from another thread.
+            </p><p>
+                If an operation was partially finished when the operation was cancelled the
+                partial result will be returned, without an error.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giooutputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giosimpleasyncresult.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.OutputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.SimpleAsyncResult</td></tr></table></div></body></html>
diff --git a/docs/html/class-giosimpleasyncresult.html b/docs/html/class-giosimpleasyncresult.html
new file mode 100644 (file)
index 0000000..6119618
--- /dev/null
@@ -0,0 +1,87 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.SimpleAsyncResult</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-gioseekable.html" title="gio.Seekable"><link rel="next" href="class-giothemedicon.html" title="gio.ThemedIcon"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.SimpleAsyncResult</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gioseekable.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giothemedicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.SimpleAsyncResult"><a name="class-giosimpleasyncresult"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.SimpleAsyncResult</h2><p>gio.SimpleAsyncResult â€” Simple asynchronous results implementation.</p></div><div class="refsect1" title="Synopsis"><a name="id527016"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.SimpleAsyncResult</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete" title="gio.SimpleAsyncResult.complete">complete</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle" title="gio.SimpleAsyncResult.complete_in_idle">complete_in_idle</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gboolean" title="gio.SimpleAsyncResult.get_op_res_gboolean">get_op_res_gboolean</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gssize" title="gio.SimpleAsyncResult.get_op_res_gssize">get_op_res_gssize</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--propagate-error" title="gio.SimpleAsyncResult.propagate_error">propagate_error</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-handle-cancellation" title="gio.SimpleAsyncResult.set_handle_cancellation">set_handle_cancellation</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>handle_cancellation</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gboolean" title="gio.SimpleAsyncResult.set_op_res_gboolean">set_op_res_gboolean</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>op_res</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gssize" title="gio.SimpleAsyncResult.set_op_res_gssize">set_op_res_gssize</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>op_res</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id527227"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult">gio.SimpleAsyncResult</a>
+</pre></div><div class="refsect1" title="Implemented Interface"><a name="id527253"></a><h2>Implemented Interface</h2><p>
+            <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><code class="classname">gio.SimpleAsyncResult</code></a> implements
+            <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+        </p></div><div class="refsect1" title="Description"><a name="id527278"></a><h2>Description</h2><p>
+            Implements <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+            for simple cases. Most of the time, this will be all an application needs, and will be used transparently
+            Because of this, GSimpleAsyncResult is used throughout GIO for handling asynchronous functions.            
+        </p><p>
+            <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><code class="classname">gio.SimpleAsyncResult</code></a>
+            handles GAsyncReadyCallbacks, error reporting, operation cancellation and the final state of an
+            operation, completely transparent to the application. Results can be returned as a pointer e.g.
+            for functions that return data that is collected asynchronously, a boolean value for checking the
+            success or failure of an operation, or a gssize for operations which return the number of bytes modified
+            by the operation; all of the simple return cases are covered. 
+        </p><p>
+            Most of the time, an application will not need to know of the details of this API; it is handled
+            transparently, and any necessary operations are handled by GAsyncResult's interface. However, if
+            implementing a new GIO module, for writing language bindings, or for complex applications that need
+            better control of how asynchronous operations are completed, it is important to understand this functionality. 
+        </p><p>
+            <a class="link" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><code class="classname">gio.SimpleAsyncResult</code></a>
+            are tagged with the calling function to ensure that asynchronous functions and
+            their finishing functions are used together correctly. 
+        </p><p>
+            An asynchronous operation can be made to ignore a cancellation event by calling
+            <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-handle-cancellation" title="gio.SimpleAsyncResult.set_handle_cancellation">gio.SimpleAsyncResult.set_handle_cancellation</a></code>()
+            with a
+            <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+            for the operation and <code class="literal">False</code>. This is useful for operations that are dangerous to cancel,
+            such as close (which would cause a leak if cancelled before being run). 
+        </p><p>
+            <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>
+            can integrate into GLib's event loop, GMainLoop, or it can use GThreads if available.
+            <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete" title="gio.SimpleAsyncResult.complete">gio.SimpleAsyncResult.complete</a></code>()
+            will finish an I/O task directly within the main event loop.
+            <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle" title="gio.SimpleAsyncResult.complete_in_idle">gio.SimpleAsyncResult.complete_in_idle</a></code>()
+            will integrate the I/O task into the main event loop as an idle function.
+            
+        </p><p>
+            To set the results of an asynchronous function,
+            <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gboolean" title="gio.SimpleAsyncResult.set_op_res_gboolean">gio.SimpleAsyncResult.set_op_res_gboolean</a></code>(), and
+            <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gssize" title="gio.SimpleAsyncResult.set_op_res_gssize">gio.SimpleAsyncResult.set_op_res_gssize</a></code>()
+            are provided, setting the operation's result to a gboolean, or gssize, respectively. 
+        </p><p>
+            Likewise, to get the result of an asynchronous function,
+            <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gboolean" title="gio.SimpleAsyncResult.get_op_res_gboolean">gio.SimpleAsyncResult.get_op_res_gboolean</a></code>() and
+            <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gssize" title="gio.SimpleAsyncResult.get_op_res_gssize">gio.SimpleAsyncResult.get_op_res_gssize</a></code>()
+            are provided, getting the operation's result as a gboolean and gssize, respectively.
+        </p></div><div class="refsect1" title="Methods"><a name="id527441"></a><h2>Methods</h2><div class="refsect2" title="gio.SimpleAsyncResult.complete"><a name="method-giosimpleasyncresult--complete"></a><h3>gio.SimpleAsyncResult.complete</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">complete</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+                The <code class="methodname">complete</code>() method completes an asynchronous I/O job.
+                Must be called in the main thread, as it invokes the callback that should be called
+                in the main thread. If you are in a different thread use
+                <code class="methodname"><a class="link" href="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle" title="gio.SimpleAsyncResult.complete_in_idle">gio.SimpleAsyncResult.complete_in_idle</a></code>().
+            </p></div><div class="refsect2" title="gio.SimpleAsyncResult.complete_in_idle"><a name="method-giosimpleasyncresult--complete-in-idle"></a><h3>gio.SimpleAsyncResult.complete_in_idle</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">complete_in_idle</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><p>
+                The <code class="methodname">complete_in_idle</code>() method completes an asynchronous
+                function in the main event loop using an idle function.
+            </p></div><div class="refsect2" title="gio.SimpleAsyncResult.get_op_res_gboolean"><a name="method-giosimpleasyncresult--get-op-res-gboolean"></a><h3>gio.SimpleAsyncResult.get_op_res_gboolean</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_op_res_gboolean</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the operation's result was
+                    <code class="literal">True</code>, <code class="literal">False</code> if the operation's result
+                    was <code class="literal">False</code>. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_op_res_gboolean</code>() method gets the operation
+                result boolean from within the asynchronous result.
+            </p></div><div class="refsect2" title="gio.SimpleAsyncResult.get_op_res_gssize"><a name="method-giosimpleasyncresult--get-op-res-gssize"></a><h3>gio.SimpleAsyncResult.get_op_res_gssize</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_op_res_gssize</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a gssize returned from the asynchronous function.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_op_res_gssize</code>() method gets a gssize
+                from the asynchronous result.
+            </p></div><div class="refsect2" title="gio.SimpleAsyncResult.propagate_error"><a name="method-giosimpleasyncresult--propagate-error"></a><h3>gio.SimpleAsyncResult.propagate_error</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">propagate_error</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the error was propegated
+                    to dest. <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">propagate_error</code>() method propagates an error
+                from within the simple asynchronous result to a given destination.
+            </p></div><div class="refsect2" title="gio.SimpleAsyncResult.set_handle_cancellation"><a name="method-giosimpleasyncresult--set-handle-cancellation"></a><h3>gio.SimpleAsyncResult.set_handle_cancellation</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_handle_cancellation</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>handle_cancellation</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>handle_cancellation</code></strong> :</span></p></td><td>a boolean.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">set_handle_cancellation</code>() method sets whether
+                to handle cancellation within the asynchronous operation.
+            </p></div><div class="refsect2" title="gio.SimpleAsyncResult.set_op_res_gboolean"><a name="method-giosimpleasyncresult--set-op-res-gboolean"></a><h3>gio.SimpleAsyncResult.set_op_res_gboolean</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_op_res_gboolean</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>op_res</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>op_res</code></strong> :</span></p></td><td>a boolean.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">set_op_res_gboolean</code>() method sets the operation
+                result to a boolean within the asynchronous result.
+            </p></div><div class="refsect2" title="gio.SimpleAsyncResult.set_op_res_gssize"><a name="method-giosimpleasyncresult--set-op-res-gssize"></a><h3>gio.SimpleAsyncResult.set_op_res_gssize</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_op_res_gssize</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>op_res</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>op_res</code></strong> :</span></p></td><td>a gssize.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">set_op_res_gssize</code>() method sets the operation
+                result within the asynchronous result to the given op_res.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gioseekable.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giothemedicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Seekable </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.ThemedIcon</td></tr></table></div></body></html>
diff --git a/docs/html/class-giothemedicon.html b/docs/html/class-giothemedicon.html
new file mode 100644 (file)
index 0000000..83d24de
--- /dev/null
@@ -0,0 +1,42 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.ThemedIcon</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giosimpleasyncresult.html" title="gio.SimpleAsyncResult"><link rel="next" href="class-giovolume.html" title="gio.Volume"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.ThemedIcon</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giosimpleasyncresult.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giovolume.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.ThemedIcon"><a name="class-giothemedicon"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.ThemedIcon</h2><p>gio.ThemedIcon â€” Icon theming support.</p></div><div class="refsect1" title="Synopsis"><a name="id527988"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.ThemedIcon</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giothemedicon.html#constructor-giothemedicon" title="Constructor">gio.ThemedIcon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giothemedicon.html#method-giothemedicon--append-name" title="gio.ThemedIcon.append_name">append_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giothemedicon.html#method-giothemedicon--get-names" title="gio.ThemedIcon.get_names">get_names</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giothemedicon.html#method-giothemedicon--prepend-name" title="gio.ThemedIcon.prepend_name">prepend_name</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id528097"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon">gio.ThemedIcon</a>
+</pre></div><div class="refsect1" title="gio.ThemedIcon Properties"><a name="properties-giomountoperation"></a><h2>gio.ThemedIcon Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"name"</td><td valign="top">Write/Contruct Only</td><td valign="top">
+                                The icon name. Default value: <code class="literal">None</code>
+                            </td></tr><tr valign="top"><td valign="top">"names"</td><td valign="top">Read/Write/Contruct Only</td><td valign="top">
+                                A list of icon names.
+                            </td></tr><tr valign="top"><td valign="top">"use-default-fallbacks"</td><td valign="top">Read/Write/Contruct Only</td><td valign="top">
+                                Whether to use the default fallbacks found by shortening the
+                                icon name at '-' characters. If the "names" array has more
+                                than one element, ignores any past the first.
+                            </td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id528241"></a><h2>Description</h2><p>
+            <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>
+            is an implementation of <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+            that supports icon themes. GThemedIcon contains a list of all of the icons present in an icon
+            theme, so that icons can be looked up quickly.
+        </p><p>
+            <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>
+            does not provide actual pixmaps for icons, just the icon names. Ideally something like
+            <code class="methodname"><PYGTKDOCLINK HREF="method-gtkicontheme--choose-icon">gtk.IconTheme.choose_icon</PYGTKDOCLINK></code>()
+            should be used to resolve the list of names so that fallback icons work nicely
+            with themes that inherit other themes
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giothemedicon"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.ThemedIcon</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>use_default_fallbacks</code></em></span><span class="initializer">=False</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td><td>a string containing an icon name.
+                </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>.
+                </td></tr></tbody></table><p>
+            Creates a new themed icon from icon name, if instead of an icon name you
+            provide a list of icon names, the <a class="link" href="class-giothemedicon.html" title="gio.ThemedIcon"><code class="classname">gio.ThemedIcon</code></a>
+            will be constructed using the items in the list.
+        </p></div><div class="refsect1" title="Methods"><a name="id528396"></a><h2>Methods</h2><div class="refsect2" title="gio.ThemedIcon.append_name"><a name="method-giothemedicon--append-name"></a><h3>gio.ThemedIcon.append_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">append_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>name</em></span> :</span></p></td><td>name of icon to append to list of icons from within icon.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">append_name</code>() method appends a name to
+                the list of icons from within icon.
+            </p></div><div class="refsect2" title="gio.ThemedIcon.get_names"><a name="method-giothemedicon--get-names"></a><h3>gio.ThemedIcon.get_names</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_names</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of icon names.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_names</code>() method gets the names
+                of icons from within icon.
+            </p></div><div class="refsect2" title="gio.ThemedIcon.prepend_name"><a name="method-giothemedicon--prepend-name"></a><h3>gio.ThemedIcon.prepend_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">prepend_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>name</em></span> :</span></p></td><td>name of icon to prepend to list of icons from within icon.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">prepend_name</code>() method prepends a name to
+                the list of icons from within icon.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giosimpleasyncresult.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giovolume.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.SimpleAsyncResult </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.Volume</td></tr></table></div></body></html>
diff --git a/docs/html/class-giounixinputstream.html b/docs/html/class-giounixinputstream.html
new file mode 100644 (file)
index 0000000..4059661
--- /dev/null
@@ -0,0 +1,37 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.unix.InputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="giounix-class-reference.html" title="PyGio Unix Class Reference"><link rel="prev" href="giounix-class-reference.html" title="PyGio Unix Class Reference"><link rel="next" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.unix.InputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="giounix-class-reference.html">Prev</a> </td><th width="60%" align="center">PyGio Unix Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giounixoutputstream.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.unix.InputStream"><a name="class-giounixinputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.unix.InputStream</h2><p>gio.unix.InputStream â€” Streaming input operations for UNIX file descriptors.</p></div><div class="refsect1" title="Synopsis"><a name="id457436"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.unix.InputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giounixinputstream.html#constructor-giounixinputstream" title="Constructor">gio.unix.InputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giounixinputstream.html#method-giounixinputstream--get-close-fd" title="gio.unix.InputStream.get_close_fd">get_close_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giounixinputstream.html#method-giounixinputstream--get-fd" title="gio.unix.InputStream.get_fd">get_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giounixinputstream.html#method-giounixinputstream--set-close-fd" title="gio.unix.InputStream.set_close_fd">set_close_fd</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id457313"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-gioinputstream.html" title="gio.InputStream">gio.InputStream</a>
+    +-- <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream">gio.unix.InputStream</a>
+</pre></div><div class="refsect1" title="gio.unix.InputStream Properties"><a name="properties-giounixinputstream"></a><h2>gio.unix.InputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"close-fd"</td><td valign="top">Read - Write</td><td valign="top">Whether to close the file descriptor when the stream is closed.
+                           Default value: <code class="literal">True</code>.</td></tr><tr valign="top"><td valign="top">"fd"</td><td valign="top">Read - Write - Construct only</td><td valign="top">The file descriptor that the stream reads from. Default value: -1.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id459369"></a><h2>Description</h2><p>
+            <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream"><code class="classname">gio.unix.InputStream</code></a>
+            implements <a class="link" href="class-gioinputstream.html" title="gio.InputStream"><code class="classname">gio.InputStream</code></a>
+           for reading from a UNIX file descriptor, including asynchronous operations.
+           The file descriptor must be selectable, so it doesn't work with opened files.
+       </p><p>
+           Note that <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream"><code class="classname">gio.unix.InputStream</code></a>
+           belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file
+           when using it.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giounixinputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.unix.InputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td><td>a UNIX file descriptor.
+                </td></tr><tr><td><p><span class="term"><em class="parameter"><code>close_fd</code></em> :</span></p></td><td><code class="literal">True</code>
+               to close the file descriptor when done 
+                </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream"><code class="classname">gio.unix.InputStream</code></a>
+                </td></tr></tbody></table><p>
+            Creates a new <a class="link" href="class-giounixinputstream.html" title="gio.unix.InputStream"><code class="classname">gio.unix.InputStream</code></a>
+            from the given fd.
+        </p><p>
+           If close_fd is <code class="literal">True</code>, the file descriptor will be closed when the stream is closed.
+       </p></div><div class="refsect1" title="Methods"><a name="id460154"></a><h2>Methods</h2><div class="refsect2" title="gio.unix.InputStream.get_close_fd"><a name="method-giounixinputstream--get-close-fd"></a><h3>gio.unix.InputStream.get_close_fd</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_close_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file descriptor is closed when done.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_close_fd</code>() method returns whether the file
+               descriptor of stream will be closed when the stream is closed.
+            </p></div><div class="refsect2" title="gio.unix.InputStream.get_fd"><a name="method-giounixinputstream--get-fd"></a><h3>gio.unix.InputStream.get_fd</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The file descriptor of stream.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_fd</code>() method return the UNIX file descriptor
+               that the stream reads from.
+            </p></div><div class="refsect2" title="gio.unix.InputStream.set_close_fd"><a name="method-giounixinputstream--set-close-fd"></a><h3>gio.unix.InputStream.set_close_fd</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_close_fd</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>close_fd</code></strong> :</span></p></td><td><code class="literal">True</code> to close the file descriptor when done .
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">set_close_fd</code>() method sets whether the file descriptor
+               of stream shall be closed when the stream is closed.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="giounix-class-reference.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="giounix-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giounixoutputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PyGio Unix Class Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.unix.OutputStream</td></tr></table></div></body></html>
diff --git a/docs/html/class-giounixoutputstream.html b/docs/html/class-giounixoutputstream.html
new file mode 100644 (file)
index 0000000..8b9b647
--- /dev/null
@@ -0,0 +1,37 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.unix.OutputStream</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="giounix-class-reference.html" title="PyGio Unix Class Reference"><link rel="prev" href="class-giounixinputstream.html" title="gio.unix.InputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.unix.OutputStream</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giounixinputstream.html">Prev</a> </td><th width="60%" align="center">PyGio Unix Class Reference</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="refentry" title="gio.unix.OutputStream"><a name="class-giounixoutputstream"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.unix.OutputStream</h2><p>gio.unix.OutputStream â€” Streaming output operations for UNIX file descriptors.</p></div><div class="refsect1" title="Synopsis"><a name="id430504"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.unix.OutputStream</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a></span></span>):
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-giounixoutputstream.html#constructor-giounixoutputstream" title="Constructor">gio.unix.OutputStream</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giounixoutputstream.html#method-giounixoutputstream--get-close-fd" title="gio.unix.OutputStream.get_close_fd">get_close_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giounixoutputstream.html#method-giounixoutputstream--get-fd" title="gio.unix.OutputStream.get_fd">get_fd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giounixoutputstream.html#method-giounixoutputstream--set-close-fd" title="gio.unix.OutputStream.set_close_fd">set_close_fd</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id500640"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giooutputstream.html" title="gio.OutputStream">gio.OutputStream</a>
+    +-- <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream">gio.unix.OutputStream</a>
+</pre></div><div class="refsect1" title="gio.unix.OutputStream Properties"><a name="properties-giounixoutputstream"></a><h2>gio.unix.OutputStream Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"close-fd"</td><td valign="top">Read - Write</td><td valign="top">Whether to close the file descriptor when the stream is closed.
+                           Default value: <code class="literal">True</code>.</td></tr><tr valign="top"><td valign="top">"fd"</td><td valign="top">Read - Write - Construct only</td><td valign="top">The file descriptor that the stream writes to. Default value: -1.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id510688"></a><h2>Description</h2><p>
+            <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"><code class="classname">gio.unix.OutputStream</code></a>
+            implements <a class="link" href="class-giooutputstream.html" title="gio.OutputStream"><code class="classname">gio.OutputStream</code></a>
+           for writing to a UNIX file descriptor, including asynchronous operations.
+           The file descriptor must be selectable, so it doesn't work with opened files.
+       </p><p>
+           Note that <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"><code class="classname">gio.unix.OutputStream</code></a>
+           belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file
+           when using it.
+        </p></div><div class="refsect1" title="Constructor"><a name="constructor-giounixoutputstream"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.unix.OutputStream</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>fd</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td><td>a UNIX file descriptor.
+                </td></tr><tr><td><p><span class="term"><em class="parameter"><code>close_fd</code></em> :</span></p></td><td><code class="literal">True</code>
+               to close the file descriptor when done 
+                </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
+                <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"><code class="classname">gio.unix.OutputStream</code></a>
+                </td></tr></tbody></table><p>
+            Creates a new <a class="link" href="class-giounixoutputstream.html" title="gio.unix.OutputStream"><code class="classname">gio.unix.OutputStream</code></a>
+            from the given fd.
+        </p><p>
+           If close_fd is <code class="literal">True</code>, the file descriptor will be closed when the stream is closed.
+       </p></div><div class="refsect1" title="Methods"><a name="id461727"></a><h2>Methods</h2><div class="refsect2" title="gio.unix.OutputStream.get_close_fd"><a name="method-giounixoutputstream--get-close-fd"></a><h3>gio.unix.OutputStream.get_close_fd</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_close_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file descriptor is closed when done.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_close_fd</code>() method returns whether the file
+               descriptor of stream will be closed when the stream is closed.
+            </p></div><div class="refsect2" title="gio.unix.OutputStream.get_fd"><a name="method-giounixoutputstream--get-fd"></a><h3>gio.unix.OutputStream.get_fd</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_fd</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The file descriptor of stream.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_fd</code>() method return the UNIX file descriptor
+               that the stream reads from.
+            </p></div><div class="refsect2" title="gio.unix.OutputStream.set_close_fd"><a name="method-giounixoutputstream--set-close-fd"></a><h3>gio.unix.OutputStream.set_close_fd</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_close_fd</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>close_fd</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>close_fd</code></strong> :</span></p></td><td><code class="literal">True</code> to close the file descriptor when done .
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">set_close_fd</code>() method sets whether the file descriptor
+               of stream shall be closed when the stream is closed.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giounixinputstream.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="giounix-class-reference.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">gio.unix.InputStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
diff --git a/docs/html/class-giovolume.html b/docs/html/class-giovolume.html
new file mode 100644 (file)
index 0000000..ff6512a
--- /dev/null
@@ -0,0 +1,176 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Volume</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giothemedicon.html" title="gio.ThemedIcon"><link rel="next" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.Volume</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giothemedicon.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-giovolumemonitor.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Volume"><a name="class-giovolume"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Volume</h2><p>gio.Volume â€” Volume management.</p></div><div class="refsect1" title="Synopsis"><a name="id528601"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Volume</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--can-eject" title="gio.Volume.can_eject">can_eject</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--can-mount" title="gio.Volume.can_mount">can_mount</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--eject" title="gio.Volume.eject">eject</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--eject-finish" title="gio.Volume.eject_finish">eject_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--enumerate-identifiers" title="gio.Volume.enumerate_identifiers">enumerate_identifiers</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-activation-root" title="gio.Volume.get_activation_root">get_activation_root</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-drive" title="gio.Volume.get_drive">get_drive</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-icon" title="gio.Volume.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-identifier" title="gio.Volume.get_identifier">get_identifier</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-mount" title="gio.Volume.get_mount">get_mount</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-name" title="gio.Volume.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-uuid" title="gio.Volume.get_uuid">get_uuid</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount" title="gio.Volume.mount">mount</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_MOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount-finish" title="gio.Volume.mount_finish">mount_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--should-automount" title="gio.Volume.should_automount">should_automount</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id529090"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+  +-- <a class="link" href="class-giovolume.html" title="gio.Volume">gio.Volume</a>
+</pre></div><div class="refsect1" title="Prerequisites"><a name="id529116"></a><h2>Prerequisites</h2><p>
+            <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a> requires
+            <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+        </p></div><div class="refsect1" title="gio.Volume Signal Prototypes"><a name="signal-prototypes-giovolume"></a><h2>gio.Volume Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><a class="link" href="class-giovolume.html#signal-giovolume--changed" title='The "changed" gio.Volume Signal'>"changed"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolume.html#signal-giovolume--removed" title='The "removed" gio.Volume Signal'>"removed"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id529280"></a><h2>Description</h2><p>
+            The <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+            interface represents user-visible objects that can be mounted. Note, when porting
+            from GnomeVFS, <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+            is the moral equivalent of GnomeVFSDrive. 
+        </p><p>
+            Mounting a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+            instance is an asynchronous operation. For more information about asynchronous operations.
+            To mount a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>, first call
+            <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount" title="gio.Volume.mount">gio.Volume.mount</a></code>()
+            with (at least) the <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+            instance, optionally a
+            <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+            object and a GAsyncReadyCallback. 
+        </p><p>
+            Typically, one will only want to pass <code class="literal">None</code> for the GMountOperation
+            if automounting all volumes when a desktop session starts since it's not desirable
+            to put up a lot of dialogs asking for credentials. 
+        </p><p>
+            The callback will be fired when the operation has resolved (either with success or failure),
+            and a GAsyncReady structure will be passed to the callback. That callback should then call
+            <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount-finish" title="gio.Volume.mount_finish">gio.Volume.mount_finish</a></code>()
+            with the GVolume instance and the GAsyncReady data to see if the operation was completed
+            successfully. If an error is present when
+            <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount-finish" title="gio.Volume.mount_finish">gio.Volume.mount_finish</a></code>()
+            is called, then it will be filled with any error information. 
+        </p><p>
+            It is sometimes necessary to directly access the underlying operating system object behind a volume
+            (e.g. for passing a volume to an application via the commandline). For this purpose, GIO allows to obtain
+            an 'identifier' for the volume. There can be different kinds of identifiers, such as Hal UDIs,
+            filesystem labels, traditional Unix devices (e.g. /dev/sda2), uuids. GIO uses predefind strings
+            as names for the different kinds of identifiers:
+            "hal-udi", "label", etc. Use
+            <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-identifier" title="gio.Volume.get_identifier">gio.Volume.get_identifier</a></code>()
+            to obtain an identifier for a volume. 
+        </p></div><div class="refsect1" title="Methods"><a name="id529397"></a><h2>Methods</h2><div class="refsect2" title="gio.Volume.can_eject"><a name="method-giovolume--can-eject"></a><h3>gio.Volume.can_eject</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">can_eject</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume can be ejected,
+                    <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">can_eject</code>() method checks if a volume can be ejected.
+            </p></div><div class="refsect2" title="gio.Volume.can_mount"><a name="method-giovolume--can-mount"></a><h3>gio.Volume.can_mount</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">can_mount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume can be mounted
+                    for media changes, <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">can_mount</code>() method checks if a volume
+                can be mounted.
+            </p></div><div class="refsect2" title="gio.Volume.eject"><a name="method-giovolume--eject"></a><h3>gio.Volume.eject</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">eject</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_UNMOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags affecting the unmount if required for eject.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+                  <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                  object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">eject</code>() method asynchronously ejects a volume. 
+            </p><p>
+                When the operation is finished, callback will be called. You can then call
+                <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--eject-finish" title="gio.Volume.eject_finish">gio.Volume.eject_finish</a></code>()
+                to obtain the result of the operation.
+            </p></div><div class="refsect2" title="gio.Volume.eject_finish"><a name="method-giovolume--eject-finish"></a><h3>gio.Volume.eject_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">eject_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume has been ejected
+                    successfully, <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">eject_finish</code>() method finishes ejecting a volume.
+                If any errors occured during the operation, error will be set to contain the
+                errors and <code class="literal">False</code> will be returned.
+            </p></div><div class="refsect2" title="gio.Volume.enumerate_identifiers"><a name="method-giovolume--enumerate-identifiers"></a><h3>gio.Volume.enumerate_identifiers</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">enumerate_identifiers</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of strings containing kinds of identifiers.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">enumerate_identifiers</code>() method gets the kinds
+                of identifiers that volume has. Use
+                <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-identifier" title="gio.Volume.get_identifier">gio.Volume.get_identifier</a></code>()
+                to obtain the identifiers themselves.
+            </p></div><div class="refsect2" title="gio.Volume.get_activation_root"><a name="method-giovolume--get-activation-root"></a><h3>gio.Volume.get_activation_root</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_activation_root</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the activation root of volume or <code class="literal">None</code>.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_activation_root</code>() method gets the activation
+                root for a <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                if it is known ahead of mount time. Returns <code class="literal">None</code> otherwise.
+                If not <code class="literal">None</code> and if volume is mounted, then the result of
+                <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-root" title="gio.Mount.get_root">gio.Mount.get_root</a></code>()
+                on the GMount object obtained from
+                <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-mount" title="gio.Volume.get_mount">gio.Volume.get_mount</a></code>()
+                will always either be equal or a prefix of what this function returns.
+                In other words, in code:
+            </p><pre class="programlisting">
+mount = volume.get_mount() # mounted, so never None
+mount_root = mount.get_root()
+volume_activation_root = volume.get_activation_root() # assume not None
+</pre><p>
+                then the expression
+            </p><pre class="programlisting">
+volume_activation_root.has_prefix(mount_root) || volume_activation_root.equal(mount_root)
+</pre><p>
+                will always be <code class="literal">True</code>.
+            </p><p>
+                Activation roots are typically used in
+                <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+                implementations to find the underlying mount to shadow, see
+                <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--is-shadowed" title="gio.Mount.is_shadowed">gio.Mount.is_shadowed</a></code>()
+                for more details.
+            </p></div><div class="refsect2" title="gio.Volume.get_drive"><a name="method-giovolume--get-drive"></a><h3>gio.Volume.get_drive</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_drive</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a>
+                    or <code class="literal">None</code> if volume is not associated with a drive.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_drive</code>() method gets the drive for the volume.
+            </p></div><div class="refsect2" title="gio.Volume.get_icon"><a name="method-giovolume--get-icon"></a><h3>gio.Volume.get_icon</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_icon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+                    for the volume.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_icon</code>() method gets the icon for volume.
+            </p></div><div class="refsect2" title="gio.Volume.get_identifier"><a name="method-giovolume--get-identifier"></a><h3>gio.Volume.get_identifier</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_identifier</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing the requested identfier, or
+                    <code class="literal">None</code> if the
+                    <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                    doesn't have this kind of identifier. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_identifier</code>() method gets the identifier of
+                the given kind for volume.
+            </p></div><div class="refsect2" title="gio.Volume.get_mount"><a name="method-giovolume--get-mount"></a><h3>gio.Volume.get_mount</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_mount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A 
+                    <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+                    or <code class="literal">None</code> if volume isn't mounted.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_mount</code>() method gets the mount for the volume.
+            </p></div><div class="refsect2" title="gio.Volume.get_name"><a name="method-giovolume--get-name"></a><h3>gio.Volume.get_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A string containing volume's name.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_name</code>() method gets the name of volume.
+            </p></div><div class="refsect2" title="gio.Volume.get_uuid"><a name="method-giovolume--get-uuid"></a><h3>gio.Volume.get_uuid</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_uuid</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the UUID for volume or <code class="literal">None</code>
+                    if no UUID can be computed.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_uuid</code>() method gets the UUID for the volume.
+                The reference is typically based on the file system UUID for the volume in
+                question and should be considered an opaque string.
+                Returns <code class="literal">None</code> if there is no UUID available.
+            </p></div><div class="refsect2" title="gio.Volume.mount"><a name="method-giovolume--mount"></a><h3>gio.Volume.mount</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">mount</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mount_operation</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>callback</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=gio.MOUNT_MOUNT_NONE</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cancellable</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>mount_operation</code></strong> :</span></p></td><td>A
+                  <a class="link" href="class-giomountoperation.html" title="gio.MountOperation"><code class="classname">gio.MountOperation</code></a>
+                  or <code class="literal">None</code> to avoid user interaction. 
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>callback</code></strong> :</span></p></td><td>A GAsyncReadyCallback to call when the request is satisfied.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>Flags affecting the operation 
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cancellable</code></strong> :</span></p></td><td>Optional
+                  <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>
+                  object, <code class="literal">None</code> to ignore.
+                  </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>The data to pass to callback function.
+                  </td></tr></tbody></table><p>
+                The <code class="methodname">mount</code>() method mounts a volume. This is an
+                asynchronous operation, and is finished by calling
+                <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--mount-finish" title="gio.Volume.mount_finish">gio.Volume.mount_finish</a></code>()
+                with the volume and GAsyncResult returned in the callback.
+            </p></div><div class="refsect2" title="gio.Volume.mount_finish"><a name="method-giovolume--mount-finish"></a><h3>gio.Volume.mount_finish</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">mount_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>a <a class="link" href="class-gioasyncresult.html" title="gio.AsyncResult"><code class="classname">gio.AsyncResult</code></a>.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume has been mounted
+                    successfully, <code class="literal">False</code> otherwise.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">mounted</code>() method finishes mounting a volume.
+                If any errors occured during the operation, error will be set to contain
+                the errors and <code class="literal">False</code> will be returned. 
+            </p><p>
+                If the mount operation succeeded,
+                <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-mount" title="gio.Volume.get_mount">get_mount</a></code>()
+                on volume is guaranteed to return the mount right after calling this function;
+                there's no need to listen for the 'mount-added' signal on
+                <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>.
+            </p></div><div class="refsect2" title="gio.Volume.should_automount"><a name="method-giovolume--should-automount"></a><h3>gio.Volume.should_automount</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">should_automount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the volume should
+                    be automatically mounted. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">should_automount</code>() method returns whether
+                the volume should be automatically mounted.
+            </p></div></div><div class="refsect1" title="Signals"><a name="id530955"></a><h2>Signals</h2><div class="refsect2" title='The "changed" gio.Volume Signal'><a name="signal-giovolume--changed"></a><h3>The "changed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>the volume</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted when the volume has been changed.
+            </p></div><div class="refsect2" title='The "removed" gio.Volume Signal'><a name="signal-giovolume--removed"></a><h3>The "removed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>the volume</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                This signal is emitted when the
+                <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                have been removed. If the recipient is holding references to the object
+                they should release them so the object can be finalized.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giothemedicon.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-giovolumemonitor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.ThemedIcon </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.VolumeMonitor</td></tr></table></div></body></html>
diff --git a/docs/html/class-giovolumemonitor.html b/docs/html/class-giovolumemonitor.html
new file mode 100644 (file)
index 0000000..bd59ccc
--- /dev/null
@@ -0,0 +1,135 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.VolumeMonitor</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giovolume.html" title="gio.Volume"><link rel="next" href="gio-functions.html" title="gio Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio.VolumeMonitor</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giovolume.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gio-functions.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.VolumeMonitor"><a name="class-giovolumemonitor"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.VolumeMonitor</h2><p>gio.VolumeMonitor â€” Volume Monitor.</p></div><div class="refsect1" title="Synopsis"><a name="id531245"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.VolumeMonitor</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-connected-drives" title="gio.VolumeMonitor.get_connected_drives">get_connected_drives</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-mount-for-uuid" title="gio.VolumeMonitor.get_mount_for_uuid">get_mount_for_uuid</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uuid</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-mounts" title="gio.VolumeMonitor.get_mounts">get_mounts</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-volume-for-uuid" title="gio.VolumeMonitor.get_volume_for_uuid">get_volume_for_uuid</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uuid</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#method-giovolumemonitor--get-volumes" title="gio.VolumeMonitor.get_volumes">get_volumes</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
+<span class="bold"><strong>Functions</strong></span>
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#function-gio--volume-monitor-adopt-orphan-mount" title="gio.volume_monitor_adopt_orphan_mount">gio.volume_monitor_adopt_orphan_mount</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-giovolumemonitor.html#function-gio--volume-monitor-get" title="gio.volume_monitor_get">gio.volume_monitor_get</a></span>(<span class="methodparam"></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id531439"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+  +-- <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor">gio.VolumeMonitor</a>
+</pre></div><div class="refsect1" title="gio.VolumeMonitor Signal Prototypes"><a name="signal-prototypes-giovolumemonitor"></a><h2>gio.VolumeMonitor Signal Prototypes</h2><p><a class="link" href="class-gobject.html#signal-prototypes-gobject" title="gobject.GObject Signal Prototypes">gobject.GObject Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--drive-changed" title='The "drive-changed" gio.Volume Signal'>"drive-changed"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--drive-connected" title='The "drive-connected" gio.Volume Signal'>"drive-connected"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--drive-disconnected" title='The "drive-disconnected" gio.Volume Signal'>"drive-disconnected"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--drive-eject-button" title='The "drive-eject-button" gio.Volume Signal'>"drive-eject-button"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--mount-added" title='The "mount-added" gio.Volume Signal'>"mount-added"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--mount-changed" title='The "mount-changed" gio.Volume Signal'>"mount-changed"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--mount-pre-unmount" title='The "mount-pre-unmount" gio.Volume Signal'>"mount-pre-unmount"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--mount-removed" title='The "mount-removed" gio.Volume Signal'>"mount-removed"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--volume-added" title='The "volume-added" gio.Volume Signal'>"volume-added"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--volume-changed" title='The "volume-changed" gio.Volume Signal'>"volume-changed"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-giovolumemonitor.html#signal-giovolumemonitor--volume-removed" title='The "volume-removed" gio.Volume Signal'>"volume-removed"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id532257"></a><h2>Description</h2><p>
+            The <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+            is for listing the user interesting devices and volumes on the computer. In other words,
+            what a file selector or file manager would show in a sidebar.
+        </p></div><div class="refsect1" title="Methods"><a name="id532277"></a><h2>Methods</h2><div class="refsect2" title="gio.VolumeMonitor.get_connected_drives"><a name="method-giovolumemonitor--get-connected-drives"></a><h3>gio.VolumeMonitor.get_connected_drives</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_connected_drives</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of connected
+                    <a class="link" href="class-giodrive.html" title="gio.Drive"><code class="classname">gio.Drive</code></a> objects. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_connected_drives</code>() method gets a list
+                of drives connected to the system. 
+            </p></div><div class="refsect2" title="gio.VolumeMonitor.get_mount_for_uuid"><a name="method-giovolumemonitor--get-mount-for-uuid"></a><h3>gio.VolumeMonitor.get_mount_for_uuid</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_mount_for_uuid</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uuid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>uuid</code></strong> :</span></p></td><td>The UUID to look for.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
+                    <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+                    or <code class="literal">None</code> if no such mount is available.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_mount_for_uuid</code>() method finds a
+                <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+                object by it's UUID (see
+                <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-uuid" title="gio.Mount.get_uuid">gio.Mount.get_uuid</a></code>())
+            </p></div><div class="refsect2" title="gio.VolumeMonitor.get_mounts"><a name="method-giovolumemonitor--get-mounts"></a><h3>gio.VolumeMonitor.get_mounts</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_mounts</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of
+                    <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+                    objects.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_mounts</code>() method gets a list of the mounts on the system.
+            </p></div><div class="refsect2" title="gio.VolumeMonitor.get_volume_for_uuid"><a name="method-giovolumemonitor--get-volume-for-uuid"></a><h3>gio.VolumeMonitor.get_volume_for_uuid</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_volume_for_uuid</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>uuid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>uuid</code></strong> :</span></p></td><td>The UUID to look for.
+                  </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A
+                    <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                    or <code class="literal">None</code> if no such volume is available.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_mount_for_uuid</code>() method finds a
+                <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+                object by it's UUID (see
+                <code class="methodname"><a class="link" href="class-giomount.html#method-giomount--get-uuid" title="gio.Mount.get_uuid">gio.Mount.get_uuid</a></code>())
+            </p></div><div class="refsect2" title="gio.VolumeMonitor.get_volumes"><a name="method-giovolumemonitor--get-volumes"></a><h3>gio.VolumeMonitor.get_volumes</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_volumes</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of
+                    <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                    objects.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">get_volumes</code>() method gets a list of the volumes on the system.
+            </p></div></div><div class="refsect1" title="Functions"><a name="id532706"></a><h2>Functions</h2><div class="refsect2" title="gio.volume_monitor_adopt_orphan_mount"><a name="function-gio--volume-monitor-adopt-orphan-mount"></a><h3>gio.volume_monitor_adopt_orphan_mount</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">volume_monitor_adopt_orphan_mount</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                    object that is the parent for mount or <code class="literal">None</code> if no wants to adopt the
+                    <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>.
+                    </td></tr></tbody></table><div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method will be deprecated starting from GIO 2.20</p></div><p>
+                The <code class="methodname">volume_monitor_adopt_orphan_mount</code>() function should
+                be called by any <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+                implementation when a new <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+                object is created that is not associated with a
+                <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a> object.
+                It must be called just before emitting the mount_added signal.
+            </p><p>
+                If the return value is not <code class="literal">None</code>, the caller must associate the returned
+                <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                object with the
+                <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>.
+                This involves returning it in it's
+                <code class="methodname"><PYGTKDOCLINK HREF="method-giomount--get-volumes">gio.Mount.get_volumes</PYGTKDOCLINK></code>()
+                implementation. The caller must also listen for the "removed" signal on the
+                returned object and give up it's reference when handling that signal 
+            </p><p>
+                Similary, if implementing
+                <code class="methodname"><a class="link" href="class-giovolumemonitor.html#function-gio--volume-monitor-adopt-orphan-mount" title="gio.volume_monitor_adopt_orphan_mount">gio.volume_monitor_adopt_orphan_mount</a></code>(),
+                the implementor must take a reference to mount and return it in it's
+                <code class="methodname"><a class="link" href="class-giovolume.html#method-giovolume--get-mount" title="gio.Volume.get_mount">gio.Volume.get_mount</a></code>()
+                implemented. Also, the implementor must listen for the "unmounted" signal
+                on mount and give up it's reference upon handling that signal. 
+            </p><p>
+                There are two main use cases for this function. 
+            </p><p>
+                One is when implementing a user space file system driver that reads blocks of
+                a block device that is already represented by the native volume monitor
+                (for example a CD Audio file system driver). Such a driver will generate it's own
+                <a class="link" href="class-giomount.html" title="gio.Mount"><code class="classname">gio.Mount</code></a>
+                object that needs to be assoicated with the
+                <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                object that represents the volume. 
+            </p><p>
+                The other is for implementing a
+                <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+                whose sole purpose is to return
+                <a class="link" href="class-giovolume.html" title="gio.Volume"><code class="classname">gio.Volume</code></a>
+                objects representing entries in the users "favorite servers" list or similar.
+            </p></div><div class="refsect2" title="gio.volume_monitor_get"><a name="function-gio--volume-monitor-get"></a><h3>gio.volume_monitor_get</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">volume_monitor_get</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A reference to the
+                    <a class="link" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><code class="classname">gio.VolumeMonitor</code></a>
+                    used by gio.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">volume_monitor_get</code>() function gets the
+                volume monitor used by gio.
+            </p></div></div><div class="refsect1" title="Signals"><a name="id532987"></a><h2>Signals</h2><div class="refsect2" title='The "drive-changed" gio.Volume Signal'><a name="signal-giovolumemonitor--drive-changed"></a><h3>The "drive-changed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td><td>the drive that changed</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted when a drive changes.
+            </p></div><div class="refsect2" title='The "drive-connected" gio.Volume Signal'><a name="signal-giovolumemonitor--drive-connected"></a><h3>The "drive-connected" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td><td>the drive that was connected</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted when a drive is connected to the system.
+            </p></div><div class="refsect2" title='The "drive-disconnected" gio.Volume Signal'><a name="signal-giovolumemonitor--drive-disconnected"></a><h3>The "drive-disconnected" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td><td>the drive that was disconnected</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted when a drive is disconnected from the system.
+            </p></div><div class="refsect2" title='The "drive-eject-button" gio.Volume Signal'><a name="signal-giovolumemonitor--drive-eject-button"></a><h3>The "drive-eject-button" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>drive</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td><td>the drive where the eject button was pressed</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted when the eject button is pressed on drive.
+            </p></div><div class="refsect2" title='The "mount-added" gio.Volume Signal'><a name="signal-giovolumemonitor--mount-added"></a><h3>The "mount-added" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>a Mount that was added.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted when a mount is added.
+            </p></div><div class="refsect2" title='The "mount-changed" gio.Volume Signal'><a name="signal-giovolumemonitor--mount-changed"></a><h3>The "mount-changed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the Mount that changed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted when a mount changes.
+            </p></div><div class="refsect2" title='The "mount-pre-unmount" gio.Volume Signal'><a name="signal-giovolumemonitor--mount-pre-unmount"></a><h3>The "mount-pre-unmount" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the Mount that is being unmounted.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted when a mount is about to be removed.
+            </p></div><div class="refsect2" title='The "mount-removed" gio.Volume Signal'><a name="signal-giovolumemonitor--mount-removed"></a><h3>The "mount-removed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>mount</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mount</code></em> :</span></p></td><td>the Mount that was removed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted when a mount is removed.
+            </p></div><div class="refsect2" title='The "volume-added" gio.Volume Signal'><a name="signal-giovolumemonitor--volume-added"></a><h3>The "volume-added" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>a Volume that was added.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted when a mountable volume is added to the system.
+            </p></div><div class="refsect2" title='The "volume-changed" gio.Volume Signal'><a name="signal-giovolumemonitor--volume-changed"></a><h3>The "volume-changed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>a Volume that changed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted when mountable volume is changed.
+            </p></div><div class="refsect2" title='The "volume-removed" gio.Volume Signal'><a name="signal-giovolumemonitor--volume-removed"></a><h3>The "volume-removed" gio.Volume Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>volume_monitor</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>volume</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td><td>the volume monitor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td><td>a Volume that was removed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+                    with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+                    method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
+                Emitted when a mountable volume is removed from the system.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giovolume.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gio-functions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Volume </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio Functions</td></tr></table></div></body></html>
diff --git a/docs/html/class-glibmaincontext.html b/docs/html/class-glibmaincontext.html
new file mode 100644 (file)
index 0000000..9f815f6
--- /dev/null
@@ -0,0 +1,29 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib.MainContext</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="next" href="class-glibmainloop.html" title="glib.MainLoop"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib.MainContext</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glib-class-reference.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-glibmainloop.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib.MainContext"><a name="class-glibmaincontext"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib.MainContext</h2><p>glib.MainContext â€” an object representing a set of event sources to be handled
+in a <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>.</p></div><div class="refsect1" title="Synopsis"><a name="id392555"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">glib.MainContext</span></span>:
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-glibmaincontext.html#constructor-glibmaincontext" title="Constructor">glib.MainContext</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-glibmaincontext.html#method-glibmaincontext--iteration" title="glib.MainContext.iteration">iteration</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>may_block</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-glibmaincontext.html#method-glibmaincontext--pending" title="glib.MainContext.pending">pending</a></span>()</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id392487"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-glibmaincontext.html" title="glib.MainContext">glib.MainContext</a>
+</pre></div><div class="refsect1" title="Description"><a name="id392470"></a><h2>Description</h2><p>A <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+represents a set of event sources that can be run in a single thread. File
+descriptors (plain files, pipes or sockets) and timeouts are the standard
+event sources for <code class="literal">GTK</code> and <code class="literal">PyGTK</code> though
+others can be added. Each event source is assigned a priority. The default
+priority, <code class="literal">glib.PRIORITY_DEFAULT</code>, is 0. Values less
+than 0 denote higher priorities. Values greater than 0 denote lower
+priorities. Events from high priority sources are always processed before
+events from lower priority sources. Single iterations of a <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+can be run with the <a class="link" href="class-glibmaincontext.html#method-glibmaincontext--iteration" title="glib.MainContext.iteration"><code class="methodname">iteration</code>()</a>
+method.</p></div><div class="refsect1" title="Constructor"><a name="constructor-glibmaincontext"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">glib.MainContext</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+        object.</td></tr></tbody></table><p>Creates a new <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+object.</p></div><div class="refsect1" title="Methods"><a name="id392378"></a><h2>Methods</h2><div class="refsect2" title="glib.MainContext.iteration"><a name="method-glibmaincontext--iteration"></a><h3>glib.MainContext.iteration</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">iteration</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>may_block</code></em> :</span></p></td><td>if <code class="literal">True</code> the call may block
+         waiting for an event.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if events were
+         dispatched.</td></tr></tbody></table><p>The <code class="methodname">iteration</code>() method runs a single
+iteration. This involves:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">checking to see if any associated event sources are ready
+to be processed;</li><li class="listitem">then if no events sources are ready and
+<em class="parameter"><code>may_block</code></em> is <code class="literal">True</code>, waiting for a
+source to become ready;</li><li class="listitem">and finally, dispatching the highest priority events
+sources that are ready</li></ul></div><p>Note that even when <em class="parameter"><code>may_block</code></em> is
+<code class="literal">True</code>, it is still possible for
+<code class="methodname">iteration</code>() to return <code class="literal">False</code>,
+since the the wait may be interrupted for other reasons than an event source
+becoming ready.</p></div><div class="refsect2" title="glib.MainContext.pending"><a name="method-glibmaincontext--pending"></a><h3>glib.MainContext.pending</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">pending</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if events are
+         pending.</td></tr></tbody></table><p>The <code class="methodname">pending</code>() method checks if any
+associated sources have pending events.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glib-class-reference.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="glib-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-glibmainloop.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PyGlibClass Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> glib.MainLoop</td></tr></table></div></body></html>
diff --git a/docs/html/class-glibmainloop.html b/docs/html/class-glibmainloop.html
new file mode 100644 (file)
index 0000000..f5ba208
--- /dev/null
@@ -0,0 +1,38 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib.MainLoop</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="class-glibmaincontext.html" title="glib.MainContext"><link rel="next" href="glib-functions.html" title="glib Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib.MainLoop</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-glibmaincontext.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="glib-functions.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib.MainLoop"><a name="class-glibmainloop"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib.MainLoop</h2><p>glib.MainLoop â€” an object representing the main event loop of a PyGTK
+    application.</p></div><div class="refsect1" title="Synopsis"><a name="id394804"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">glib.MainLoop</span></span>:
+<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-glibmainloop.html#constructor-glibmainloop" title="Constructor">glib.MainLoop</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>context</code></em></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>is_running</code></em></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-glibmainloop.html#method-glibmainloop--get-context" title="glib.MainLoop.get_context">get_context</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-glibmainloop.html#method-glibmainloop--is-running" title="glib.MainLoop.is_running">is_running</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-glibmainloop.html#method-glibmainloop--quit" title="glib.MainLoop.quit">quit</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run">run</a></span>()</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id395291"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-glibmainloop.html" title="glib.MainLoop">glib.MainLoop</a>
+</pre></div><div class="refsect1" title="Description"><a name="id394716"></a><h2>Description</h2><p><a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>
+represents a main event loop. A <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>
+is created with the <a class="link" href="class-glibmainloop.html#constructor-glibmainloop" title="Constructor">glib.MainLoop</a>()
+constructor. After adding the initial event sources, the <a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run"><code class="methodname">run</code>()</a>
+method is called. This continuously checks for new events from each of the
+event sources and dispatches them. Finally, the processing of an event from
+one of the sources leads to a call to the <a class="link" href="class-glibmainloop.html#method-glibmainloop--quit" title="glib.MainLoop.quit"><code class="methodname">quit</code>()</a>
+method to exit the main loop, and the <a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run"><code class="methodname">run</code>()</a>
+method returns.</p><p>It is possible to create new instances of <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>
+recursively. This is often used in <code class="literal">PyGTK</code> applications
+when showing modal dialog boxes. Note that event sources are associated with
+a particular <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>,
+and will be checked and dispatched for all main loops associated with that
+<a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>.</p><p><code class="literal">PyGTK</code> contains wrappers of some of these
+functions, e.g. the <PYGTKDOCLINK HREF="function-gtk--main"><code class="function">gtk.main</code>()</PYGTKDOCLINK>, <PYGTKDOCLINK HREF="function-gtk--main-quit"><code class="function">gtk.main_quit</code>()</PYGTKDOCLINK>
+and <PYGTKDOCLINK HREF="function-gtk--events-pending"><code class="function">gtk.events_pending</code>()</PYGTKDOCLINK>
+functions.</p></div><div class="refsect1" title="Constructor"><a name="constructor-glibmainloop"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">glib.MainLoop</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>context</code></em></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>is_running</code></em></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td><td>a <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+       or <code class="literal">None</code> to use the default
+       context.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>is_running</code></em> :</span></p></td><td>if <code class="literal">True</code> indicates that the
+       loop is running. This is not very important since calling the <a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run"><code class="methodname">run</code>()</a>
+       method will set this to <code class="literal">True</code>
+       anyway.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>
+       object.</td></tr></tbody></table><p>Creates a new <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>
+object.</p></div><div class="refsect1" title="Methods"><a name="id385752"></a><h2>Methods</h2><div class="refsect2" title="glib.MainLoop.get_context"><a name="method-glibmainloop--get-context"></a><h3>glib.MainLoop.get_context</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_context</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+         the mainloop is associated with</td></tr></tbody></table><p>The <code class="methodname">get_context</code>() method returns the
+<a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>
+that the mainloop was created with.</p></div><div class="refsect2" title="glib.MainLoop.is_running"><a name="method-glibmainloop--is-running"></a><h3>glib.MainLoop.is_running</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">is_running</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the mainloop is
+         currently being run.</td></tr></tbody></table><p>The <code class="methodname">is_running</code>() method checks to see
+if the mainloop is currently being run via the <a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run"><code class="methodname">run</code>()</a>
+method.</p></div><div class="refsect2" title="glib.MainLoop.quit"><a name="method-glibmainloop--quit"></a><h3>glib.MainLoop.quit</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">quit</span>()</code></pre><p>The <code class="methodname">quit</code>() method stops the mainloop
+from running. Any subsequent calls to the <a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run"><code class="methodname">run</code>()</a>
+method will return immediately.</p></div><div class="refsect2" title="glib.MainLoop.run"><a name="method-glibmainloop--run"></a><h3>glib.MainLoop.run</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">run</span>()</code></pre><p>The <code class="methodname">run</code>() method runs a mainloop until
+the <a class="link" href="class-glibmainloop.html#method-glibmainloop--quit" title="glib.MainLoop.quit"><code class="methodname">quit</code>()</a>
+method is called. If this is called for the thread of the loop's <a class="link" href="class-glibmaincontext.html" title="glib.MainContext"><code class="classname">glib.MainContext</code></a>,
+it will process events from the loop, otherwise it will simply wait.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-glibmaincontext.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="glib-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="glib-functions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glib.MainContext </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> glib Functions</td></tr></table></div></body></html>
diff --git a/docs/html/class-gobject.html b/docs/html/class-gobject.html
new file mode 100644 (file)
index 0000000..1a71df7
--- /dev/null
@@ -0,0 +1,176 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GObject</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="next" href="class-gobjectgboxed.html" title="gobject.GBoxed"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GObject</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gobject-class-reference.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gobjectgboxed.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GObject"><a name="class-gobject"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">gobject.GObject</span></h2><p>gobject.GObject â€” the base class</p></div><div class="refsect1" title="Synopsis"><a name="id438474"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gobject.GObject</span></span>:
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--get-property" title="gobject.GObject.get_property">get_property</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--get-properties" title="gobject.GObject.get_properties">get_properties</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>first_property_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--set-property" title="gobject.GObject.set_property">set_property</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>value</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--set-properties" title="gobject.GObject.set_properties">set_properties</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span><span class="initializer">=value</span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--freeze-notify" title="gobject.GObject.freeze_notify">freeze_notify</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--notify" title="gobject.GObject.notify">notify</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--thaw-notify" title="gobject.GObject.thaw_notify">thaw_notify</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--get-data" title="gobject.GObject.get_data">get_data</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>key</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--set-data" title="gobject.GObject.set_data">set_data</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>key</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>data</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect">connect</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--connect-after" title="gobject.GObject.connect_after">connect_after</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--connect-object" title="gobject.GObject.connect_object">connect_object</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--connect-object-after" title="gobject.GObject.connect_object_after">connect_object_after</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--disconnect" title="gobject.GObject.disconnect">disconnect</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-disconnect" title="gobject.GObject.handler_disconnect">handler_disconnect</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-is-connected" title="gobject.GObject.handler_is_connected">handler_is_connected</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-block" title="gobject.GObject.handler_block">handler_block</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-unblock" title="gobject.GObject.handler_unblock">handler_unblock</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-block-by-func" title="gobject.GObject.handler_block_by_func">handler_block_by_func</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callable</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--handler-unblock-by-func" title="gobject.GObject.handler_unblock_by_func">handler_unblock_by_func</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callable</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--emit" title="gobject.GObject.emit">emit</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--stop-emission" title="gobject.GObject.stop_emission">stop_emission</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--emit-stop-by-name" title="gobject.GObject.emit_stop_by_name">emit_stop_by_name</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobject.html#method-gobject--chain" title="gobject.GObject.chain">chain</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id360340"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+</pre></div><div class="refsect1" title="Attributes"><a name="id360346"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"props"</td><td valign="top">Read/Write</td><td valign="top">
+              <p>This attribute gives full access to GObject properties as
+                  simple attributes. It can be used to iterate over all the object
+                  properties, and can be used both on class or instance objects.</p>
+              <p>Examples:</p>
+              <pre class="programlisting">
+button = Button()
+button_label = button.props.label
+button.props.label = 'Click on this fancy button'
+for pspec in button.props:
+    print pspec
+    print button.get_property(pspec.name)
+label_pspec = Button.props.label
+button_label = button.get_property(label_pspec.name)
+              </pre>
+            </td></tr><tr valign="top"><td valign="top">"__doc__"</td><td valign="top">Read</td><td valign="top">The documentation for the object type. Uses
+             "__gdoc__" if no specific documentation set.</td></tr><tr valign="top"><td valign="top">"__gdoc__"</td><td valign="top">Read</td><td valign="top">The generated documentation for the underlying GObject
+             type.</td></tr><tr valign="top"><td valign="top">"__gtype__"</td><td valign="top">Read</td><td valign="top">The underlying GObject type.</td></tr><tr valign="top"><td valign="top">"__grefcount__"</td><td valign="top">Read</td><td valign="top">The reference count for the underlying GObject.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gobject.GObject Signal Prototypes"><a name="signal-prototypes-gobject"></a><h2>gobject.GObject Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gobject.html#signal-gobject--notify" title='The GObject "notify" Signal'>notify</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>gobject</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>property_spec</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id365926"></a><h2>Description</h2><p>The <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+    class is the base class providing the common attributes and methods for
+    the PyGTK classes. The <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+    class is not a user interface widget class.</p><p>The <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>
+    class provides the signal management methods, the object property access
+    methods and the object data management methods.</p></div><div class="refsect1" title="Methods"><a name="id365893"></a><h2>Methods</h2><div class="refsect2" title="gobject.GObject.get_property"><a name="method-gobject--get-property"></a><h3>gobject.GObject.get_property</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_property</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td><td>a string containing the property name for the
+GObject</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a Python object containing the value of the
+property</td></tr></tbody></table><p>The <code class="methodname">get_property</code>() method returns the
+value of the property specified by <em class="parameter"><code>property_name</code></em> or
+None if there is no value associated with the property.</p><p>The <code class="exceptionname">TypeError</code> exception is raised
+if the property name is not registered with the object class.</p></div><div class="refsect2" title="gobject.GObject.get_properties"><a name="method-gobject--get-properties"></a><h3>gobject.GObject.get_properties</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_properties</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>first_property_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td><td>a string containing the first property name for the
+GObject</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional property names 
+</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing the property values 
+requested</td></tr></tbody></table><p>The <code class="methodname">get_properties</code>() method returns a tuple containing
+the values of the properties requested, or
+None if there is no value associated with the property.</p><p>The <code class="exceptionname">TypeError</code> exception is raised
+if the property name is not registered with the object class.</p></div><div class="refsect2" title="gobject.GObject.set_property"><a name="method-gobject--set-property"></a><h3>gobject.GObject.set_property</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_property</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>value</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td><td>a string containing the property
+name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a Python object containing the property value
+to be set</td></tr></tbody></table><p>The <code class="methodname">set_property</code>() method sets the
+property specified by <em class="parameter"><code>property_name</code></em> to the specified
+<em class="parameter"><code>value</code></em>.</p><p>The <code class="exceptionname">TypeError</code> exception is raised
+if the property name is not registered with the object class or if the value
+specified could not be converted to the property type.</p></div><div class="refsect2" title="gobject.GObject.set_properties"><a name="method-gobject--set-properties"></a><h3>gobject.GObject.set_properties</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_properties</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span><span class="initializer">=value</span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td><td>the property name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td><td>a Python object containing the property value
+to be set</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional property name and value 
+kwargs</td></tr></tbody></table><p>The <code class="methodname">set_properties</code>() method sets the
+property specified by <em class="parameter"><code>property_name</code></em> to the specified
+<em class="parameter"><code>value</code></em>, followed by pairs of property name 
+and value as keyword arguments.</p><p>The <code class="exceptionname">TypeError</code> exception is raised
+if the property name is not registered with the object class or if the value
+specified could not be converted to the property type.</p></div><div class="refsect2" title="gobject.GObject.freeze_notify"><a name="method-gobject--freeze-notify"></a><h3>gobject.GObject.freeze_notify</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">freeze_notify</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">freeze_notify</code>() method freezes the
+object's property-changed notification queue so that "notify" signals are
+blocked until the <code class="methodname">thaw_notify</code>() method is
+called.</p></div><div class="refsect2" title="gobject.GObject.notify"><a name="method-gobject--notify"></a><h3>gobject.GObject.notify</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">notify</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>property_name</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td><td>a string containing a property
+name</td></tr></tbody></table><p>The <code class="methodname">notify</code>() method causes the "notify"
+signal for the property specified by <em class="parameter"><code>property_name</code></em> to
+be emitted.</p></div><div class="refsect2" title="gobject.GObject.thaw_notify"><a name="method-gobject--thaw-notify"></a><h3>gobject.GObject.thaw_notify</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">thaw_notify</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">thaw_notify</code>() method thaws the
+object's property-changed notification queue so that "notify" signals are
+emitted.</p></div><div class="refsect2" title="gobject.GObject.get_data"><a name="method-gobject--get-data"></a><h3>gobject.GObject.get_data</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_data</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>key</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td><td>a string used as the key</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a Python object containing the associated
+data</td></tr></tbody></table><p>The <code class="methodname">get_data</code>() method returns the
+Python object associated with the specified <em class="parameter"><code>key</code></em> or
+None if there is no data associated with the <em class="parameter"><code>key</code></em> or
+if there is no key associated with the object.</p></div><div class="refsect2" title="gobject.GObject.set_data"><a name="method-gobject--set-data"></a><h3>gobject.GObject.set_data</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_data</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>key</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>data</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td><td>a string used as a key</td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td>a Python object that is the value to be
+associated with the key</td></tr></tbody></table><p>The <code class="methodname">set_data</code>() method associates the
+specified Python object (<em class="parameter"><code>data</code></em>) with
+<em class="parameter"><code>key</code></em>.</p></div><div class="refsect2" title="gobject.GObject.connect"><a name="method-gobject--connect"></a><h3>gobject.GObject.connect</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">connect</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td><td>a Python function or method
+object.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional optional
+parameters</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer identifier</td></tr></tbody></table><p>The <code class="methodname">connect</code>() method adds a function or
+method (<em class="parameter"><code>handler</code></em>)to the end of the list of signal
+handlers for the named <em class="parameter"><code>detailed_signal</code></em> but before the
+default class signal handler. An optional set of parameters may be specified
+after the <em class="parameter"><code>handler</code></em> parameter. These will all be passed
+to the signal handler when invoked.</p><p>For example if a function handler was connected to a signal
+using:</p><pre class="programlisting">
+  handler_id = object.connect("signal_name", handler, arg1, arg2, arg3)
+</pre><p>The handler should be defined as:</p><pre class="programlisting">
+  def handler(object, arg1, arg2, arg3):
+</pre><p>A method handler connected to a signal using:</p><pre class="programlisting">
+  handler_id = object.connect("signal_name", self.handler, arg1, arg2)
+</pre><p>requires an additional argument when defined:</p><pre class="programlisting">
+  def handler(self, object, arg1, arg2)
+</pre><p>A <code class="exceptionname">TypeError</code> exception is raised
+if <em class="parameter"><code>detailed_signal</code></em> identifies a signal name that is
+not associated with the object.</p></div><div class="refsect2" title="gobject.GObject.connect_after"><a name="method-gobject--connect-after"></a><h3>gobject.GObject.connect_after</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">connect_after</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td><td>a Python function or method
+object</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional optional
+parameters</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table><p>The <code class="methodname">connect_after</code>() method is similar
+to the <code class="methodname">connect</code>() method except that the
+<em class="parameter"><code>handler</code></em> is added to the signal handler list after the
+default class signal handler. Otherwise the details of
+<em class="parameter"><code>handler</code></em> definition and invocation are the
+same.</p></div><div class="refsect2" title="gobject.GObject.connect_object"><a name="method-gobject--connect-object"></a><h3>gobject.GObject.connect_object</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">connect_object</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>gobject</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td><td>a Python function or method
+object</td></tr><tr><td><p><span class="term"><em class="parameter"><code>gobject</code></em> :</span></p></td><td>a GObject</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table><p>The <code class="methodname">connect_object</code>() method is the same
+as the <code class="methodname">connect</code>() method except that the
+<em class="parameter"><code>handler</code></em> is invoked with the specified
+<em class="parameter"><code>gobject</code></em> in place of the object invoking the
+<code class="methodname">connect_object</code>() method. For example, a call with a
+function handler:</p><pre class="programlisting">
+  handler_id = object("signal_name", handler, gobject)
+</pre><p>will cause the <em class="parameter"><code>handler</code></em> to be invoked
+as:</p><pre class="programlisting">
+  handler(gobject)
+</pre><p>Likewise a method handler will be invoked as:</p><pre class="programlisting">
+  self.handler(gobject)
+</pre><p>This can be helpful in invoking PyGTK widget methods that
+require no arguments except the widget itself (e.g.
+<code class="methodname">widget.destroy</code>()) by using the class method as the
+handler. For example, a Button "clicked" signal can be set up to invoke the
+Window <code class="methodname">destroy</code>() method as:</p><pre class="programlisting">
+  handler_id = button.connect_object("clicked", Window.destroy, window)
+</pre><p>When the button is clicked the handler is invoked as:</p><pre class="programlisting">
+  Window.destroy(window)
+</pre><p>which is the same as:</p><pre class="programlisting">
+  window.destroy()
+</pre><p>Additional arguments may be passed to the handler as with the
+<code class="methodname">connect</code>() method handler invocations.</p></div><div class="refsect2" title="gobject.GObject.connect_object_after"><a name="method-gobject--connect-object-after"></a><h3>gobject.GObject.connect_object_after</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">connect_object_after</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>handler</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>handler</code></em> :</span></p></td><td>a Python function or method
+object</td></tr><tr><td><p><span class="term"><em class="parameter"><code>gobject</code></em> :</span></p></td><td>a GObject</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table><p>The <code class="methodname">connect_object_after</code>() method is
+similar to the <code class="methodname">connect_object</code>() method except that
+the <em class="parameter"><code>handler</code></em> is added to the signal handler list after
+the default class signal handler. Otherwise the details of
+<em class="parameter"><code>handler</code></em> definition and invocation are the
+same.</p></div><div class="refsect2" title="gobject.GObject.disconnect"><a name="method-gobject--disconnect"></a><h3>gobject.GObject.disconnect</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">disconnect</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>handler_id</code></em> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table><p>The <code class="methodname">disconnect</code>() method removes the
+signal handler with the specified <em class="parameter"><code>handler_id</code></em> from the
+list of signal handlers for the object.</p></div><div class="refsect2" title="gobject.GObject.handler_disconnect"><a name="method-gobject--handler-disconnect"></a><h3>gobject.GObject.handler_disconnect</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">handler_disconnect</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>handler_id</code></em> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table><p>The <code class="methodname">handler_disconnect</code>() method removes
+the signal handler with the specified <em class="parameter"><code>handler_id</code></em> from
+the list of signal handlers for the object.</p></div><div class="refsect2" title="gobject.GObject.handler_is_connected"><a name="method-gobject--handler-is-connected"></a><h3>gobject.GObject.handler_is_connected</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">handler_is_connected</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>handler_id</code></em> :</span></p></td><td>an integer handler
+identifier</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the signal handler
+is connected to the object.</td></tr></tbody></table><p>The <code class="methodname">handler_is_connected</code>() method
+returns <code class="literal">True</code> if the signal handler with the specified
+<em class="parameter"><code>handler_id</code></em> is connected to the object.</p></div><div class="refsect2" title="gobject.GObject.handler_block"><a name="method-gobject--handler-block"></a><h3>gobject.GObject.handler_block</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">handler_block</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>handler_id</code></em> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table><p>The <code class="methodname">handler_block</code>() method blocks the
+signal handler with the specified <em class="parameter"><code>handler_id</code></em> from
+being invoked until it is unblocked.</p></div><div class="refsect2" title="gobject.GObject.handler_unblock"><a name="method-gobject--handler-unblock"></a><h3>gobject.GObject.handler_unblock</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">handler_unblock</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>handler_id</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>handler_id</code></em> :</span></p></td><td>an integer handler
+identifier</td></tr></tbody></table></div><div class="refsect2" title="gobject.GObject.handler_block_by_func"><a name="method-gobject--handler-block-by-func"></a><h3>gobject.GObject.handler_block_by_func</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">handler_block_by_func</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callable</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callable</code></em> :</span></p></td><td>a callable python object</td></tr></tbody></table><p>The <code class="methodname">handler_block_by_func</code>() method blocks the
+all signal handler connected to a specific <em class="parameter"><code>callable</code></em> from
+being invoked until the callable is unblocked.</p></div><div class="refsect2" title="gobject.GObject.handler_unblock_by_func"><a name="method-gobject--handler-unblock-by-func"></a><h3>gobject.GObject.handler_unblock_by_func</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">handler_unblock_by_func</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callable</code></em> :</span></p></td><td>a callable python object</td></tr></tbody></table><p>The <code class="methodname">handler_unblock_by_func</code>() method unblocks
+all signal handler connected to a specified <em class="parameter"><code>callable</code></em>
+thereby allowing it to be invoked when the associated signals are
+emitted.</p></div><div class="refsect2" title="gobject.GObject.emit"><a name="method-gobject--emit"></a><h3>gobject.GObject.emit</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">emit</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional parameters</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a PyObject*</td></tr></tbody></table><p>The <code class="methodname">emit</code>() method causes the object to
+emit the signal specified by <em class="parameter"><code>detailed_signal</code></em>. The
+additional parameters must match the number and type of the required signal
+handler parameters. In most cases no additional parameters are needed. for
+example:</p><pre class="programlisting">
+  button.emit("clicked")
+</pre><p>is all that is required to emit the "clicked" signal for a
+button. The most common case requiring additional parameters occurs when
+emitting an event signal; for example:</p><pre class="programlisting">
+  button.emit("button_press_event", event)
+</pre></div><div class="refsect2" title="gobject.GObject.stop_emission"><a name="method-gobject--stop-emission"></a><h3>gobject.GObject.stop_emission</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">stop_emission</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr></tbody></table><p>The <code class="methodname">stop_emission</code>() method stops the
+current emission of the signal specified by
+<em class="parameter"><code>detailed_signal</code></em>. Any signal handlers in the list
+still to be run will not be invoked.</p></div><div class="refsect2" title="gobject.GObject.emit_stop_by_name"><a name="method-gobject--emit-stop-by-name"></a><h3>gobject.GObject.emit_stop_by_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">emit_stop_by_name</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>detailed_signal</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>detailed_signal</code></em> :</span></p></td><td>a string containing the signal
+name</td></tr></tbody></table><p>The <code class="methodname">emit_stop_by_name</code>() method stops
+the current emission of the signal specified by
+<em class="parameter"><code>detailed_signal</code></em>. Any signal handlers in the list
+still to be run will not be invoked.</p></div><div class="refsect2" title="gobject.GObject.chain"><a name="method-gobject--chain"></a><h3>gobject.GObject.chain</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">chain</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional parameters</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a Python object</td></tr></tbody></table><p>The chain() method does something.</p></div></div><div class="refsect1" title="Signals"><a name="id357922"></a><h2>Signals</h2><div class="refsect2" title='The GObject "notify" Signal'><a name="signal-gobject--notify"></a><h3>The GObject "notify" Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>gobject</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>property_spec</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>gobject</code></em> :</span></p></td><td>the gobject that received the
+signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>property_spec</code></em> :</span></p></td><td>the <PYGTKDOCLINK HREF="class-gobjectgparamspec"><code class="classname">gobject.GParamSpec</code></PYGTKDOCLINK> of the property that was
+changed</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
+with the <a class="link" href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><code class="methodname">connect</code>()</a>
+method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
+any)</td></tr></tbody></table><p>The "notify" signal is emitted on a gobject when one of its
+properties has been changed. Note that getting this signal doesn't guarantee
+that the value of the property has actually changed, it may also be emitted
+when the setter for the property is called to reinstate the previous
+value. For example to be notified of the change of the title of a <PYGTKDOCLINK HREF="class-gtkwindow"><code class="classname">gtk.Window</code></PYGTKDOCLINK> you could
+connect to the "notify" signal similar to:</p><pre class="programlisting">
+  window.connect("notify::title", callback)
+</pre></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gobject-class-reference.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gobjectgboxed.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PyGObject Class Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject.GBoxed</td></tr></table></div></body></html>
diff --git a/docs/html/class-gobjectgboxed.html b/docs/html/class-gobjectgboxed.html
new file mode 100644 (file)
index 0000000..30b7dc5
--- /dev/null
@@ -0,0 +1,9 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GBoxed</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobject.html" title="gobject.GObject"><link rel="next" href="class-gobjectgpointer.html" title="gobject.GPointer"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GBoxed</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobject.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gobjectgpointer.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GBoxed"><a name="class-gobjectgboxed"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject.GBoxed</h2><p>gobject.GBoxed â€” an object containing an opaque chunk of data</p></div><div class="refsect1" title="Synopsis"><a name="id411403"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gobject.GBoxed</span></span>:
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gobjectgboxed.html#method-gobjectgboxed--copy" title="gobject.GBoxed.copy">copy</a></span>()</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id430702"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectgboxed.html" title="gobject.GBoxed">gobject.GBoxed</a>
+</pre></div><div class="refsect1" title="Description"><a name="id365742"></a><h2>Description</h2><p><a class="link" href="class-gobjectgboxed.html" title="gobject.GBoxed"><code class="classname">gobject.GBoxed</code></a>
+is an abstract base class that encapsulates an opaque chunk of data to
+provide an object-oriented interface and a type that is registered with the
+<code class="literal">GLIB</code> type system. A boxed type is registered with
+functions that provide for the copying and freeing of the underlying data
+structure - this allows PyGTK to encapsulate these as Python objects.</p></div><div class="refsect1" title="Methods"><a name="id422177"></a><h2>Methods</h2><div class="refsect2" title="gobject.GBoxed.copy"><a name="method-gobjectgboxed--copy"></a><h3>gobject.GBoxed.copy</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">copy</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a copy of the <a class="link" href="class-gobjectgboxed.html" title="gobject.GBoxed"><code class="classname">gobject.GBoxed</code></a>
+         object</td></tr></tbody></table><p>The <code class="methodname">copy</code>() method makes and returns a copy of the boxed object.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gobject.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gobjectgpointer.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject.GObject </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject.GPointer</td></tr></table></div></body></html>
diff --git a/docs/html/class-gobjectginterface.html b/docs/html/class-gobjectginterface.html
new file mode 100644 (file)
index 0000000..5156c43
--- /dev/null
@@ -0,0 +1,4 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GInterface</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobjectgpointer.html" title="gobject.GPointer"><link rel="next" href="gobject-functions.html" title="gobject Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GInterface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobjectgpointer.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gobject-functions.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GInterface"><a name="class-gobjectginterface"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject.GInterface</h2><p>gobject.GInterface â€” an object representing a GInterface</p></div><div class="refsect1" title="Synopsis"><a name="id367430"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gobject.GInterface</span></span>:
+</pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id357622"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectginterface.html" title="gobject.GInterface">gobject.GInterface</a>
+</pre></div><div class="refsect1" title="Description"><a name="id358624"></a><h2>Description</h2><p><a class="link" href="class-gobjectginterface.html" title="gobject.GInterface"><code class="classname">gobject.GInterface</code></a>
+is an abstract base class that encapsulates a GInterface.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gobjectgpointer.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gobject-functions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject.GPointer </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject Functions</td></tr></table></div></body></html>
diff --git a/docs/html/class-gobjectgpointer.html b/docs/html/class-gobjectgpointer.html
new file mode 100644 (file)
index 0000000..258a160
--- /dev/null
@@ -0,0 +1,8 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject.GPointer</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobjectgboxed.html" title="gobject.GBoxed"><link rel="next" href="class-gobjectginterface.html" title="gobject.GInterface"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject.GPointer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobjectgboxed.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gobjectginterface.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject.GPointer"><a name="class-gobjectgpointer"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject.GPointer</h2><p>gobject.GPointer â€” an object containing a completely opaque chunk of
+    data</p></div><div class="refsect1" title="Synopsis"><a name="id357742"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gobject.GPointer</span></span>:
+</pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id357261"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobjectgpointer.html" title="gobject.GPointer">gobject.GPointer</a>
+</pre></div><div class="refsect1" title="Description"><a name="id376068"></a><h2>Description</h2><p><a class="link" href="class-gobjectgpointer.html" title="gobject.GPointer"><code class="classname">gobject.GPointer</code></a>
+is an abstract base class that encapsulates an opaque chunk of data and
+registers it with the <code class="literal">GLIB</code> type system. A pointer type
+has no methods and generic ways of copying and freeing the data. It
+shouldn't be used in PyGTK.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gobjectgboxed.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gobjectginterface.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject.GBoxed </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject.GInterface</td></tr></table></div></body></html>
diff --git a/docs/html/gio-class-reference.html b/docs/html/gio-class-reference.html
new file mode 100644 (file)
index 0000000..9b0f9b6
--- /dev/null
@@ -0,0 +1 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGio Class Reference</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="index.html" title="PyGObject Reference Manual"><link rel="prev" href="gobject-constants.html" title="gobject Constants"><link rel="next" href="class-gioappinfo.html" title="gio.AppInfo"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGio Class Reference</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gobject-constants.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="class-gioappinfo.html">Next</a></td></tr></table><hr></div><div class="chapter" title="PyGio Class Reference"><div class="titlepage"><div><div><h2 class="title"><a name="gio-class-reference"></a>PyGio Class Reference</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="refentrytitle"><a href="class-gioappinfo.html">gio.AppInfo</a></span><span class="refpurpose"> â€” Information about an installed application and methods to launch it (with file arguments).</span></dt><dt><span class="refentrytitle"><a href="class-gioapplaunchcontext.html">gio.AppLaunchContext</a></span><span class="refpurpose"> â€” Application launch context.</span></dt><dt><span class="refentrytitle"><a href="class-gioasyncresult.html">gio.AsyncResult</a></span><span class="refpurpose"> â€” Asynchronous Function Results.</span></dt><dt><span class="refentrytitle"><a href="class-giobufferedinputstream.html">gio.BufferedInputStream</a></span><span class="refpurpose"> â€” Buffered Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giobufferedoutputstream.html">gio.BufferedOutputStream</a></span><span class="refpurpose"> â€” Buffered Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-giocancellable.html">gio.Cancellable</a></span><span class="refpurpose"> â€” Thread-safe Operation Cancellation Stack.</span></dt><dt><span class="refentrytitle"><a href="class-giodatainputstream.html">gio.DataInputStream</a></span><span class="refpurpose"> â€” Data Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giodataoutputstream.html">gio.DataOutputStream</a></span><span class="refpurpose"> â€” Data Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-giodrive.html">gio.Drive</a></span><span class="refpurpose"> â€” Virtual File System drive management.</span></dt><dt><span class="refentrytitle"><a href="class-gioemblem.html">gio.Emblem</a></span><span class="refpurpose"> â€” An object for emblems.</span></dt><dt><span class="refentrytitle"><a href="class-gioemblemedicon.html">gio.EmblemedIcon</a></span><span class="refpurpose"> â€” Icon with emblems.</span></dt><dt><span class="refentrytitle"><a href="class-giofile.html">gio.File</a></span><span class="refpurpose"> â€” File and Directory Handling.</span></dt><dt><span class="refentrytitle"><a href="class-giofileattributeinfo.html">gio.FileAttributeInfo</a></span><span class="refpurpose"> â€” Information about a specific attribute.</span></dt><dt><span class="refentrytitle"><a href="class-giofileenumerator.html">gio.FileEnumerator</a></span><span class="refpurpose"> â€” Enumerated Files Routines.</span></dt><dt><span class="refentrytitle"><a href="class-giofileicon.html">gio.FileIcon</a></span><span class="refpurpose"> â€” Icons pointing to an image file.</span></dt><dt><span class="refentrytitle"><a href="class-giofileinfo.html">gio.FileInfo</a></span><span class="refpurpose"> â€” File Information and Attributes</span></dt><dt><span class="refentrytitle"><a href="class-giofileinputstream.html">gio.FileInputStream</a></span><span class="refpurpose"> â€” Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giofilemonitor.html">gio.FileMonitor</a></span><span class="refpurpose"> â€” File Monitor</span></dt><dt><span class="refentrytitle"><a href="class-giofileoutputstream.html">gio.FileOutputStream</a></span><span class="refpurpose"> â€” Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giofilterinputstream.html">gio.FilterInputStream</a></span><span class="refpurpose"> â€” Filter Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giofilteroutputstream.html">gio.FilterOutputStream</a></span><span class="refpurpose"> â€” Filter Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-gioicon.html">gio.Icon</a></span><span class="refpurpose"> â€” Interface for icons.</span></dt><dt><span class="refentrytitle"><a href="class-gioinputstream.html">gio.InputStream</a></span><span class="refpurpose"> â€” Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-gioloadableicon.html">gio.LoadableIcon</a></span><span class="refpurpose"> â€” Interface for icons.</span></dt><dt><span class="refentrytitle"><a href="class-giomemoryinputstream.html">gio.MemoryInputStream</a></span><span class="refpurpose"> â€” Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giomemoryoutputstream.html">gio.MemoryOutputStream</a></span><span class="refpurpose"> â€” Streaming output operations on memory chunks</span></dt><dt><span class="refentrytitle"><a href="class-giomount.html">gio.Mount</a></span><span class="refpurpose"> â€” Mount management</span></dt><dt><span class="refentrytitle"><a href="class-giomountoperation.html">gio.MountOperation</a></span><span class="refpurpose"> â€” Authentication methods for mountable locations.</span></dt><dt><span class="refentrytitle"><a href="class-giooutputstream.html">gio.OutputStream</a></span><span class="refpurpose"> â€” Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-gioseekable.html">gio.Seekable</a></span><span class="refpurpose"> â€” Stream seeking interface.</span></dt><dt><span class="refentrytitle"><a href="class-giosimpleasyncresult.html">gio.SimpleAsyncResult</a></span><span class="refpurpose"> â€” Simple asynchronous results implementation.</span></dt><dt><span class="refentrytitle"><a href="class-giothemedicon.html">gio.ThemedIcon</a></span><span class="refpurpose"> â€” Icon theming support.</span></dt><dt><span class="refentrytitle"><a href="class-giovolume.html">gio.Volume</a></span><span class="refpurpose"> â€” Volume management.</span></dt><dt><span class="refentrytitle"><a href="class-giovolumemonitor.html">gio.VolumeMonitor</a></span><span class="refpurpose"> â€” Volume Monitor.</span></dt><dt><span class="refentrytitle"><a href="gio-functions.html">gio Functions</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="gio-constants.html">gio Constants</a></span><span class="refpurpose"> â€” the built-in constants of the gio module</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gobject-constants.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="class-gioappinfo.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject Constants </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.AppInfo</td></tr></table></div></body></html>
diff --git a/docs/html/gio-constants.html b/docs/html/gio-constants.html
new file mode 100644 (file)
index 0000000..074b1d4
--- /dev/null
@@ -0,0 +1,414 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio Constants</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="gio-functions.html" title="gio Functions"><link rel="next" href="giounix-class-reference.html" title="PyGio Unix Class Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio Constants</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gio-functions.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="giounix-class-reference.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio Constants"><a name="gio-constants"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio Constants</h2><p>gio Constants â€” the built-in constants of the gio module</p></div><div class="refsect1" title="Synopsis"><a name="id536207"></a><h2>Synopsis</h2><pre class="programlisting">
+<a class="xref" href="gio-constants.html#gio-app-info-constants" title="Gio AppInfo Create Flags Constants">Gio AppInfo Create Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-ask-password-flags-constants" title="Gio Ask Password Flags Constants">Gio Ask Password Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-data-stream-byte-order-constants" title="Gio Data Stream Byte Order Constants">Gio Data Stream Byte Order Constants</a>
+<a class="xref" href="gio-constants.html#gio-data-stream-newline-type-constants" title="Gio Data Stream Newline Type Constants">Gio Data Stream Newline Type Constants</a>
+<a class="xref" href="gio-constants.html#gio-emblem-origin-constants" title="Gio Emblem Origin Constants">Gio Emblem Origin Constants</a>
+<a class="xref" href="gio-constants.html#gio-error-constants" title="Gio Error Constants">Gio Error Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-attribute-constants" title="Gio File Attribute Constants">Gio File Attribute Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-attribute-flags-constants" title="Gio File Attribute Flags Constants">Gio File Attribute Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-create-flags-constants" title="Gio File Create Flags Constants">Gio File Create Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-copy-flags-constants" title="Gio File Copy Flags Constants">Gio File Copy Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-monitor-flags-constants" title="Gio File Monitor Flags Constants">Gio File Monitor Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-query-info-flags-constants" title="Gio File Query Info Flags Constants">Gio File Query Info Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-file-type-constants" title="Gio File Type Constants">Gio File Type Constants</a>
+<a class="xref" href="gio-constants.html#gio-mount-mount-flags-constants" title="Gio Mount Mount Flags Constants">Gio Mount Mount Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-mount-operation-result-constants" title="Gio Mount Operation Result Constants">Gio Mount Operation Result Constants</a>
+<a class="xref" href="gio-constants.html#gio-mount-unmount-flags-constants" title="Gio Mount Unmount Flags Constants">Gio Mount Unmount Flags Constants</a>
+<a class="xref" href="gio-constants.html#gio-password-save-constants" title="Gio Password Save Constants">Gio Password Save Constants</a>
+</pre></div><div class="refsect1" title="Description"><a name="gio-constants-description"></a><h2>Description</h2><div class="refsect2" title="Gio Ask Password Flags Constants"><a name="gio-ask-password-flags-constants"></a><h3>Gio Ask Password Flags Constants</h3><p>
+         Flags that are used to request specific information from the user, or to
+         notify the user of their choices in an authentication situation.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_ANONYMOUS_SUPPORTED</code></span></p></td><td>operation supports anonymous users.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_NEED_DOMAIN</code></span></p></td><td>operation requires a domain.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_NEED_PASSWORD</code></span></p></td><td>operation requires a password.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_NEED_USERNAME</code></span></p></td><td>operation requires a username.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ASK_PASSWORD_SAVING_SUPPORTED</code></span></p></td><td>operation supports saving settings.</td></tr></tbody></table></div><div class="refsect2" title="Gio AppInfo Create Flags Constants"><a name="gio-app-info-constants"></a><h3>Gio AppInfo Create Flags Constants</h3><p>
+         Flags used when creating a <a class="link" href="class-gioappinfo.html" title="gio.AppInfo"><code class="classname">gio.AppInfo</code></a>
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.APP_INFO_CREATE_NONE</code></span></p></td><td>No flags.</td></tr><tr><td><p><span class="term"><code class="literal">gio.APP_INFO_CREATE_NEEDS_TERMINAL</code></span></p></td><td>Application opens in a terminal window. </td></tr><tr><td><p><span class="term"><code class="literal">gio.APP_INFO_CREATE_SUPPORTS_URIS</code></span></p></td><td>Application supports URI arguments. </td></tr></tbody></table></div><div class="refsect2" title="Gio Data Stream Byte Order Constants"><a name="gio-data-stream-byte-order-constants"></a><h3>Gio Data Stream Byte Order Constants</h3><p>
+         Used to ensure proper endianness of streaming data sources across various machine architectures.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN</code></span></p></td><td>Selects Big Endian byte order.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_BYTE_ORDER_HOST_ENDIAN</code></span></p></td><td>Selects endianness based on host machine's architecture.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN</code></span></p></td><td>Selects Little Endian byte order.</td></tr></tbody></table></div><div class="refsect2" title="Gio Data Stream Newline Type Constants"><a name="gio-data-stream-newline-type-constants"></a><h3>Gio Data Stream Newline Type Constants</h3><p>
+         Used when checking for or setting the line endings for a given file.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_NEWLINE_TYPE_LF</code></span></p></td><td>Selects "LF" line endings, common on most modern UNIX platforms.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_NEWLINE_TYPE_CR</code></span></p></td><td>Selects "CR" line endings.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_NEWLINE_TYPE_CR_LF</code></span></p></td><td>Selects "CR, LF" line ending, common on Microsoft Windows.</td></tr><tr><td><p><span class="term"><code class="literal">gio.DATA_STREAM_NEWLINE_TYPE_ANY</code></span></p></td><td>Automatically try to handle any line ending type.</td></tr></tbody></table></div><div class="refsect2" title="Gio Emblem Origin Constants"><a name="gio-emblem-origin-constants"></a><h3>Gio Emblem Origin Constants</h3><p>
+         GEmblemOrigin is used to add information about the origin of the emblem to GEmblem.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.EMBLEM_ORIGIN_DEVICE</code></span></p></td><td>Embleme adds device-specific information.</td></tr><tr><td><p><span class="term"><code class="literal">gio.EMBLEM_ORIGIN_LIVEMETADATA</code></span></p></td><td>Emblem depicts live metadata, such as "readonly".</td></tr><tr><td><p><span class="term"><code class="literal">gio.EMBLEM_ORIGIN_TAG</code></span></p></td><td>Emblem comes from a user-defined tag, e.g. set by nautilus (in the future).</td></tr><tr><td><p><span class="term"><code class="literal">gio.EMBLEM_ORIGIN_UNKNOWN</code></span></p></td><td>Emblem of unknown origin.</td></tr></tbody></table></div><div class="refsect2" title="Gio Error Constants"><a name="gio-error-constants"></a><h3>Gio Error Constants</h3><p>
+        GIOError Error codes returned by GIO functions.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.ERROR_ALREADY_MOUNTED</code></span></p></td><td>File is already mounted.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_BUSY</code></span></p></td><td>File is busy.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_CANCELLED</code></span></p></td><td>Operation was cancelled. See
+               <a class="link" href="class-giocancellable.html" title="gio.Cancellable"><code class="classname">gio.Cancellable</code></a>.
+           </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_CANT_CREATE_BACKUP</code></span></p></td><td>Backup couldn't be created.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_CLOSED</code></span></p></td><td>File was closed.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_EXISTS</code></span></p></td><td>File already exists error.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_FAILED</code></span></p></td><td>Generic error condition for when any operation fails.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_FAILED_HANDLED</code></span></p></td><td>Operation failed and a helper program has already interacted with
+           the user. Do not display any error dialog. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_FILENAME_TOO_LONG</code></span></p></td><td>Filename is too many characters.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_HOST_NOT_FOUND</code></span></p></td><td>Host couldn't be found (remote operations).</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_INVALID_ARGUMENT</code></span></p></td><td>Invalid argument.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_INVALID_FILENAME</code></span></p></td><td>Filename is invalid or contains invalid characters.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_IS_DIRECTORY</code></span></p></td><td>File is a directory error.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_DIRECTORY</code></span></p></td><td>File is not a directory.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_EMPTY</code></span></p></td><td>File is a directory that isn't empty.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_FOUND</code></span></p></td><td>File not found error.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_MOUNTABLE_FILE</code></span></p></td><td>File cannot be mounted.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_MOUNTED</code></span></p></td><td>File isn't mounted. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_REGULAR_FILE</code></span></p></td><td>File is not a regular file.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_SUPPORTED</code></span></p></td><td>Operation not supported for the current backend.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NOT_SYMBOLIC_LINK</code></span></p></td><td>File is not a symbolic link.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_NO_SPACE</code></span></p></td><td>No space left on drive. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_PENDING</code></span></p></td><td>Operations are still pending.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_PERMISSION_DENIED</code></span></p></td><td>Permission denied.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_READ_ONLY</code></span></p></td><td>File is read only. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_TIMED_OUT</code></span></p></td><td>Operation timed out. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_TOO_MANY_LINKS</code></span></p></td><td>File contains too many symbolic links. </td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_TOO_MANY_OPEN_FILES</code></span></p></td><td>The current process has too many files open and can't open any
+           more. Duplicate descriptors do count toward this limit. Since 2.20</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_WOULD_BLOCK</code></span></p></td><td>Operation would block.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_WOULD_MERGE</code></span></p></td><td>Operation would merge files.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_WOULD_RECURSE</code></span></p></td><td>Operation would be recursive.</td></tr><tr><td><p><span class="term"><code class="literal">gio.ERROR_WRONG_ETAG</code></span></p></td><td>File's Entity Tag was incorrect. </td></tr></tbody></table></div><div class="refsect2" title="Gio File Attribute Constants"><a name="gio-file-attribute-constants"></a><h3>Gio File Attribute Constants</h3><p>
+         The file attributes.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_TYPE</code></span></p></td><td>
+                "standard::type" A key in the "standard" namespace for storing file types. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32. The value for this key should contain a
+                <a class="xref" href="gio-constants.html#gio-file-type-constants" title="Gio File Type Constants">Gio File Type Constants</a>
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</code></span></p></td><td>
+                "standard::is-hidden" A key in the "standard" namespace for checking if a file is hidden. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_IS_BACKUP</code></span></p></td><td>
+                "standard::is-backup" A key in the "standard" namespace for checking if a file is a backup file. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</code></span></p></td><td>
+                "standard::is-symlink" A key in the "standard" namespace for checking if the file is a symlink.
+                Typically the actual type is something else, if we followed the symlink to get the type. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</code></span></p></td><td>
+                "standard::is-virtual" A key in the "standard" namespace for checking if a file is virtual. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_NAME</code></span></p></td><td>
+                "standard::name" A key in the "standard" namespace for getting the name of the file.
+                The name is the on-disk filename which may not be in any known encoding,
+                and can thus not be generally displayed as is. Use
+                gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the name in a user
+                interface. Corresponding GFileAttributeType is gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</code></span></p></td><td>
+                "standard::display-name" A key in the "standard" namespace for getting the display
+                name of the file. A display name is guaranteed to be in UTF8 and can thus be displayed
+                in the UI. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_EDIT_NAME</code></span></p></td><td>
+                "standard::edit-name" A key in the "standard" namespace for edit name of the file.
+                An edit name is similar to the display name, but it is meant to be used when you want
+                to rename the file in the UI. The display name might contain information you don't
+                want in the new filename (such as "(invalid unicode)" if the filename was in an
+                invalid encoding). Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_COPY_NAME</code></span></p></td><td>
+                "standard::copy-name" A key in the "standard" namespace for getting the copy
+                name of the file. The copy name is an optional version of the name. If available
+                it's always in UTF8, and corresponds directly to the original filename (only transcoded
+                to UTF8). This is useful if you want to copy the file to another filesystem that might
+                have a different encoding. If the filename is not a valid string in the encoding selected
+                for the filesystem it is in then the copy name will not be set. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_ICON</code></span></p></td><td>
+                "standard::icon" A key in the "standard" namespace for getting the icon for the file. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a
+                <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</code></span></p></td><td>
+                "standard::content-type" A key in the "standard" namespace for getting the content type of the file. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING. The value for this key should contain a valid content type.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</code></span></p></td><td>
+                "standard::fast-content-type" A key in the "standard" namespace for getting the fast
+                content type. The fast content type isn't as reliable as the regular one, as it
+                only uses the filename to guess it, but it is faster to calculate than the regular
+                content type. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_SIZE</code></span></p></td><td>
+                "standard::size" A key in the "standard" namespace for getting the file's size (in bytes). Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT64.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</code></span></p></td><td>
+                "standard::symlink-target" A key in the "standard" namespace for getting the target URI
+                for the file, in the case of gio.FILE_TYPE_SHORTCUT or gio.FILE_TYPE_MOUNTABLE files. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_SORT_ORDER</code></span></p></td><td>
+                "standard::sort-order" A key in the "standard" namespace for setting the sort order of a file. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_INT32. An example use would be in file managers, which would use this
+                key to set the order files are displayed. Files with smaller sort order should be sorted first,
+                and files without sort order as if sort order was zero.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ETAG_VALUE</code></span></p></td><td>
+                "etag::value" A key in the "etag" namespace for getting the value of the file's entity tag. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ID_FILE</code></span></p></td><td>
+                "id::file" A key in the "id" namespace for getting a file identifier. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during listing files,
+                to avoid recursive directory scanning.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ID_FILESYSTEM</code></span></p></td><td>
+                "id::filesystem" A key in the "id" namespace for getting the file system identifier. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during drag and
+                drop to see if the source and target are on the same filesystem (default to move) or not (default to copy).
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_READ</code></span></p></td><td>
+                "access::can-read" A key in the "access" namespace for getting read privileges. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
+                if the user is able to read the file.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_WRITE</code></span></p></td><td>
+                "access::can-write" A key in the "access" namespace for getting write privileges.Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
+                if the user is able to write to the file.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</code></span></p></td><td>
+                "access::can-execute" A key in the "access" namespace for getting execution privileges. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
+                if the user is able to execute the file.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_DELETE</code></span></p></td><td>
+                "access::can-delete" A key in the "access" namespace for checking deletion privileges. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
+                if the user is able to delete the file.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_TRASH</code></span></p></td><td>
+                "access::can-trash" A key in the "access" namespace for checking trashing privileges. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
+                if the user is able to move the file to the trash.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_ACCESS_CAN_RENAME</code></span></p></td><td>
+                "access::can-rename" A key in the "access" namespace for checking renaming privileges. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <code class="literal">True</code>
+                if the user is able to rename the file.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</code></span></p></td><td>
+                "mountable::can-mount" A key in the "mountable" namespace for checking if
+                a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</code></span></p></td><td>
+                "mountable::can-unmount" A key in the "mountable" namespace for checking if a file
+                (of type G_FILE_TYPE_MOUNTABLE) is unmountable. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</code></span></p></td><td>
+                "mountable::can-eject" A key in the "mountable" namespace for checking if a file
+                (of type G_FILE_TYPE_MOUNTABLE) can be ejected. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</code></span></p></td><td>
+                "mountable::unix-device" A key in the "mountable" namespace for getting the unix device. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</code></span></p></td><td>
+                "mountable::hal-udi" A key in the "mountable" namespace for getting the
+                HAL UDI for the mountable file. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_MODIFIED</code></span></p></td><td>
+                "time::modified" A key in the "time" namespace for getting the time the file was last modified. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was modified.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_MODIFIED_USEC</code></span></p></td><td>
+                "time::modified-usec" A key in the "time" namespace for getting the miliseconds
+                of the time the file was last modified. This should be used in conjunction
+                with G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_UINT32.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_ACCESS</code></span></p></td><td>
+                "time::access" A key in the "time" namespace for getting the time the file was last accessed. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last accessed.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_ACCESS_USEC</code></span></p></td><td>
+                "time::access-usec" A key in the "time" namespace for getting the microseconds of
+                the time the file was last accessed. This should be used in conjunction
+                with G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_CHANGED</code></span></p></td><td>
+                "time::changed" A key in the "time" namespace for getting the time the
+                file was last changed. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last changed.
+                This corresponds to the traditional UNIX ctime.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_CHANGED_USEC</code></span></p></td><td>
+                "time::changed-usec" A key in the "time" namespace for getting the microseconds
+                of the time the file was last changed. This should be used in conjunction
+                with G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_CREATED</code></span></p></td><td>
+                "time::created" A key in the "time" namespace for getting the time the file was created. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was created.
+                This corresponds to the NTFS ctime.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TIME_CREATED_USEC</code></span></p></td><td>
+                "time::created-usec" A key in the "time" namespace for getting the microseconds of the time the
+                file was created. This should be used in conjunction with G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_DEVICE</code></span></p></td><td>
+                "unix::device" A key in the "unix" namespace for getting the device id of the device the file
+                is located on (see stat() documentation). This attribute is only available
+                for UNIX file systems. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_INODE</code></span></p></td><td>
+                "unix::inode" A key in the "unix" namespace for getting the inode of the file. This attribute is only
+                available for UNIX file systems. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_UINT64.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_MODE</code></span></p></td><td>
+                "unix::mode" A key in the "unix" namespace for getting the mode of the file (e.g.
+                whether the file is a regular file, symlink, etc). See lstat() documentation.
+                This attribute is only available for UNIX file systems. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_NLINK</code></span></p></td><td>
+                "unix::nlink" A key in the "unix" namespace for getting the number of hard links
+                for a file. See lstat() documentation. This attribute is only available for UNIX
+                file systems. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_UID</code></span></p></td><td>
+                "unix::uid" A key in the "unix" namespace for getting the user ID for the file. This attribute
+                is only available for UNIX file systems. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_GID</code></span></p></td><td>
+                "unix::gid" A key in the "unix" namespace for getting the group ID for the file.
+                This attribute is only available for UNIX file systems. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_RDEV</code></span></p></td><td>
+                "unix::rdev" A key in the "unix" namespace for getting the device ID for the file
+                (if it is a special file). See lstat() documentation. This attribute is only available
+                for UNIX file systems. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</code></span></p></td><td>
+                "unix::block-size" A key in the "unix" namespace for getting the block size for
+                the file system. This attribute is only available for UNIX file systems. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_BLOCKS</code></span></p></td><td>
+                "unix::blocks" A key in the "unix" namespace for getting the number of blocks allocated
+                for the file. This attribute is only available for UNIX file systems. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_UINT64.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</code></span></p></td><td>
+                "unix::is-mountpoint" A key in the "unix" namespace for checking if the file represents
+                a UNIX mount point. This attribute is <code class="literal">True</code> if the file is a UNIX mount point.
+                This attribute is only available for UNIX file systems. Corresponding
+                GFileAttributeType
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_DOS_IS_ARCHIVE</code></span></p></td><td>
+                "dos::is-archive" A key in the "dos" namespace for checking if the file's archive
+                flag is set. This attribute is <code class="literal">True</code> if the archive flag is set.
+                This attribute is only available for DOS file systems. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_DOS_IS_SYSTEM</code></span></p></td><td>
+                "dos::is-system" A key in the "dos" namespace for checking if the file's backup
+                flag is set. This attribute is <code class="literal">True</code> if the backup flag is set.
+                This attribute is only available for DOS file systems. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a> is
+                G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_OWNER_USER</code></span></p></td><td>
+                "owner::user" A key in the "owner" namespace for getting the user name
+                of the file's owner. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_OWNER_USER_REAL</code></span></p></td><td>
+                "owner::user-real" A key in the "owner" namespace for getting the real name
+                of the user that owns the file. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a> is
+                G_FILE_ATTRIBUTE_TYPE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_OWNER_GROUP</code></span></p></td><td>
+                "owner::group" A key in the "owner" namespace for getting the file owner's
+                group. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_THUMBNAIL_PATH</code></span></p></td><td>
+                "thumbnail::path" A key in the "thumbnail" namespace for getting the path
+                to the thumbnail image. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_THUMBNAILING_FAILED</code></span></p></td><td>
+                "thumbnail::failed" A key in the "thumbnail" namespace for checking if thumbnailing failed. This attribute
+                is <code class="literal">True</code> if thumbnailing failed. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a> is
+                G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_PREVIEW_ICON</code></span></p></td><td>
+                "preview::icon" A key in the "preview" namespace for getting a
+                <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+                that can be used to get preview of the file. For example, it
+                may be a low resolution thumbnail without metadata. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a> is
+                G_FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a GIcon.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE</code></span></p></td><td>
+                "filesystem::size" A key in the "filesystem" namespace for getting the total
+                size (in bytes) of the file system, used in
+                <code class="methodname"><a class="link" href="class-giofile.html#method-giofile--query-filesystem-info" title="gio.File.query_filesystem_info">query_filesystem_info</a></code>().
+                Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_UINT64.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_FREE</code></span></p></td><td>
+                "filesystem::free" A key in the "filesystem" namespace for getting the number of bytes of free space left
+                on the file system. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_UINT64.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_TYPE</code></span></p></td><td>
+                "filesystem::type" A key in the "filesystem" namespace for getting the file system's type. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_READONLY</code></span></p></td><td>
+                "filesystem::readonly" A key in the "filesystem" namespace for checking if the
+                file system is read only. Is set to <code class="literal">True</code> if the file system
+                is read only. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_GVFS_BACKEND</code></span></p></td><td>
+                "gvfs::backend" A key in the "gvfs" namespace that gets the name of the current GVFS backend in use. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_SELINUX_CONTEXT</code></span></p></td><td>
+                "selinux::context" A key in the "selinux" namespace for getting the file's SELinux context. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+                Note that this attribute is only available if GLib has been built with SELinux support.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TRASH_ITEM_COUNT</code></span></p></td><td>
+                "trash::item-count" A key in the "trash" namespace. When requested against "trash:///" returns the number
+                of (toplevel) items in the trash folder. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_UINT32.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW</code></span></p></td><td>
+                "filesystem::use-preview" A key in the "filesystem" namespace for hinting a file manager
+                application whether it should preview (e.g. thumbnail) files on the file system.
+                The value for this key contain a GFilesystemPreviewType.
+            </td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_STANDARD_DESCRIPTION</code></span></p></td><td>
+                "standard::description" A key in the "standard" namespace for getting the description
+                of the file. The description is a utf8 string that describes the file, generally containing
+                the filename, but can also contain furter information. Example descriptions could be
+                "filename (on hostname)" for a remote file or "filename (in trash)" for a
+                file in the trash. This is useful for instance as the window title when
+                displaying a directory or for a bookmarks menu. Corresponding
+                <a class="xref" href="gio-constants.html#gio-file-attribute-type-constants" title="Gio File Attribute Type Constants">Gio File Attribute Type Constants</a>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+            </td></tr></tbody></table></div><div class="refsect2" title="Gio File Attribute Type Constants"><a name="gio-file-attribute-type-constants"></a><h3>Gio File Attribute Type Constants</h3><p>
+         The data types for file attributes.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_BOOLEAN</code></span></p></td><td>a boolean value.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING</code></span></p></td><td>a zero terminated string of non-zero bytes.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_INT32</code></span></p></td><td>a signed 4-byte/32-bit integer.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_INT64</code></span></p></td><td>a signed 8-byte/64-bit integer.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_INVALID</code></span></p></td><td>indicates an invalid or uninitalized type.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_OBJECT</code></span></p></td><td>a <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_STRING</code></span></p></td><td>a null terminated UTF8 string.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_UINT32</code></span></p></td><td>an unsigned 4-byte/32-bit integer.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_TYPE_UINT64</code></span></p></td><td>an unsigned 8-byte/64-bit integer.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Attribute Flags Constants"><a name="gio-file-attribute-flags-constants"></a><h3>Gio File Attribute Flags Constants</h3><p>
+         Flags specifying the behaviour of an attribute.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_INFO_NONE</code></span></p></td><td>no flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_INFO_COPY_WITH_FILE</code></span></p></td><td>copy the attribute values when the file is copied.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED</code></span></p></td><td>copy the attribute values when the file is moved.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Create Flags Constants"><a name="gio-file-create-flags-constants"></a><h3>Gio File Create Flags Constants</h3><p>
+         Flags used when an operation may create a file.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_CREATE_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_CREATE_PRIVATE</code></span></p></td><td>Create a file that can only be accessed by the current user.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_CREATE_REPLACE_DESTINATION</code></span></p></td><td>
+               Replace the destination as if it didn't exist before. Don't try
+               to keep any old permissions, replace instead of following links. This is
+               generally useful if you're doing a "copy over" rather than a "save new version of"
+               replace operation. You can think of it as "unlink destination" before writing
+               to it, although the implementation may not be exactly like that.
+           </td></tr></tbody></table></div><div class="refsect2" title="Gio File Copy Flags Constants"><a name="gio-file-copy-flags-constants"></a><h3>Gio File Copy Flags Constants</h3><p>
+         Flags used when copying or moving files.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_OVERWRITE</code></span></p></td><td>Overwrite any existing files.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_BACKUP</code></span></p></td><td>Make a backup of any existing files.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_NOFOLLOW_SYMLINKS</code></span></p></td><td>Don't follow symlinks.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_ALL_METADATA</code></span></p></td><td>Copy all file metadata instead of just default set used for copy
+           (see <a class="link" href="class-giofileinfo.html" title="gio.FileInfo"><code class="classname">gio.FileInfo</code></a>).</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_NO_FALLBACK_FOR_MOVE</code></span></p></td><td>Don't use copy and delete fallback if native move not supported.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_COPY_TARGET_DEFAULT_PERMS</code></span></p></td><td>Leaves target file with default perms, instead of setting the source file perms.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Monitor Flags Constants"><a name="gio-file-monitor-flags-constants"></a><h3>Gio File Monitor Flags Constants</h3><p>
+            Flags used to set what a
+            <a class="link" href="class-giofilemonitor.html" title="gio.FileMonitor"><code class="classname">gio.FileMonitor</code></a>
+            will watch for.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_MONITOR_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_MONITOR_WATCH_MOUNTS</code></span></p></td><td>Watch for mount events.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Query Info Flags Constants"><a name="gio-file-query-info-flags-constants"></a><h3>Gio File Query Info Flags Constants</h3><p>
+         Flags used when querying a
+         <a class="link" href="class-giofile.html" title="gio.File"><code class="classname">gio.FileInfo</code></a>.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_QUERY_INFO_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS</code></span></p></td><td>Don't follow symlinks.</td></tr></tbody></table></div><div class="refsect2" title="Gio File Type Constants"><a name="gio-file-type-constants"></a><h3>Gio File Type Constants</h3><p>
+         Indicates the file's on-disk type.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_DIRECTORY</code></span></p></td><td>File handle represents a directory.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_MOUNTABLE</code></span></p></td><td>File is a mountable location.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_REGULAR</code></span></p></td><td>File handle represents a regular file.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_SHORTCUT</code></span></p></td><td>File is a shortcut (Windows systems).</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_SPECIAL</code></span></p></td><td>File is a "special" file, such as a socket, fifo, block device, or character device.</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_SYMBOLIC_LINK</code></span></p></td><td>File handle represents a symbolic link (Unix systems).</td></tr><tr><td><p><span class="term"><code class="literal">gio.FILE_TYPE_UNKNOWN</code></span></p></td><td>File's type is unknown.</td></tr></tbody></table></div><div class="refsect2" title="Gio Mount Mount Flags Constants"><a name="gio-mount-mount-flags-constants"></a><h3>Gio Mount Mount Flags Constants</h3><p>
+         Flags used when mounting a mount.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.MOUNT_MOUNT_NONE</code></span></p></td><td>No flags set.</td></tr></tbody></table></div><div class="refsect2" title="Gio Mount Unmount Flags Constants"><a name="gio-mount-unmount-flags-constants"></a><h3>Gio Mount Unmount Flags Constants</h3><p>
+         Flags used when unmounting a mount.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.MOUNT_UNMOUNT_NONE</code></span></p></td><td>No flags set.</td></tr><tr><td><p><span class="term"><code class="literal">gio.MOUNT_UNMOUNT_FORCE</code></span></p></td><td>Unmount even if there are outstanding file operations on the mount.</td></tr></tbody></table></div><div class="refsect2" title="Gio Mount Operation Result Constants"><a name="gio-mount-operation-result-constants"></a><h3>Gio Mount Operation Result Constants</h3><p>
+         returned as a result when a request for information is send by the mounting operation.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.MOUNT_OPERATION_HANDLED</code></span></p></td><td>The request was fulfilled and the user specified data is now available.</td></tr><tr><td><p><span class="term"><code class="literal">gio.MOUNT_OPERATION_ABORTED</code></span></p></td><td>The user requested the mount operation to be aborted.</td></tr><tr><td><p><span class="term"><code class="literal">gio.MOUNT_OPERATION_UNHANDLED</code></span></p></td><td>The request was unhandled (i.e. not implemented).</td></tr></tbody></table></div><div class="refsect2" title="Gio Password Save Constants"><a name="gio-password-save-constants"></a><h3>Gio Password Save Constants</h3><p>
+         is used to indicate the lifespan of a saved password.
+      </p><p>
+         Gvfs stores passwords in the Gnome keyring when this flag allows it to,
+         and later retrieves it again from there.
+      </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gio.PASSWORD_SAVE_FOR_SESSION</code></span></p></td><td>save a password for the session.</td></tr><tr><td><p><span class="term"><code class="literal">gio.PASSWORD_SAVE_NEVER</code></span></p></td><td>never save a password.</td></tr><tr><td><p><span class="term"><code class="literal">gio.PASSWORD_SAVE_PERMANENTLY</code></span></p></td><td>save a password permanently.</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gio-functions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="giounix-class-reference.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> PyGio Unix Class Reference</td></tr></table></div></body></html>
diff --git a/docs/html/gio-functions.html b/docs/html/gio-functions.html
new file mode 100644 (file)
index 0000000..77a4ff7
--- /dev/null
@@ -0,0 +1,74 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio Functions</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giovolumemonitor.html" title="gio.VolumeMonitor"><link rel="next" href="gio-constants.html" title="gio Constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gio Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giovolumemonitor.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gio-constants.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio Functions"><a name="gio-functions"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio Functions</h2><p>gio Functions</p></div><div class="refsect1" title="Synopsis"><a name="id534717"></a><h2>Synopsis</h2><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-can-be-executable" title="gio.content_type_can_be_executable">gio.content_type_can_be_executable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-equals" title="gio.content_type_equals">gio.content_type_equals</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type1</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type2</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-from-mime-type" title="gio.content_type_from_mime_type">gio.content_type_from_mime_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mime_type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-get-description" title="gio.content_type_get_description">gio.content_type_get_description</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-get-icon" title="gio.content_type_get_icon">gio.content_type_get_icon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-get-mime-type" title="gio.content_type_get_mime_type">gio.content_type_get_mime_type</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-guess" title="gio.content_type_guess">gio.content_type_guess</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>want_uncertain</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-is-a" title="gio.content_type_is_a">gio.content_type_is_a</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>supertype</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-type-is-unknown" title="gio.content_type_is_unknown">gio.content_type_is_unknown</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--content-types-get-registered" title="gio.content_types_get_registered">gio.content_types_get_registered</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gio-functions.html#function-gio--io-error-from-errno" title="gio.io_error_from_errno">gio.io_error_from_errno</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>err_no</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Description"><a name="id535062"></a><h2>Description</h2><p>
+           These functions are part of the <code class="literal">PyGObject</code> gio module
+          but are not directly associated with a specific class
+        </p></div><div class="refsect1" title="Functions"><a name="id535080"></a><h2>Functions</h2><div class="refsect2" title="gio.content_type_can_be_executable"><a name="function-gio--content-type-can-be-executable"></a><h3>gio.content_type_can_be_executable</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">content_type_can_be_executable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the file type corresponds
+                   to a type that can be executable, <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">content_type_can_be_executable</code>() function checks
+               if a content type can be executable. Note that for instance things like text files
+               can be executables (i.e. scripts and batch files).
+            </p></div><div class="refsect2" title="gio.content_type_equals"><a name="function-gio--content-type-equals"></a><h3>gio.content_type_equals</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">content_type_equals</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type1</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type1</code></em> :</span></p></td><td>a content type string. 
+                   </td></tr><tr><td><p><span class="term"><em class="parameter"><code>type2</code></em> :</span></p></td><td>a content type string. 
+                   </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the two strings are
+                   identical or equivalent, <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">content_type_equals</code>() function compares
+               two content types for equality.
+            </p></div><div class="refsect2" title="gio.content_type_from_mime_type"><a name="function-gio--content-type-from-mime-type"></a><h3>gio.content_type_from_mime_type</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">content_type_from_mime_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mime_type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td><td>a mime type string.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The content type or <code class="literal">None</code> when does not know. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">content_type_from_mime_type</code>() function tries
+               to find a content type based on the mime type name.
+            </p></div><div class="refsect2" title="gio.content_type_get_description"><a name="function-gio--content-type-get-description"></a><h3>gio.content_type_get_description</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">content_type_get_description</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a short description of the content type type. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">content_type_get_description</code>() function
+               gets the human readable description of the content type.
+            </p></div><div class="refsect2" title="gio.content_type_get_icon"><a name="function-gio--content-type-get-icon"></a><h3>gio.content_type_get_icon</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">content_type_get_icon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
+                   corresponding to the content type. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">content_type_get_icon</code>() function
+               gets the icon for a content type.
+            </p></div><div class="refsect2" title="gio.content_type_get_mime_type"><a name="function-gio--content-type-get-mime-type"></a><h3>gio.content_type_get_mime_type</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">content_type_get_mime_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string.
+                    </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the registered mime-type for the given type,
+                   or <code class="literal">None</code> if unknown. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">content_type_get_mime_type</code>() function
+               gets the mime-type for the content type. If one is registered
+            </p></div><div class="refsect2" title="gio.content_type_guess"><a name="function-gio--content-type-guess"></a><h3>gio.content_type_guess</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">content_type_guess</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>want_uncertain</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td><td>a string, or <code class="literal">None</code>. 
+                   </td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td>a stream of data, or <code class="literal">None</code>. 
+                   </td></tr><tr><td><p><span class="term"><em class="parameter"><code>want_uncertain</code></em> :</span></p></td><td>a flag indicating the certainty of the result.
+                   </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string indicating a guessed content type for the given data.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">content_type_guess</code>() function guesses
+               the content type based on example data. If the function is uncertain,
+               result_uncertain will be set to <code class="literal">True</code>. Either filename
+               or data may be <code class="literal">None</code>, in which case the guess will be
+               based solely on the other argument.
+            </p></div><div class="refsect2" title="gio.content_type_is_a"><a name="function-gio--content-type-is-a"></a><h3>gio.content_type_is_a</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">content_type_is_a</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>supertype</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string. 
+                   </td></tr><tr><td><p><span class="term"><em class="parameter"><code>supertype</code></em> :</span></p></td><td>a string.
+                   </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if type is a kind of
+                   supertype, <code class="literal">False</code> otherwise. 
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">content_type_is_a</code>() function determines
+               if type is a subset of supertype.
+            </p></div><div class="refsect2" title="gio.content_type_is_unknown"><a name="function-gio--content-type-is-unknown"></a><h3>gio.content_type_is_unknown</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">content_type_is_unknown</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a content type string. 
+                   </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the type is the unknown type.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">content_type_is_unknown</code>() function checks if
+               the content type is the generic "unknown" type. On unix this is the
+               "application/octet-stream" mimetype, while on win32 it is "*".
+            </p></div><div class="refsect2" title="gio.content_types_get_registered"><a name="function-gio--content-types-get-registered"></a><h3>gio.content_types_get_registered</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">content_types_get_registered</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of the registered content types.
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">content_types_get_registered</code>() function
+               gets a list of strings containing all the registered content types
+               known to the system.
+            </p></div><div class="refsect2" title="gio.io_error_from_errno"><a name="function-gio--io-error-from-errno"></a><h3>gio.io_error_from_errno</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">io_error_from_errno</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>err_no</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>err_no</code></em> :</span></p></td><td>Error number.
+                   </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a
+                   <a class="xref" href="gio-constants.html#gio-error-constants" title="Gio Error Constants">Gio Error Constants</a>
+                    </td></tr></tbody></table><p>
+                The <code class="methodname">io_error_from_errno</code>() function converts
+               error codes into GIO error codes.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-giovolumemonitor.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gio-constants.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.VolumeMonitor </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio Constants</td></tr></table></div></body></html>
diff --git a/docs/html/giounix-class-reference.html b/docs/html/giounix-class-reference.html
new file mode 100644 (file)
index 0000000..e91aa73
--- /dev/null
@@ -0,0 +1 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGio Unix Class Reference</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="index.html" title="PyGObject Reference Manual"><link rel="prev" href="gio-constants.html" title="gio Constants"><link rel="next" href="class-giounixinputstream.html" title="gio.unix.InputStream"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGio Unix Class Reference</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gio-constants.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="class-giounixinputstream.html">Next</a></td></tr></table><hr></div><div class="chapter" title="PyGio Unix Class Reference"><div class="titlepage"><div><div><h2 class="title"><a name="giounix-class-reference"></a>PyGio Unix Class Reference</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="refentrytitle"><a href="class-giounixinputstream.html">gio.unix.InputStream</a></span><span class="refpurpose"> â€” Streaming input operations for UNIX file descriptors.</span></dt><dt><span class="refentrytitle"><a href="class-giounixoutputstream.html">gio.unix.OutputStream</a></span><span class="refpurpose"> â€” Streaming output operations for UNIX file descriptors.</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gio-constants.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="class-giounixinputstream.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio Constants </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.unix.InputStream</td></tr></table></div></body></html>
diff --git a/docs/html/glib-class-reference.html b/docs/html/glib-class-reference.html
new file mode 100644 (file)
index 0000000..fa78a88
--- /dev/null
@@ -0,0 +1,3 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGlibClass Reference</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="index.html" title="PyGObject Reference Manual"><link rel="prev" href="pygobject-introduction.html" title="Introduction"><link rel="next" href="class-glibmaincontext.html" title="glib.MainContext"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGlibClass Reference</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pygobject-introduction.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="class-glibmaincontext.html">Next</a></td></tr></table><hr></div><div class="chapter" title="PyGlibClass Reference"><div class="titlepage"><div><div><h2 class="title"><a name="glib-class-reference"></a>PyGlibClass Reference</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="refentrytitle"><a href="class-glibmaincontext.html">glib.MainContext</a></span><span class="refpurpose"> â€” an object representing a set of event sources to be handled
+in a <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>.</span></dt><dt><span class="refentrytitle"><a href="class-glibmainloop.html">glib.MainLoop</a></span><span class="refpurpose"> â€” an object representing the main event loop of a PyGTK
+    application.</span></dt><dt><span class="refentrytitle"><a href="glib-functions.html">glib Functions</a></span><span class="refpurpose"> â€” miscellaneous functions</span></dt><dt><span class="refentrytitle"><a href="glib-constants.html">glib Constants</a></span><span class="refpurpose"> â€” the built-in constants of the glib module</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pygobject-introduction.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="class-glibmaincontext.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Introduction </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> glib.MainContext</td></tr></table></div></body></html>
diff --git a/docs/html/glib-constants.html b/docs/html/glib-constants.html
new file mode 100644 (file)
index 0000000..4e56956
--- /dev/null
@@ -0,0 +1,40 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib Constants</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="glib-functions.html" title="glib Functions"><link rel="next" href="gobject-class-reference.html" title="PyGObject Class Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib Constants</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glib-functions.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="gobject-class-reference.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib Constants"><a name="glib-constants"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib Constants</h2><p>glib Constants â€” the built-in constants of the glib module</p></div><div class="refsect1" title="Synopsis"><a name="id400400"></a><h2>Synopsis</h2><pre class="programlisting">
+<a class="xref" href="glib-constants.html#glib-io-condition-constants" title="Glib IO Condition Constants">Glib IO Condition Constants</a>
+<a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
+<a class="xref" href="glib-constants.html#glib-spawn-flag-constants" title="Glib Spawn Flag Constants">Glib Spawn Flag Constants</a>
+<a class="xref" href="glib-constants.html#glib-user-directory-constants" title="Glib User Directory Constants">Glib User Directory Constants</a>
+<a class="xref" href="glib-constants.html#glib-version-constants" title="Glib Version Constants">Glib Version Constants</a>
+</pre></div><div class="refsect1" title="Description"><a name="glib-constants-description"></a><h2>Description</h2><div class="refsect2" title="Glib IO Condition Constants"><a name="glib-io-condition-constants"></a><h3>Glib IO Condition Constants</h3><p>The IO Condition constants are a set of bit-flags that specify a
+condition to watch for on an event source.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.IO_IN</code></span></p></td><td>There is data to read</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_OUT</code></span></p></td><td>Data can be written (without blocking).</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_PRI</code></span></p></td><td>There is urgent data to read.</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_ERR</code></span></p></td><td>Error condition.</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_HUP</code></span></p></td><td>Hung up (the connection has been broken, usually for
+           pipes and sockets).</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_NVAL</code></span></p></td><td>Invalid request. The file descriptor is not
+           open.</td></tr></tbody></table></div><div class="refsect2" title="Glib Priority Constants"><a name="glib-priority-constants"></a><h3>Glib Priority Constants</h3><p>The Priority constants specify </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_HIGH</code></span></p></td><td>Use this for high priority event sources.</td></tr><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_DEFAULT</code></span></p></td><td>Use this for default priority event sources.  This
+           priority is used when adding timeout functions with the <a class="link" href="glib-functions.html#function-glib--timeout-add" title="glib.timeout_add"><code class="function">glib.timeout_add</code>()</a>
+           function. This priority is also used for events from the X
+           server.</td></tr><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_HIGH_IDLE</code></span></p></td><td>Use this for high priority idle functions. For example,
+           glib.PRIORITY_HIGH_IDLE + 10 is used for resizing operations;
+           and, glib.PRIORITY_HIGH_IDLE + 20, for redrawing
+           operations. (This is done to ensure that any pending resizes are
+           processed before any pending redraws, so that widgets are not
+           redrawn twice unnecessarily.)</td></tr><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_DEFAULT_IDLE</code></span></p></td><td>Use this for default priority idle functions. This
+           priority is used when adding idle functions with the <a class="link" href="glib-functions.html#function-glib--idle-add" title="glib.idle_add"><code class="function">glib.idle_add</code>()</a>
+           function.</td></tr><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_LOW</code></span></p></td><td>Use this for very low priority background
+           tasks.</td></tr></tbody></table></div><div class="refsect2" title="Glib Spawn Flag Constants"><a name="glib-spawn-flag-constants"></a><h3>Glib Spawn Flag Constants</h3><p>The Spawn Flag constants are a set of bit-flags that can be
+passed to the <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
+function.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.SPAWN_LEAVE_DESCRIPTORS_OPEN</code></span></p></td><td>the parent's open file descriptors will be inherited by
+the child; otherwise all descriptors except stdin/stdout/stderr will be
+closed before calling <code class="function">exec</code>() in the child.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_DO_NOT_REAP_CHILD</code></span></p></td><td>the child will not be automatically reaped; you must
+call <code class="function">waitpid</code>() or handle <code class="literal">SIGCHLD</code>
+yourself, or the child will become a zombie.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_SEARCH_PATH</code></span></p></td><td><em class="parameter"><code>argv</code></em>[0] need not be an absolute
+path, it will be looked for in the user's <code class="envar">PATH</code>.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_STDOUT_TO_DEV_NULL</code></span></p></td><td>the child's standard output will be discarded, instead
+of going to the same location as the parent's standard output.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_STDERR_TO_DEV_NULL</code></span></p></td><td>the child's standard error will be discarded.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_CHILD_INHERITS_STDIN</code></span></p></td><td>the child will inherit the parent's standard input (by
+default, the child's standard input is attached to /dev/null).</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_FILE_AND_ARGV_ZERO</code></span></p></td><td>the first element of <em class="parameter"><code>argv</code></em> is the
+file to execute, while the remaining elements are the actual argument vector
+to pass to the file. Normally <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
+uses <em class="parameter"><code>argv</code></em>[0] as the file to execute, and passes all
+of <em class="parameter"><code>argv</code></em> to the child.</td></tr></tbody></table></div><div class="refsect2" title="Glib User Directory Constants"><a name="glib-user-directory-constants"></a><h3>Glib User Directory Constants</h3><p>The User Directory constants are integer values that are currently used only as arguments to
+        <a class="link" href="glib-functions.html#function-glib--get-user-special-dir" title="glib.get_user_special_dir"><code class="function">glib.get_user_special_dir</code>()</a>
+        function.  See function documentation for details.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_DESKTOP</code></span></p></td><td>the user's Desktop directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_DOCUMENTS</code></span></p></td><td>the user's Documents directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_DOWNLOAD</code></span></p></td><td>the user's Downloads directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_MUSIC</code></span></p></td><td>the user's Music directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_PICTURES</code></span></p></td><td>the user's Pictures directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_PUBLIC_SHARE</code></span></p></td><td>the user's shared directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_TEMPLATES</code></span></p></td><td>the user's Templates directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_VIDEOS</code></span></p></td><td>the user's Movies directory</td></tr></tbody></table></div><div class="refsect2" title="Glib Version Constants"><a name="glib-version-constants"></a><h3>Glib Version Constants</h3><p>The Version constants specify the version of
+<code class="literal">Glib</code> used by PyGObject as a 3-tuple containing the major,
+minor and patch release numbers.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.glib_version</code></span></p></td><td>A 3-tuple containing (major, minor, patch) release
+           numbers of glib.</td></tr><tr><td><p><span class="term"><code class="literal">glib.pyglib_version</code></span></p></td><td>A 3-tuple containing (major, minor, patch) release
+           numbers of the python bindings.</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glib-functions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="glib-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gobject-class-reference.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glib Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> PyGObject Class Reference</td></tr></table></div></body></html>
diff --git a/docs/html/glib-functions.html b/docs/html/glib-functions.html
new file mode 100644 (file)
index 0000000..ffb796f
--- /dev/null
@@ -0,0 +1,280 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib Functions</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="class-glibmainloop.html" title="glib.MainLoop"><link rel="next" href="glib-constants.html" title="glib Constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glib Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-glibmainloop.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="glib-constants.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib Functions"><a name="glib-functions"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib Functions</h2><p>glib Functions â€” miscellaneous functions</p></div><div class="refsect1" title="Synopsis"><a name="id406219"></a><h2>Synopsis</h2><pre class="programlisting">
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--idle-add" title="glib.idle_add">glib.idle_add</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--timeout-add" title="glib.timeout_add">glib.timeout_add</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--timeout-add-seconds" title="glib.timeout_add_seconds">glib.timeout_add_seconds</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--io-add-watch" title="glib.io_add_watch">glib.io_add_watch</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>fd</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>condition</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--source-remove" title="glib.source_remove">glib.source_remove</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>tag</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--main-context-default" title="glib.main_context_default">glib.main_context_default</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--markup-escape-text" title="glib.markup_escape_text">glib.markup_escape_text</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>text</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--child-watch-add" title="glib.child_watch_add">glib.child_watch_add</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pid</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>function</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async">glib.spawn_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>argv</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>envp</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>working_directory</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_setup</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_input</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_output</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_error</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-current-time" title="glib.get_current_time">glib.get_current_time</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-cache-dir" title="glib.get_user_cache_dir">glib.get_user_cache_dir</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-config-dir" title="glib.get_user_config_dir">glib.get_user_config_dir</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-data-dir" title="glib.get_user_data_dir">glib.get_user_data_dir</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-special-dir" title="glib.get_user_special_dir">glib.get_user_special_dir</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>directory</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--main-depth" title="glib.main_depth">glib.main_depth</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--threads-init" title="glib.threads_init">glib.threads_init</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--filename-display-name" title="glib.filename_display_name">glib.filename_display_name</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--filename-display-basename" title="glib.filename_display_basename">glib.filename_display_basename</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--filename-from-utf8" title="glib.filename_from_utf8">glib.filename_from_utf8</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>utf8string</code></em></span></span>)</code></pre></div><div class="refsect1" title="Description"><a name="id395853"></a><h2>Description</h2><p>These functions are part of the <code class="literal">PyGObject</code> glib
+module but are not directly associated with a specific class.</p></div><div class="refsect1" title="Functions"><a name="id403508"></a><h2>Functions</h2><div class="refsect2" title="glib.idle_add"><a name="function-glib--idle-add"></a><h3>glib.idle_add</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.idle_add</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a function to call when
+<code class="literal">PyGTK</code> is idle</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>optionals arguments to be passed to
+<em class="parameter"><code>callback</code></em></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer ID</td></tr></tbody></table><p>The <code class="function">glib.idle_add</code>() function adds a
+function (specified by <em class="parameter"><code>callback</code></em>) to be called
+whenever there are no higher priority events pending to the default main
+loop. The function is given the default idle priority,
+<code class="literal">glib.PRIORITY_DEFAULT_IDLE</code>. Additional arguments to
+pass to <em class="parameter"><code>callback</code></em> can be specified after
+<em class="parameter"><code>callback</code></em>. The idle priority can be specified as a
+keyword-value pair with the keyword "priority". If
+<em class="parameter"><code>callback</code></em> returns <code class="literal">False</code> it is
+automatically removed from the list of event sources and will not be called
+again.</p></div><div class="refsect2" title="glib.timeout_add"><a name="function-glib--timeout-add"></a><h3>glib.timeout_add</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.timeout_add</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td><td>the time between calls to the function, in
+milliseconds </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>the function to call</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>zero or more arguments that will be passed to
+<em class="parameter"><code>callback</code></em></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer ID of the event
+source</td></tr></tbody></table><p>The <code class="function">glib.timeout_add</code>() function sets a
+function (specified by <em class="parameter"><code>callback</code></em>) to be called at
+regular intervals (specified by <em class="parameter"><code>interval</code></em>, with the
+default priority, <code class="literal">glib.PRIORITY_DEFAULT</code>. Additional
+arguments to pass to <em class="parameter"><code>callback</code></em> can be specified after
+<em class="parameter"><code>callback</code></em>. The idle priority may be specified as a
+keyword-value pair with the keyword "priority".</p><p>The function is called repeatedly until it returns
+<code class="literal">False</code>, at which point the timeout is automatically
+destroyed and the function will not be called again. The first call to the
+function will be at the end of the first interval. Note that timeout
+functions may be delayed, due to the processing of other event sources. Thus
+they should not be relied on for precise timing. After each call to the
+timeout function, the time of the next timeout is recalculated based on the
+current time and the given interval (it does not try to 'catch up' time lost
+in delays).</p></div><div class="refsect2" title="glib.timeout_add_seconds"><a name="function-glib--timeout-add-seconds"></a><h3>glib.timeout_add_seconds</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.timeout_add_seconds</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td><td>the time between calls to the function, in
+seconds </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>the function to call</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>zero or more arguments that will be passed to
+<em class="parameter"><code>callback</code></em></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer ID of the event
+source</td></tr></tbody></table><p>The <code class="function">glib.timeout_add_seconds</code>() is similar to
+       <code class="function">glib.timeout_add</code>() except
+       that <em class="parameter"><code>interval</code></em> must be specified in seconds, not
+       milliseconds, and the function should cause less CPU wakeups, which is important
+       for laptops' batteries.</p><p>Unlike <code class="function">glib.timeout_add</code>(), this function operates at
+       whole second granularity.  The initial starting point of the timer is determined
+       by the implementation and the implementation is expected to group multiple timers
+       together so that they fire all at the same time.  To allow this grouping, the
+       interval to the first timer is rounded and can deviate up to one second from the
+       specified interval.  Subsequent timer iterations will generally run at the
+       specified interval.</p><p>Note that timeout functions may be delayed, due to the processing of other
+       event sources.  Thus they should not be relied on for precise timing.  After each
+       call to the timeout function, the time of the next timeout is recalculated based
+       on the current time and the given interval.</p><p>The grouping of timers to fire at the same time results in a more power and
+       CPU efficient behavior so if your timer is in multiples of seconds and you don't
+       require the first timer exactly one second from now, the use of
+       <code class="function">glib.timeout_add_seconds</code>() is preferred
+       over <code class="function">glib.timeout_add</code>().</p></div><div class="refsect2" title="glib.io_add_watch"><a name="function-glib--io-add-watch"></a><h3>glib.io_add_watch</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.io_add_watch</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>fd</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>condition</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td><td>a Python file object or an integer file
+descriptor ID</td></tr><tr><td><p><span class="term"><em class="parameter"><code>condition</code></em> :</span></p></td><td>a condition mask</td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a function to call</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional arguments to pass to
+<em class="parameter"><code>callback</code></em></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer ID of the event source</td></tr></tbody></table><p>The <code class="function">glib.io_add_watch</code>() function
+arranges for the file (specified by <em class="parameter"><code>fd</code></em>) to be
+monitored by the main loop for the specified
+<em class="parameter"><code>condition</code></em>. <em class="parameter"><code>fd</code></em> may be a Python
+file object or an integer file descriptor. The value of condition is a
+combination of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.IO_IN</code></span></p></td><td>There is data to read.</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_OUT</code></span></p></td><td>Data can be written (without blocking). </td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_PRI</code></span></p></td><td>There is urgent data to read.</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_ERR</code></span></p></td><td>Error condition.</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_HUP</code></span></p></td><td>Hung up (the connection has been broken, usually for
+pipes and sockets).</td></tr></tbody></table><p>Additional arguments to pass to <em class="parameter"><code>callback</code></em>
+can be specified after <em class="parameter"><code>callback</code></em>. The idle priority
+may be specified as a keyword-value pair with the keyword "priority". The
+signature of the callback function is:</p><pre class="programlisting">
+  def callback(source, cb_condition, ...)
+</pre><p>where <em class="parameter"><code>source</code></em> is
+<em class="parameter"><code>fd</code></em>, the file descriptor;
+<em class="parameter"><code>cb_condition</code></em> is the condition that triggered the
+signal; and, <em class="parameter"><code>...</code></em> are the zero or more arguments that
+were passed to the <code class="function">glib.io_add_watch</code>()
+function.</p><p>If the callback function returns <code class="literal">False</code> it
+will be automatically removed from the list of event sources and will not be
+called again. If it returns <code class="literal">True</code> it will be called again
+when the condition is matched.</p></div><div class="refsect2" title="glib.source_remove"><a name="function-glib--source-remove"></a><h3>glib.source_remove</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.source_remove</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>tag</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>tag</code></em> :</span></p></td><td>an integer ID</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the event source was
+removed</td></tr></tbody></table><p>The <code class="function">glib.source_remove</code>() function
+removes the event source specified by tag (as returned by the <a class="link" href="glib-functions.html#function-glib--idle-add" title="glib.idle_add"><code class="function">glib.idle_add</code>()</a>, 
+<a class="link" href="glib-functions.html#function-glib--timeout-add" title="glib.timeout_add"><code class="function">glib.timeout_add</code></a>() 
+and <a class="link" href="glib-functions.html#function-glib--io-add-watch" title="glib.io_add_watch"><code class="function">glib.io_add_watch</code>()</a> 
+functions)</p></div><div class="refsect2" title="glib.main_context_default"><a name="function-glib--main-context-default"></a><h3>glib.main_context_default</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.main_context_default</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the default glib.MainContext
+object</td></tr></tbody></table><p>The <code class="function">glib.main_context_default</code>() function
+returns the default glib.MainContext object.</p></div><div class="refsect2" title="glib.markup_escape_text"><a name="function-glib--markup-escape-text"></a><h3>glib.markup_escape_text</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.markup_escape_text</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>text</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td><td>the UTF-8 string to be
+escaped</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the escaped text</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">glib.markup_escape_text</code>() function
+escapes the string specified by <em class="parameter"><code>text</code></em> so that the
+markup parser will parse it verbatim. Less than, greater than, ampersand,
+etc. are replaced with the corresponding entities. This function would
+typically be used when writing out a file to be parsed with the markup
+parser.</p><p>Note that this function doesn't protect whitespace and line
+endings from being processed according to the XML rules for normalization of
+line endings and attribute values.</p></div><div class="refsect2" title="glib.child_watch_add"><a name="function-glib--child-watch-add"></a><h3>glib.child_watch_add</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.child_watch_add</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pid</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>function</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pid</code></strong> :</span></p></td><td>process id of a child process to watch</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>function</code></strong> :</span></p></td><td>the function to call</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>the optional data to pass to
+<em class="parameter"><code>function</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>priority</code></strong> :</span></p></td><td>the priority of the idle source - one of the
+<a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the id of event source.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">glib.child_watch_add</code>() function sets
+the function specified by <em class="parameter"><code>function</code></em> to be called with
+the user data specified by <em class="parameter"><code>data</code></em> when the child
+indicated by <em class="parameter"><code>pid</code></em> exits. The signature for the
+callback is:</p><pre class="programlisting">
+def callback(pid, condition, user_data)
+</pre><p>where <em class="parameter"><code>pid</code></em> is is the child process id,
+<em class="parameter"><code>condition</code></em> is the status information about the child
+process and <em class="parameter"><code>user_data</code></em> is <em class="parameter"><code>data</code></em>
+PyGTK supports only a single callback per process id.</p></div><div class="refsect2" title="glib.spawn_async"><a name="function-glib--spawn-async"></a><h3>glib.spawn_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.spawn_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>argv</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>envp</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>working_directory</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_setup</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_input</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_output</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_error</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>argv</code></strong> :</span></p></td><td>a sequence of strings containing the arguments
+of the child process</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>envp</code></strong> :</span></p></td><td>the child's environment or
+<code class="literal">None</code> to inherit the parent's
+environment.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>working_directory</code></strong> :</span></p></td><td>the child's current working directory, or
+<code class="literal">None</code> to inherit parent's</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags from the <a class="xref" href="glib-constants.html#glib-spawn-flag-constants" title="Glib Spawn Flag Constants">Glib Spawn Flag Constants</a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>child_setup</code></strong> :</span></p></td><td>a function to run in the child just before
+calling <code class="function">exec</code>()</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>the user data for the
+<em class="parameter"><code>child_setup</code></em> function</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>standard_input</code></strong> :</span></p></td><td>if <code class="literal">True</code> return the file
+descriptor for the child's stdin</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>standard_output</code></strong> :</span></p></td><td>if <code class="literal">True</code> return the file
+descriptor for the child's stdout</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>standard_error</code></strong> :</span></p></td><td>if <code class="literal">True</code> return the file
+descriptor for the child's stderr</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 4-tuple containing the child's process id and
+the stdin, stdout and stderr file descriptor integers.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">glib.spawn_async</code>() function executes
+a child program asynchronously (your program will not block waiting for the
+child to exit). The child program is specified by the only argument that
+must be provided, <em class="parameter"><code>argv</code></em>. <em class="parameter"><code>argv</code></em>
+should be a sequence of strings, to be passed as the argument vector for the
+child. The first string in <em class="parameter"><code>argv</code></em> is of course the name
+of the program to execute. By default, the name of the program must be a
+full path; the <code class="envar">PATH</code> shell variable will only be searched if
+you pass the <code class="literal">glib.SPAWN_SEARCH_PATH</code> flag in
+<em class="parameter"><code>flags</code></em>. The function returns a 4-tuple containing the
+child's process id and the file descriptors for the child's stdin, stdout
+and stderr. The stdin, stdout and stderr file descriptors are returned only
+ofthe corresponding <em class="parameter"><code>standard_input</code></em>,
+<em class="parameter"><code>standard_output</code></em> or
+<em class="parameter"><code>standard_error</code></em> params are
+<code class="literal">True</code>.</p><p>On Windows, the low-level child process creation API
+(<code class="function">CreateProcess</code>()) doesn't use argument vectors, but a
+command line. The C runtime library's <code class="function">spawn*</code>() family
+of functions (which <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
+eventually calls) paste the argument vector elements into a command line,
+and the C runtime startup code does a corresponding reconstruction of an
+argument vector from the command line, to be passed to
+<code class="function">main</code>(). Complications arise when you have argument
+vector elements that contain spaces of double quotes. The
+<code class="function">spawn*</code>() functions don't do any quoting or escaping,
+but on the other hand the startup code does do unquoting and unescaping in
+order to enable receiving arguments with embedded spaces or double
+quotes. To work around this asymmetry, the <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
+function will do quoting and escaping on argument vector elements that need
+it before calling the C runtime <code class="function">spawn</code>()
+function.</p><p><em class="parameter"><code>envp</code></em> is a sequence of strings, where each
+ string has the form <code class="literal">KEY=VALUE</code>. This will become the
+ child's environment. If <em class="parameter"><code>envp</code></em> is
+ <em class="parameter"><code>None</code></em> or not specified, the child inherits its
+ parent's environment.</p><p><em class="parameter"><code>flags</code></em> should be the bitwise
+<code class="literal">OR</code> of the <a class="xref" href="glib-constants.html#glib-spawn-flag-constants" title="Glib Spawn Flag Constants">Glib Spawn Flag Constants</a> you want to affect the
+function's behaviour. The <code class="literal">glib.SPAWN_DO_NOT_REAP_CHILD</code>
+flag means that the child will not automatically be reaped; you must use a
+GChildWatch source to be notified about the death of the child
+process. Eventually you must call g_spawn_close_pid() on the child_pid, in
+order to free resources which may be associated with the child process. (On
+Unix, using a GChildWatch source is equivalent to calling
+<code class="function">waitpid</code>() or handling the <code class="literal">SIGCHLD</code>
+signal manually. On Windows, calling g_spawn_close_pid() is equivalent to
+calling <code class="function">CloseHandle</code>() on the process handle
+returned).</p><p><code class="literal">glib.SPAWN_LEAVE_DESCRIPTORS_OPEN</code> means
+that the parent's open file descriptors will be inherited by the child;
+otherwise all descriptors except stdin/stdout/stderr will be closed before
+calling <code class="function">exec</code>() in the
+child. <code class="literal">glib.SPAWN_SEARCH_PATH</code> means that
+<em class="parameter"><code>argv</code></em>[0] need not be an absolute path, it will be
+looked for in the user's
+<code class="envar">PATH</code>. <code class="literal">glib.SPAWN_STDOUT_TO_DEV_NULL</code>
+means that the child's standard output will be discarded, instead of going
+to the same location as the parent's standard output. If you use this flag,
+<em class="parameter"><code>standard_output</code></em> must be
+<code class="literal">None</code>. <code class="literal">glib.SPAWN_STDERR_TO_DEV_NULL</code>
+means that the child's standard error will be discarded, instead of going to
+the same location as the parent's standard error. If you use this flag,
+<em class="parameter"><code>standard_error</code></em> must be
+<code class="literal">None</code>. <code class="literal">glib.SPAWN_CHILD_INHERITS_STDIN</code>
+means that the child will inherit the parent's standard input (by default,
+the child's standard input is attached to
+<code class="filename">/dev/null</code>). If you use this flag,
+<em class="parameter"><code>standard_input</code></em> must be
+<code class="literal">None</code>. <code class="literal">glib.SPAWN_FILE_AND_ARGV_ZERO</code>
+means that the first element of <em class="parameter"><code>argv</code></em> is the file to
+execute, while the remaining elements are the actual argument vector to pass
+to the file. Normally the <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
+function uses <em class="parameter"><code>argv</code></em>[0] as the file to execute, and
+passes all of <em class="parameter"><code>argv</code></em> to the child.</p><p><em class="parameter"><code>child_setup</code></em> and
+<em class="parameter"><code>user_data</code></em> are a function and user data. On POSIX
+platforms, the function is called in the child after GLib has performed all
+the setup it plans to perform (including creating pipes, closing file
+descriptors, etc.) but before calling <code class="function">exec</code>(). That is,
+<em class="parameter"><code>child_setup</code></em> is called just before calling
+<code class="function">exec</code>() in the child. Obviously actions taken in this
+function will only affect the child, not the parent. On Windows, there is no
+separate <code class="function">fork</code>() and <code class="function">exec</code>()
+functionality. Child processes are created and run right away with one API
+call,
+<code class="function">CreateProcess</code>(). <em class="parameter"><code>child_setup</code></em> is
+called in the parent process just before creating the child process. You
+should carefully consider what you do in <em class="parameter"><code>child_setup</code></em>
+if you intend your software to be portable to Windows.</p><p>The returned child process id can be used to send signals to the
+child, or to wait for the child if you specified the
+<code class="literal">glib.SPAWN_DO_NOT_REAP_CHILD</code> flag.  On Windows, child
+pid will be returned only if you specified the
+<code class="literal">glib.SPAWN_DO_NOT_REAP_CHILD</code> flag.</p><p>The caller of the <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
+must close any returned file descriptors when they are no longer in
+use.</p><p>If <em class="parameter"><code>standard_input</code></em> is
+<code class="literal">None</code>, the child's standard input is attached to
+<code class="filename">/dev/null</code> unless
+<code class="literal">glib.SPAWN_CHILD_INHERITS_STDIN</code> is set.</p><p>If <em class="parameter"><code>standard_error</code></em> is
+<code class="literal">None</code>, the child's standard error goes to the same
+location as the parent's standard error unless
+<code class="literal">glib.SPAWN_STDERR_TO_DEV_NULL</code> is set.</p><p>If <em class="parameter"><code>standard_output</code></em> is
+<code class="literal">None</code>, the child's standard output goes to the same
+location as the parent's standard output unless
+<code class="literal">glib.SPAWN_STDOUT_TO_DEV_NULL</code> is set.</p><p>If an error occurs, the glib.GError exception will be
+raised.</p></div><div class="refsect2" title="glib.get_current_time"><a name="function-glib--get-current-time"></a><h3>glib.get_current_time</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.get_current_time</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the current time as the number of seconds and
+microseconds from the epoch.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">glib.get_current_time</code>() function
+reurns the current time of day as the number of seconds and microseconds
+from the epoch.</p></div><div class="refsect2" title="glib.get_user_cache_dir"><a name="function-glib--get-user-cache-dir"></a><h3>glib.get_user_cache_dir</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.get_user_cache_dir</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
+              a strings with a path to user's cache directory.
+            </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGObject 2.18 and above.</p></div><p>Returns a base directory in which to store non-essential,
+        cached data specific to particular user.</p><p>On UNIX platforms this is determined using the mechanisms
+        described in the
+        <a class="ulink" href="http://www.freedesktop.org/Standards/basedir-spec" target="_top">XDG
+          Base Directory Specification</a>.</p></div><div class="refsect2" title="glib.get_user_config_dir"><a name="function-glib--get-user-config-dir"></a><h3>glib.get_user_config_dir</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.get_user_config_dir</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
+              a strings with a path to user's configuration directory.
+            </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGObject 2.18 and above.</p></div><p>Returns a base directory in which to store user-specific
+        application configuration information such as user preferences
+        and settings. </p><p>On UNIX platforms this is determined using the mechanisms
+        described in the
+        <a class="ulink" href="http://www.freedesktop.org/Standards/basedir-spec" target="_top">XDG
+          Base Directory Specification</a>.</p></div><div class="refsect2" title="glib.get_user_data_dir"><a name="function-glib--get-user-data-dir"></a><h3>glib.get_user_data_dir</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.get_user_data_dir</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
+              a strings with a path to user's data directory.
+            </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGObject 2.18 and above.</p></div><p>Returns a base directory in which to access application
+        data such as icons that is customized for a particular
+        user</p><p>On UNIX platforms this is determined using the mechanisms
+        described in the
+        <a class="ulink" href="http://www.freedesktop.org/Standards/basedir-spec" target="_top">XDG
+          Base Directory Specification</a>.</p></div><div class="refsect2" title="glib.get_user_special_dir"><a name="function-glib--get-user-special-dir"></a><h3>glib.get_user_special_dir</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.get_user_special_dir</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>directory</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>directory</em></span> :</span></p></td><td>
+              the logical id of special directory,
+              see <a class="link" href="glib-constants.html#glib-user-directory-constants" title="Glib User Directory Constants">User
+              Directory constants</a> for the list of supported
+              values
+            </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
+              a strings with a path to the requested directory.
+            </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGObject 2.18 and above.</p></div><p>Returns the full path of a special directory using its
+        logical id.</p><p>On Unix this is done using the XDG special user
+        directories.  For compatibility with existing practise,
+        <a class="link" href="glib-constants.html#glib-user-directory-constants" title="Glib User Directory Constants">glib.USER_DIRECTORY_DESKTOP</a>
+        falls back to <code class="literal">$HOME/Desktop</code> when XDG
+        special user directories have not been set up.</p><p>Depending on the platform, the user might be able to
+        change the path of the special directory without requiring the
+        session to restart; GLib will not reflect any change once the
+        special directories are loaded.</p></div><div class="refsect2" title="glib.main_depth"><a name="function-glib--main-depth"></a><h3>glib.main_depth</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.main_depth</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the depth of the stack of calls to the main
+context.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">main_depth</code>() function returns the depth
+of the stack of calls in the main context. That is, when called from the
+toplevel, it gives 0. When called from within a callback from the <a class="link" href="class-glibmaincontext.html#method-glibmaincontext--iteration" title="glib.MainContext.iteration"><code class="methodname">glib.MainContext.iteration</code>()</a>
+method (or the <a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run"><code class="methodname">glib.MainLoop.run</code>()</a>
+method, etc.) it returns 1. When called from within a callback to a
+recursive call to the <a class="link" href="class-glibmaincontext.html#method-glibmaincontext--iteration" title="glib.MainContext.iteration"><code class="methodname">glib.MainContext.iteration</code>()</a>
+method), it returns 2. And so forth.</p></div><div class="refsect2" title="glib.threads_init"><a name="function-glib--threads-init"></a><h3>glib.threads_init</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.threads_init</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code></code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <code class="function">threads_init</code>() function initializes the
+      the use of Python threading in the glib module. This function is
+      different than the <PYGTKDOCLINK HREF="function-gdk--threads-init"><code class="function">gtk.gdk.threads_init</code>()</PYGTKDOCLINK>
+      function as that function also initializes the gdk threads.</p></div><div class="refsect2" title="glib.signal_accumulator_true_handled"><a name="function-glib--signal-accumulator-true-handled"></a><h3>glib.signal_accumulator_true_handled</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.signal_accumulator_true_handled</span>()</code></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">signal_accumulator_true_handled</code>()
+      function is only used as accumulator argument when registering
+      signals.</p></div><div class="refsect2" title="glib.filename_display_name"><a name="function-glib--filename-display-name"></a><h3>glib.filename_display_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.filename_display_name</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>filename</em></span> :</span></p></td><td>a pathname in the file name
+          encoding</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an UTF8 rendition of
+          <em class="parameter"><code>filename</code></em>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">filename_display_name</code>() function
+      converts a filename into a valid UTF-8 string. The conversion is not
+      necessarily reversible, so you should keep the original around and use
+      the return value of this function only for display purposes. Unlike
+      g_filename_to_utf8(), the result is guaranteed to be non-None even if
+      the filename actually isn't in the file name encoding.</p><p>If you know the whole pathname of the file you should use the
+      <a class="link" href="glib-functions.html#function-glib--filename-display-basename" title="glib.filename_display_basename"><code class="function">glib.filename_display_basename</code>()</a>
+      function, since that allows location-based translation of
+      filenames.</p></div><div class="refsect2" title="glib.filename_display_basename"><a name="function-glib--filename-display-basename"></a><h3>glib.filename_display_basename</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.filename_display_basename</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>filename</em></span> :</span></p></td><td>an absolute pathname in the file name
+          encoding</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an UTF8 rendition of
+          <em class="parameter"><code>filename</code></em>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">filename_display_basename</code>() function
+      returns the display basename for the particular filename, guaranteed
+      to be valid UTF-8. The display name might not be identical to the
+      filename, for instance there might be problems converting it to UTF-8,
+      and some files can be translated in the display.</p><p>You must pass the whole absolute pathname to this functions so
+      that translation of well known locations can be done.</p><p>This function is preferred over the <a class="link" href="glib-functions.html#function-glib--filename-display-name" title="glib.filename_display_name"><code class="function">glib.filename_display_name</code>()</a>
+      function if you know the whole path, as it allows translation.</p></div><div class="refsect2" title="glib.filename_from_utf8"><a name="function-glib--filename-from-utf8"></a><h3>glib.filename_from_utf8</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.filename_from_utf8</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>utf8string</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>utf8string</em></span> :</span></p></td><td>a UTF-8 encoded string.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a filename encoded in the GLib filename
+          encoding.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">filename_from_utf8</code>() function converts
+      a string from UTF-8 to the encoding GLib uses for filenames. Note that
+      on Windows GLib uses UTF-8 for filenames.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-glibmainloop.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="glib-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="glib-constants.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glib.MainLoop </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> glib Constants</td></tr></table></div></body></html>
diff --git a/docs/html/gobject-class-reference.html b/docs/html/gobject-class-reference.html
new file mode 100644 (file)
index 0000000..80d2cce
--- /dev/null
@@ -0,0 +1,2 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGObject Class Reference</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="index.html" title="PyGObject Reference Manual"><link rel="prev" href="glib-constants.html" title="glib Constants"><link rel="next" href="class-gobject.html" title="gobject.GObject"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGObject Class Reference</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glib-constants.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="class-gobject.html">Next</a></td></tr></table><hr></div><div class="chapter" title="PyGObject Class Reference"><div class="titlepage"><div><div><h2 class="title"><a name="gobject-class-reference"></a>PyGObject Class Reference</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="refentrytitle"><a href="class-gobject.html">gobject.GObject</a></span><span class="refpurpose"> â€” the base class</span></dt><dt><span class="refentrytitle"><a href="class-gobjectgboxed.html">gobject.GBoxed</a></span><span class="refpurpose"> â€” an object containing an opaque chunk of data</span></dt><dt><span class="refentrytitle"><a href="class-gobjectgpointer.html">gobject.GPointer</a></span><span class="refpurpose"> â€” an object containing a completely opaque chunk of
+    data</span></dt><dt><span class="refentrytitle"><a href="class-gobjectginterface.html">gobject.GInterface</a></span><span class="refpurpose"> â€” an object representing a GInterface</span></dt><dt><span class="refentrytitle"><a href="gobject-functions.html">gobject Functions</a></span><span class="refpurpose"> â€” miscellaneous functions</span></dt><dt><span class="refentrytitle"><a href="gobject-constants.html">gobject Constants</a></span><span class="refpurpose"> â€” the built-in constants of the gobject module</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glib-constants.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="class-gobject.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glib Constants </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject.GObject</td></tr></table></div></body></html>
diff --git a/docs/html/gobject-constants.html b/docs/html/gobject-constants.html
new file mode 100644 (file)
index 0000000..6ff3ee5
--- /dev/null
@@ -0,0 +1,63 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject Constants</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="gobject-functions.html" title="gobject Functions"><link rel="next" href="gio-class-reference.html" title="PyGio Class Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject Constants</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gobject-functions.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gio-class-reference.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject Constants"><a name="gobject-constants"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject Constants</h2><p>gobject Constants â€” the built-in constants of the gobject module</p></div><div class="refsect1" title="Synopsis"><a name="id374449"></a><h2>Synopsis</h2><pre class="programlisting">
+<a class="xref" href="gobject-constants.html#gobject-param-constants" title="GObject Param Flag Constants">GObject Param Flag Constants</a>
+<a class="xref" href="gobject-constants.html#gobject-signal-constants" title="GObject Signal Flag Constants">GObject Signal Flag Constants</a>
+<a class="xref" href="gobject-constants.html#gobject-type-constants" title="GObject Built-in Type Constants">GObject Built-in Type Constants</a>
+<a class="xref" href="gobject-constants.html#gobject-version-constants" title="GObject Version Constants">GObject Version Constants</a>
+</pre></div><div class="refsect1" title="Description"><a name="gobject-constants-description"></a><h2>Description</h2><div class="refsect2" title="GObject Param Flag Constants"><a name="gobject-param-constants"></a><h3>GObject Param Flag Constants</h3><p>The Param Flag constants are a set of bit-flags that specify
+certain aspects of parameters that can be configured.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gobject.PARAM_READABLE</code></span></p></td><td>The parameter is readable</td></tr><tr><td><p><span class="term"><code class="literal">gobject.PARAM_WRITABLE</code></span></p></td><td>The parameter is writable</td></tr><tr><td><p><span class="term"><code class="literal">gobject.PARAM_CONSTRUCT</code></span></p></td><td>The parameter will be set upon object
+           construction</td></tr><tr><td><p><span class="term"><code class="literal">gobject.PARAM_CONSTRUCT_ONLY</code></span></p></td><td>The parameter will only be set upon object
+           construction</td></tr><tr><td><p><span class="term"><code class="literal">gobject.PARAM_LAX_VALIDATION</code></span></p></td><td>Upon parameter conversion strict validation is not
+           required</td></tr></tbody></table></div><div class="refsect2" title="GObject Signal Flag Constants"><a name="gobject-signal-constants"></a><h3>GObject Signal Flag Constants</h3><p>The Signal Flag constants are a set of bit-flags that specify a
+signal's behavior. The overall signal description outlines how especially
+the <code class="literal">RUN</code> flags control the stages of a signal
+emission.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_RUN_FIRST</code></span></p></td><td>Invoke the object method handler in the first emission
+           stage.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_RUN_LAST</code></span></p></td><td>Invoke the object method handler in the third emission
+           stage.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_RUN_CLEANUP</code></span></p></td><td>Invoke the object method handler in the last emission
+           stage.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_NO_RECURSE</code></span></p></td><td>Signals being emitted for an object while currently
+           being in emission for this very object will not be emitted
+           recursively, but instead cause the first emission to be
+           restarted.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_DETAILED</code></span></p></td><td>This signal supports "::detail" appendices to the
+           signal name upon handler connections and emissions.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_ACTION</code></span></p></td><td>Action signals are signals that may freely be emitted
+           on alive objects from user code via the <a class="link" href="class-gobject.html#method-gobject--emit" title="gobject.GObject.emit"><code class="methodname">gobject.emit</code>()</a>
+           method and friends, without the need of being embedded into
+           extra code that performs pre or post emission adjustments on the
+           object. They can also be thought of as object methods which can
+           be called generically by third-party code.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_NO_HOOKS</code></span></p></td><td>No emissions hooks are supported for this
+           signal.</td></tr></tbody></table></div><div class="refsect2" title="GObject Spawn Flag Constants"><a name="gobject-spawn-flag-constants"></a><h3>GObject Spawn Flag Constants</h3><p>The Spawn Flag constants are a set of bit-flags that can be
+passed to the <PYGTKDOCLINK HREF="function-gobject--spawn-async"><code class="function">gobject.spawn_async</code>()</PYGTKDOCLINK>
+function.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_LEAVE_DESCRIPTORS_OPEN</code></span></p></td><td>the parent's open file descriptors will be inherited by
+the child; otherwise all descriptors except stdin/stdout/stderr will be
+closed before calling <code class="function">exec</code>() in the child.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_DO_NOT_REAP_CHILD</code></span></p></td><td>the child will not be automatically reaped; you must
+call <code class="function">waitpid</code>() or handle <code class="literal">SIGCHLD</code>
+yourself, or the child will become a zombie.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_SEARCH_PATH</code></span></p></td><td><em class="parameter"><code>argv</code></em>[0] need not be an absolute
+path, it will be looked for in the user's <code class="envar">PATH</code>.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_STDOUT_TO_DEV_NULL</code></span></p></td><td>the child's standard output will be discarded, instead
+of going to the same location as the parent's standard output.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_STDERR_TO_DEV_NULL</code></span></p></td><td>the child's standard error will be discarded.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_CHILD_INHERITS_STDIN</code></span></p></td><td>the child will inherit the parent's standard input (by
+default, the child's standard input is attached to /dev/null).</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SPAWN_FILE_AND_ARGV_ZERO</code></span></p></td><td>the first element of <em class="parameter"><code>argv</code></em> is the
+file to execute, while the remaining elements are the actual argument vector
+to pass to the file. Normally <PYGTKDOCLINK HREF="function-gobject--spawn-async"><code class="function">gobject.spawn_async</code>()</PYGTKDOCLINK>
+uses <em class="parameter"><code>argv</code></em>[0] as the file to execute, and passes all
+of <em class="parameter"><code>argv</code></em> to the child.</td></tr></tbody></table></div><div class="refsect2" title="GObject Built-in Type Constants"><a name="gobject-type-constants"></a><h3>GObject Built-in Type Constants</h3><p>The Built-in Type constants specify the pre-defined types used
+by gobject.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gobject.TYPE_INVALID</code></span></p></td><td>An invalid type, used as error return value in some
+           functions.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_NONE</code></span></p></td><td>A fundamental type indicating no type.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_INTERFACE</code></span></p></td><td>The fundamental type from which all interfaces are
+           derived.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_CHAR</code></span></p></td><td>The fundamental type corresponding to a
+           character. This maps to a string in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_UCHAR</code></span></p></td><td>The fundamental type corresponding to an unsigned
+           character. This maps to a string in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_BOOLEAN</code></span></p></td><td>The fundamental type corresponding to a True or False
+           value. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_INT</code></span></p></td><td>The fundamental type corresponding to an
+           integer. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_UINT</code></span></p></td><td>he fundamental type corresponding to an unsigned
+           integer. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_LONG</code></span></p></td><td>The fundamental type corresponding to a long
+           integer. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_ULONG</code></span></p></td><td>The fundamental type corresponding to an unsigned
+           integer. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_INT64</code></span></p></td><td>The fundamental type corresponding to an long long
+           integer. This maps to a long integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_UINT64</code></span></p></td><td>The fundamental type corresponding to an unsigned long
+           long integer. This maps to a long integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_ENUM</code></span></p></td><td>The fundamental type corresponding to an enumeration
+           type. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_FLAGS</code></span></p></td><td>The fundamental type corresponding to a flag
+           type. This maps to an integer in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_FLOAT</code></span></p></td><td>The fundamental type corresponding to a floating point
+           number. This maps to a float in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_DOUBLE</code></span></p></td><td>The fundamental type corresponding to a double
+           floating point number. This maps to a float in Python.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_STRING</code></span></p></td><td>The fundamental type corresponding to a string.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_POINTER</code></span></p></td><td>The fundamental type corresponding to a pointer to an
+           anonymous type. This has no corresponding Python type.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_BOXED</code></span></p></td><td>The fundamental type corresponding to a boxed object
+           type.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_PARAM</code></span></p></td><td>The fundamental type corresponding to a GParamSpec
+           type.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_OBJECT</code></span></p></td><td>The fundamental type corresponding to a GObject
+           type.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.TYPE_PYOBJECT</code></span></p></td><td>The fundamental type corresponding to a Python Object
+           type.</td></tr></tbody></table></div><div class="refsect2" title="GObject Version Constants"><a name="gobject-version-constants"></a><h3>GObject Version Constants</h3><p>The Version constants specify the version of
+<code class="literal">GLIB</code> used by PyGTK as a 3-tuple containing the major,
+minor and patch release numbers.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gobject.glib_version</code></span></p></td><td>A 3-tuple containing (major, minor, patch) release
+           numbers.</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gobject-functions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gio-class-reference.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> PyGio Class Reference</td></tr></table></div></body></html>
diff --git a/docs/html/gobject-functions.html b/docs/html/gobject-functions.html
new file mode 100644 (file)
index 0000000..3853a06
--- /dev/null
@@ -0,0 +1,134 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gobject Functions</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gobject-class-reference.html" title="PyGObject Class Reference"><link rel="prev" href="class-gobjectginterface.html" title="gobject.GInterface"><link rel="next" href="gobject-constants.html" title="gobject Constants"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gobject Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gobjectginterface.html">Prev</a> </td><th width="60%" align="center">PyGObject Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gobject-constants.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gobject Functions"><a name="gobject-functions"></a><div class="titlepage"></div><div class="refnamediv"><h2>gobject Functions</h2><p>gobject Functions â€” miscellaneous functions</p></div><div class="refsect1" title="Synopsis"><a name="id361138"></a><h2>Synopsis</h2><pre class="programlisting">
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-name" title="gobject.type_name">gobject.type_name</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-from-name" title="gobject.type_from_name">gobject.type_from_name</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type_name</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-parent" title="gobject.type_parent">gobject.type_parent</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-is-a" title="gobject.type_is_a">gobject.type_is_a</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>parent_type</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-children" title="gobject.type_children">gobject.type_children</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-interfaces" title="gobject.type_interfaces">gobject.type_interfaces</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--type-register" title="gobject.type_register">gobject.type_register</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>class</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-new" title="gobject.signal_new">gobject.signal_new</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>signal_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>flags</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>return_type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>param_types</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-list-names" title="gobject.signal_list_names">gobject.signal_list_names</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-list-ids" title="gobject.signal_list_ids">gobject.signal_list_ids</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-lookup" title="gobject.signal_lookup">gobject.signal_lookup</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-name" title="gobject.signal_name">gobject.signal_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>signal_id</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-query1" title="gobject.signal_query">gobject.signal_query</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-query2" title="gobject.signal_query">gobject.signal_query</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>signal_id</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--list-properties" title="gobject.list_properties">gobject.list_properties</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--new" title="gobject.new">gobject.new</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-accumulator-true-handled" title="gobject.signal_accumulator_true_handled">gobject.signal_accumulator_true_handled</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--add-emission-hook" title="gobject.add_emission_hook">gobject.add_emission_hook</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--remove-emission-hook" title="gobject.remove_emission_hook">gobject.remove_emission_hook</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>hook_id</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject---install-metaclass" title="gobject._install_metaclass">gobject._install_metaclass</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>metaclass</code></em></span></span>)</code>
+    </pre></div><div class="refsect1" title="Description"><a name="id363851"></a><h2>Description</h2><p>These functions are part of the <code class="literal">PyGTK</code> gobject
+module but are not directly associated with a specific class.</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
+        Many functions that previously were in this namespace got moved to <a class="link" href="glib-functions.html" title="glib Functions"><code class="literal">glib</code></a> namespace instead.  They
+        are still available in <code class="literal">gobject</code> for backward compatibility, but
+        not documented here.  If you miss documentation for some function, be sure to
+        check <a class="link" href="glib-functions.html" title="glib Functions"><code class="literal">glib</code></a> first.
+      </p></div></div><div class="refsect1" title="Functions"><a name="id427695"></a><h2>Functions</h2><div class="refsect2" title="gobject.type_name"><a name="function-gobject--type-name"></a><h3>gobject.type_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.type_name</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td></td></tr></tbody></table><p>The <code class="function">gobject.type_name</code>() function returns
+the unique name that is assigned to the specified
+<em class="parameter"><code>type</code></em>. <em class="parameter"><code>type</code></em> can be a GObject
+type, type ID or instance. This function raises a TypeError exception
+if <em class="parameter"><code>type</code></em> isn't a <code class="literal">PyGTK</code> type.</p></div><div class="refsect2" title="gobject.type_from_name"><a name="function-gobject--type-from-name"></a><h3>gobject.type_from_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.type_from_name</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type_name</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td><td>a string containing the name of a
+type</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the type ID named
+<em class="parameter"><code>type_name</code></em></td></tr></tbody></table><p>The <code class="function">gobject.type_from_name</code>() function
+returns the type ID of the <code class="literal">PyGTK</code> type with the name
+specified by <em class="parameter"><code>type_name</code></em>. This function raises a
+RuntimeError exception if no type matches
+<em class="parameter"><code>type_name</code></em>.</p></div><div class="refsect2" title="gobject.type_parent"><a name="function-gobject--type-parent"></a><h3>gobject.type_parent</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.type_parent</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the parent type ID</td></tr></tbody></table><p>The <code class="function">gobject.type_parent</code>() function returns
+the direct parent type ID of the specified <em class="parameter"><code>type</code></em>.
+<em class="parameter"><code>type</code></em> can be a GObject type, type ID or instance. If
+<em class="parameter"><code>type</code></em> has no parent, i.e. is a fundamental type, the
+RuntimeError exception is raised. </p></div><div class="refsect2" title="gobject.type_is_a"><a name="function-gobject--type-is-a"></a><h3>gobject.type_is_a</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.type_is_a</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>parent_type</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><em class="parameter"><code>parent_type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if
+<em class="parameter"><code>parent_type</code></em> is an ancestor of
+<em class="parameter"><code>type</code></em></td></tr></tbody></table><p>The <code class="function">gobject.type_is_a</code>() function returns
+<code class="literal">True</code> if the specified <em class="parameter"><code>type</code></em> is a
+descendant of the type specified by <em class="parameter"><code>parent_type</code></em>. This
+function also returns <code class="literal">True</code> if
+<em class="parameter"><code>parent_type</code></em> is an interface and
+<em class="parameter"><code>type</code></em> conforms to it.</p></div><div class="refsect2" title="gobject.type_children"><a name="function-gobject--type-children"></a><h3>gobject.type_children</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.type_children</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of the child types of
+<em class="parameter"><code>type</code></em></td></tr></tbody></table><p>The <code class="function">gobject.type_children</code>() function
+returns a list containing the child types of the specified
+<em class="parameter"><code>type</code></em>.</p></div><div class="refsect2" title="gobject.type_interfaces"><a name="function-gobject--type-interfaces"></a><h3>gobject.type_interfaces</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.type_interfaces</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of the interface types supported by
+<em class="parameter"><code>type</code></em></td></tr></tbody></table><p>The <code class="function">gobject.type_interfaces</code>() function
+returns a list of the interface types supported by
+<em class="parameter"><code>type</code></em>. <em class="parameter"><code>type</code></em> can be a GObject
+type, type ID or instance. This function returns a RuntimeError exception if
+type is not a valid type or has no interfaces.</p></div><div class="refsect2" title="gobject.type_register"><a name="function-gobject--type-register"></a><h3>gobject.type_register</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.type_register</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>class</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>class</code></em> :</span></p></td><td>a Python class that is a descendant of <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a></td></tr></tbody></table><p>The <code class="function">gobject.type_register</code>() function
+registers the specified Python <em class="parameter"><code>class</code></em> as a PyGTK type.
+class must be a descendant of <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>. The function generates a name for the new type.</p></div><div class="refsect2" title="gobject.signal_new"><a name="function-gobject--signal-new"></a><h3>gobject.signal_new</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.signal_new</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>signal_name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>flags</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>return_type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>param_types</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>signal_name</code></em> :</span></p></td><td>a string containing the name of the
+signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>the object type that the signal is associated
+with</td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td>the signal flags</td></tr><tr><td><p><span class="term"><em class="parameter"><code>return_type</code></em> :</span></p></td><td>the return type of the signal
+handler</td></tr><tr><td><p><span class="term"><em class="parameter"><code>param_types</code></em> :</span></p></td><td>the parameter types passed to the signal
+handler</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a unique integer signal ID</td></tr></tbody></table><p>The <code class="function">gobject.signal_new</code>() function registers
+a signal with the specified <em class="parameter"><code>signal_name</code></em> for the
+specified object <em class="parameter"><code>type</code></em>. The value of
+<em class="parameter"><code>flags</code></em> is a combination of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_RUN_FIRST</code></span></p></td><td>Invoke the object method handler in the first emission
+stage. </td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_RUN_LAST</code></span></p></td><td>Invoke the object method handler in the third emission
+stage.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_RUN_CLEANUP</code></span></p></td><td>Invoke the object method handler in the last emission
+stage.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_NO_RECURSE</code></span></p></td><td>Signals being emitted for an object while currently
+being in emission for this very object will not be emitted recursively, but
+instead cause the first emission to be restarted.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_DETAILED</code></span></p></td><td>This signal supports "::detail" appendixes to the
+signal name upon handler connections and emissions.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_ACTION</code></span></p></td><td>Action signals are signals that may freely be emitted
+on alive objects from user code via <a class="link" href="class-gobject.html#method-gobject--emit" title="gobject.GObject.emit"><code class="methodname">gobject.emit()</code>()</a> 
+and friends, without the need of being embedded into extra code that
+performs pre or post emission adjustments on the object. They can also be
+thought of as generically callable object methods.</td></tr><tr><td><p><span class="term"><code class="literal">gobject.SIGNAL_NO_HOOKS</code></span></p></td><td> No emissions hooks are supported for this
+signal.</td></tr></tbody></table><p><em class="parameter"><code>return_type</code></em> is the type of the return
+value from a signal handler and may be a gobject type, type ID or instance.
+The <em class="parameter"><code>param_types</code></em> parameter is a list of additional
+types that are passed to the signal handler. Each parameter type may be
+specified as a gobject type, type ID or instance. For example, to add a
+signal to the gtk.Window type called "my-signal" that calls a handler with a
+gtk.Button widget and an integer value and a return value  that is a
+boolean, use:</p><pre class="programlisting">
+  gobject.signal_new("my_signal", gtk.Window, gobject.SIGNAL_RUN_LAST, gobject.TYPE_BOOLEAN, (gtk.Button, gobject.TYPE_INT))
+</pre></div><div class="refsect2" title="gobject.signal_list_names"><a name="function-gobject--signal-list-names"></a><h3>gobject.signal_list_names</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.signal_list_names</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of the signal names supported by
+<em class="parameter"><code>type</code></em></td></tr></tbody></table><p>The <code class="function">gobject.signal_list_names</code>() function
+returns a list of the names of the signals that are supported by the
+specified GObject <em class="parameter"><code>type</code></em></p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The type keyword is available in PyGTK 2.6 and above.</p></div></div><div class="refsect2" title="gobject.signal_list_ids"><a name="function-gobject--signal-list-ids"></a><h3>gobject.signal_list_ids</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.signal_list_ids</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of the signal ids supported by
+<em class="parameter"><code>type</code></em></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">gobject.signal_list_ids</code>() function
+returns a list of the integer ids of the signals that are supported by the
+GObject specified by <em class="parameter"><code>type</code></em></p></div><div class="refsect2" title="gobject.signal_lookup"><a name="function-gobject--signal-lookup"></a><h3>gobject.signal_lookup</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.signal_lookup</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>the name of a signal for
+<em class="parameter"><code>type</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the integer id of a signal supported by
+<em class="parameter"><code>type</code></em> or 0.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">gobject.signal_lookup</code>() function
+returns the id of the signal with the name specified by
+<em class="parameter"><code>name</code></em> that is supported by the GObject specified
+specified by<em class="parameter"><code>type</code></em>. 0 is returned if the signal is not
+found.</p></div><div class="refsect2" title="gobject.signal_name"><a name="function-gobject--signal-name"></a><h3>gobject.signal_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.signal_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>signal_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>signal_id</code></strong> :</span></p></td><td>an integer signal id</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name of the signal or
+<code class="literal">None</code>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">gobject.signal_name</code>() function returns
+the name of the signal that has the signal id specified by
+<em class="parameter"><code>id</code></em>.</p></div><div class="refsect2" title="gobject.signal_query"><a name="function-gobject--signal-query1"></a><h3>gobject.signal_query</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.signal_query</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>the name of a signal for
+<em class="parameter"><code>type</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 6-tuple containing signal information or
+<code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">gobject.signal_query</code>() function returns
+a 6-tuple containing information about the signal with the name specified by
+<em class="parameter"><code>name</code></em> that is supported by the GObject specified by
+<em class="parameter"><code>type</code></em>. If the signal is not found
+<code class="literal">None</code> is returned.</p><p>The signal information 6-tuple contains:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">the integer signal id</li><li class="listitem">the signal name</li><li class="listitem">the GType that the signal is registered for</li><li class="listitem">the signal flags (see the <a class="xref" href="gobject-constants.html#gobject-signal-constants" title="GObject Signal Flag Constants">GObject Signal Flag Constants</a>)</li><li class="listitem">the GType of the return from the signal callback
+function</li><li class="listitem">a tuple containing the GTypes of the parameters that are
+passed to the signal callback function. Note that these may not correspond
+exactly to the <code class="literal">PyGTK</code> signal callback parameters.</li></ul></div></div><div class="refsect2" title="gobject.signal_query"><a name="function-gobject--signal-query2"></a><h3>gobject.signal_query</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.signal_query</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>signal_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>signal_id</code></strong> :</span></p></td><td>the integer id of a signal</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 6-tuple containing signal information or
+<code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">gobject.signal_query</code>() function returns
+a 6-tuple containing information about the signal with the id specified by
+<em class="parameter"><code>signal_id</code></em>. If the signal is not found
+<code class="literal">None</code> is returned.</p><p>The signal information 6-tuple contains:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">the integer signal id</li><li class="listitem">the signal name</li><li class="listitem">the GType that the signal is registered for</li><li class="listitem">the signal flags (see the <a class="xref" href="gobject-constants.html#gobject-signal-constants" title="GObject Signal Flag Constants">GObject Signal Flag Constants</a>)</li><li class="listitem">the GType of the return from the signal callback
+function</li><li class="listitem">a tuple containing the GTypes of the parameters that are
+passed to the signal callback function. Note that these may not correspond
+exactly to the <code class="literal">PyGTK</code> signal callback parameters.</li></ul></div></div><div class="refsect2" title="gobject.list_properties"><a name="function-gobject--list-properties"></a><h3>gobject.list_properties</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.list_properties</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of the properties (as GParam objects)
+supported by <em class="parameter"><code>type</code></em></td></tr></tbody></table><p>The <code class="function">gobject.list_properties</code>() function
+returns a list of the properties (as GParam objects) supported by
+<em class="parameter"><code>type</code></em>.</p></div><div class="refsect2" title="gobject.new"><a name="function-gobject--new"></a><h3>gobject.new</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.new</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td>a GObject type, type ID or
+instance</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>zero or more property-value
+pairs</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new object if the specified
+<em class="parameter"><code>type</code></em></td></tr></tbody></table><p>The <code class="function">gobject.new</code>() function returns a new
+object of the specified <em class="parameter"><code>type</code></em>. type must specify a
+type that is a descendant of <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>. A
+TypeError exception is raised if <em class="parameter"><code>type</code></em> specifies an
+abstract class or a type that is not a descendant of <a class="link" href="class-gobject.html" title="gobject.GObject"><code class="classname">gobject.GObject</code></a>. A set
+of property-value pairs may be specified to set the value of the object's
+properties.</p></div><div class="refsect2" title="gobject.signal_accumulator_true_handled"><a name="function-gobject--signal-accumulator-true-handled"></a><h3>gobject.signal_accumulator_true_handled</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.signal_accumulator_true_handled</span>()</code></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">signal_accumulator_true_handled</code>()
+      function is only used as accumulator argument when registering
+      signals.</p></div><div class="refsect2" title="gobject.add_emission_hook"><a name="function-gobject--add-emission-hook"></a><h3>gobject.add_emission_hook</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.add_emission_hook</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>type</em></span> :</span></p></td><td>a Python GObject instance or
+          type</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>name</em></span> :</span></p></td><td>a signal name</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>callback</em></span> :</span></p></td><td>a function</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>...</em></span> :</span></p></td><td>zero or more extra arguments that will be
+          passed to callback.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the hook id, for later use with <PYGTKDOCLINK HREF="function-gobject--signal-remove-emission-hook"><code class="function">gobject.signal_remove_emission_hook</code>()</PYGTKDOCLINK>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">add_emission_hook</code>() function adds an
+      emission hook for the signal specified by <em class="parameter"><code>name</code></em>,
+      which will get called for any emission of that signal, independent of
+      the instance. This is possible only for signals which don't have the
+      <code class="literal">gobject.SIGNAL_NO_HOOKS</code> flag set.</p></div><div class="refsect2" title="gobject.remove_emission_hook"><a name="function-gobject--remove-emission-hook"></a><h3>gobject.remove_emission_hook</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject.remove_emission_hook</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>hook_id</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>type</em></span> :</span></p></td><td>a Python GObject instance or
+          type</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>name</em></span> :</span></p></td><td>a signal name</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>hook_id</em></span> :</span></p></td><td>the id of the emission hook as returned by the
+          <a class="link" href="gobject-functions.html#function-gobject--add-emission-hook" title="gobject.add_emission_hook"><code class="function">gobject.add_emission_hook</code>()</a>)
+          function.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">remove_emission_hook</code>() function deletes
+      an emission hook.</p></div><div class="refsect2" title="gobject._install_metaclass"><a name="function-gobject---install-metaclass"></a><h3>gobject._install_metaclass</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gobject._install_metaclass</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>metaclass</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>metaclass</em></span> :</span></p></td><td></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">_install_metaclass</code>() function installs
+      the metaclass specified by <em class="parameter"><code>metaclass</code></em>.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gobjectginterface.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gobject-constants.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gobject.GInterface </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gobject Constants</td></tr></table></div></body></html>
diff --git a/docs/html/index.html b/docs/html/index.html
new file mode 100644 (file)
index 0000000..f5b135d
--- /dev/null
@@ -0,0 +1,6 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PyGObject Reference Manual</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="description" content="This reference describes the classes of the python gobject module."><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="next" href="pygobject-introduction.html" title="Introduction"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PyGObject Reference Manual</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="pygobject-introduction.html">Next</a></td></tr></table><hr></div><div class="book" title="PyGObject Reference Manual"><div class="titlepage"><div><div><h1 class="title"><a name="pygobject-reference"></a>PyGObject Reference Manual</h1></div><div><p class="releaseinfo">for PyGObject version 2.28.6</p></div><div><p class="pubdate">2011-06-13
+</p></div><div><div class="abstract" title="Abstract"><p class="title"><b>Abstract</b></p><p>This reference describes the classes of the python gobject
+module.</p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="pygobject-introduction.html">Introduction</a></span></dt><dd><dl><dt><span class="sect1"><a href="pygobject-introduction.html#pygobject-reference-format">Reference Page Format</a></span></dt></dl></dd><dt><span class="chapter"><a href="glib-class-reference.html">PyGlibClass Reference</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="class-glibmaincontext.html">glib.MainContext</a></span><span class="refpurpose"> â€” an object representing a set of event sources to be handled
+in a <a class="link" href="class-glibmainloop.html" title="glib.MainLoop"><code class="classname">glib.MainLoop</code></a>.</span></dt><dt><span class="refentrytitle"><a href="class-glibmainloop.html">glib.MainLoop</a></span><span class="refpurpose"> â€” an object representing the main event loop of a PyGTK
+    application.</span></dt><dt><span class="refentrytitle"><a href="glib-functions.html">glib Functions</a></span><span class="refpurpose"> â€” miscellaneous functions</span></dt><dt><span class="refentrytitle"><a href="glib-constants.html">glib Constants</a></span><span class="refpurpose"> â€” the built-in constants of the glib module</span></dt></dl></dd><dt><span class="chapter"><a href="gobject-class-reference.html">PyGObject Class Reference</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="class-gobject.html">gobject.GObject</a></span><span class="refpurpose"> â€” the base class</span></dt><dt><span class="refentrytitle"><a href="class-gobjectgboxed.html">gobject.GBoxed</a></span><span class="refpurpose"> â€” an object containing an opaque chunk of data</span></dt><dt><span class="refentrytitle"><a href="class-gobjectgpointer.html">gobject.GPointer</a></span><span class="refpurpose"> â€” an object containing a completely opaque chunk of
+    data</span></dt><dt><span class="refentrytitle"><a href="class-gobjectginterface.html">gobject.GInterface</a></span><span class="refpurpose"> â€” an object representing a GInterface</span></dt><dt><span class="refentrytitle"><a href="gobject-functions.html">gobject Functions</a></span><span class="refpurpose"> â€” miscellaneous functions</span></dt><dt><span class="refentrytitle"><a href="gobject-constants.html">gobject Constants</a></span><span class="refpurpose"> â€” the built-in constants of the gobject module</span></dt></dl></dd><dt><span class="chapter"><a href="gio-class-reference.html">PyGio Class Reference</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="class-gioappinfo.html">gio.AppInfo</a></span><span class="refpurpose"> â€” Information about an installed application and methods to launch it (with file arguments).</span></dt><dt><span class="refentrytitle"><a href="class-gioapplaunchcontext.html">gio.AppLaunchContext</a></span><span class="refpurpose"> â€” Application launch context.</span></dt><dt><span class="refentrytitle"><a href="class-gioasyncresult.html">gio.AsyncResult</a></span><span class="refpurpose"> â€” Asynchronous Function Results.</span></dt><dt><span class="refentrytitle"><a href="class-giobufferedinputstream.html">gio.BufferedInputStream</a></span><span class="refpurpose"> â€” Buffered Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giobufferedoutputstream.html">gio.BufferedOutputStream</a></span><span class="refpurpose"> â€” Buffered Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-giocancellable.html">gio.Cancellable</a></span><span class="refpurpose"> â€” Thread-safe Operation Cancellation Stack.</span></dt><dt><span class="refentrytitle"><a href="class-giodatainputstream.html">gio.DataInputStream</a></span><span class="refpurpose"> â€” Data Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giodataoutputstream.html">gio.DataOutputStream</a></span><span class="refpurpose"> â€” Data Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-giodrive.html">gio.Drive</a></span><span class="refpurpose"> â€” Virtual File System drive management.</span></dt><dt><span class="refentrytitle"><a href="class-gioemblem.html">gio.Emblem</a></span><span class="refpurpose"> â€” An object for emblems.</span></dt><dt><span class="refentrytitle"><a href="class-gioemblemedicon.html">gio.EmblemedIcon</a></span><span class="refpurpose"> â€” Icon with emblems.</span></dt><dt><span class="refentrytitle"><a href="class-giofile.html">gio.File</a></span><span class="refpurpose"> â€” File and Directory Handling.</span></dt><dt><span class="refentrytitle"><a href="class-giofileattributeinfo.html">gio.FileAttributeInfo</a></span><span class="refpurpose"> â€” Information about a specific attribute.</span></dt><dt><span class="refentrytitle"><a href="class-giofileenumerator.html">gio.FileEnumerator</a></span><span class="refpurpose"> â€” Enumerated Files Routines.</span></dt><dt><span class="refentrytitle"><a href="class-giofileicon.html">gio.FileIcon</a></span><span class="refpurpose"> â€” Icons pointing to an image file.</span></dt><dt><span class="refentrytitle"><a href="class-giofileinfo.html">gio.FileInfo</a></span><span class="refpurpose"> â€” File Information and Attributes</span></dt><dt><span class="refentrytitle"><a href="class-giofileinputstream.html">gio.FileInputStream</a></span><span class="refpurpose"> â€” Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giofilemonitor.html">gio.FileMonitor</a></span><span class="refpurpose"> â€” File Monitor</span></dt><dt><span class="refentrytitle"><a href="class-giofileoutputstream.html">gio.FileOutputStream</a></span><span class="refpurpose"> â€” Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giofilterinputstream.html">gio.FilterInputStream</a></span><span class="refpurpose"> â€” Filter Input Stream</span></dt><dt><span class="refentrytitle"><a href="class-giofilteroutputstream.html">gio.FilterOutputStream</a></span><span class="refpurpose"> â€” Filter Output Stream</span></dt><dt><span class="refentrytitle"><a href="class-gioicon.html">gio.Icon</a></span><span class="refpurpose"> â€” Interface for icons.</span></dt><dt><span class="refentrytitle"><a href="class-gioinputstream.html">gio.InputStream</a></span><span class="refpurpose"> â€” Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-gioloadableicon.html">gio.LoadableIcon</a></span><span class="refpurpose"> â€” Interface for icons.</span></dt><dt><span class="refentrytitle"><a href="class-giomemoryinputstream.html">gio.MemoryInputStream</a></span><span class="refpurpose"> â€” Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-giomemoryoutputstream.html">gio.MemoryOutputStream</a></span><span class="refpurpose"> â€” Streaming output operations on memory chunks</span></dt><dt><span class="refentrytitle"><a href="class-giomount.html">gio.Mount</a></span><span class="refpurpose"> â€” Mount management</span></dt><dt><span class="refentrytitle"><a href="class-giomountoperation.html">gio.MountOperation</a></span><span class="refpurpose"> â€” Authentication methods for mountable locations.</span></dt><dt><span class="refentrytitle"><a href="class-giooutputstream.html">gio.OutputStream</a></span><span class="refpurpose"> â€” Base class for implementing streaming input</span></dt><dt><span class="refentrytitle"><a href="class-gioseekable.html">gio.Seekable</a></span><span class="refpurpose"> â€” Stream seeking interface.</span></dt><dt><span class="refentrytitle"><a href="class-giosimpleasyncresult.html">gio.SimpleAsyncResult</a></span><span class="refpurpose"> â€” Simple asynchronous results implementation.</span></dt><dt><span class="refentrytitle"><a href="class-giothemedicon.html">gio.ThemedIcon</a></span><span class="refpurpose"> â€” Icon theming support.</span></dt><dt><span class="refentrytitle"><a href="class-giovolume.html">gio.Volume</a></span><span class="refpurpose"> â€” Volume management.</span></dt><dt><span class="refentrytitle"><a href="class-giovolumemonitor.html">gio.VolumeMonitor</a></span><span class="refpurpose"> â€” Volume Monitor.</span></dt><dt><span class="refentrytitle"><a href="gio-functions.html">gio Functions</a></span><span class="refpurpose"></span></dt><dt><span class="refentrytitle"><a href="gio-constants.html">gio Constants</a></span><span class="refpurpose"> â€” the built-in constants of the gio module</span></dt></dl></dd><dt><span class="chapter"><a href="giounix-class-reference.html">PyGio Unix Class Reference</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="class-giounixinputstream.html">gio.unix.InputStream</a></span><span class="refpurpose"> â€” Streaming input operations for UNIX file descriptors.</span></dt><dt><span class="refentrytitle"><a href="class-giounixoutputstream.html">gio.unix.OutputStream</a></span><span class="refpurpose"> â€” Streaming output operations for UNIX file descriptors.</span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="pygobject-introduction.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Introduction</td></tr></table></div></body></html>
diff --git a/docs/html/index.sgml b/docs/html/index.sgml
new file mode 100644 (file)
index 0000000..e9b5432
--- /dev/null
@@ -0,0 +1,532 @@
+<ANCHOR id="pygobject-reference" href="pygobject/index.html">
+        <ANCHOR id="class-glibmaincontext" href="pygobject/class-glibmaincontext.html">
+        <ANCHOR id="constructor-glibmaincontext" href="pygobject/class-glibmaincontext.html#constructor-glibmaincontext">
+        <ANCHOR id="method-glibmaincontext--iteration" href="pygobject/class-glibmaincontext.html#method-glibmaincontext--iteration">
+        <ANCHOR id="method-glibmaincontext--pending" href="pygobject/class-glibmaincontext.html#method-glibmaincontext--pending">
+        <ANCHOR id="class-glibmainloop" href="pygobject/class-glibmainloop.html">
+        <ANCHOR id="constructor-glibmainloop" href="pygobject/class-glibmainloop.html#constructor-glibmainloop">
+        <ANCHOR id="method-glibmainloop--get-context" href="pygobject/class-glibmainloop.html#method-glibmainloop--get-context">
+        <ANCHOR id="method-glibmainloop--is-running" href="pygobject/class-glibmainloop.html#method-glibmainloop--is-running">
+        <ANCHOR id="method-glibmainloop--quit" href="pygobject/class-glibmainloop.html#method-glibmainloop--quit">
+        <ANCHOR id="method-glibmainloop--run" href="pygobject/class-glibmainloop.html#method-glibmainloop--run">
+        <ANCHOR id="glib-functions" href="pygobject/glib-functions.html">
+        <ANCHOR id="function-glib--idle-add" href="pygobject/glib-functions.html#function-glib--idle-add">
+        <ANCHOR id="function-glib--timeout-add" href="pygobject/glib-functions.html#function-glib--timeout-add">
+        <ANCHOR id="function-glib--timeout-add-seconds" href="pygobject/glib-functions.html#function-glib--timeout-add-seconds">
+        <ANCHOR id="function-glib--io-add-watch" href="pygobject/glib-functions.html#function-glib--io-add-watch">
+        <ANCHOR id="function-glib--source-remove" href="pygobject/glib-functions.html#function-glib--source-remove">
+        <ANCHOR id="function-glib--main-context-default" href="pygobject/glib-functions.html#function-glib--main-context-default">
+        <ANCHOR id="function-glib--markup-escape-text" href="pygobject/glib-functions.html#function-glib--markup-escape-text">
+        <ANCHOR id="function-glib--child-watch-add" href="pygobject/glib-functions.html#function-glib--child-watch-add">
+        <ANCHOR id="function-glib--spawn-async" href="pygobject/glib-functions.html#function-glib--spawn-async">
+        <ANCHOR id="function-glib--get-current-time" href="pygobject/glib-functions.html#function-glib--get-current-time">
+        <ANCHOR id="function-glib--get-user-cache-dir" href="pygobject/glib-functions.html#function-glib--get-user-cache-dir">
+        <ANCHOR id="function-glib--get-user-config-dir" href="pygobject/glib-functions.html#function-glib--get-user-config-dir">
+        <ANCHOR id="function-glib--get-user-data-dir" href="pygobject/glib-functions.html#function-glib--get-user-data-dir">
+        <ANCHOR id="function-glib--get-user-special-dir" href="pygobject/glib-functions.html#function-glib--get-user-special-dir">
+        <ANCHOR id="function-glib--main-depth" href="pygobject/glib-functions.html#function-glib--main-depth">
+        <ANCHOR id="function-glib--threads-init" href="pygobject/glib-functions.html#function-glib--threads-init">
+        <ANCHOR id="function-glib--signal-accumulator-true-handled" href="pygobject/glib-functions.html#function-glib--signal-accumulator-true-handled">
+        <ANCHOR id="function-glib--filename-display-name" href="pygobject/glib-functions.html#function-glib--filename-display-name">
+        <ANCHOR id="function-glib--filename-display-basename" href="pygobject/glib-functions.html#function-glib--filename-display-basename">
+        <ANCHOR id="function-glib--filename-from-utf8" href="pygobject/glib-functions.html#function-glib--filename-from-utf8">
+        <ANCHOR id="glib-constants" href="pygobject/glib-constants.html">
+        <ANCHOR id="glib-constants-description" href="pygobject/glib-constants.html#glib-constants-description">
+        <ANCHOR id="glib-io-condition-constants" href="pygobject/glib-constants.html#glib-io-condition-constants">
+        <ANCHOR id="glib-priority-constants" href="pygobject/glib-constants.html#glib-priority-constants">
+        <ANCHOR id="glib-spawn-flag-constants" href="pygobject/glib-constants.html#glib-spawn-flag-constants">
+        <ANCHOR id="glib-user-directory-constants" href="pygobject/glib-constants.html#glib-user-directory-constants">
+        <ANCHOR id="glib-version-constants" href="pygobject/glib-constants.html#glib-version-constants">
+        <ANCHOR id="class-gobject" href="pygobject/class-gobject.html">
+        <ANCHOR id="signal-prototypes-gobject" href="pygobject/class-gobject.html#signal-prototypes-gobject">
+        <ANCHOR id="method-gobject--get-property" href="pygobject/class-gobject.html#method-gobject--get-property">
+        <ANCHOR id="method-gobject--get-properties" href="pygobject/class-gobject.html#method-gobject--get-properties">
+        <ANCHOR id="method-gobject--set-property" href="pygobject/class-gobject.html#method-gobject--set-property">
+        <ANCHOR id="method-gobject--set-properties" href="pygobject/class-gobject.html#method-gobject--set-properties">
+        <ANCHOR id="method-gobject--freeze-notify" href="pygobject/class-gobject.html#method-gobject--freeze-notify">
+        <ANCHOR id="method-gobject--notify" href="pygobject/class-gobject.html#method-gobject--notify">
+        <ANCHOR id="method-gobject--thaw-notify" href="pygobject/class-gobject.html#method-gobject--thaw-notify">
+        <ANCHOR id="method-gobject--get-data" href="pygobject/class-gobject.html#method-gobject--get-data">
+        <ANCHOR id="method-gobject--set-data" href="pygobject/class-gobject.html#method-gobject--set-data">
+        <ANCHOR id="method-gobject--connect" href="pygobject/class-gobject.html#method-gobject--connect">
+        <ANCHOR id="method-gobject--connect-after" href="pygobject/class-gobject.html#method-gobject--connect-after">
+        <ANCHOR id="method-gobject--connect-object" href="pygobject/class-gobject.html#method-gobject--connect-object">
+        <ANCHOR id="method-gobject--connect-object-after" href="pygobject/class-gobject.html#method-gobject--connect-object-after">
+        <ANCHOR id="method-gobject--disconnect" href="pygobject/class-gobject.html#method-gobject--disconnect">
+        <ANCHOR id="method-gobject--handler-disconnect" href="pygobject/class-gobject.html#method-gobject--handler-disconnect">
+        <ANCHOR id="method-gobject--handler-is-connected" href="pygobject/class-gobject.html#method-gobject--handler-is-connected">
+        <ANCHOR id="method-gobject--handler-block" href="pygobject/class-gobject.html#method-gobject--handler-block">
+        <ANCHOR id="method-gobject--handler-unblock" href="pygobject/class-gobject.html#method-gobject--handler-unblock">
+        <ANCHOR id="method-gobject--handler-block-by-func" href="pygobject/class-gobject.html#method-gobject--handler-block-by-func">
+        <ANCHOR id="method-gobject--handler-unblock-by-func" href="pygobject/class-gobject.html#method-gobject--handler-unblock-by-func">
+        <ANCHOR id="method-gobject--emit" href="pygobject/class-gobject.html#method-gobject--emit">
+        <ANCHOR id="method-gobject--stop-emission" href="pygobject/class-gobject.html#method-gobject--stop-emission">
+        <ANCHOR id="method-gobject--emit-stop-by-name" href="pygobject/class-gobject.html#method-gobject--emit-stop-by-name">
+        <ANCHOR id="method-gobject--chain" href="pygobject/class-gobject.html#method-gobject--chain">
+        <ANCHOR id="signal-gobject--notify" href="pygobject/class-gobject.html#signal-gobject--notify">
+        <ANCHOR id="class-gobjectgboxed" href="pygobject/class-gobjectgboxed.html">
+        <ANCHOR id="method-gobjectgboxed--copy" href="pygobject/class-gobjectgboxed.html#method-gobjectgboxed--copy">
+        <ANCHOR id="class-gobjectgpointer" href="pygobject/class-gobjectgpointer.html">
+        <ANCHOR id="class-gobjectginterface" href="pygobject/class-gobjectginterface.html">
+        <ANCHOR id="gobject-functions" href="pygobject/gobject-functions.html">
+        <ANCHOR id="function-gobject--type-name" href="pygobject/gobject-functions.html#function-gobject--type-name">
+        <ANCHOR id="function-gobject--type-from-name" href="pygobject/gobject-functions.html#function-gobject--type-from-name">
+        <ANCHOR id="function-gobject--type-parent" href="pygobject/gobject-functions.html#function-gobject--type-parent">
+        <ANCHOR id="function-gobject--type-is-a" href="pygobject/gobject-functions.html#function-gobject--type-is-a">
+        <ANCHOR id="function-gobject--type-children" href="pygobject/gobject-functions.html#function-gobject--type-children">
+        <ANCHOR id="function-gobject--type-interfaces" href="pygobject/gobject-functions.html#function-gobject--type-interfaces">
+        <ANCHOR id="function-gobject--type-register" href="pygobject/gobject-functions.html#function-gobject--type-register">
+        <ANCHOR id="function-gobject--signal-new" href="pygobject/gobject-functions.html#function-gobject--signal-new">
+        <ANCHOR id="function-gobject--signal-list-names" href="pygobject/gobject-functions.html#function-gobject--signal-list-names">
+        <ANCHOR id="function-gobject--signal-list-ids" href="pygobject/gobject-functions.html#function-gobject--signal-list-ids">
+        <ANCHOR id="function-gobject--signal-lookup" href="pygobject/gobject-functions.html#function-gobject--signal-lookup">
+        <ANCHOR id="function-gobject--signal-name" href="pygobject/gobject-functions.html#function-gobject--signal-name">
+        <ANCHOR id="function-gobject--signal-query1" href="pygobject/gobject-functions.html#function-gobject--signal-query1">
+        <ANCHOR id="function-gobject--signal-query2" href="pygobject/gobject-functions.html#function-gobject--signal-query2">
+        <ANCHOR id="function-gobject--list-properties" href="pygobject/gobject-functions.html#function-gobject--list-properties">
+        <ANCHOR id="function-gobject--new" href="pygobject/gobject-functions.html#function-gobject--new">
+        <ANCHOR id="function-gobject--signal-accumulator-true-handled" href="pygobject/gobject-functions.html#function-gobject--signal-accumulator-true-handled">
+        <ANCHOR id="function-gobject--add-emission-hook" href="pygobject/gobject-functions.html#function-gobject--add-emission-hook">
+        <ANCHOR id="function-gobject--remove-emission-hook" href="pygobject/gobject-functions.html#function-gobject--remove-emission-hook">
+        <ANCHOR id="function-gobject---install-metaclass" href="pygobject/gobject-functions.html#function-gobject---install-metaclass">
+        <ANCHOR id="gobject-constants" href="pygobject/gobject-constants.html">
+        <ANCHOR id="gobject-constants-description" href="pygobject/gobject-constants.html#gobject-constants-description">
+        <ANCHOR id="gobject-param-constants" href="pygobject/gobject-constants.html#gobject-param-constants">
+        <ANCHOR id="gobject-signal-constants" href="pygobject/gobject-constants.html#gobject-signal-constants">
+        <ANCHOR id="gobject-spawn-flag-constants" href="pygobject/gobject-constants.html#gobject-spawn-flag-constants">
+        <ANCHOR id="gobject-type-constants" href="pygobject/gobject-constants.html#gobject-type-constants">
+        <ANCHOR id="gobject-version-constants" href="pygobject/gobject-constants.html#gobject-version-constants">
+        <ANCHOR id="class-gioappinfo" href="pygobject/class-gioappinfo.html">
+        <ANCHOR id="constructor-gioappinfo" href="pygobject/class-gioappinfo.html#constructor-gioappinfo">
+        <ANCHOR id="method-gioappinfo--add-supports-type" href="pygobject/class-gioappinfo.html#method-gioappinfo--add-supports-type">
+        <ANCHOR id="method-gioappinfo--can-delete" href="pygobject/class-gioappinfo.html#method-gioappinfo--can-delete">
+        <ANCHOR id="method-gioappinfo--can-remove-supports-type" href="pygobject/class-gioappinfo.html#method-gioappinfo--can-remove-supports-type">
+        <ANCHOR id="method-gioappinfo--delete" href="pygobject/class-gioappinfo.html#method-gioappinfo--delete">
+        <ANCHOR id="method-gioappinfo--dup" href="pygobject/class-gioappinfo.html#method-gioappinfo--dup">
+        <ANCHOR id="method-gioappinfo--equal" href="pygobject/class-gioappinfo.html#method-gioappinfo--equal">
+        <ANCHOR id="method-gioappinfo--get-commandline" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-commandline">
+        <ANCHOR id="method-gioappinfo--get-description" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-description">
+        <ANCHOR id="method-gioappinfo--get-executable" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-executable">
+        <ANCHOR id="method-gioappinfo--get-icon" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-icon">
+        <ANCHOR id="method-gioappinfo--get-id" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-id">
+        <ANCHOR id="method-gioappinfo--get-name" href="pygobject/class-gioappinfo.html#method-gioappinfo--get-name">
+        <ANCHOR id="method-gioappinfo--launch" href="pygobject/class-gioappinfo.html#method-gioappinfo--launch">
+        <ANCHOR id="method-gioappinfo--launch-uris" href="pygobject/class-gioappinfo.html#method-gioappinfo--launch-uris">
+        <ANCHOR id="method-gioappinfo--remove-supports-type" href="pygobject/class-gioappinfo.html#method-gioappinfo--remove-supports-type">
+        <ANCHOR id="method-gioappinfo--set-as-default-for-extension" href="pygobject/class-gioappinfo.html#method-gioappinfo--set-as-default-for-extension">
+        <ANCHOR id="method-gioappinfo--set-as-default-for-type" href="pygobject/class-gioappinfo.html#method-gioappinfo--set-as-default-for-type">
+        <ANCHOR id="method-gioappinfo--should-show" href="pygobject/class-gioappinfo.html#method-gioappinfo--should-show">
+        <ANCHOR id="method-gioappinfo--supports-files" href="pygobject/class-gioappinfo.html#method-gioappinfo--supports-files">
+        <ANCHOR id="method-gioappinfo--supports-uris" href="pygobject/class-gioappinfo.html#method-gioappinfo--supports-uris">
+        <ANCHOR id="function-gio--app-info-get-all" href="pygobject/class-gioappinfo.html#function-gio--app-info-get-all">
+        <ANCHOR id="function-gio--app-info-get-all-for-type" href="pygobject/class-gioappinfo.html#function-gio--app-info-get-all-for-type">
+        <ANCHOR id="function-gio--app-info-get-default-for-type" href="pygobject/class-gioappinfo.html#function-gio--app-info-get-default-for-type">
+        <ANCHOR id="function-gio--app-info-get-default-for-uri-scheme" href="pygobject/class-gioappinfo.html#function-gio--app-info-get-default-for-uri-scheme">
+        <ANCHOR id="function-gio--app-info-reset-type-association" href="pygobject/class-gioappinfo.html#function-gio--app-info-reset-type-association">
+        <ANCHOR id="class-gioapplaunchcontext" href="pygobject/class-gioapplaunchcontext.html">
+        <ANCHOR id="constructor-gioapplaunchcontext" href="pygobject/class-gioapplaunchcontext.html#constructor-gioapplaunchcontext">
+        <ANCHOR id="method-gioapplaunchcontext--get-display" href="pygobject/class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-display">
+        <ANCHOR id="method-gioapplaunchcontext--get-startup-notify-id" href="pygobject/class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id">
+        <ANCHOR id="method-gioapplaunchcontext--launch-failed" href="pygobject/class-gioapplaunchcontext.html#method-gioapplaunchcontext--launch-failed">
+        <ANCHOR id="class-gioasyncresult" href="pygobject/class-gioasyncresult.html">
+        <ANCHOR id="method-gioasyncresult--get-source-object" href="pygobject/class-gioasyncresult.html#method-gioasyncresult--get-source-object">
+        <ANCHOR id="class-giobufferedinputstream" href="pygobject/class-giobufferedinputstream.html">
+        <ANCHOR id="properties-giobufferedinputstream" href="pygobject/class-giobufferedinputstream.html#properties-giobufferedinputstream">
+        <ANCHOR id="constructor-giobufferedinputstream" href="pygobject/class-giobufferedinputstream.html#constructor-giobufferedinputstream">
+        <ANCHOR id="method-giobufferedinputstream--fill" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--fill">
+        <ANCHOR id="method-giobufferedinputstream--fill-async" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async">
+        <ANCHOR id="method-giobufferedinputstream--fill-finish" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--fill-finish">
+        <ANCHOR id="method-giobufferedinputstream--get-available" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--get-available">
+        <ANCHOR id="method-giobufferedinputstream--get-buffer-size" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--get-buffer-size">
+        <ANCHOR id="method-giobufferedinputstream--read-byte" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--read-byte">
+        <ANCHOR id="method-giobufferedinputstream--set-buffer-size" href="pygobject/class-giobufferedinputstream.html#method-giobufferedinputstream--set-buffer-size">
+        <ANCHOR id="function-gio--buffered-input-stream-new-sized" href="pygobject/class-giobufferedinputstream.html#function-gio--buffered-input-stream-new-sized">
+        <ANCHOR id="class-giobufferedoutputstream" href="pygobject/class-giobufferedoutputstream.html">
+        <ANCHOR id="properties-giobufferedoutputstream" href="pygobject/class-giobufferedoutputstream.html#properties-giobufferedoutputstream">
+        <ANCHOR id="constructor-giobufferedoutputstream" href="pygobject/class-giobufferedoutputstream.html#constructor-giobufferedoutputstream">
+        <ANCHOR id="method-giobufferedoutputstream--get-auto-grow" href="pygobject/class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-auto-grow">
+        <ANCHOR id="method-giobufferedoutputstream--get-buffer-size" href="pygobject/class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-buffer-size">
+        <ANCHOR id="method-giobufferedoutputstream--set-auto-grow" href="pygobject/class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-auto-grow">
+        <ANCHOR id="method-giobufferedoutputstream--set-buffer-size" href="pygobject/class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-buffer-size">
+        <ANCHOR id="function-gio--buffered-output-stream-new-sized" href="pygobject/class-giobufferedoutputstream.html#function-gio--buffered-output-stream-new-sized">
+        <ANCHOR id="class-giocancellable" href="pygobject/class-giocancellable.html">
+        <ANCHOR id="constructor-giocancellable" href="pygobject/class-giocancellable.html#constructor-giocancellable">
+        <ANCHOR id="method-giocancellable--cancel" href="pygobject/class-giocancellable.html#method-giocancellable--cancel">
+        <ANCHOR id="method-giocancellable--get-fd" href="pygobject/class-giocancellable.html#method-giocancellable--get-fd">
+        <ANCHOR id="method-giocancellable--is-cancelled" href="pygobject/class-giocancellable.html#method-giocancellable--is-cancelled">
+        <ANCHOR id="method-giocancellable--pop-current" href="pygobject/class-giocancellable.html#method-giocancellable--pop-current">
+        <ANCHOR id="method-giocancellable--push-current" href="pygobject/class-giocancellable.html#method-giocancellable--push-current">
+        <ANCHOR id="method-giocancellable--reset" href="pygobject/class-giocancellable.html#method-giocancellable--reset">
+        <ANCHOR id="method-giocancellable--set-error-if-cancelled" href="pygobject/class-giocancellable.html#method-giocancellable--set-error-if-cancelled">
+        <ANCHOR id="function-gio--cancellable-get-current" href="pygobject/class-giocancellable.html#function-gio--cancellable-get-current">
+        <ANCHOR id="class-giodatainputstream" href="pygobject/class-giodatainputstream.html">
+        <ANCHOR id="properties-giodatainputstream" href="pygobject/class-giodatainputstream.html#properties-giodatainputstream">
+        <ANCHOR id="constructor-giodatainputstream" href="pygobject/class-giodatainputstream.html#constructor-giodatainputstream">
+        <ANCHOR id="method-giodatainputstream--get-byte-order" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--get-byte-order">
+        <ANCHOR id="method-giodatainputstream--get-newline-type" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--get-newline-type">
+        <ANCHOR id="method-giodatainputstream--read-byte" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-byte">
+        <ANCHOR id="method-giodatainputstream--read-int16" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-int16">
+        <ANCHOR id="method-giodatainputstream--read-int32" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-int32">
+        <ANCHOR id="method-giodatainputstream--read-int64" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-int64">
+        <ANCHOR id="method-giodatainputstream--read-line" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-line">
+        <ANCHOR id="method-giodatainputstream--read-line-async" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-line-async">
+        <ANCHOR id="method-giodatainputstream--read-line-finish" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-line-finish">
+        <ANCHOR id="method-giodatainputstream--read-uint16" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-uint16">
+        <ANCHOR id="method-giodatainputstream--read-uint32" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-uint32">
+        <ANCHOR id="method-giodatainputstream--read-uint64" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-uint64">
+        <ANCHOR id="method-giodatainputstream--read-until" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-until">
+        <ANCHOR id="method-giodatainputstream--read-until-async" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-until-async">
+        <ANCHOR id="method-giodatainputstream--read-until-finish" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--read-until-finish">
+        <ANCHOR id="method-giodatainputstream--set-byte-order" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--set-byte-order">
+        <ANCHOR id="method-giodatainputstream--set-newline-type" href="pygobject/class-giodatainputstream.html#method-giodatainputstream--set-newline-type">
+        <ANCHOR id="class-giodataoutputstream" href="pygobject/class-giodataoutputstream.html">
+        <ANCHOR id="properties-giodataoutputstream" href="pygobject/class-giodataoutputstream.html#properties-giodataoutputstream">
+        <ANCHOR id="constructor-giodataoutputstream" href="pygobject/class-giodataoutputstream.html#constructor-giodataoutputstream">
+        <ANCHOR id="method-giodataoutputstream--get-byte-order" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--get-byte-order">
+        <ANCHOR id="method-giodataoutputstream--put-byte" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-byte">
+        <ANCHOR id="method-giodataoutputstream--put-int16" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-int16">
+        <ANCHOR id="method-giodataoutputstream--put-int32" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-int32">
+        <ANCHOR id="method-giodataoutputstream--put-int64" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-int64">
+        <ANCHOR id="method-giodataoutputstream--put-string" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-string">
+        <ANCHOR id="method-giodataoutputstream--put-uint16" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-uint16">
+        <ANCHOR id="method-giodataoutputstream--put-uint32" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-uint32">
+        <ANCHOR id="method-giodataoutputstream--put-uint64" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--put-uint64">
+        <ANCHOR id="method-giodataoutputstream--set-byte-order" href="pygobject/class-giodataoutputstream.html#method-giodataoutputstream--set-byte-order">
+        <ANCHOR id="class-giodrive" href="pygobject/class-giodrive.html">
+        <ANCHOR id="method-giodrive--can-eject" href="pygobject/class-giodrive.html#method-giodrive--can-eject">
+        <ANCHOR id="method-giodrive--can-poll-for-media" href="pygobject/class-giodrive.html#method-giodrive--can-poll-for-media">
+        <ANCHOR id="method-giodrive--eject" href="pygobject/class-giodrive.html#method-giodrive--eject">
+        <ANCHOR id="method-giodrive--eject-finish" href="pygobject/class-giodrive.html#method-giodrive--eject-finish">
+        <ANCHOR id="method-giodrive--enumerate-identifiers" href="pygobject/class-giodrive.html#method-giodrive--enumerate-identifiers">
+        <ANCHOR id="method-giodrive--get-icon" href="pygobject/class-giodrive.html#method-giodrive--get-icon">
+        <ANCHOR id="method-giodrive--get-identifier" href="pygobject/class-giodrive.html#method-giodrive--get-identifier">
+        <ANCHOR id="method-giodrive--get-name" href="pygobject/class-giodrive.html#method-giodrive--get-name">
+        <ANCHOR id="method-giodrive--get-volumes" href="pygobject/class-giodrive.html#method-giodrive--get-volumes">
+        <ANCHOR id="method-giodrive--has-media" href="pygobject/class-giodrive.html#method-giodrive--has-media">
+        <ANCHOR id="method-giodrive--has-volumes" href="pygobject/class-giodrive.html#method-giodrive--has-volumes">
+        <ANCHOR id="method-giodrive--is-media-check-automatic" href="pygobject/class-giodrive.html#method-giodrive--is-media-check-automatic">
+        <ANCHOR id="method-giodrive--is-media-removable" href="pygobject/class-giodrive.html#method-giodrive--is-media-removable">
+        <ANCHOR id="method-giodrive--poll-for-media" href="pygobject/class-giodrive.html#method-giodrive--poll-for-media">
+        <ANCHOR id="method-giodrive--poll-for-media-finish" href="pygobject/class-giodrive.html#method-giodrive--poll-for-media-finish">
+        <ANCHOR id="class-gioemblem" href="pygobject/class-gioemblem.html">
+        <ANCHOR id="properties-gioemblem" href="pygobject/class-gioemblem.html#properties-gioemblem">
+        <ANCHOR id="constructor-gioemblem" href="pygobject/class-gioemblem.html#constructor-gioemblem">
+        <ANCHOR id="method-gioemblem--get-icon" href="pygobject/class-gioemblem.html#method-gioemblem--get-icon">
+        <ANCHOR id="method-gioemblem--get-origin" href="pygobject/class-gioemblem.html#method-gioemblem--get-origin">
+        <ANCHOR id="function-gio--emblem-new-with-origin" href="pygobject/class-gioemblem.html#function-gio--emblem-new-with-origin">
+        <ANCHOR id="class-gioemblemedicon" href="pygobject/class-gioemblemedicon.html">
+        <ANCHOR id="constructor-gioemblemedicon" href="pygobject/class-gioemblemedicon.html#constructor-gioemblemedicon">
+        <ANCHOR id="method-gioemblemedicon--add-emblem" href="pygobject/class-gioemblemedicon.html#method-gioemblemedicon--add-emblem">
+        <ANCHOR id="method-gioemblemedicon--get-icon" href="pygobject/class-gioemblemedicon.html#method-gioemblemedicon--get-icon">
+        <ANCHOR id="class-giofile" href="pygobject/class-giofile.html">
+        <ANCHOR id="constructor-giofile" href="pygobject/class-giofile.html#constructor-giofile">
+        <ANCHOR id="method-giofile--append-to" href="pygobject/class-giofile.html#method-giofile--append-to">
+        <ANCHOR id="method-giofile--append-to-async" href="pygobject/class-giofile.html#method-giofile--append-to-async">
+        <ANCHOR id="method-giofile--append-to-finish" href="pygobject/class-giofile.html#method-giofile--append-to-finish">
+        <ANCHOR id="method-giofile--copy" href="pygobject/class-giofile.html#method-giofile--copy">
+        <ANCHOR id="method-giofile--copy-async" href="pygobject/class-giofile.html#method-giofile--copy-async">
+        <ANCHOR id="method-giofile--copy-attributes" href="pygobject/class-giofile.html#method-giofile--copy-attributes">
+        <ANCHOR id="method-giofile--copy-finish" href="pygobject/class-giofile.html#method-giofile--copy-finish">
+        <ANCHOR id="method-giofile--create" href="pygobject/class-giofile.html#method-giofile--create">
+        <ANCHOR id="method-giofile--create-async" href="pygobject/class-giofile.html#method-giofile--create-async">
+        <ANCHOR id="method-giofile--create-finish" href="pygobject/class-giofile.html#method-giofile--create-finish">
+        <ANCHOR id="method-giofile--delete" href="pygobject/class-giofile.html#method-giofile--delete">
+        <ANCHOR id="method-giofile--dup" href="pygobject/class-giofile.html#method-giofile--dup">
+        <ANCHOR id="method-giofile--eject-mountable" href="pygobject/class-giofile.html#method-giofile--eject-mountable">
+        <ANCHOR id="method-giofile--eject-mountable-finish" href="pygobject/class-giofile.html#method-giofile--eject-mountable-finish">
+        <ANCHOR id="method-giofile--enumerate-children" href="pygobject/class-giofile.html#method-giofile--enumerate-children">
+        <ANCHOR id="method-giofile--enumerate-children-async" href="pygobject/class-giofile.html#method-giofile--enumerate-children-async">
+        <ANCHOR id="method-giofile--enumerate-children-finish" href="pygobject/class-giofile.html#method-giofile--enumerate-children-finish">
+        <ANCHOR id="method-giofile--equal" href="pygobject/class-giofile.html#method-giofile--equal">
+        <ANCHOR id="method-giofile--find-enclosing-mount" href="pygobject/class-giofile.html#method-giofile--find-enclosing-mount">
+        <ANCHOR id="method-giofile--find-enclosing-mount-async" href="pygobject/class-giofile.html#method-giofile--find-enclosing-mount-async">
+        <ANCHOR id="method-giofile--find-enclosing-mount-finish" href="pygobject/class-giofile.html#method-giofile--find-enclosing-mount-finish">
+        <ANCHOR id="method-giofile--get-basename" href="pygobject/class-giofile.html#method-giofile--get-basename">
+        <ANCHOR id="method-giofile--get-child" href="pygobject/class-giofile.html#method-giofile--get-child">
+        <ANCHOR id="method-giofile--get-child-for-display-name" href="pygobject/class-giofile.html#method-giofile--get-child-for-display-name">
+        <ANCHOR id="method-giofile--get-parent" href="pygobject/class-giofile.html#method-giofile--get-parent">
+        <ANCHOR id="method-giofile--get-parse-name" href="pygobject/class-giofile.html#method-giofile--get-parse-name">
+        <ANCHOR id="method-giofile--get-path" href="pygobject/class-giofile.html#method-giofile--get-path">
+        <ANCHOR id="method-giofile--get-relative-path" href="pygobject/class-giofile.html#method-giofile--get-relative-path">
+        <ANCHOR id="method-giofile--get-uri" href="pygobject/class-giofile.html#method-giofile--get-uri">
+        <ANCHOR id="method-giofile--get-uri-scheme" href="pygobject/class-giofile.html#method-giofile--get-uri-scheme">
+        <ANCHOR id="method-giofile--has-prefix" href="pygobject/class-giofile.html#method-giofile--has-prefix">
+        <ANCHOR id="method-giofile--has-uri-scheme" href="pygobject/class-giofile.html#method-giofile--has-uri-scheme">
+        <ANCHOR id="method-giofile--is-native" href="pygobject/class-giofile.html#method-giofile--is-native">
+        <ANCHOR id="method-giofile--load-contents" href="pygobject/class-giofile.html#method-giofile--load-contents">
+        <ANCHOR id="method-giofile--load-contents-async" href="pygobject/class-giofile.html#method-giofile--load-contents-async">
+        <ANCHOR id="method-giofile--load-contents-finish" href="pygobject/class-giofile.html#method-giofile--load-contents-finish">
+        <ANCHOR id="method-giofile--make-directory" href="pygobject/class-giofile.html#method-giofile--make-directory">
+        <ANCHOR id="method-giofile--make-directory-with-parents" href="pygobject/class-giofile.html#method-giofile--make-directory-with-parents">
+        <ANCHOR id="method-giofile--make-symbolic-link" href="pygobject/class-giofile.html#method-giofile--make-symbolic-link">
+        <ANCHOR id="method-giofile--monitor" href="pygobject/class-giofile.html#method-giofile--monitor">
+        <ANCHOR id="method-giofile--monitor-directory" href="pygobject/class-giofile.html#method-giofile--monitor-directory">
+        <ANCHOR id="method-giofile--monitor-file" href="pygobject/class-giofile.html#method-giofile--monitor-file">
+        <ANCHOR id="method-giofile--mount-enclosing-volume" href="pygobject/class-giofile.html#method-giofile--mount-enclosing-volume">
+        <ANCHOR id="method-giofile--mount-enclosing-volume-finish" href="pygobject/class-giofile.html#method-giofile--mount-enclosing-volume-finish">
+        <ANCHOR id="method-giofile--mount-mountable" href="pygobject/class-giofile.html#method-giofile--mount-mountable">
+        <ANCHOR id="method-giofile--mount-mountable-finish" href="pygobject/class-giofile.html#method-giofile--mount-mountable-finish">
+        <ANCHOR id="method-giofile--move" href="pygobject/class-giofile.html#method-giofile--move">
+        <ANCHOR id="method-giofile--query-default-handler" href="pygobject/class-giofile.html#method-giofile--query-default-handler">
+        <ANCHOR id="method-giofile--query-exists" href="pygobject/class-giofile.html#method-giofile--query-exists">
+        <ANCHOR id="method-giofile--query-file-type" href="pygobject/class-giofile.html#method-giofile--query-file-type">
+        <ANCHOR id="method-giofile--query-filesystem-info" href="pygobject/class-giofile.html#method-giofile--query-filesystem-info">
+        <ANCHOR id="method-giofile--query-filesystem-info-async" href="pygobject/class-giofile.html#method-giofile--query-filesystem-info-async">
+        <ANCHOR id="method-giofile--query-filesystem-info-finish" href="pygobject/class-giofile.html#method-giofile--query-filesystem-info-finish">
+        <ANCHOR id="method-giofile--query-info" href="pygobject/class-giofile.html#method-giofile--query-info">
+        <ANCHOR id="method-giofile--query-info-async" href="pygobject/class-giofile.html#method-giofile--query-info-async">
+        <ANCHOR id="method-giofile--query-info-finish" href="pygobject/class-giofile.html#method-giofile--query-info-finish">
+        <ANCHOR id="method-giofile--query-settable-attributes" href="pygobject/class-giofile.html#method-giofile--query-settable-attributes">
+        <ANCHOR id="method-giofile--query-writable-namespace" href="pygobject/class-giofile.html#method-giofile--query-writable-namespace">
+        <ANCHOR id="method-giofile--read" href="pygobject/class-giofile.html#method-giofile--read">
+        <ANCHOR id="method-giofile--read-async" href="pygobject/class-giofile.html#method-giofile--read-async">
+        <ANCHOR id="method-giofile--read-finish" href="pygobject/class-giofile.html#method-giofile--read-finish">
+        <ANCHOR id="method-giofile--replace" href="pygobject/class-giofile.html#method-giofile--replace">
+        <ANCHOR id="method-giofile--replace-async" href="pygobject/class-giofile.html#method-giofile--replace-async">
+        <ANCHOR id="method-giofile--replace-contents" href="pygobject/class-giofile.html#method-giofile--replace-contents">
+        <ANCHOR id="method-giofile--replace-contents-async" href="pygobject/class-giofile.html#method-giofile--replace-contents-async">
+        <ANCHOR id="method-giofile--replace-contents-finish" href="pygobject/class-giofile.html#method-giofile--replace-contents-finish">
+        <ANCHOR id="method-giofile--replace-finish" href="pygobject/class-giofile.html#method-giofile--replace-finish">
+        <ANCHOR id="method-giofile--resolve-relative-path" href="pygobject/class-giofile.html#method-giofile--resolve-relative-path">
+        <ANCHOR id="method-giofile--set-attribute" href="pygobject/class-giofile.html#method-giofile--set-attribute">
+        <ANCHOR id="method-giofile--set-attribute-byte-string" href="pygobject/class-giofile.html#method-giofile--set-attribute-byte-string">
+        <ANCHOR id="method-giofile--set-attribute-int32" href="pygobject/class-giofile.html#method-giofile--set-attribute-int32">
+        <ANCHOR id="method-giofile--set-attribute-int64" href="pygobject/class-giofile.html#method-giofile--set-attribute-int64">
+        <ANCHOR id="method-giofile--set-attribute-string" href="pygobject/class-giofile.html#method-giofile--set-attribute-string">
+        <ANCHOR id="method-giofile--set-attribute-uint32" href="pygobject/class-giofile.html#method-giofile--set-attribute-uint32">
+        <ANCHOR id="method-giofile--set-attribute-uint64" href="pygobject/class-giofile.html#method-giofile--set-attribute-uint64">
+        <ANCHOR id="method-giofile--set-attributes-async" href="pygobject/class-giofile.html#method-giofile--set-attributes-async">
+        <ANCHOR id="method-giofile--set-attributes-finish" href="pygobject/class-giofile.html#method-giofile--set-attributes-finish">
+        <ANCHOR id="method-giofile--set-attributes-from-info" href="pygobject/class-giofile.html#method-giofile--set-attributes-from-info">
+        <ANCHOR id="method-giofile--set-display-name" href="pygobject/class-giofile.html#method-giofile--set-display-name">
+        <ANCHOR id="method-giofile--set-display-name-async" href="pygobject/class-giofile.html#method-giofile--set-display-name-async">
+        <ANCHOR id="method-giofile--set-display-name-finish" href="pygobject/class-giofile.html#method-giofile--set-display-name-finish">
+        <ANCHOR id="method-giofile--trash" href="pygobject/class-giofile.html#method-giofile--trash">
+        <ANCHOR id="method-giofile--unmount-mountable" href="pygobject/class-giofile.html#method-giofile--unmount-mountable">
+        <ANCHOR id="method-giofile--unmount-mountable-finish" href="pygobject/class-giofile.html#method-giofile--unmount-mountable-finish">
+        <ANCHOR id="function-gio--file-parse-name" href="pygobject/class-giofile.html#function-gio--file-parse-name">
+        <ANCHOR id="class-giofileattributeinfo" href="pygobject/class-giofileattributeinfo.html">
+        <ANCHOR id="attributes-giofileattributeinfo" href="pygobject/class-giofileattributeinfo.html#attributes-giofileattributeinfo">
+        <ANCHOR id="class-giofileenumerator" href="pygobject/class-giofileenumerator.html">
+        <ANCHOR id="properties-giofileenumerator" href="pygobject/class-giofileenumerator.html#properties-giofileenumerator">
+        <ANCHOR id="method-giofileenumerator--close" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--close">
+        <ANCHOR id="method-giofileenumerator--close-async" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--close-async">
+        <ANCHOR id="method-giofileenumerator--close-finish" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--close-finish">
+        <ANCHOR id="method-giofileenumerator--get-container" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--get-container">
+        <ANCHOR id="method-giofileenumerator--has-pending" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--has-pending">
+        <ANCHOR id="method-giofileenumerator--is-closed" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--is-closed">
+        <ANCHOR id="method-giofileenumerator--next-file" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--next-file">
+        <ANCHOR id="method-giofileenumerator--next-files-async" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--next-files-async">
+        <ANCHOR id="method-giofileenumerator--next-files-finish" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--next-files-finish">
+        <ANCHOR id="method-giofileenumerator--set-pending" href="pygobject/class-giofileenumerator.html#method-giofileenumerator--set-pending">
+        <ANCHOR id="class-giofileicon" href="pygobject/class-giofileicon.html">
+        <ANCHOR id="constructor-giofileicon" href="pygobject/class-giofileicon.html#constructor-giofileicon">
+        <ANCHOR id="method-giofileicon--get-file" href="pygobject/class-giofileicon.html#method-giofileicon--get-file">
+        <ANCHOR id="class-giofileinfo" href="pygobject/class-giofileinfo.html">
+        <ANCHOR id="constructor-giofileinfo" href="pygobject/class-giofileinfo.html#constructor-giofileinfo">
+        <ANCHOR id="class-giofileinputstream" href="pygobject/class-giofileinputstream.html">
+        <ANCHOR id="method-giofileinputstream--query-info" href="pygobject/class-giofileinputstream.html#method-giofileinputstream--query-info">
+        <ANCHOR id="method-giofileinputstream--query-info-async" href="pygobject/class-giofileinputstream.html#method-giofileinputstream--query-info-async">
+        <ANCHOR id="method-giofileinputstream--query-info-finish" href="pygobject/class-giofileinputstream.html#method-giofileinputstream--query-info-finish">
+        <ANCHOR id="class-giofilemonitor" href="pygobject/class-giofilemonitor.html">
+        <ANCHOR id="properties-giofilemonitor" href="pygobject/class-giofilemonitor.html#properties-giofilemonitor">
+        <ANCHOR id="signal-prototypes-giofilemonitor" href="pygobject/class-giofilemonitor.html#signal-prototypes-giofilemonitor">
+        <ANCHOR id="class-giofileoutputstream" href="pygobject/class-giofileoutputstream.html">
+        <ANCHOR id="method-giofileoutputstream--get-etag" href="pygobject/class-giofileoutputstream.html#method-giofileoutputstream--get-etag">
+        <ANCHOR id="method-giofileoutputstream--query-info" href="pygobject/class-giofileoutputstream.html#method-giofileoutputstream--query-info">
+        <ANCHOR id="method-giofileoutputstream--query-info-async" href="pygobject/class-giofileoutputstream.html#method-giofileoutputstream--query-info-async">
+        <ANCHOR id="method-giofileoutputstream--query-info-finish" href="pygobject/class-giofileoutputstream.html#method-giofileoutputstream--query-info-finish">
+        <ANCHOR id="class-giofilterinputstream" href="pygobject/class-giofilterinputstream.html">
+        <ANCHOR id="properties-giofilterinputstream" href="pygobject/class-giofilterinputstream.html#properties-giofilterinputstream">
+        <ANCHOR id="method-giofilterinputstream--get-base-stream" href="pygobject/class-giofilterinputstream.html#method-giofilterinputstream--get-base-stream">
+        <ANCHOR id="method-giofilterinputstream--get-close-base-stream" href="pygobject/class-giofilterinputstream.html#method-giofilterinputstream--get-close-base-stream">
+        <ANCHOR id="method-giofilterinputstream--set-close-base-stream" href="pygobject/class-giofilterinputstream.html#method-giofilterinputstream--set-close-base-stream">
+        <ANCHOR id="class-giofilteroutputstream" href="pygobject/class-giofilteroutputstream.html">
+        <ANCHOR id="properties-giofilteroutputstream" href="pygobject/class-giofilteroutputstream.html#properties-giofilteroutputstream">
+        <ANCHOR id="method-giofilteroutputstream--get-base-stream" href="pygobject/class-giofilteroutputstream.html#method-giofilteroutputstream--get-base-stream">
+        <ANCHOR id="method-giofilteroutputstream--get-close-base-stream" href="pygobject/class-giofilteroutputstream.html#method-giofilteroutputstream--get-close-base-stream">
+        <ANCHOR id="method-giofilteroutputstream--set-close-base-stream" href="pygobject/class-giofilteroutputstream.html#method-giofilteroutputstream--set-close-base-stream">
+        <ANCHOR id="class-gioicon" href="pygobject/class-gioicon.html">
+        <ANCHOR id="method-gioicon--equal" href="pygobject/class-gioicon.html#method-gioicon--equal">
+        <ANCHOR id="method-gioicon--to-string" href="pygobject/class-gioicon.html#method-gioicon--to-string">
+        <ANCHOR id="function-gio--icon-new-from-string" href="pygobject/class-gioicon.html#function-gio--icon-new-from-string">
+        <ANCHOR id="class-gioinputstream" href="pygobject/class-gioinputstream.html">
+        <ANCHOR id="method-gioinputstream--clear-pending" href="pygobject/class-gioinputstream.html#method-gioinputstream--clear-pending">
+        <ANCHOR id="method-gioinputstream--close" href="pygobject/class-gioinputstream.html#method-gioinputstream--close">
+        <ANCHOR id="method-gioinputstream--close-async" href="pygobject/class-gioinputstream.html#method-gioinputstream--close-async">
+        <ANCHOR id="method-gioinputstream--close-finish" href="pygobject/class-gioinputstream.html#method-gioinputstream--close-finish">
+        <ANCHOR id="method-gioinputstream--has-pending" href="pygobject/class-gioinputstream.html#method-gioinputstream--has-pending">
+        <ANCHOR id="method-gioinputstream--is-closed" href="pygobject/class-gioinputstream.html#method-gioinputstream--is-closed">
+        <ANCHOR id="method-gioinputstream--read" href="pygobject/class-gioinputstream.html#method-gioinputstream--read">
+        <ANCHOR id="method-gioinputstream--read-async" href="pygobject/class-gioinputstream.html#method-gioinputstream--read-async">
+        <ANCHOR id="method-gioinputstream--read-finish" href="pygobject/class-gioinputstream.html#method-gioinputstream--read-finish">
+        <ANCHOR id="method-gioinputstream--read-part" href="pygobject/class-gioinputstream.html#method-gioinputstream--read-part">
+        <ANCHOR id="method-gioinputstream--set-pending" href="pygobject/class-gioinputstream.html#method-gioinputstream--set-pending">
+        <ANCHOR id="method-gioinputstream--skip" href="pygobject/class-gioinputstream.html#method-gioinputstream--skip">
+        <ANCHOR id="method-gioinputstream--skip-async" href="pygobject/class-gioinputstream.html#method-gioinputstream--skip-async">
+        <ANCHOR id="method-gioinputstream--skip-finish" href="pygobject/class-gioinputstream.html#method-gioinputstream--skip-finish">
+        <ANCHOR id="class-gioloadableicon" href="pygobject/class-gioloadableicon.html">
+        <ANCHOR id="method-gioloadableicon--load" href="pygobject/class-gioloadableicon.html#method-gioloadableicon--load">
+        <ANCHOR id="method-gioloadableicon--load-async" href="pygobject/class-gioloadableicon.html#method-gioloadableicon--load-async">
+        <ANCHOR id="method-gioloadableicon--load-finish" href="pygobject/class-gioloadableicon.html#method-gioloadableicon--load-finish">
+        <ANCHOR id="class-giomemoryinputstream" href="pygobject/class-giomemoryinputstream.html">
+        <ANCHOR id="constructor-giomemoryinputstream" href="pygobject/class-giomemoryinputstream.html#constructor-giomemoryinputstream">
+        <ANCHOR id="method-giomemoryinputstream--add-data" href="pygobject/class-giomemoryinputstream.html#method-giomemoryinputstream--add-data">
+        <ANCHOR id="function-gio--memory-input-stream-new-from-data" href="pygobject/class-giomemoryinputstream.html#function-gio--memory-input-stream-new-from-data">
+        <ANCHOR id="class-giomemoryoutputstream" href="pygobject/class-giomemoryoutputstream.html">
+        <ANCHOR id="constructor-giomemoryoutputstream" href="pygobject/class-giomemoryoutputstream.html#constructor-giomemoryoutputstream">
+        <ANCHOR id="method-giomemoryoutputstream--get-contents" href="pygobject/class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-contents">
+        <ANCHOR id="method-giomemoryoutputstream--get-data-size" href="pygobject/class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-data-size">
+        <ANCHOR id="method-giomemoryoutputstream--get-size" href="pygobject/class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-size">
+        <ANCHOR id="class-giomount" href="pygobject/class-giomount.html">
+        <ANCHOR id="signal-prototypes-giomount" href="pygobject/class-giomount.html#signal-prototypes-giomount">
+        <ANCHOR id="method-giomount--can-eject" href="pygobject/class-giomount.html#method-giomount--can-eject">
+        <ANCHOR id="method-giomount--can-unmount" href="pygobject/class-giomount.html#method-giomount--can-unmount">
+        <ANCHOR id="method-giomount--eject" href="pygobject/class-giomount.html#method-giomount--eject">
+        <ANCHOR id="method-giomount--eject-finish" href="pygobject/class-giomount.html#method-giomount--eject-finish">
+        <ANCHOR id="method-giomount--get-drive" href="pygobject/class-giomount.html#method-giomount--get-drive">
+        <ANCHOR id="method-giomount--get-icon" href="pygobject/class-giomount.html#method-giomount--get-icon">
+        <ANCHOR id="method-giomount--get-name" href="pygobject/class-giomount.html#method-giomount--get-name">
+        <ANCHOR id="method-giomount--get-root" href="pygobject/class-giomount.html#method-giomount--get-root">
+        <ANCHOR id="method-giomount--get-uuid" href="pygobject/class-giomount.html#method-giomount--get-uuid">
+        <ANCHOR id="method-giomount--get-volume" href="pygobject/class-giomount.html#method-giomount--get-volume">
+        <ANCHOR id="method-giomount--guess-content-type" href="pygobject/class-giomount.html#method-giomount--guess-content-type">
+        <ANCHOR id="method-giomount--guess-content-type-finish" href="pygobject/class-giomount.html#method-giomount--guess-content-type-finish">
+        <ANCHOR id="method-giomount--guess-content-type-sync" href="pygobject/class-giomount.html#method-giomount--guess-content-type-sync">
+        <ANCHOR id="method-giomount--is-shadowed" href="pygobject/class-giomount.html#method-giomount--is-shadowed">
+        <ANCHOR id="method-giomount--remount" href="pygobject/class-giomount.html#method-giomount--remount">
+        <ANCHOR id="method-giomount--remount-finish" href="pygobject/class-giomount.html#method-giomount--remount-finish">
+        <ANCHOR id="method-giomount--shadow" href="pygobject/class-giomount.html#method-giomount--shadow">
+        <ANCHOR id="method-giomount--unmount" href="pygobject/class-giomount.html#method-giomount--unmount">
+        <ANCHOR id="method-giomount--unmount-finish" href="pygobject/class-giomount.html#method-giomount--unmount-finish">
+        <ANCHOR id="method-giomount--unshadow" href="pygobject/class-giomount.html#method-giomount--unshadow">
+        <ANCHOR id="signal-giomount--aborted" href="pygobject/class-giomount.html#signal-giomount--aborted">
+        <ANCHOR id="signal-giomount--changed" href="pygobject/class-giomount.html#signal-giomount--changed">
+        <ANCHOR id="signal-giomount--unmounted" href="pygobject/class-giomount.html#signal-giomount--unmounted">
+        <ANCHOR id="class-giomountoperation" href="pygobject/class-giomountoperation.html">
+        <ANCHOR id="properties-giomountoperation" href="pygobject/class-giomountoperation.html#properties-giomountoperation">
+        <ANCHOR id="signal-prototypes-giomountoperation" href="pygobject/class-giomountoperation.html#signal-prototypes-giomountoperation">
+        <ANCHOR id="constructor-giomountoperation" href="pygobject/class-giomountoperation.html#constructor-giomountoperation">
+        <ANCHOR id="method-giomountoperation--get-anonymous" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-anonymous">
+        <ANCHOR id="method-giomountoperation--get-choice" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-choice">
+        <ANCHOR id="method-giomountoperation--get-domain" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-domain">
+        <ANCHOR id="method-giomountoperation--get-password" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-password">
+        <ANCHOR id="method-giomountoperation--get-password-save" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-password-save">
+        <ANCHOR id="method-giomountoperation--get-username" href="pygobject/class-giomountoperation.html#method-giomountoperation--get-username">
+        <ANCHOR id="method-giomountoperation--reply" href="pygobject/class-giomountoperation.html#method-giomountoperation--reply">
+        <ANCHOR id="method-giomountoperation--set-anonymous" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-anonymous">
+        <ANCHOR id="method-giomountoperation--set-choice" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-choice">
+        <ANCHOR id="method-giomountoperation--set-domain" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-domain">
+        <ANCHOR id="method-giomountoperation--set-password" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-password">
+        <ANCHOR id="method-giomountoperation--set-password-save" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-password-save">
+        <ANCHOR id="method-giomountoperation--set-username" href="pygobject/class-giomountoperation.html#method-giomountoperation--set-username">
+        <ANCHOR id="signal-giomountoperation--aborted" href="pygobject/class-giomountoperation.html#signal-giomountoperation--aborted">
+        <ANCHOR id="signal-giomountoperation--ask-password" href="pygobject/class-giomountoperation.html#signal-giomountoperation--ask-password">
+        <ANCHOR id="signal-giomountoperation--ask-question" href="pygobject/class-giomountoperation.html#signal-giomountoperation--ask-question">
+        <ANCHOR id="signal-giomountoperation--reply" href="pygobject/class-giomountoperation.html#signal-giomountoperation--reply">
+        <ANCHOR id="class-giooutputstream" href="pygobject/class-giooutputstream.html">
+        <ANCHOR id="class-gioseekable" href="pygobject/class-gioseekable.html">
+        <ANCHOR id="method-gioseekable--tell" href="pygobject/class-gioseekable.html#method-gioseekable--tell">
+        <ANCHOR id="method-gioseekable--can_seek" href="pygobject/class-gioseekable.html#method-gioseekable--can_seek">
+        <ANCHOR id="method-gioseekable--seek" href="pygobject/class-gioseekable.html#method-gioseekable--seek">
+        <ANCHOR id="method-gioseekable--can_truncate" href="pygobject/class-gioseekable.html#method-gioseekable--can_truncate">
+        <ANCHOR id="method-gioseekable--truncate" href="pygobject/class-gioseekable.html#method-gioseekable--truncate">
+        <ANCHOR id="class-giosimpleasyncresult" href="pygobject/class-giosimpleasyncresult.html">
+        <ANCHOR id="method-giosimpleasyncresult--complete" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete">
+        <ANCHOR id="method-giosimpleasyncresult--complete-in-idle" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle">
+        <ANCHOR id="method-giosimpleasyncresult--get-op-res-gboolean" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gboolean">
+        <ANCHOR id="method-giosimpleasyncresult--get-op-res-gssize" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gssize">
+        <ANCHOR id="method-giosimpleasyncresult--propagate-error" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--propagate-error">
+        <ANCHOR id="method-giosimpleasyncresult--set-handle-cancellation" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-handle-cancellation">
+        <ANCHOR id="method-giosimpleasyncresult--set-op-res-gboolean" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gboolean">
+        <ANCHOR id="method-giosimpleasyncresult--set-op-res-gssize" href="pygobject/class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gssize">
+        <ANCHOR id="class-giothemedicon" href="pygobject/class-giothemedicon.html">
+        <ANCHOR id="properties-giomountoperation" href="pygobject/class-giothemedicon.html#properties-giomountoperation">
+        <ANCHOR id="constructor-giothemedicon" href="pygobject/class-giothemedicon.html#constructor-giothemedicon">
+        <ANCHOR id="method-giothemedicon--append-name" href="pygobject/class-giothemedicon.html#method-giothemedicon--append-name">
+        <ANCHOR id="method-giothemedicon--get-names" href="pygobject/class-giothemedicon.html#method-giothemedicon--get-names">
+        <ANCHOR id="method-giothemedicon--prepend-name" href="pygobject/class-giothemedicon.html#method-giothemedicon--prepend-name">
+        <ANCHOR id="class-giovolume" href="pygobject/class-giovolume.html">
+        <ANCHOR id="signal-prototypes-giovolume" href="pygobject/class-giovolume.html#signal-prototypes-giovolume">
+        <ANCHOR id="method-giovolume--can-eject" href="pygobject/class-giovolume.html#method-giovolume--can-eject">
+        <ANCHOR id="method-giovolume--can-mount" href="pygobject/class-giovolume.html#method-giovolume--can-mount">
+        <ANCHOR id="method-giovolume--eject" href="pygobject/class-giovolume.html#method-giovolume--eject">
+        <ANCHOR id="method-giovolume--eject-finish" href="pygobject/class-giovolume.html#method-giovolume--eject-finish">
+        <ANCHOR id="method-giovolume--enumerate-identifiers" href="pygobject/class-giovolume.html#method-giovolume--enumerate-identifiers">
+        <ANCHOR id="method-giovolume--get-activation-root" href="pygobject/class-giovolume.html#method-giovolume--get-activation-root">
+        <ANCHOR id="method-giovolume--get-drive" href="pygobject/class-giovolume.html#method-giovolume--get-drive">
+        <ANCHOR id="method-giovolume--get-icon" href="pygobject/class-giovolume.html#method-giovolume--get-icon">
+        <ANCHOR id="method-giovolume--get-identifier" href="pygobject/class-giovolume.html#method-giovolume--get-identifier">
+        <ANCHOR id="method-giovolume--get-mount" href="pygobject/class-giovolume.html#method-giovolume--get-mount">
+        <ANCHOR id="method-giovolume--get-name" href="pygobject/class-giovolume.html#method-giovolume--get-name">
+        <ANCHOR id="method-giovolume--get-uuid" href="pygobject/class-giovolume.html#method-giovolume--get-uuid">
+        <ANCHOR id="method-giovolume--mount" href="pygobject/class-giovolume.html#method-giovolume--mount">
+        <ANCHOR id="method-giovolume--mount-finish" href="pygobject/class-giovolume.html#method-giovolume--mount-finish">
+        <ANCHOR id="method-giovolume--should-automount" href="pygobject/class-giovolume.html#method-giovolume--should-automount">
+        <ANCHOR id="signal-giovolume--changed" href="pygobject/class-giovolume.html#signal-giovolume--changed">
+        <ANCHOR id="signal-giovolume--removed" href="pygobject/class-giovolume.html#signal-giovolume--removed">
+        <ANCHOR id="class-giovolumemonitor" href="pygobject/class-giovolumemonitor.html">
+        <ANCHOR id="signal-prototypes-giovolumemonitor" href="pygobject/class-giovolumemonitor.html#signal-prototypes-giovolumemonitor">
+        <ANCHOR id="method-giovolumemonitor--get-connected-drives" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-connected-drives">
+        <ANCHOR id="method-giovolumemonitor--get-mount-for-uuid" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-mount-for-uuid">
+        <ANCHOR id="method-giovolumemonitor--get-mounts" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-mounts">
+        <ANCHOR id="method-giovolumemonitor--get-volume-for-uuid" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-volume-for-uuid">
+        <ANCHOR id="method-giovolumemonitor--get-volumes" href="pygobject/class-giovolumemonitor.html#method-giovolumemonitor--get-volumes">
+        <ANCHOR id="function-gio--volume-monitor-adopt-orphan-mount" href="pygobject/class-giovolumemonitor.html#function-gio--volume-monitor-adopt-orphan-mount">
+        <ANCHOR id="function-gio--volume-monitor-get" href="pygobject/class-giovolumemonitor.html#function-gio--volume-monitor-get">
+        <ANCHOR id="signal-giovolumemonitor--drive-changed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--drive-changed">
+        <ANCHOR id="signal-giovolumemonitor--drive-connected" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--drive-connected">
+        <ANCHOR id="signal-giovolumemonitor--drive-disconnected" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--drive-disconnected">
+        <ANCHOR id="signal-giovolumemonitor--drive-eject-button" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--drive-eject-button">
+        <ANCHOR id="signal-giovolumemonitor--mount-added" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--mount-added">
+        <ANCHOR id="signal-giovolumemonitor--mount-changed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--mount-changed">
+        <ANCHOR id="signal-giovolumemonitor--mount-pre-unmount" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--mount-pre-unmount">
+        <ANCHOR id="signal-giovolumemonitor--mount-removed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--mount-removed">
+        <ANCHOR id="signal-giovolumemonitor--volume-added" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--volume-added">
+        <ANCHOR id="signal-giovolumemonitor--volume-changed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--volume-changed">
+        <ANCHOR id="signal-giovolumemonitor--volume-removed" href="pygobject/class-giovolumemonitor.html#signal-giovolumemonitor--volume-removed">
+        <ANCHOR id="gio-functions" href="pygobject/gio-functions.html">
+        <ANCHOR id="function-gio--content-type-can-be-executable" href="pygobject/gio-functions.html#function-gio--content-type-can-be-executable">
+        <ANCHOR id="function-gio--content-type-equals" href="pygobject/gio-functions.html#function-gio--content-type-equals">
+        <ANCHOR id="function-gio--content-type-from-mime-type" href="pygobject/gio-functions.html#function-gio--content-type-from-mime-type">
+        <ANCHOR id="function-gio--content-type-get-description" href="pygobject/gio-functions.html#function-gio--content-type-get-description">
+        <ANCHOR id="function-gio--content-type-get-icon" href="pygobject/gio-functions.html#function-gio--content-type-get-icon">
+        <ANCHOR id="function-gio--content-type-get-mime-type" href="pygobject/gio-functions.html#function-gio--content-type-get-mime-type">
+        <ANCHOR id="function-gio--content-type-guess" href="pygobject/gio-functions.html#function-gio--content-type-guess">
+        <ANCHOR id="function-gio--content-type-is-a" href="pygobject/gio-functions.html#function-gio--content-type-is-a">
+        <ANCHOR id="function-gio--content-type-is-unknown" href="pygobject/gio-functions.html#function-gio--content-type-is-unknown">
+        <ANCHOR id="function-gio--content-types-get-registered" href="pygobject/gio-functions.html#function-gio--content-types-get-registered">
+        <ANCHOR id="function-gio--io-error-from-errno" href="pygobject/gio-functions.html#function-gio--io-error-from-errno">
+        <ANCHOR id="gio-constants" href="pygobject/gio-constants.html">
+        <ANCHOR id="gio-constants-description" href="pygobject/gio-constants.html#gio-constants-description">
+        <ANCHOR id="gio-ask-password-flags-constants" href="pygobject/gio-constants.html#gio-ask-password-flags-constants">
+        <ANCHOR id="gio-app-info-constants" href="pygobject/gio-constants.html#gio-app-info-constants">
+        <ANCHOR id="gio-data-stream-byte-order-constants" href="pygobject/gio-constants.html#gio-data-stream-byte-order-constants">
+        <ANCHOR id="gio-data-stream-newline-type-constants" href="pygobject/gio-constants.html#gio-data-stream-newline-type-constants">
+        <ANCHOR id="gio-emblem-origin-constants" href="pygobject/gio-constants.html#gio-emblem-origin-constants">
+        <ANCHOR id="gio-error-constants" href="pygobject/gio-constants.html#gio-error-constants">
+        <ANCHOR id="gio-file-attribute-constants" href="pygobject/gio-constants.html#gio-file-attribute-constants">
+        <ANCHOR id="gio-file-attribute-type-constants" href="pygobject/gio-constants.html#gio-file-attribute-type-constants">
+        <ANCHOR id="gio-file-attribute-flags-constants" href="pygobject/gio-constants.html#gio-file-attribute-flags-constants">
+        <ANCHOR id="gio-file-create-flags-constants" href="pygobject/gio-constants.html#gio-file-create-flags-constants">
+        <ANCHOR id="gio-file-copy-flags-constants" href="pygobject/gio-constants.html#gio-file-copy-flags-constants">
+        <ANCHOR id="gio-file-monitor-flags-constants" href="pygobject/gio-constants.html#gio-file-monitor-flags-constants">
+        <ANCHOR id="gio-file-query-info-flags-constants" href="pygobject/gio-constants.html#gio-file-query-info-flags-constants">
+        <ANCHOR id="gio-file-type-constants" href="pygobject/gio-constants.html#gio-file-type-constants">
+        <ANCHOR id="gio-mount-mount-flags-constants" href="pygobject/gio-constants.html#gio-mount-mount-flags-constants">
+        <ANCHOR id="gio-mount-unmount-flags-constants" href="pygobject/gio-constants.html#gio-mount-unmount-flags-constants">
+        <ANCHOR id="gio-mount-operation-result-constants" href="pygobject/gio-constants.html#gio-mount-operation-result-constants">
+        <ANCHOR id="gio-password-save-constants" href="pygobject/gio-constants.html#gio-password-save-constants">
+        <ANCHOR id="class-giounixinputstream" href="pygobject/class-giounixinputstream.html">
+        <ANCHOR id="properties-giounixinputstream" href="pygobject/class-giounixinputstream.html#properties-giounixinputstream">
+        <ANCHOR id="constructor-giounixinputstream" href="pygobject/class-giounixinputstream.html#constructor-giounixinputstream">
+        <ANCHOR id="method-giounixinputstream--get-close-fd" href="pygobject/class-giounixinputstream.html#method-giounixinputstream--get-close-fd">
+        <ANCHOR id="method-giounixinputstream--get-fd" href="pygobject/class-giounixinputstream.html#method-giounixinputstream--get-fd">
+        <ANCHOR id="method-giounixinputstream--set-close-fd" href="pygobject/class-giounixinputstream.html#method-giounixinputstream--set-close-fd">
+        <ANCHOR id="class-giounixoutputstream" href="pygobject/class-giounixoutputstream.html">
+        <ANCHOR id="properties-giounixoutputstream" href="pygobject/class-giounixoutputstream.html#properties-giounixoutputstream">
+        <ANCHOR id="constructor-giounixoutputstream" href="pygobject/class-giounixoutputstream.html#constructor-giounixoutputstream">
+        <ANCHOR id="method-giounixoutputstream--get-close-fd" href="pygobject/class-giounixoutputstream.html#method-giounixoutputstream--get-close-fd">
+        <ANCHOR id="method-giounixoutputstream--get-fd" href="pygobject/class-giounixoutputstream.html#method-giounixoutputstream--get-fd">
+        <ANCHOR id="method-giounixoutputstream--set-close-fd" href="pygobject/class-giounixoutputstream.html#method-giounixoutputstream--set-close-fd">
+        
\ No newline at end of file
diff --git a/docs/html/pygobject-introduction.html b/docs/html/pygobject-introduction.html
new file mode 100644 (file)
index 0000000..bdb81c0
--- /dev/null
@@ -0,0 +1,83 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Introduction</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="index.html" title="PyGObject Reference Manual"><link rel="prev" href="index.html" title="PyGObject Reference Manual"><link rel="next" href="glib-class-reference.html" title="PyGlibClass Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Introduction</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="glib-class-reference.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Introduction"><div class="titlepage"><div><div><h2 class="title"><a name="pygobject-introduction"></a>Introduction</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="pygobject-introduction.html#pygobject-reference-format">Reference Page Format</a></span></dt></dl></div><p>This document describes many of the <code class="literal">PyGObject</code>
+  version 2.12 classes and their methods and associated
+  functions. Deprecated classes, functions and methods have been
+  specifically left out of this reference though classes that have become
+  deprecated since PyGObject 2.0 have been left in but annotated with a
+  deprecation warning. This document attempts to document as much of the
+  <code class="literal">PyGObject</code> <code class="literal">API</code> as possible but there
+  are undoubtedly errors and omissions. If you discover any of these please
+  file a bug report at <a class="ulink" href="http://bugzilla.gnome.org" target="_top">bugzilla.gnome.org</a> for the
+  <code class="literal">pygobject</code> project. Specific areas that have not been
+  documented include:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">The GParamSpec class</li></ul></div><p>This reference describes the API for <code class="literal">PyGObject</code> as
+  of version 2.11.0+ and assumes that the additional API changes for version
+  2.12 will not be significant. There will undoubtedly be changes that are
+  not reflected in this reference. The differences in the API between
+  version 2.0 and previous versions are denoted in this reference with a
+  Note that describes the availability of the object, constructor, method or
+  function. Any of these that do not have a notation can be assumed to be
+  available in all versions of PyGObject from 2.0 and up. The source code
+  must be consulted if this reference and your version of
+  <code class="literal">PyGObject</code> seem to differ. You are encouraged to use the
+  latest version of <code class="literal">PyGObject</code> that is available. See the
+  <a class="ulink" href="http://www.pygtk.org" target="_top"><code class="literal">PyGTK</code>
+  homepage</a> for more information and more resources on how to use
+  PyGObject as well as help in its development.</p><p> The Reference contains a chapter for each
+  <code class="literal">PyGObject</code> module containing the class descriptions. The
+  class descriptions are arranged alphabetically within the
+  chapters. Currently there is one module chapter:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">The <code class="literal">gobject</code> module</span></p></td><td>The classes that are included in the
+<code class="literal">gobject</code> module of <code class="literal">PyGObject</code> and are
+accessed similar to: gobject.GObject. These classes are the base object
+classes that the <code class="literal">gtk</code> and <code class="literal">gtk.gdk</code>
+module classes are built on.</td></tr></tbody></table><div class="sect1" title="Reference Page Format"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pygobject-reference-format"></a>Reference Page Format</h2></div></div></div><p>Each <code class="literal">PyGObject</code> class is described in a reference
+page that has a number of sections in a fixed format. Each reference page
+will have a subset of the following sections:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">Name</span></p></td><td>The name and a one-line description of the
+class.</td></tr><tr><td><p><span class="term">Synopsis</span></p></td><td>A synopsis of the class and its methods and
+optionally a list of associated functions.</td></tr><tr><td><p><span class="term">Ancestry</span></p></td><td>The list of the parent classes of the class. This
+section may not be present in all class descriptions.</td></tr><tr><td><p><span class="term">Properties</span></p></td><td>A list of the properties (internal state)
+supported by the class. This section may not be present in all classes. The
+property descriptions include the name, the access operations (e.g. Read,
+Write), and a brief description. Properties are accessed using the <a class="link" href="class-gobject.html#method-gobject--set-property" title="gobject.GObject.set_property"><code class="methodname">gobject.set_property</code>()</a> 
+and <a class="link" href="class-gobject.html#method-gobject--get-property" title="gobject.GObject.get_property"><code class="methodname">gobject.get_property</code>()</a> 
+methods that are available to every <code class="literal">PyGObject</code> object. This
+section may not be present in all class descriptions.</td></tr><tr><td><p><span class="term">Attributes</span></p></td><td>A set of internal object state data accessible as Python
+         attributes (e.g. object.attr). The attribute descriptions include
+         a name by which the attribute data is accessed, the access mode
+         (e.g. Read, Write), and a brief description of the attribute. Most
+         <code class="literal">PyGObject</code> classes do not support attributes so
+         this section is not present in most class descriptions.</td></tr><tr><td><p><span class="term">Signal Prototypes</span></p></td><td>A list of the signals supported by the class including
+         the signal name and a synopsis of the signal handler function
+         prototype. This section may not be present in all class
+         descriptions.</td></tr><tr><td><p><span class="term">Description</span></p></td><td>A description of the class and possibly some of
+       the methods supported by the class.</td></tr><tr><td><p><span class="term">Constructor</span></p></td><td>The description of the class object constructor including
+         the synopsis with brief parameter descriptions and a description
+         of th use of the constructor. There may be more than one
+         constructor description if the constructor supports different
+         parameter lists. This section may not be present in all class
+         descriptions.</td></tr><tr><td><p><span class="term">Methods</span></p></td><td>A list of methods supported by the class. Each method
+         description includes: a synopsis of the method and its parameters
+         as well as a brief description of each parameter and return value
+         (if any); and, a description of the use of the method.</td></tr><tr><td><p><span class="term">Functions</span></p></td><td>A list of related functions. Each function description
+         includes a synopsis of the function and its parameters and return
+         value (if any), and a description of the use of the
+         function.</td></tr><tr><td><p><span class="term">Signals</span></p></td><td>A list of signals including a synopsis of the signal
+         handler prototype function with its parameters and return value
+         (if any). The signal emission conditions are briefly
+         described. This section is not present in all class descriptions;
+         specifically, the <code class="literal">gtk.gdk</code> classes do not
+         usually support signals.</td></tr></tbody></table><p>The function and method synopsis parameters are displayed in
+    <span class="bold"><strong>bold</strong></span> to denote Python keyword
+    parameters.  Also if the parameter is optional its default value will be
+    displayed. For example the <a class="link" href="gobject-functions.html#function-gobject--signal-lookup" title="gobject.signal_lookup"><code class="function">gobject.signal_lookup</code>()</a>
+    function synopsis is:</p><pre class="programlisting">
+<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="gobject-functions.html#function-gobject--signal-lookup" title="gobject.signal_lookup">gobject.signal_lookup</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code>
+</pre><p>The parameters <em class="parameter"><code>name</code></em> and
+    <em class="parameter"><code>type</code></em> are keyword parameters that can be specified
+    in a call either by position or keyword (in which case position is not
+    important). The following calls have the same result:</p><pre class="programlisting">
+  id = gobject.signal_lookup("clicked", gtk.Button)
+  id = gobject.signal_lookup("clicked", type=gtk.Button)
+  id = gobject.signal_lookup(name="clicked", type=gtk.Button)
+  id = gobject.signal_lookup(type=gtk.Button, name="clicked")
+</pre><p>Parameters that are not keyword parameters are displayed in
+<span class="emphasis"><em>italic</em></span> and must be specified positionally but may also
+be optional.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="glib-class-reference.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PyGObject Reference Manual </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> PyGlibClass Reference</td></tr></table></div></body></html>
diff --git a/docs/html/pygobject.devhelp b/docs/html/pygobject.devhelp
new file mode 100644 (file)
index 0000000..b37be2a
--- /dev/null
@@ -0,0 +1,525 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<book xmlns="http://www.devhelp.net/book" title="PyGObject Reference Manual" link="index.html" author="" name="pygobject" language="python">
+  <chapters>
+    <sub name="Introduction" link="pygobject-introduction.html">
+      <sub name="Reference Page Format" link="pygobject-introduction.html#pygobject-reference-format"/>
+    </sub>
+    <sub name="PyGlibClass Reference" link="glib-class-reference.html">
+      <sub name="glib.MainContext" link="class-glibmaincontext.html"/>
+      <sub name="glib.MainLoop" link="class-glibmainloop.html"/>
+      <sub name="glib Functions" link="glib-functions.html"/>
+      <sub name="glib Constants" link="glib-constants.html"/>
+    </sub>
+    <sub name="PyGObject Class Reference" link="gobject-class-reference.html">
+      <sub name="gobject.GObject" link="class-gobject.html"/>
+      <sub name="gobject.GBoxed" link="class-gobjectgboxed.html"/>
+      <sub name="gobject.GPointer" link="class-gobjectgpointer.html"/>
+      <sub name="gobject.GInterface" link="class-gobjectginterface.html"/>
+      <sub name="gobject Functions" link="gobject-functions.html"/>
+      <sub name="gobject Constants" link="gobject-constants.html"/>
+    </sub>
+    <sub name="PyGio Class Reference" link="gio-class-reference.html">
+      <sub name="gio.AppInfo" link="class-gioappinfo.html"/>
+      <sub name="gio.AppLaunchContext" link="class-gioapplaunchcontext.html"/>
+      <sub name="gio.AsyncResult" link="class-gioasyncresult.html"/>
+      <sub name="gio.BufferedInputStream" link="class-giobufferedinputstream.html"/>
+      <sub name="gio.BufferedOutputStream" link="class-giobufferedoutputstream.html"/>
+      <sub name="gio.Cancellable" link="class-giocancellable.html"/>
+      <sub name="gio.DataInputStream" link="class-giodatainputstream.html"/>
+      <sub name="gio.DataOutputStream" link="class-giodataoutputstream.html"/>
+      <sub name="gio.Drive" link="class-giodrive.html"/>
+      <sub name="gio.Emblem" link="class-gioemblem.html"/>
+      <sub name="gio.EmblemedIcon" link="class-gioemblemedicon.html"/>
+      <sub name="gio.File" link="class-giofile.html"/>
+      <sub name="gio.FileAttributeInfo" link="class-giofileattributeinfo.html"/>
+      <sub name="gio.FileEnumerator" link="class-giofileenumerator.html"/>
+      <sub name="gio.FileIcon" link="class-giofileicon.html"/>
+      <sub name="gio.FileInfo" link="class-giofileinfo.html"/>
+      <sub name="gio.FileInputStream" link="class-giofileinputstream.html"/>
+      <sub name="gio.FileMonitor" link="class-giofilemonitor.html"/>
+      <sub name="gio.FileOutputStream" link="class-giofileoutputstream.html"/>
+      <sub name="gio.FilterInputStream" link="class-giofilterinputstream.html"/>
+      <sub name="gio.FilterOutputStream" link="class-giofilteroutputstream.html"/>
+      <sub name="gio.Icon" link="class-gioicon.html"/>
+      <sub name="gio.InputStream" link="class-gioinputstream.html"/>
+      <sub name="gio.LoadableIcon" link="class-gioloadableicon.html"/>
+      <sub name="gio.MemoryInputStream" link="class-giomemoryinputstream.html"/>
+      <sub name="gio.MemoryOutputStream" link="class-giomemoryoutputstream.html"/>
+      <sub name="gio.Mount" link="class-giomount.html"/>
+      <sub name="gio.MountOperation" link="class-giomountoperation.html"/>
+      <sub name="gio.OutputStream" link="class-giooutputstream.html"/>
+      <sub name="gio.Seekable" link="class-gioseekable.html"/>
+      <sub name="gio.SimpleAsyncResult" link="class-giosimpleasyncresult.html"/>
+      <sub name="gio.ThemedIcon" link="class-giothemedicon.html"/>
+      <sub name="gio.Volume" link="class-giovolume.html"/>
+      <sub name="gio.VolumeMonitor" link="class-giovolumemonitor.html"/>
+      <sub name="gio Functions" link="gio-functions.html"/>
+      <sub name="gio Constants" link="gio-constants.html"/>
+    </sub>
+    <sub name="PyGio Unix Class Reference" link="giounix-class-reference.html">
+      <sub name="gio.unix.InputStream" link="class-giounixinputstream.html"/>
+      <sub name="gio.unix.OutputStream" link="class-giounixoutputstream.html"/>
+    </sub>
+  </chapters>
+  <functions>
+    <function name="glib.MainContext" link="class-glibmaincontext.html#constructor-glibmaincontext"/>
+    <function name="glib.MainLoop" link="class-glibmainloop.html#constructor-glibmainloop"/>
+    <function name="gio.AppInfo" link="class-gioappinfo.html#constructor-gioappinfo"/>
+    <function name="gio.AppLaunchContext" link="class-gioapplaunchcontext.html#constructor-gioapplaunchcontext"/>
+    <function name="gio.BufferedInputStream" link="class-giobufferedinputstream.html#constructor-giobufferedinputstream"/>
+    <function name="gio.BufferedOutputStream" link="class-giobufferedoutputstream.html#constructor-giobufferedoutputstream"/>
+    <function name="gio.Cancellable" link="class-giocancellable.html#constructor-giocancellable"/>
+    <function name="gio.DataInputStream" link="class-giodatainputstream.html#constructor-giodatainputstream"/>
+    <function name="gio.DataOutputStream" link="class-giodataoutputstream.html#constructor-giodataoutputstream"/>
+    <function name="gio.Emblem" link="class-gioemblem.html#constructor-gioemblem"/>
+    <function name="gio.EmblemedIcon" link="class-gioemblemedicon.html#constructor-gioemblemedicon"/>
+    <function name="gio.File" link="class-giofile.html#constructor-giofile"/>
+    <function name="gio.FileIcon" link="class-giofileicon.html#constructor-giofileicon"/>
+    <function name="gio.FileInfo" link="class-giofileinfo.html#constructor-giofileinfo"/>
+    <function name="gio.MemoryInputStream" link="class-giomemoryinputstream.html#constructor-giomemoryinputstream"/>
+    <function name="gio.MemoryOutputStream" link="class-giomemoryoutputstream.html#constructor-giomemoryoutputstream"/>
+    <function name="gio.MountOperation" link="class-giomountoperation.html#constructor-giomountoperation"/>
+    <function name="gio.ThemedIcon" link="class-giothemedicon.html#constructor-giothemedicon"/>
+    <function name="gio.unix.InputStream" link="class-giounixinputstream.html#constructor-giounixinputstream"/>
+    <function name="gio.unix.OutputStream" link="class-giounixoutputstream.html#constructor-giounixoutputstream"/>
+    <function name="glib.MainContext.iteration" link="class-glibmaincontext.html#method-glibmaincontext--iteration"/>
+    <function name="glib.MainContext.pending" link="class-glibmaincontext.html#method-glibmaincontext--pending"/>
+    <function name="glib.MainLoop.get_context" link="class-glibmainloop.html#method-glibmainloop--get-context"/>
+    <function name="glib.MainLoop.is_running" link="class-glibmainloop.html#method-glibmainloop--is-running"/>
+    <function name="glib.MainLoop.quit" link="class-glibmainloop.html#method-glibmainloop--quit"/>
+    <function name="glib.MainLoop.run" link="class-glibmainloop.html#method-glibmainloop--run"/>
+    <function name="glib.idle_add" link="glib-functions.html#function-glib--idle-add"/>
+    <function name="glib.timeout_add" link="glib-functions.html#function-glib--timeout-add"/>
+    <function name="glib.timeout_add_seconds" link="glib-functions.html#function-glib--timeout-add-seconds"/>
+    <function name="glib.io_add_watch" link="glib-functions.html#function-glib--io-add-watch"/>
+    <function name="glib.source_remove" link="glib-functions.html#function-glib--source-remove"/>
+    <function name="glib.main_context_default" link="glib-functions.html#function-glib--main-context-default"/>
+    <function name="glib.markup_escape_text" link="glib-functions.html#function-glib--markup-escape-text"/>
+    <function name="glib.child_watch_add" link="glib-functions.html#function-glib--child-watch-add"/>
+    <function name="glib.spawn_async" link="glib-functions.html#function-glib--spawn-async"/>
+    <function name="glib.get_current_time" link="glib-functions.html#function-glib--get-current-time"/>
+    <function name="glib.get_user_cache_dir" link="glib-functions.html#function-glib--get-user-cache-dir"/>
+    <function name="glib.get_user_config_dir" link="glib-functions.html#function-glib--get-user-config-dir"/>
+    <function name="glib.get_user_data_dir" link="glib-functions.html#function-glib--get-user-data-dir"/>
+    <function name="glib.get_user_special_dir" link="glib-functions.html#function-glib--get-user-special-dir"/>
+    <function name="glib.main_depth" link="glib-functions.html#function-glib--main-depth"/>
+    <function name="glib.threads_init" link="glib-functions.html#function-glib--threads-init"/>
+    <function name="glib.signal_accumulator_true_handled" link="glib-functions.html#function-glib--signal-accumulator-true-handled"/>
+    <function name="glib.filename_display_name" link="glib-functions.html#function-glib--filename-display-name"/>
+    <function name="glib.filename_display_basename" link="glib-functions.html#function-glib--filename-display-basename"/>
+    <function name="glib.filename_from_utf8" link="glib-functions.html#function-glib--filename-from-utf8"/>
+    <function name="Glib IO Condition Constants" link="glib-constants.html#glib-io-condition-constants"/>
+    <function name="Glib Priority Constants" link="glib-constants.html#glib-priority-constants"/>
+    <function name="Glib Spawn Flag Constants" link="glib-constants.html#glib-spawn-flag-constants"/>
+    <function name="Glib User Directory Constants" link="glib-constants.html#glib-user-directory-constants"/>
+    <function name="Glib Version Constants" link="glib-constants.html#glib-version-constants"/>
+    <function name="gobject.GObject.get_property" link="class-gobject.html#method-gobject--get-property"/>
+    <function name="gobject.GObject.get_properties" link="class-gobject.html#method-gobject--get-properties"/>
+    <function name="gobject.GObject.set_property" link="class-gobject.html#method-gobject--set-property"/>
+    <function name="gobject.GObject.set_properties" link="class-gobject.html#method-gobject--set-properties"/>
+    <function name="gobject.GObject.freeze_notify" link="class-gobject.html#method-gobject--freeze-notify"/>
+    <function name="gobject.GObject.notify" link="class-gobject.html#method-gobject--notify"/>
+    <function name="gobject.GObject.thaw_notify" link="class-gobject.html#method-gobject--thaw-notify"/>
+    <function name="gobject.GObject.get_data" link="class-gobject.html#method-gobject--get-data"/>
+    <function name="gobject.GObject.set_data" link="class-gobject.html#method-gobject--set-data"/>
+    <function name="gobject.GObject.connect" link="class-gobject.html#method-gobject--connect"/>
+    <function name="gobject.GObject.connect_after" link="class-gobject.html#method-gobject--connect-after"/>
+    <function name="gobject.GObject.connect_object" link="class-gobject.html#method-gobject--connect-object"/>
+    <function name="gobject.GObject.connect_object_after" link="class-gobject.html#method-gobject--connect-object-after"/>
+    <function name="gobject.GObject.disconnect" link="class-gobject.html#method-gobject--disconnect"/>
+    <function name="gobject.GObject.handler_disconnect" link="class-gobject.html#method-gobject--handler-disconnect"/>
+    <function name="gobject.GObject.handler_is_connected" link="class-gobject.html#method-gobject--handler-is-connected"/>
+    <function name="gobject.GObject.handler_block" link="class-gobject.html#method-gobject--handler-block"/>
+    <function name="gobject.GObject.handler_unblock" link="class-gobject.html#method-gobject--handler-unblock"/>
+    <function name="gobject.GObject.handler_block_by_func" link="class-gobject.html#method-gobject--handler-block-by-func"/>
+    <function name="gobject.GObject.handler_unblock_by_func" link="class-gobject.html#method-gobject--handler-unblock-by-func"/>
+    <function name="gobject.GObject.emit" link="class-gobject.html#method-gobject--emit"/>
+    <function name="gobject.GObject.stop_emission" link="class-gobject.html#method-gobject--stop-emission"/>
+    <function name="gobject.GObject.emit_stop_by_name" link="class-gobject.html#method-gobject--emit-stop-by-name"/>
+    <function name="gobject.GObject.chain" link="class-gobject.html#method-gobject--chain"/>
+    <function name="The GObject &quot;notify&quot; Signal" link="class-gobject.html#signal-gobject--notify"/>
+    <function name="gobject.GBoxed.copy" link="class-gobjectgboxed.html#method-gobjectgboxed--copy"/>
+    <function name="gobject.type_name" link="gobject-functions.html#function-gobject--type-name"/>
+    <function name="gobject.type_from_name" link="gobject-functions.html#function-gobject--type-from-name"/>
+    <function name="gobject.type_parent" link="gobject-functions.html#function-gobject--type-parent"/>
+    <function name="gobject.type_is_a" link="gobject-functions.html#function-gobject--type-is-a"/>
+    <function name="gobject.type_children" link="gobject-functions.html#function-gobject--type-children"/>
+    <function name="gobject.type_interfaces" link="gobject-functions.html#function-gobject--type-interfaces"/>
+    <function name="gobject.type_register" link="gobject-functions.html#function-gobject--type-register"/>
+    <function name="gobject.signal_new" link="gobject-functions.html#function-gobject--signal-new"/>
+    <function name="gobject.signal_list_names" link="gobject-functions.html#function-gobject--signal-list-names"/>
+    <function name="gobject.signal_list_ids" link="gobject-functions.html#function-gobject--signal-list-ids"/>
+    <function name="gobject.signal_lookup" link="gobject-functions.html#function-gobject--signal-lookup"/>
+    <function name="gobject.signal_name" link="gobject-functions.html#function-gobject--signal-name"/>
+    <function name="gobject.signal_query" link="gobject-functions.html#function-gobject--signal-query1"/>
+    <function name="gobject.signal_query" link="gobject-functions.html#function-gobject--signal-query2"/>
+    <function name="gobject.list_properties" link="gobject-functions.html#function-gobject--list-properties"/>
+    <function name="gobject.new" link="gobject-functions.html#function-gobject--new"/>
+    <function name="gobject.signal_accumulator_true_handled" link="gobject-functions.html#function-gobject--signal-accumulator-true-handled"/>
+    <function name="gobject.add_emission_hook" link="gobject-functions.html#function-gobject--add-emission-hook"/>
+    <function name="gobject.remove_emission_hook" link="gobject-functions.html#function-gobject--remove-emission-hook"/>
+    <function name="gobject._install_metaclass" link="gobject-functions.html#function-gobject---install-metaclass"/>
+    <function name="GObject Param Flag Constants" link="gobject-constants.html#gobject-param-constants"/>
+    <function name="GObject Signal Flag Constants" link="gobject-constants.html#gobject-signal-constants"/>
+    <function name="GObject Spawn Flag Constants" link="gobject-constants.html#gobject-spawn-flag-constants"/>
+    <function name="GObject Built-in Type Constants" link="gobject-constants.html#gobject-type-constants"/>
+    <function name="GObject Version Constants" link="gobject-constants.html#gobject-version-constants"/>
+    <function name="gio.AppInfo.add_supports_type" link="class-gioappinfo.html#method-gioappinfo--add-supports-type"/>
+    <function name="gio.AppInfo.can_delete" link="class-gioappinfo.html#method-gioappinfo--can-delete"/>
+    <function name="gio.AppInfo.can_remove_supports_type" link="class-gioappinfo.html#method-gioappinfo--can-remove-supports-type"/>
+    <function name="gio.AppInfo.delete" link="class-gioappinfo.html#method-gioappinfo--delete"/>
+    <function name="gio.AppInfo.dup" link="class-gioappinfo.html#method-gioappinfo--dup"/>
+    <function name="gio.AppInfo.equal" link="class-gioappinfo.html#method-gioappinfo--equal"/>
+    <function name="gio.AppInfo.get_commandline" link="class-gioappinfo.html#method-gioappinfo--get-commandline"/>
+    <function name="gio.AppInfo.get_description" link="class-gioappinfo.html#method-gioappinfo--get-description"/>
+    <function name="gio.AppInfo.get_executable" link="class-gioappinfo.html#method-gioappinfo--get-executable"/>
+    <function name="gio.AppInfo.get_icon" link="class-gioappinfo.html#method-gioappinfo--get-icon"/>
+    <function name="gio.AppInfo.get_id" link="class-gioappinfo.html#method-gioappinfo--get-id"/>
+    <function name="gio.AppInfo.get_name" link="class-gioappinfo.html#method-gioappinfo--get-name"/>
+    <function name="gio.AppInfo.launch" link="class-gioappinfo.html#method-gioappinfo--launch"/>
+    <function name="gio.AppInfo.launch_uris" link="class-gioappinfo.html#method-gioappinfo--launch-uris"/>
+    <function name="gio.AppInfo.remove_supports_type" link="class-gioappinfo.html#method-gioappinfo--remove-supports-type"/>
+    <function name="gio.AppInfo.set_as_default_for_extension" link="class-gioappinfo.html#method-gioappinfo--set-as-default-for-extension"/>
+    <function name="gio.AppInfo.set_as_default_for_type" link="class-gioappinfo.html#method-gioappinfo--set-as-default-for-type"/>
+    <function name="gio.AppInfo.should_show" link="class-gioappinfo.html#method-gioappinfo--should-show"/>
+    <function name="gio.AppInfo.supports_files" link="class-gioappinfo.html#method-gioappinfo--supports-files"/>
+    <function name="gio.AppInfo.supports_uris" link="class-gioappinfo.html#method-gioappinfo--supports-uris"/>
+    <function name="gio.app_info_get_all" link="class-gioappinfo.html#function-gio--app-info-get-all"/>
+    <function name="gio.app_info_get_all_for_type" link="class-gioappinfo.html#function-gio--app-info-get-all-for-type"/>
+    <function name="gio.app_info_get_default_for_type" link="class-gioappinfo.html#function-gio--app-info-get-default-for-type"/>
+    <function name="gio.app_info_get_default_for_uri_scheme" link="class-gioappinfo.html#function-gio--app-info-get-default-for-uri-scheme"/>
+    <function name="gio.app_info_reset_type_association" link="class-gioappinfo.html#function-gio--app-info-reset-type-association"/>
+    <function name="gio.AppLaunchContext.get_display" link="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-display"/>
+    <function name="gio.AppLaunchContext.get_startup_notify_id" link="class-gioapplaunchcontext.html#method-gioapplaunchcontext--get-startup-notify-id"/>
+    <function name="gio.AppLaunchContext.launch_failed" link="class-gioapplaunchcontext.html#method-gioapplaunchcontext--launch-failed"/>
+    <function name="gio.AsyncResult.get_source_object" link="class-gioasyncresult.html#method-gioasyncresult--get-source-object"/>
+    <function name="gio.BufferedInputStream.fill" link="class-giobufferedinputstream.html#method-giobufferedinputstream--fill"/>
+    <function name="gio.BufferedInputStream.fill_async" link="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-async"/>
+    <function name="gio.BufferedInputStream.fill_finish" link="class-giobufferedinputstream.html#method-giobufferedinputstream--fill-finish"/>
+    <function name="gio.BufferedInputStream.get_available" link="class-giobufferedinputstream.html#method-giobufferedinputstream--get-available"/>
+    <function name="gio.BufferedInputStream.get_buffer_size" link="class-giobufferedinputstream.html#method-giobufferedinputstream--get-buffer-size"/>
+    <function name="gio.BufferedInputStream.read_byte" link="class-giobufferedinputstream.html#method-giobufferedinputstream--read-byte"/>
+    <function name="gio.BufferedInputStream.set_buffer_size" link="class-giobufferedinputstream.html#method-giobufferedinputstream--set-buffer-size"/>
+    <function name="gio.buffered_input_stream_new_sized" link="class-giobufferedinputstream.html#function-gio--buffered-input-stream-new-sized"/>
+    <function name="gio.BufferedOutputStream.get_auto_grow" link="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-auto-grow"/>
+    <function name="gio.BufferedOutputStream.get_buffer_size" link="class-giobufferedoutputstream.html#method-giobufferedoutputstream--get-buffer-size"/>
+    <function name="gio.BufferedOutputStream.set_auto_grow" link="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-auto-grow"/>
+    <function name="gio.BufferedOutputStream.set_buffer_size" link="class-giobufferedoutputstream.html#method-giobufferedoutputstream--set-buffer-size"/>
+    <function name="gio.buffered_output_stream_new_sized" link="class-giobufferedoutputstream.html#function-gio--buffered-output-stream-new-sized"/>
+    <function name="gio.Cancellable.cancel" link="class-giocancellable.html#method-giocancellable--cancel"/>
+    <function name="gio.Cancellable.get_fd" link="class-giocancellable.html#method-giocancellable--get-fd"/>
+    <function name="gio.Cancellable.is_cancelled" link="class-giocancellable.html#method-giocancellable--is-cancelled"/>
+    <function name="gio.Cancellable.pop_current" link="class-giocancellable.html#method-giocancellable--pop-current"/>
+    <function name="gio.Cancellable.push_current" link="class-giocancellable.html#method-giocancellable--push-current"/>
+    <function name="gio.Cancellable.reset" link="class-giocancellable.html#method-giocancellable--reset"/>
+    <function name="gio.Cancellable.set_error_if_cancelled" link="class-giocancellable.html#method-giocancellable--set-error-if-cancelled"/>
+    <function name="gio.cancellable_get_current" link="class-giocancellable.html#function-gio--cancellable-get-current"/>
+    <function name="gio.DataInputStream.get_byte_order" link="class-giodatainputstream.html#method-giodatainputstream--get-byte-order"/>
+    <function name="gio.DataInputStream.get_newline_type" link="class-giodatainputstream.html#method-giodatainputstream--get-newline-type"/>
+    <function name="gio.DataInputStream.read_byte" link="class-giodatainputstream.html#method-giodatainputstream--read-byte"/>
+    <function name="gio.DataInputStream.read_int16" link="class-giodatainputstream.html#method-giodatainputstream--read-int16"/>
+    <function name="gio.DataInputStream.read_int32" link="class-giodatainputstream.html#method-giodatainputstream--read-int32"/>
+    <function name="gio.DataInputStream.read_int64" link="class-giodatainputstream.html#method-giodatainputstream--read-int64"/>
+    <function name="gio.DataInputStream.read_line" link="class-giodatainputstream.html#method-giodatainputstream--read-line"/>
+    <function name="gio.DataInputStream.read_line_async" link="class-giodatainputstream.html#method-giodatainputstream--read-line-async"/>
+    <function name="gio.DataInputStream.read_line_finish" link="class-giodatainputstream.html#method-giodatainputstream--read-line-finish"/>
+    <function name="gio.DataInputStream.read_uint16" link="class-giodatainputstream.html#method-giodatainputstream--read-uint16"/>
+    <function name="gio.DataInputStream.read_uint32" link="class-giodatainputstream.html#method-giodatainputstream--read-uint32"/>
+    <function name="gio.DataInputStream.read_uint64" link="class-giodatainputstream.html#method-giodatainputstream--read-uint64"/>
+    <function name="gio.DataInputStream.read_until" link="class-giodatainputstream.html#method-giodatainputstream--read-until"/>
+    <function name="gio.DataInputStream.read_until_async" link="class-giodatainputstream.html#method-giodatainputstream--read-until-async"/>
+    <function name="gio.DataInputStream.read_until_finish" link="class-giodatainputstream.html#method-giodatainputstream--read-until-finish"/>
+    <function name="gio.DataInputStream.set_byte_order" link="class-giodatainputstream.html#method-giodatainputstream--set-byte-order"/>
+    <function name="gio.DataInputStream.set_newline_type" link="class-giodatainputstream.html#method-giodatainputstream--set-newline-type"/>
+    <function name="gio.DataOutputStream.get_byte_order" link="class-giodataoutputstream.html#method-giodataoutputstream--get-byte-order"/>
+    <function name="gio.DataOutputStream.put_byte" link="class-giodataoutputstream.html#method-giodataoutputstream--put-byte"/>
+    <function name="gio.DataOutputStream.put_int16" link="class-giodataoutputstream.html#method-giodataoutputstream--put-int16"/>
+    <function name="gio.DataOutputStream.put_int32" link="class-giodataoutputstream.html#method-giodataoutputstream--put-int32"/>
+    <function name="gio.DataOutputStream.put_int64" link="class-giodataoutputstream.html#method-giodataoutputstream--put-int64"/>
+    <function name="gio.DataOutputStream.put_string" link="class-giodataoutputstream.html#method-giodataoutputstream--put-string"/>
+    <function name="gio.DataOutputStream.put_uint16" link="class-giodataoutputstream.html#method-giodataoutputstream--put-uint16"/>
+    <function name="gio.DataOutputStream.put_uint32" link="class-giodataoutputstream.html#method-giodataoutputstream--put-uint32"/>
+    <function name="gio.DataOutputStream.put_uint64" link="class-giodataoutputstream.html#method-giodataoutputstream--put-uint64"/>
+    <function name="gio.DataOutputStream.set_byte_order" link="class-giodataoutputstream.html#method-giodataoutputstream--set-byte-order"/>
+    <function name="gio.Drive.can_eject" link="class-giodrive.html#method-giodrive--can-eject"/>
+    <function name="gio.Drive.can_poll_for_media" link="class-giodrive.html#method-giodrive--can-poll-for-media"/>
+    <function name="gio.Drive.eject" link="class-giodrive.html#method-giodrive--eject"/>
+    <function name="gio.Drive.eject_finish" link="class-giodrive.html#method-giodrive--eject-finish"/>
+    <function name="gio.Drive.enumerate_identifiers" link="class-giodrive.html#method-giodrive--enumerate-identifiers"/>
+    <function name="gio.Drive.get_icon" link="class-giodrive.html#method-giodrive--get-icon"/>
+    <function name="gio.Drive.get_identifier" link="class-giodrive.html#method-giodrive--get-identifier"/>
+    <function name="gio.Drive.get_name" link="class-giodrive.html#method-giodrive--get-name"/>
+    <function name="gio.Drive.get_volumes" link="class-giodrive.html#method-giodrive--get-volumes"/>
+    <function name="gio.Drive.has_media" link="class-giodrive.html#method-giodrive--has-media"/>
+    <function name="gio.Drive.has_volumes" link="class-giodrive.html#method-giodrive--has-volumes"/>
+    <function name="gio.Drive.is_media_check_automatic" link="class-giodrive.html#method-giodrive--is-media-check-automatic"/>
+    <function name="gio.Drive.is_media_removable" link="class-giodrive.html#method-giodrive--is-media-removable"/>
+    <function name="gio.Drive.poll_for_media" link="class-giodrive.html#method-giodrive--poll-for-media"/>
+    <function name="gio.Drive.poll_for_media_finish" link="class-giodrive.html#method-giodrive--poll-for-media-finish"/>
+    <function name="gio.Emblem.get_icon" link="class-gioemblem.html#method-gioemblem--get-icon"/>
+    <function name="gio.Emblem.get_origin" link="class-gioemblem.html#method-gioemblem--get-origin"/>
+    <function name="gio.emblem_new_with_origin" link="class-gioemblem.html#function-gio--emblem-new-with-origin"/>
+    <function name="gio.EmblemedIcon.add_emblem" link="class-gioemblemedicon.html#method-gioemblemedicon--add-emblem"/>
+    <function name="gio.EmblemedIcon.get_icon" link="class-gioemblemedicon.html#method-gioemblemedicon--get-icon"/>
+    <function name="gio.File.append_to" link="class-giofile.html#method-giofile--append-to"/>
+    <function name="gio.File.append_to_async" link="class-giofile.html#method-giofile--append-to-async"/>
+    <function name="gio.File.append_to_finish" link="class-giofile.html#method-giofile--append-to-finish"/>
+    <function name="gio.File.copy" link="class-giofile.html#method-giofile--copy"/>
+    <function name="gio.File.copy_async" link="class-giofile.html#method-giofile--copy-async"/>
+    <function name="gio.File.copy_attributes" link="class-giofile.html#method-giofile--copy-attributes"/>
+    <function name="gio.File.copy_finish" link="class-giofile.html#method-giofile--copy-finish"/>
+    <function name="gio.File.create" link="class-giofile.html#method-giofile--create"/>
+    <function name="gio.File.create_async" link="class-giofile.html#method-giofile--create-async"/>
+    <function name="gio.File.create_finish" link="class-giofile.html#method-giofile--create-finish"/>
+    <function name="gio.File.delete" link="class-giofile.html#method-giofile--delete"/>
+    <function name="gio.File.dup" link="class-giofile.html#method-giofile--dup"/>
+    <function name="gio.File.eject_mountable" link="class-giofile.html#method-giofile--eject-mountable"/>
+    <function name="gio.File.eject_mountable_finish" link="class-giofile.html#method-giofile--eject-mountable-finish"/>
+    <function name="gio.File.enumerate_children" link="class-giofile.html#method-giofile--enumerate-children"/>
+    <function name="gio.File.enumerate_children_async" link="class-giofile.html#method-giofile--enumerate-children-async"/>
+    <function name="gio.File.eject_mountable_finish" link="class-giofile.html#method-giofile--enumerate-children-finish"/>
+    <function name="gio.File.equal" link="class-giofile.html#method-giofile--equal"/>
+    <function name="gio.File.find_enclosing_mount" link="class-giofile.html#method-giofile--find-enclosing-mount"/>
+    <function name="gio.File.find_enclosing_mount_async" link="class-giofile.html#method-giofile--find-enclosing-mount-async"/>
+    <function name="gio.File.find_enclosing_mount_finish" link="class-giofile.html#method-giofile--find-enclosing-mount-finish"/>
+    <function name="gio.File.get_basename" link="class-giofile.html#method-giofile--get-basename"/>
+    <function name="gio.File.get_child" link="class-giofile.html#method-giofile--get-child"/>
+    <function name="gio.File.get_child_for_display_name" link="class-giofile.html#method-giofile--get-child-for-display-name"/>
+    <function name="gio.File.get_parent" link="class-giofile.html#method-giofile--get-parent"/>
+    <function name="gio.File.get_parse_name" link="class-giofile.html#method-giofile--get-parse-name"/>
+    <function name="gio.File.get_path" link="class-giofile.html#method-giofile--get-path"/>
+    <function name="gio.File.get_relative_path" link="class-giofile.html#method-giofile--get-relative-path"/>
+    <function name="gio.File.get_uri" link="class-giofile.html#method-giofile--get-uri"/>
+    <function name="gio.File.get_uri_scheme" link="class-giofile.html#method-giofile--get-uri-scheme"/>
+    <function name="gio.File.has_prefix" link="class-giofile.html#method-giofile--has-prefix"/>
+    <function name="gio.File.has_uri_scheme" link="class-giofile.html#method-giofile--has-uri-scheme"/>
+    <function name="gio.File.is_native" link="class-giofile.html#method-giofile--is-native"/>
+    <function name="gio.File.load_contents" link="class-giofile.html#method-giofile--load-contents"/>
+    <function name="gio.File.load_contents_async" link="class-giofile.html#method-giofile--load-contents-async"/>
+    <function name="gio.File.load_contents_finish" link="class-giofile.html#method-giofile--load-contents-finish"/>
+    <function name="gio.File.make_directory" link="class-giofile.html#method-giofile--make-directory"/>
+    <function name="gio.File.make_directory_with_parents" link="class-giofile.html#method-giofile--make-directory-with-parents"/>
+    <function name="gio.File.make_symbolic_link" link="class-giofile.html#method-giofile--make-symbolic-link"/>
+    <function name="gio.File.monitor" link="class-giofile.html#method-giofile--monitor"/>
+    <function name="gio.File.monitor_directory" link="class-giofile.html#method-giofile--monitor-directory"/>
+    <function name="gio.File.monitor_file" link="class-giofile.html#method-giofile--monitor-file"/>
+    <function name="gio.File.mount_enclosing_volume" link="class-giofile.html#method-giofile--mount-enclosing-volume"/>
+    <function name="gio.File.mount_enclosing_volume_finish" link="class-giofile.html#method-giofile--mount-enclosing-volume-finish"/>
+    <function name="gio.File.mount_mountable" link="class-giofile.html#method-giofile--mount-mountable"/>
+    <function name="gio.File.mount_mountable_finish" link="class-giofile.html#method-giofile--mount-mountable-finish"/>
+    <function name="gio.File.move" link="class-giofile.html#method-giofile--move"/>
+    <function name="gio.File.query_default_handler" link="class-giofile.html#method-giofile--query-default-handler"/>
+    <function name="gio.File.query_exists" link="class-giofile.html#method-giofile--query-exists"/>
+    <function name="gio.File.query_file_type" link="class-giofile.html#method-giofile--query-file-type"/>
+    <function name="gio.File.query_filesystem_info" link="class-giofile.html#method-giofile--query-filesystem-info"/>
+    <function name="gio.File.query_filesystem_info_async" link="class-giofile.html#method-giofile--query-filesystem-info-async"/>
+    <function name="gio.File.query_filesystem_info_finish" link="class-giofile.html#method-giofile--query-filesystem-info-finish"/>
+    <function name="gio.File.query_filesystem_info" link="class-giofile.html#method-giofile--query-info"/>
+    <function name="gio.File.query_info_async" link="class-giofile.html#method-giofile--query-info-async"/>
+    <function name="gio.File.query_info_finish" link="class-giofile.html#method-giofile--query-info-finish"/>
+    <function name="gio.File.query_settable_attributes" link="class-giofile.html#method-giofile--query-settable-attributes"/>
+    <function name="gio.File.query_writable_namespace" link="class-giofile.html#method-giofile--query-writable-namespace"/>
+    <function name="gio.File.read" link="class-giofile.html#method-giofile--read"/>
+    <function name="gio.File.read_async" link="class-giofile.html#method-giofile--read-async"/>
+    <function name="gio.File.read_finish" link="class-giofile.html#method-giofile--read-finish"/>
+    <function name="gio.File.replace" link="class-giofile.html#method-giofile--replace"/>
+    <function name="gio.File.replace_async" link="class-giofile.html#method-giofile--replace-async"/>
+    <function name="gio.File.replace_contents" link="class-giofile.html#method-giofile--replace-contents"/>
+    <function name="gio.File.replace_contents_async" link="class-giofile.html#method-giofile--replace-contents-async"/>
+    <function name="gio.File.replace_contents_finish" link="class-giofile.html#method-giofile--replace-contents-finish"/>
+    <function name="gio.File.replace_finish" link="class-giofile.html#method-giofile--replace-finish"/>
+    <function name="gio.File.resolve_relative_path" link="class-giofile.html#method-giofile--resolve-relative-path"/>
+    <function name="gio.File.set_attribute" link="class-giofile.html#method-giofile--set-attribute"/>
+    <function name="gio.File.set_attribute_byte_string" link="class-giofile.html#method-giofile--set-attribute-byte-string"/>
+    <function name="gio.File.set_attribute_int32" link="class-giofile.html#method-giofile--set-attribute-int32"/>
+    <function name="gio.File.set_attribute_int64" link="class-giofile.html#method-giofile--set-attribute-int64"/>
+    <function name="gio.File.set_attribute_string" link="class-giofile.html#method-giofile--set-attribute-string"/>
+    <function name="gio.File.set_attribute_uint32" link="class-giofile.html#method-giofile--set-attribute-uint32"/>
+    <function name="gio.File.set_attribute_uint64" link="class-giofile.html#method-giofile--set-attribute-uint64"/>
+    <function name="gio.File.set_attributes_async" link="class-giofile.html#method-giofile--set-attributes-async"/>
+    <function name="gio.File.set_attributes_finish" link="class-giofile.html#method-giofile--set-attributes-finish"/>
+    <function name="gio.File.set_attributes_from_info" link="class-giofile.html#method-giofile--set-attributes-from-info"/>
+    <function name="gio.File.set_display_name" link="class-giofile.html#method-giofile--set-display-name"/>
+    <function name="gio.File.set_display_name_async" link="class-giofile.html#method-giofile--set-display-name-async"/>
+    <function name="gio.File.set_display_name_finish" link="class-giofile.html#method-giofile--set-display-name-finish"/>
+    <function name="gio.File.trash" link="class-giofile.html#method-giofile--trash"/>
+    <function name="gio.File.unmount_mountable" link="class-giofile.html#method-giofile--unmount-mountable"/>
+    <function name="gio.File.unmount_mountable_finish" link="class-giofile.html#method-giofile--unmount-mountable-finish"/>
+    <function name="gio.file_parse_name" link="class-giofile.html#function-gio--file-parse-name"/>
+    <function name="gio.FileEnumerator.close" link="class-giofileenumerator.html#method-giofileenumerator--close"/>
+    <function name="gio.FileEnumerator.close_async" link="class-giofileenumerator.html#method-giofileenumerator--close-async"/>
+    <function name="gio.FileEnumerator.close_finish" link="class-giofileenumerator.html#method-giofileenumerator--close-finish"/>
+    <function name="gio.FileEnumerator.get_container" link="class-giofileenumerator.html#method-giofileenumerator--get-container"/>
+    <function name="gio.FileEnumerator.has_pending" link="class-giofileenumerator.html#method-giofileenumerator--has-pending"/>
+    <function name="gio.FileEnumerator.is_closed" link="class-giofileenumerator.html#method-giofileenumerator--is-closed"/>
+    <function name="gio.FileEnumerator.next_file" link="class-giofileenumerator.html#method-giofileenumerator--next-file"/>
+    <function name="gio.FileEnumerator.next_files_async" link="class-giofileenumerator.html#method-giofileenumerator--next-files-async"/>
+    <function name="gio.FileEnumerator.next_files_finish" link="class-giofileenumerator.html#method-giofileenumerator--next-files-finish"/>
+    <function name="gio.FileEnumerator.set_pending" link="class-giofileenumerator.html#method-giofileenumerator--set-pending"/>
+    <function name="gio.FileIcon.get_file" link="class-giofileicon.html#method-giofileicon--get-file"/>
+    <function name="gio.FileInputStream.query_info" link="class-giofileinputstream.html#method-giofileinputstream--query-info"/>
+    <function name="gio.FileInputStream.query_info_async" link="class-giofileinputstream.html#method-giofileinputstream--query-info-async"/>
+    <function name="gio.FileInputStream.query_info_finish" link="class-giofileinputstream.html#method-giofileinputstream--query-info-finish"/>
+    <function name="gio.FileOutputStream.get_etag" link="class-giofileoutputstream.html#method-giofileoutputstream--get-etag"/>
+    <function name="gio.FileOutputStream.query_info" link="class-giofileoutputstream.html#method-giofileoutputstream--query-info"/>
+    <function name="gio.FileOutputStream.query_info_async" link="class-giofileoutputstream.html#method-giofileoutputstream--query-info-async"/>
+    <function name="gio.FileOutputStream.query_info_finish" link="class-giofileoutputstream.html#method-giofileoutputstream--query-info-finish"/>
+    <function name="gio.FilterInputStream.get_base_stream" link="class-giofilterinputstream.html#method-giofilterinputstream--get-base-stream"/>
+    <function name="gio.FilterInputStream.get_close_base_stream" link="class-giofilterinputstream.html#method-giofilterinputstream--get-close-base-stream"/>
+    <function name="gio.FilterInputStream.set_close_base_stream" link="class-giofilterinputstream.html#method-giofilterinputstream--set-close-base-stream"/>
+    <function name="gio.FilterOutputStream.get_base_stream" link="class-giofilteroutputstream.html#method-giofilteroutputstream--get-base-stream"/>
+    <function name="gio.FilterOutputStream.get_close_base_stream" link="class-giofilteroutputstream.html#method-giofilteroutputstream--get-close-base-stream"/>
+    <function name="gio.FilterOutputStream.set_close_base_stream" link="class-giofilteroutputstream.html#method-giofilteroutputstream--set-close-base-stream"/>
+    <function name="gio.Icon.equal" link="class-gioicon.html#method-gioicon--equal"/>
+    <function name="gio.Icon.to_string" link="class-gioicon.html#method-gioicon--to-string"/>
+    <function name="gio.icon_new_from_string" link="class-gioicon.html#function-gio--icon-new-from-string"/>
+    <function name="gio.InputStream.clear_pending" link="class-gioinputstream.html#method-gioinputstream--clear-pending"/>
+    <function name="gio.InputStream.close" link="class-gioinputstream.html#method-gioinputstream--close"/>
+    <function name="gio.InputStream.close_async" link="class-gioinputstream.html#method-gioinputstream--close-async"/>
+    <function name="gio.InputStream.close_finish" link="class-gioinputstream.html#method-gioinputstream--close-finish"/>
+    <function name="gio.InputStream.has_pending" link="class-gioinputstream.html#method-gioinputstream--has-pending"/>
+    <function name="gio.InputStream.is_closed" link="class-gioinputstream.html#method-gioinputstream--is-closed"/>
+    <function name="gio.InputStream.read" link="class-gioinputstream.html#method-gioinputstream--read"/>
+    <function name="gio.InputStream.read_async" link="class-gioinputstream.html#method-gioinputstream--read-async"/>
+    <function name="gio.InputStream.read_finish" link="class-gioinputstream.html#method-gioinputstream--read-finish"/>
+    <function name="gio.InputStream.read_part" link="class-gioinputstream.html#method-gioinputstream--read-part"/>
+    <function name="gio.InputStream.set_pending" link="class-gioinputstream.html#method-gioinputstream--set-pending"/>
+    <function name="gio.InputStream.skip" link="class-gioinputstream.html#method-gioinputstream--skip"/>
+    <function name="gio.InputStream.skip_async" link="class-gioinputstream.html#method-gioinputstream--skip-async"/>
+    <function name="gio.InputStream.skip_finish" link="class-gioinputstream.html#method-gioinputstream--skip-finish"/>
+    <function name="gio.LoadableIcon.load" link="class-gioloadableicon.html#method-gioloadableicon--load"/>
+    <function name="gio.LoadableIcon.load_async" link="class-gioloadableicon.html#method-gioloadableicon--load-async"/>
+    <function name="gio.LoadableIcon.load_finish" link="class-gioloadableicon.html#method-gioloadableicon--load-finish"/>
+    <function name="gio.MemoryInputStream.add_data" link="class-giomemoryinputstream.html#method-giomemoryinputstream--add-data"/>
+    <function name="gio.memory_input_stream_new_from_data" link="class-giomemoryinputstream.html#function-gio--memory-input-stream-new-from-data"/>
+    <function name="gio.MemoryOutputStream.get_contents" link="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-contents"/>
+    <function name="gio.MemoryOutputStream.get_data_size" link="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-data-size"/>
+    <function name="gio.MemoryOutputStream.get_size" link="class-giomemoryoutputstream.html#method-giomemoryoutputstream--get-size"/>
+    <function name="gio.Mount.can_eject" link="class-giomount.html#method-giomount--can-eject"/>
+    <function name="gio.Mount.can_unmount" link="class-giomount.html#method-giomount--can-unmount"/>
+    <function name="gio.Mount.eject" link="class-giomount.html#method-giomount--eject"/>
+    <function name="gio.Mount.eject_finish" link="class-giomount.html#method-giomount--eject-finish"/>
+    <function name="gio.Mount.get_drive" link="class-giomount.html#method-giomount--get-drive"/>
+    <function name="gio.Mount.get_icon" link="class-giomount.html#method-giomount--get-icon"/>
+    <function name="gio.Mount.get_name" link="class-giomount.html#method-giomount--get-name"/>
+    <function name="gio.Mount.get_root" link="class-giomount.html#method-giomount--get-root"/>
+    <function name="gio.Mount.get_uuid" link="class-giomount.html#method-giomount--get-uuid"/>
+    <function name="gio.Mount.get_volume" link="class-giomount.html#method-giomount--get-volume"/>
+    <function name="gio.Mount.guess_content_type" link="class-giomount.html#method-giomount--guess-content-type"/>
+    <function name="gio.Mount.guess_content_type_finish" link="class-giomount.html#method-giomount--guess-content-type-finish"/>
+    <function name="gio.Mount.guess_content_type_sync" link="class-giomount.html#method-giomount--guess-content-type-sync"/>
+    <function name="gio.Mount.is_shadowed" link="class-giomount.html#method-giomount--is-shadowed"/>
+    <function name="gio.Mount.remount" link="class-giomount.html#method-giomount--remount"/>
+    <function name="gio.Mount.remount_finish" link="class-giomount.html#method-giomount--remount-finish"/>
+    <function name="gio.Mount.shadow" link="class-giomount.html#method-giomount--shadow"/>
+    <function name="gio.Mount.unmount" link="class-giomount.html#method-giomount--unmount"/>
+    <function name="gio.Mount.unmount_finish" link="class-giomount.html#method-giomount--unmount-finish"/>
+    <function name="gio.Mount.unshadow" link="class-giomount.html#method-giomount--unshadow"/>
+    <function name="The &quot;aborted&quot; gio.Mount Signal" link="class-giomount.html#signal-giomount--aborted"/>
+    <function name="The &quot;changed&quot; gio.Mount Signal" link="class-giomount.html#signal-giomount--changed"/>
+    <function name="The &quot;unmounted&quot; gio.Mount Signal" link="class-giomount.html#signal-giomount--unmounted"/>
+    <function name="gio.MountOperation.get_anonymous" link="class-giomountoperation.html#method-giomountoperation--get-anonymous"/>
+    <function name="gio.MountOperation.get_choice" link="class-giomountoperation.html#method-giomountoperation--get-choice"/>
+    <function name="gio.MountOperation.get_domain" link="class-giomountoperation.html#method-giomountoperation--get-domain"/>
+    <function name="gio.MountOperation.get_password" link="class-giomountoperation.html#method-giomountoperation--get-password"/>
+    <function name="gio.MountOperation.get_password_save" link="class-giomountoperation.html#method-giomountoperation--get-password-save"/>
+    <function name="gio.MountOperation.get_username" link="class-giomountoperation.html#method-giomountoperation--get-username"/>
+    <function name="gio.MountOperation.reply" link="class-giomountoperation.html#method-giomountoperation--reply"/>
+    <function name="gio.MountOperation.set_anonymous" link="class-giomountoperation.html#method-giomountoperation--set-anonymous"/>
+    <function name="gio.MountOperation.set_choice" link="class-giomountoperation.html#method-giomountoperation--set-choice"/>
+    <function name="gio.MountOperation.set_domain" link="class-giomountoperation.html#method-giomountoperation--set-domain"/>
+    <function name="gio.MountOperation.set_password" link="class-giomountoperation.html#method-giomountoperation--set-password"/>
+    <function name="gio.MountOperation.set_password_save" link="class-giomountoperation.html#method-giomountoperation--set-password-save"/>
+    <function name="gio.MountOperation.set_username" link="class-giomountoperation.html#method-giomountoperation--set-username"/>
+    <function name="The &quot;aborted&quot; gio.MountOperation Signal" link="class-giomountoperation.html#signal-giomountoperation--aborted"/>
+    <function name="The &quot;ask-password&quot; gio.MountOperation Signal" link="class-giomountoperation.html#signal-giomountoperation--ask-password"/>
+    <function name="The &quot;ask-question&quot; gio.MountOperation Signal" link="class-giomountoperation.html#signal-giomountoperation--ask-question"/>
+    <function name="The &quot;reply&quot; gio.MountOperation Signal" link="class-giomountoperation.html#signal-giomountoperation--reply"/>
+    <function name="gio.Seekable.tell" link="class-gioseekable.html#method-gioseekable--tell"/>
+    <function name="gio.Seekable.can_seek" link="class-gioseekable.html#method-gioseekable--can_seek"/>
+    <function name="gio.Seekable.seek" link="class-gioseekable.html#method-gioseekable--seek"/>
+    <function name="gio.Seekable.can_truncate" link="class-gioseekable.html#method-gioseekable--can_truncate"/>
+    <function name="gio.Seekable.truncate" link="class-gioseekable.html#method-gioseekable--truncate"/>
+    <function name="gio.SimpleAsyncResult.complete" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete"/>
+    <function name="gio.SimpleAsyncResult.complete_in_idle" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--complete-in-idle"/>
+    <function name="gio.SimpleAsyncResult.get_op_res_gboolean" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gboolean"/>
+    <function name="gio.SimpleAsyncResult.get_op_res_gssize" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--get-op-res-gssize"/>
+    <function name="gio.SimpleAsyncResult.propagate_error" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--propagate-error"/>
+    <function name="gio.SimpleAsyncResult.set_handle_cancellation" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-handle-cancellation"/>
+    <function name="gio.SimpleAsyncResult.set_op_res_gboolean" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gboolean"/>
+    <function name="gio.SimpleAsyncResult.set_op_res_gssize" link="class-giosimpleasyncresult.html#method-giosimpleasyncresult--set-op-res-gssize"/>
+    <function name="gio.ThemedIcon.append_name" link="class-giothemedicon.html#method-giothemedicon--append-name"/>
+    <function name="gio.ThemedIcon.get_names" link="class-giothemedicon.html#method-giothemedicon--get-names"/>
+    <function name="gio.ThemedIcon.prepend_name" link="class-giothemedicon.html#method-giothemedicon--prepend-name"/>
+    <function name="gio.Volume.can_eject" link="class-giovolume.html#method-giovolume--can-eject"/>
+    <function name="gio.Volume.can_mount" link="class-giovolume.html#method-giovolume--can-mount"/>
+    <function name="gio.Volume.eject" link="class-giovolume.html#method-giovolume--eject"/>
+    <function name="gio.Volume.eject_finish" link="class-giovolume.html#method-giovolume--eject-finish"/>
+    <function name="gio.Volume.enumerate_identifiers" link="class-giovolume.html#method-giovolume--enumerate-identifiers"/>
+    <function name="gio.Volume.get_activation_root" link="class-giovolume.html#method-giovolume--get-activation-root"/>
+    <function name="gio.Volume.get_drive" link="class-giovolume.html#method-giovolume--get-drive"/>
+    <function name="gio.Volume.get_icon" link="class-giovolume.html#method-giovolume--get-icon"/>
+    <function name="gio.Volume.get_identifier" link="class-giovolume.html#method-giovolume--get-identifier"/>
+    <function name="gio.Volume.get_mount" link="class-giovolume.html#method-giovolume--get-mount"/>
+    <function name="gio.Volume.get_name" link="class-giovolume.html#method-giovolume--get-name"/>
+    <function name="gio.Volume.get_uuid" link="class-giovolume.html#method-giovolume--get-uuid"/>
+    <function name="gio.Volume.mount" link="class-giovolume.html#method-giovolume--mount"/>
+    <function name="gio.Volume.mount_finish" link="class-giovolume.html#method-giovolume--mount-finish"/>
+    <function name="gio.Volume.should_automount" link="class-giovolume.html#method-giovolume--should-automount"/>
+    <function name="The &quot;changed&quot; gio.Volume Signal" link="class-giovolume.html#signal-giovolume--changed"/>
+    <function name="The &quot;removed&quot; gio.Volume Signal" link="class-giovolume.html#signal-giovolume--removed"/>
+    <function name="gio.VolumeMonitor.get_connected_drives" link="class-giovolumemonitor.html#method-giovolumemonitor--get-connected-drives"/>
+    <function name="gio.VolumeMonitor.get_mount_for_uuid" link="class-giovolumemonitor.html#method-giovolumemonitor--get-mount-for-uuid"/>
+    <function name="gio.VolumeMonitor.get_mounts" link="class-giovolumemonitor.html#method-giovolumemonitor--get-mounts"/>
+    <function name="gio.VolumeMonitor.get_volume_for_uuid" link="class-giovolumemonitor.html#method-giovolumemonitor--get-volume-for-uuid"/>
+    <function name="gio.VolumeMonitor.get_volumes" link="class-giovolumemonitor.html#method-giovolumemonitor--get-volumes"/>
+    <function name="gio.volume_monitor_adopt_orphan_mount" link="class-giovolumemonitor.html#function-gio--volume-monitor-adopt-orphan-mount"/>
+    <function name="gio.volume_monitor_get" link="class-giovolumemonitor.html#function-gio--volume-monitor-get"/>
+    <function name="The &quot;drive-changed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--drive-changed"/>
+    <function name="The &quot;drive-connected&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--drive-connected"/>
+    <function name="The &quot;drive-disconnected&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--drive-disconnected"/>
+    <function name="The &quot;drive-eject-button&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--drive-eject-button"/>
+    <function name="The &quot;mount-added&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--mount-added"/>
+    <function name="The &quot;mount-changed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--mount-changed"/>
+    <function name="The &quot;mount-pre-unmount&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--mount-pre-unmount"/>
+    <function name="The &quot;mount-removed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--mount-removed"/>
+    <function name="The &quot;volume-added&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--volume-added"/>
+    <function name="The &quot;volume-changed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--volume-changed"/>
+    <function name="The &quot;volume-removed&quot; gio.Volume Signal" link="class-giovolumemonitor.html#signal-giovolumemonitor--volume-removed"/>
+    <function name="gio.content_type_can_be_executable" link="gio-functions.html#function-gio--content-type-can-be-executable"/>
+    <function name="gio.content_type_equals" link="gio-functions.html#function-gio--content-type-equals"/>
+    <function name="gio.content_type_from_mime_type" link="gio-functions.html#function-gio--content-type-from-mime-type"/>
+    <function name="gio.content_type_get_description" link="gio-functions.html#function-gio--content-type-get-description"/>
+    <function name="gio.content_type_get_icon" link="gio-functions.html#function-gio--content-type-get-icon"/>
+    <function name="gio.content_type_get_mime_type" link="gio-functions.html#function-gio--content-type-get-mime-type"/>
+    <function name="gio.content_type_guess" link="gio-functions.html#function-gio--content-type-guess"/>
+    <function name="gio.content_type_is_a" link="gio-functions.html#function-gio--content-type-is-a"/>
+    <function name="gio.content_type_is_unknown" link="gio-functions.html#function-gio--content-type-is-unknown"/>
+    <function name="gio.content_types_get_registered" link="gio-functions.html#function-gio--content-types-get-registered"/>
+    <function name="gio.io_error_from_errno" link="gio-functions.html#function-gio--io-error-from-errno"/>
+    <function name="Gio Ask Password Flags Constants" link="gio-constants.html#gio-ask-password-flags-constants"/>
+    <function name="Gio AppInfo Create Flags Constants" link="gio-constants.html#gio-app-info-constants"/>
+    <function name="Gio Data Stream Byte Order Constants" link="gio-constants.html#gio-data-stream-byte-order-constants"/>
+    <function name="Gio Data Stream Newline Type Constants" link="gio-constants.html#gio-data-stream-newline-type-constants"/>
+    <function name="Gio Emblem Origin Constants" link="gio-constants.html#gio-emblem-origin-constants"/>
+    <function name="Gio Error Constants" link="gio-constants.html#gio-error-constants"/>
+    <function name="Gio File Attribute Constants" link="gio-constants.html#gio-file-attribute-constants"/>
+    <function name="Gio File Attribute Type Constants" link="gio-constants.html#gio-file-attribute-type-constants"/>
+    <function name="Gio File Attribute Flags Constants" link="gio-constants.html#gio-file-attribute-flags-constants"/>
+    <function name="Gio File Create Flags Constants" link="gio-constants.html#gio-file-create-flags-constants"/>
+    <function name="Gio File Copy Flags Constants" link="gio-constants.html#gio-file-copy-flags-constants"/>
+    <function name="Gio File Monitor Flags Constants" link="gio-constants.html#gio-file-monitor-flags-constants"/>
+    <function name="Gio File Query Info Flags Constants" link="gio-constants.html#gio-file-query-info-flags-constants"/>
+    <function name="Gio File Type Constants" link="gio-constants.html#gio-file-type-constants"/>
+    <function name="Gio Mount Mount Flags Constants" link="gio-constants.html#gio-mount-mount-flags-constants"/>
+    <function name="Gio Mount Unmount Flags Constants" link="gio-constants.html#gio-mount-unmount-flags-constants"/>
+    <function name="Gio Mount Operation Result Constants" link="gio-constants.html#gio-mount-operation-result-constants"/>
+    <function name="Gio Password Save Constants" link="gio-constants.html#gio-password-save-constants"/>
+    <function name="gio.unix.InputStream.get_close_fd" link="class-giounixinputstream.html#method-giounixinputstream--get-close-fd"/>
+    <function name="gio.unix.InputStream.get_fd" link="class-giounixinputstream.html#method-giounixinputstream--get-fd"/>
+    <function name="gio.unix.InputStream.set_close_fd" link="class-giounixinputstream.html#method-giounixinputstream--set-close-fd"/>
+    <function name="gio.unix.OutputStream.get_close_fd" link="class-giounixoutputstream.html#method-giounixoutputstream--get-close-fd"/>
+    <function name="gio.unix.OutputStream.get_fd" link="class-giounixoutputstream.html#method-giounixoutputstream--get-fd"/>
+    <function name="gio.unix.OutputStream.set_close_fd" link="class-giounixoutputstream.html#method-giounixoutputstream--set-close-fd"/>
+  </functions>
+</book>
diff --git a/docs/reference/entities.docbook.in b/docs/reference/entities.docbook.in
new file mode 100644 (file)
index 0000000..be788f8
--- /dev/null
@@ -0,0 +1 @@
+<!ENTITY version "@PACKAGE_VERSION@">
diff --git a/docs/reference/pygio-appinfo.xml b/docs/reference/pygio-appinfo.xml
new file mode 100644 (file)
index 0000000..eaeb060
--- /dev/null
@@ -0,0 +1,894 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioappinfo">
+    <refnamediv>
+        <refname>gio.AppInfo</refname>
+        <refpurpose>Information about an installed application and methods to launch it (with file arguments).</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.AppInfo</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-gioappinfo">gio.AppInfo</link></methodname>
+       <methodparam><parameter role="keyword">commandline</parameter></methodparam>
+        <methodparam><parameter role="keyword">application_name</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.APP_INFO_CREATE_NONE</initializer></methodparam>
+    </constructorsynopsis>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--add-supports-type">add_supports_type</link></methodname>
+        <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--can-delete">can_delete</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--can-remove-supports-type">can_remove_supports_type</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--delete">delete</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--dup">dup</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--equal">equal</link></methodname>
+        <methodparam><parameter role="keyword">appinfo2</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--get-commandline">get_commandline</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--get-description">get_description</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--get-executable">get_executable</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--get-icon">get_icon</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--get-id">get_id</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--get-name">get_name</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--launch">launch</link></methodname>
+        <methodparam><parameter role="keyword">files</parameter></methodparam>
+        <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--launch-uris">launch_uris</link></methodname>
+        <methodparam><parameter role="keyword">uris</parameter></methodparam>
+        <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--remove-supports-type">remove_supports_type</link></methodname>
+        <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--set-as-default-for-extension">set_as_default_for_extension</link></methodname>
+        <methodparam><parameter role="keyword">extension</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--set-as-default-for-type">set_as_default_for_type</link></methodname>
+        <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--should-show">should_show</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--supports-files">supports_files</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--supports-uris">supports_uris</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+<methodsynopsis language="python">
+    <methodname><link linkend="function-gio--app-info-get-all">gio.app_info_get_all</link></methodname>
+    <methodparam></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--app-info-get-all-for-type">gio.app_info_get_all_for_type</link></methodname>
+    <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--app-info-get-default-for-type">gio.app_info_get_default_for_type</link></methodname>
+    <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+    <methodparam><parameter role="keyword">must_support_uris</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--app-info-get-default-for-uri-scheme">gio.app_info_get_default_for_uri_scheme</link></methodname>
+    <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--app-info-reset-type-association">gio.app_info_reset_type_association</link></methodname>
+    <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+  +-- <link linkend="class-gioappinfo">gio.AppInfo</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Known Implementation</title>
+        <para>
+            <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link> is implemented by
+            <link linkend="class-giodesktopappinfo"><classname>gio.DesktopAppInfo</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+            and <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
+            are used for describing and launching applications installed on the system.
+        </para>
+        <para>
+            As of GLib 2.20, URIs will always be converted to POSIX paths (using
+            <methodname><link linkend="method-giofile--get-path">gio.File.get_path</link></methodname>()) when using
+            <methodname><link linkend="method-gioappinfo--launch">gio.AppInfo.launch</link></methodname>()
+            even if the application requested an URI and not a POSIX path. For example for an desktop-file
+            based application with Exec key totem %U and a single URI, sftp://foo/file.avi, then /home/user/.gvfs/sftp
+            on foo/file.avi will be passed. This will only work if a set of suitable GIO extensions (such as gvfs 2.26
+            compiled with FUSE support), is available and operational; if this is not the case, the URI will be passed
+            unmodified to the application. Some URIs, such as mailto:, of course cannot be mapped to a POSIX path
+            (in gvfs there's no FUSE mount for it); such URIs will be passed unmodified to the application. 
+        </para>
+        <para>
+            Specifically for gvfs 2.26 and later, the POSIX URI will be mapped back to the GIO URI in the
+            <link linkend="class-giofile"><classname>gio.File</classname></link> constructors
+            (since gvfs implements the GVfs extension point). As such, if the application needs to examine the URI,
+            it needs to use
+            <methodname><link linkend="method-giofile--get-uri">gio.File.get_uri</link></methodname>()
+            or similar on
+            <link linkend="class-giofile"><classname>gio.File</classname></link>.
+            In other words, an application cannot assume that the URI passed to e.g.
+            <methodname><link linkend="constructor-giofile">gio.File</link></methodname>() constructor
+            is equal to the result of
+            <methodname><link linkend="method-giofile--get-uri">gio.File.get_uri</link></methodname>().
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-gioappinfo">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.AppInfo</methodname>
+            <methodparam><parameter role="keyword">commandline</parameter></methodparam>
+            <methodparam><parameter role="keyword">application_name</parameter><initializer><literal>None</literal></initializer></methodparam>
+            <methodparam><parameter role="keyword">flags</parameter><initializer>gio.APP_INFO_CREATE_NONE</initializer></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><parameter>commandline</parameter>&nbsp;:</term>
+                <listitem><simpara>the commandline to use 
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><parameter>application_name</parameter>&nbsp;:</term>
+                <listitem><simpara>the application name, or <literal>None</literal> to use commandline.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><parameter>flags</parameter>&nbsp;:</term>
+                <listitem><simpara>flags that can specify details of the created,
+                from <xref linkend="gio-app-info-constants" endterm="gio-app-info-constants-title"></xref>
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                for given command.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+            from the given information.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-gioappinfo--add-supports-type">
+            <title>gio.AppInfo.add_supports_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>add_supports_type</methodname>
+                <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>content_type</parameter>&nbsp;:</term>
+                    <listitem><simpara>A string.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>add_supports_type</methodname>() method adds a content type
+                to the application information to indicate the application is capable of
+                opening files with the given content type.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--can-delete">
+            <title>gio.AppInfo.can_delete</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>can_delete</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if appinfo can be deleted.
+                   </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>can_delete</methodname>() method obtains the information
+               whether the <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+               can be deleted. See
+               <methodname><link linkend="method-gioappinfo--delete">gio.AppInfo.delete</link></methodname>().
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--can-remove-supports-type">
+            <title>gio.AppInfo.can_remove_supports_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>can_remove_supports_type</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if it is possible to remove
+                    supported content types from a given appinfo, <literal>False</literal>
+                    if not. </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>can_remove_supports_type</methodname>() method checks if a
+                supported content type can be removed from an application.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--delete">
+            <title>gio.AppInfo.delete</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>delete</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if appinfo has been deleted.
+                   </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>delete</methodname>() method tries to delete an
+               <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>.
+            </para>
+           <para>
+               On some platforms, there may be a difference between user-defined
+               <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s
+               which can be deleted, and system-wide ones which cannot. See
+               <methodname><link linkend="method-gioappinfo--can-delete">gio.AppInfo.can_delete</link></methodname>().
+           </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--dup">
+            <title>gio.AppInfo.dup</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>dup</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A duplicate of appinfo.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>dup</methodname>() method creates a duplicate of a
+                <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioappinfo--equal">
+            <title>gio.AppInfo.equal</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>equal</methodname>
+                <methodparam><parameter role="keyword">icon2</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>appinfo2</parameter>&nbsp;:</term>
+                    <listitem><simpara>the second
+                    <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if appinfo1 is equal to appinfo2.
+                    <literal>False</literal> otherwise.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>equal</methodname>() method checks if two
+                <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s are equal.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--get-commandline">
+            <title>gio.AppInfo.get_commandline</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_commandline</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string containing the appinfo's commandline, or
+                   <literal>None</literal> if this information is not available.
+                   </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_commandline</methodname>() method gets the
+               commandline with which the application will be started.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--get-description">
+            <title>gio.AppInfo.get_description</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_description</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A string containing a description of the application
+                    appinfo, or <literal>None</literal> if none.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_description</methodname>() method gets a human-readable
+                description of an installed application.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--get-executable">
+            <title>gio.AppInfo.get_executable</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_executable</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string containing the appinfo's application
+                    binary's name.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_description</methodname>() method gets the executable's
+                name for the installed application.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--get-icon">
+            <title>gio.AppInfo.get_icon</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_icon</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the default
+                    <link linkend="class-gioicon"><classname>gio.Icon</classname></link> for appinfo.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_icon</methodname>() method gets the icon for the application.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--get-id">
+            <title>gio.AppInfo.get_id</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_id</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string containing the application's ID.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_id</methodname>() method gets the ID of an application.
+                An id is a string that identifies the application. The exact format of the
+                id is platform dependent. For instance, on Unix this is the desktop file id
+                from the xdg menu specification. 
+            </para>
+            <para>
+                Note that the returned ID may be <literal>None</literal>, depending on
+                how the appinfo has been constructed.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--get-name">
+            <title>gio.AppInfo.get_name</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_name</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the name of the application for appinfo.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_name</methodname>() method gets the installed
+                name of the application.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioappinfo--launch">
+            <title>gio.AppInfo.launch</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>launch</methodname>
+                <methodparam><parameter role="keyword">files</parameter></methodparam>
+                <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>files</parameter>&nbsp;:</term>
+                    <listitem><simpara>a list of <link linkend="class-giofile"><classname>gio.File</classname></link> objects.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>launch_context</parameter>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
+                    or <literal>None</literal>.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> on successful launch,
+                    <literal>False</literal> otherwise.                      
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>launch</methodname>() method launches the application.
+                Passes files to the launched application as arguments, using the optional
+                launch_context to get information about the details of the launcher
+                (like what screen it is on). On error, error will be set accordingly. 
+            </para>
+            <para>
+                To lauch the application without arguments pass a <literal>None</literal> for files list. 
+            </para>
+            <para>
+                Note that even if the launch is successful the application launched can fail
+                to start if it runs into problems during startup. There is no way to detect this. 
+            </para>
+            <para>
+                Some URIs can be changed when passed through a
+                <link linkend="class-giofile"><classname>gio.File</classname></link>
+                (for instance unsupported uris with strange formats like mailto:), so
+                if you have a textual uri you want to pass in as argument, consider using
+                <methodname><link linkend="method-gioappinfo--launch-uris">gio.File.launch_uris</link></methodname>()
+                instead.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioappinfo--launch-uris">
+            <title>gio.AppInfo.launch_uris</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>launch_uris</methodname>
+                <methodparam><parameter role="keyword">uris</parameter></methodparam>
+                <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>uris</parameter>&nbsp;:</term>
+                    <listitem><simpara>a list containing URIs to launch.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>launch_context</parameter>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
+                    or <literal>None</literal>.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> on successful launch,
+                    <literal>False</literal> otherwise.                      
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>launch_uris</methodname>() method launches the application.
+                Passes uris to the launched application as arguments, using the optional
+                launch_context to get information about the details of the launcher
+                (like what screen it is on). On error, error will be set accordingly. 
+            </para>
+            <para>
+                To lauch the application without arguments pass a <literal>None</literal> for files list. 
+            </para>
+            <para>
+                Note that even if the launch is successful the application launched can fail
+                to start if it runs into problems during startup. There is no way to detect this. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioappinfo--remove-supports-type">
+            <title>gio.AppInfo.remove_supports_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>remove_supports_type</methodname>
+                <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>content_type</parameter>&nbsp;:</term>
+                    <listitem><simpara>A string.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>remove_supports_type</methodname>() method removes a
+                supported type from an application, if possible.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioappinfo--set-as-default-for-extension">
+            <title>gio.AppInfo.set_as_default_for_extension</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_as_default_for_extension</methodname>
+                <methodparam><parameter role="keyword">extension</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>extension</parameter>&nbsp;:</term>
+                    <listitem><simpara>A string containing the file extension (without the dot).
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_as_default_for_extension</methodname>() method sets the
+                application as the default handler for the given file extention.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioappinfo--set-as-default-for-type">
+            <title>gio.AppInfo.set_as_default_for_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_as_default_for_type</methodname>
+                <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>content_type</parameter>&nbsp;:</term>
+                    <listitem><simpara>The content type.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_as_default_for_type</methodname>() method sets the
+                application as the default handler for a given type.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--should-show">
+            <title>gio.AppInfo.should_show</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>should_show</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the appinfo should be shown,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>should_show</methodname>() method checks if the application
+                info should be shown in menus that list available applications.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--supports-files">
+            <title>gio.AppInfo.supports_files</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>supports_files</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the appinfo supports files. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>supports_files</methodname>() method checks if the application
+                accepts files as arguments.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--supports-uris">
+            <title>gio.AppInfo.supports_uris</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>supports_uris</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the appinfo supports uris. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>supports_uris</methodname>() method checks if the application
+                accepts uris as arguments.
+            </para>
+        </refsect2>
+    </refsect1>
+    
+    <refsect1>
+        <title>Functions</title>
+
+        <refsect2 id="function-gio--app-info-get-all">
+            <title>gio.app_info_get_all</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>app_info_get_all</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A list of <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>app_info_get_all</methodname>() function gets a list of all of
+                the applications currently registered on this system. 
+            </para>
+            <para>
+                For desktop files, this includes applications that have NoDisplay=true set or are
+                excluded from display by means of OnlyShowIn or NotShowIn. See
+                <methodname><link linkend="method-gioappinfo--should-show">gio.AppInfo.should_show</link></methodname>().
+                The returned list does not include applications which have the Hidden key set.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--app-info-get-all-for-type">
+            <title>gio.app_info_get_all_for_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>app_info_get_all_for_type</methodname>
+                <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>content_type</parameter>&nbsp;:</term>
+                    <listitem><simpara>the content type to find a
+                    <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    for.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A list of <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s
+                    for a given content type or <literal>None</literal> on error. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>app_info_get_all_for_type</methodname>() function gets a list of all
+                <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s
+                for a given content type.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--app-info-get-default-for-type">
+            <title>gio.app_info_get_default_for_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>app_info_get_default_for_type</methodname>
+                <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+                <methodparam><parameter role="keyword">must_support_uris</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>content_type</parameter>&nbsp;:</term>
+                    <listitem><simpara>the content type to find a
+                    <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    for.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>must_support_uris</parameter>&nbsp;:</term>
+                    <listitem><simpara>if <literal>True</literal>, the
+                    <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    is expected to support URIs </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    for given content_type or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>app_info_get_default_for_type</methodname>() function gets the
+                <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                that correspond to a given content type.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--app-info-get-default-for-uri-scheme">
+            <title>gio.app_info_get_default_for_uri_scheme</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>app_info_get_default_for_uri_scheme</methodname>
+                <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>uri_scheme</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string containing a URI scheme.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    for given uri_scheme or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>app_info_get_default_for_uri_scheme</methodname>() function gets
+                the default application for launching applications using this URI scheme. A URI
+                scheme is the initial part of the URI, up to but not including the
+                ':', e.g. "http", "ftp" or "sip".
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--app-info-reset-type-association">
+            <title>gio.app_info_reset_type_association</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>app_info_reset_type_association</methodname>
+                <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>content_type</parameter>&nbsp;:</term>
+                    <listitem><simpara>a content type</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>app_info_reset_type_association</methodname>() function
+               removes all changes to the type associations done by
+               <methodname><link linkend="method-gioappinfo--set-as-default-for-type">set_as_default_for_type</link></methodname>(),
+               <methodname><link linkend="method-gioappinfo--set-as-default-for-extension">set_as_default_for_extension</link></methodname>(),
+               <methodname><link linkend="method-gioappinfo--add-supports-type">add_supports_type</link></methodname>() or
+               <methodname><link linkend="method-gioappinfo--remove-supports-type">remove_supports_type</link></methodname>().
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-applaunchcontext.xml b/docs/reference/pygio-applaunchcontext.xml
new file mode 100644 (file)
index 0000000..66bb229
--- /dev/null
@@ -0,0 +1,194 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioapplaunchcontext">
+    <refnamediv>
+        <refname>gio.AppLaunchContext</refname>
+        <refpurpose>Application launch context.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.AppLaunchContext</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-gioapplaunchcontext">gio.AppLaunchContext</link></methodname>
+       <methodparam></methodparam>
+    </constructorsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioapplaunchcontext--get-display">get_display</link></methodname>
+        <methodparam><parameter role="keyword">info</parameter></methodparam>
+        <methodparam><parameter role="keyword">files</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioapplaunchcontext--get-startup-notify-id">get_startup_notify_id</link></methodname>
+        <methodparam><parameter role="keyword">info</parameter></methodparam>
+        <methodparam><parameter role="keyword">files</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioapplaunchcontext--launch-failed">launch_failed</link></methodname>
+        <methodparam><parameter role="keyword">startup_notify_id</parameter></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-gioapplaunchcontext">gio.AppLaunchContext</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            The <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
+            is used for integrating the launch with the launching application. This is used to handle for
+            instance startup notification and launching the new application on the same screen as the launching window.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-gioapplaunchcontext">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.AppLaunchContext</methodname>
+            <methodparam></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new application launch context. This is not normally used, instead
+            you instantiate a subclass of this, such as
+            <link linkend="class-gdkapplaunchcontext"><classname>gtk.gdk.AppLaunchContext</classname></link>.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-gioapplaunchcontext--get-display">
+            <title>gio.AppLaunchContext.get_display</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_display</methodname>
+                <methodparam><parameter role="keyword">info</parameter></methodparam>
+                <methodparam><parameter role="keyword">files</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>info</parameter>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>files</parameter>&nbsp;:</term>
+                    <listitem><simpara>a list of
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>
+                    objects.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a display string for the display. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_display</methodname>() method gets the display
+                string for the display. This is used to ensure new applications
+                are started on the same display as the launching application.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioapplaunchcontext--get-startup-notify-id">
+            <title>gio.AppLaunchContext.get_startup_notify_id</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_startup_notify_id</methodname>
+                <methodparam><parameter role="keyword">info</parameter></methodparam>
+                <methodparam><parameter role="keyword">files</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>info</parameter>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>files</parameter>&nbsp;:</term>
+                    <listitem><simpara>a list of
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>
+                    objects.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a startup notification ID for the application,
+                    or <literal>None</literal> if not supported. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_startup_notify_id</methodname>() method initiates
+                startup notification for the application and returns the DESKTOP_STARTUP_ID
+                for the launched operation, if supported. 
+            </para>
+            <para>
+                Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioapplaunchcontext--launch-failed">
+            <title>gio.AppLaunchContext.launch_failed</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>launch_failed</methodname>
+                <methodparam><parameter role="keyword">startup_notify_id</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>startup_notify_id</parameter>&nbsp;:</term>
+                    <listitem><simpara>the startup notification id that was returned by
+                    <methodname><link linkend="method-gioapplaunchcontext--get-startup-notify-id">get_startup_notify_id</link></methodname>.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a startup notification ID for the application,
+                    or <literal>None</literal> if not supported. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_startup_notify_id</methodname>() method is called
+                when an application has failed to launch, so that it can cancel the application
+                startup notification started in
+                <methodname><link linkend="method-gioapplaunchcontext--get-startup-notify-id">get_startup_notify_id</link></methodname>
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-asyncresult.xml b/docs/reference/pygio-asyncresult.xml
new file mode 100644 (file)
index 0000000..abe56ce
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioasyncresult">
+    <refnamediv>
+        <refname>gio.AsyncResult</refname>
+        <refpurpose>Asynchronous Function Results.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.AsyncResult</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioasyncresult--get-source-object">get_source_object</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+  +-- <link linkend="class-gioasyncresult">gio.AsyncResult</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Prerequisites</title>
+        <para>
+            <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link> is required by
+            <link linkend="class-gobject"><classname>gobject.GObject</classname></link>.
+        </para>
+    </refsect1>
+    
+    <refsect1>
+       <title>Known Implementation</title>
+        <para>
+            <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link> is implemented by
+            <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link>.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+            provides a base class for implementing asynchronous function results.
+        </para>
+        <para>
+            Asynchronous operations are broken up into two separate operations which are chained
+            together by a GAsyncReadyCallback. To begin an asynchronous operation, provide a
+            GAsyncReadyCallback to the asynchronous function. This callback will be triggered when
+            the operation has completed, and will be passed a GAsyncResult instance filled with the
+            details of the operation's success or failure, the object the asynchronous function was
+            started for and any error codes returned. The asynchronous callback function is then expected
+            to call the corresponding "_finish()" function with the object the function was called for,
+            and the <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+            instance, and optionally, an error to grab any error conditions that may have occurred. 
+        </para>
+        <para>
+            The purpose of the "_finish()" function is to take the generic result of type GAsyncResult and
+            return the specific result that the operation in question yields (e.g. a
+            <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+            for a "enumerate children" operation). If the result or error status of the operation is not needed,
+            there is no need to call the "_finish()" function, GIO will take care of cleaning up the result and error
+            information after the GAsyncReadyCallback returns. It is also allowed to take a reference to the
+            <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+            and call "_finish()" later. 
+        </para>
+        <para>
+            The callback for an asynchronous operation is called only once, and is always called, even
+            in the case of a cancelled operation. On cancellation the result is a gio.ERROR_CANCELLED error. 
+        </para>
+        <para>
+            Some ascynchronous operations are implemented using synchronous calls. These are run in a
+            separate thread, if GThread has been initialized, but otherwise they are sent to the Main Event
+            Loop and processed in an idle function. So, if you truly need asynchronous operations, make
+            sure to initialize GThread.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-gioasyncresult--get-source-object">
+            <title>gio.AsyncResult.get_source_object</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_source_object</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the source object for the res.                        
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_source_object</methodname>() method gets the source object
+                from a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-bufferedinputstream.xml b/docs/reference/pygio-bufferedinputstream.xml
new file mode 100644 (file)
index 0000000..677b1da
--- /dev/null
@@ -0,0 +1,461 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giobufferedinputstream">
+    <refnamediv>
+        <refname>gio.BufferedInputStream</refname>
+        <refpurpose>Buffered Input Stream</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.BufferedInputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-giofilterinputstream">gio.FilterInputStream</link></classname></ooclass>
+
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-giobufferedinputstream">gio.BufferedInputStream</link></methodname>
+       <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+    </constructorsynopsis>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giobufferedinputstream--fill">fill</link></methodname>
+        <methodparam><parameter role="keyword">count</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giobufferedinputstream--fill-async">fill_async</link></methodname>
+        <methodparam><parameter role="keyword">count</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giobufferedinputstream--fill-finish">fill_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giobufferedinputstream--get-available">get_available</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giobufferedinputstream--get-buffer-size">get_buffer_size</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giobufferedinputstream--read-byte">read_byte</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giobufferedinputstream--set-buffer-size">set_buffer_size</link></methodname>
+        <methodparam><parameter role="keyword">size</parameter></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+<methodsynopsis language="python">
+    <methodname><link linkend="function-gio--buffered-input-stream-new-sized">gio.buffered_input_stream_new_sized</link></methodname>
+    <methodparam><parameter role="keyword">size</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+    +-- <link linkend="class-giofilterinputstream">gio.FilterInputStream</link>
+      +-- <link linkend="class-giobufferedinputstream">gio.BufferedInputStream</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1 id="properties-giobufferedinputstream">
+        <title>gio.BufferedInputStream Properties</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"buffer-size"</entry>
+                            <entry>Read - Write - Construct</entry>
+                            <entry>The size of the backend buffer. Allowed values: >= 1. Default value: 4096.</entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giobufferedinputstream"><classname>gio.BufferedInputStream</classname></link>
+            implements <link linkend="class-giofilterinputstream"><classname>gio.FilterInputStream</classname></link>
+            and provides for buffered reads.
+        </para>
+        <para>
+            By default,
+            <link linkend="class-giobufferedinputstream"><classname>gio.BufferedInputStream</classname></link>'s
+            buffer size is set at 4 kilobytes.
+        </para>
+        <para>
+            To create a buffered input stream, use
+            <methodname><link linkend="constructor-giobufferedinputstream">gio.BufferedInputStream</link></methodname>(),
+            or <methodname><link linkend="function-gio--buffered-input-stream-new-sized">gio.buffered_input_stream_new_sized</link></methodname>()
+            to specify the buffer's size at construction.
+        </para>
+        <para>
+            To get the size of a buffer within a buffered input stream, use
+            <methodname><link linkend="method-giobufferedinputstream--get-buffer-size">get_buffer_size</link></methodname>().
+            To change the size of a buffered input stream's buffer, use
+            <methodname><link linkend="method-giobufferedinputstream--set-buffer-size">set_buffer_size</link></methodname>().
+            Note that the buffer's size cannot be reduced below the size of the data within the buffer.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giobufferedinputstream">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.BufferedInputStream</methodname>
+            <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><parameter>base_stream</parameter>&nbsp;:</term>
+                <listitem><simpara>a
+                <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+                for the given base_stream.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+            from the given base_stream, with a buffer set to the default size (4 kilobytes).
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giobufferedinputstream--fill">
+            <title>gio.BufferedInputStream.fill</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>fill</methodname>
+                <methodparam><parameter role="keyword">count</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">count</parameter>&nbsp;:</term>
+                  <listitem><simpara>the number of bytes that will be read from the stream.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the number of bytes read into stream's buffer,
+                    up to count, or -1 on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>fill</methodname>() method tries to read count bytes
+                from the stream into the buffer. Will block during this read.
+            </para>
+            <para>
+                If count is zero, returns zero and does nothing. A value of count
+                larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+            </para>
+            <para>
+                On success, the number of bytes read into the buffer is returned. It
+                is not an error if this is not the same as the requested size, as it can
+                happen e.g. near the end of a file. Zero is returned on end of file
+                (or if count is zero), but never otherwise.
+            </para>
+            <para>
+                If count is -1 then the attempted read size is equal to the number
+                of bytes that are required to fill the buffer.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can
+                be cancelled by triggering the cancellable object from another thread.
+                If the operation was cancelled, the error gio.ERROR_CANCELLED will be
+                returned. If an operation was partially finished when the operation was
+                cancelled the partial result will be returned, without an error.
+            </para>
+            <para>
+                On error -1 is returned and error is set accordingly.
+            </para>
+            <para>
+                For the asynchronous, non-blocking, version of this function, see
+                <methodname><link linkend="method-giobufferedinputstream--fill-async">gio.BufferedInputStream.fill_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giobufferedinputstream--fill-async">
+            <title>gio.BufferedInputStream.fill_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>fill_async</methodname>
+                <methodparam><parameter role="keyword">count</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">count</parameter>&nbsp;:</term>
+                  <listitem><simpara>the number of bytes that will be read from the stream.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>fill_async</methodname>() method reads data into stream's
+                buffer asynchronously, up to count size. io_priority can be used to
+                prioritize reads.
+            </para>
+            <para>
+                For the synchronous version of this function, see
+                <methodname><link linkend="method-giobufferedinputstream--fill">gio.BufferedInputStream.fill</link></methodname>().
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was
+                cancelled, the error gio.ERROR_CANCELLED will be set
+            </para>
+            <para>
+                If count is -1 then the attempted read size is equal to the number of bytes
+                that are required to fill the buffer.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giobufferedinputstream--fill-finish">
+            <title>gio.BufferedInputStream.fill_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>fill_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the size of the read stream, or -1 on an error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>fill_finish</methodname>() method finishes an asynchronous
+                file append operation started with
+                <methodname><link linkend="method-giobufferedinputstream--fill-async">gio.BufferedInputStream.fill_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giobufferedinputstream--get-available">
+            <title>gio.BufferedInputStream.get_available</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_available</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>size of the available stream.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_available</methodname>() method gets the size of
+                the available data within the stream.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giobufferedinputstream--get-buffer-size">
+            <title>gio.BufferedInputStream.get_buffer_size</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_buffer_size</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the current buffer size.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_buffer_size</methodname>() method gets the size
+                of the input buffer.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giobufferedinputstream--read-byte">
+            <title>gio.BufferedInputStream.read_byte</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_byte</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the byte read from the stream, or -1 on end of stream or error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_byte</methodname>() method tries to read a single
+                byte from the stream or the buffer. Will block during this read.
+            </para>
+            <para>
+                On success, the byte read from the stream is returned. On end of stream -1
+                is returned but it's not an exceptional error and error is not set.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can
+                be cancelled by triggering the cancellable object from another thread.
+                If the operation was cancelled, the error gio.ERROR_CANCELLED will be
+                returned. If an operation was partially finished when the operation was
+                cancelled the partial result will be returned, without an error.
+            </para>
+            <para>
+                On error -1 is returned and error is set accordingly.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giobufferedinputstream--set-buffer-size">
+            <title>gio.BufferedInputStream.set_buffer_size</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_buffer_size</methodname>
+                <methodparam><parameter role="keyword">size</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">size</parameter>&nbsp;:</term>
+                  <listitem><simpara>the new buffer size.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_buffer_size</methodname>() method sets the size
+                of the internal buffer of stream to size, or to the size of the contents
+                of the buffer. The buffer can never be resized smaller than its current contents.
+            </para>
+        </refsect2>
+    </refsect1>
+    
+    <refsect1>
+        <title>Functions</title>
+
+        <refsect2 id="function-gio--buffered-input-stream-new-sized">
+            <title>gio.buffered_input_stream_new_sized</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>buffered_input_stream_new_sized</methodname>
+                <methodparam><parameter role="keyword">size</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>size</parameter>&nbsp;:</term>
+                    <listitem><simpara>the requested buffer size.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A new
+                    <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>buffered_input_stream_new_sized</methodname>() function creates
+                a new <link linkend="class-giobufferedinputstream"><classname>gio.BufferedInputStream</classname></link>
+                from the given base_stream, with a buffer set to size.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-bufferedoutputstream.xml b/docs/reference/pygio-bufferedoutputstream.xml
new file mode 100644 (file)
index 0000000..6d7900f
--- /dev/null
@@ -0,0 +1,275 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giobufferedoutputstream">
+    <refnamediv>
+        <refname>gio.BufferedOutputStream</refname>
+        <refpurpose>Buffered Output Stream</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.BufferedOutputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-giofilteroutputstream">gio.FilterOutputStream</link></classname></ooclass>
+
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-giobufferedoutputstream">gio.BufferedOutputStream</link></methodname>
+       <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+    </constructorsynopsis>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giobufferedoutputstream--get-auto-grow">get_auto_grow</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giobufferedoutputstream--get-buffer-size">get_buffer_size</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giobufferedoutputstream--set-auto-grow">set_auto_grow</link></methodname>
+        <methodparam><parameter role="keyword">auto_grow</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giobufferedoutputstream--set-buffer-size">set_buffer_size</link></methodname>
+        <methodparam><parameter role="keyword">size</parameter></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+<methodsynopsis language="python">
+    <methodname><link linkend="function-gio--buffered-output-stream-new-sized">gio.buffered_output_stream_new_sized</link></methodname>
+    <methodparam><parameter role="keyword">size</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+    +-- <link linkend="class-giofilteroutputstream">gio.FilterOutputStream</link>
+      +-- <link linkend="class-giobufferedoutputstream">gio.BufferedOutputStream</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1 id="properties-giobufferedoutputstream">
+        <title>gio.BufferedOutputStream Properties</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"auto-grow"</entry>
+                            <entry>Read - Write</entry>
+                            <entry>Whether the buffer should automatically grow. Default value: <literal>False</literal>.</entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"buffer-size"</entry>
+                            <entry>Read - Write - Construct</entry>
+                            <entry>The size of the backend buffer. Allowed values: >= 1. Default value: 4096.</entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giobufferedoutputstream"><classname>gio.BufferedOutputStream</classname></link>
+            implements <link linkend="class-giofilteroutputstream"><classname>gio.FilterOutputStream</classname></link>
+            and provides for buffered writes.
+        </para>
+        <para>
+            By default,
+            <link linkend="class-giobufferedoutputstream"><classname>gio.BufferedOutputStream</classname></link>'s
+            buffer size is set at 4 kilobytes.
+        </para>
+        <para>
+            To create a buffered output stream, use
+            <methodname><link linkend="constructor-giobufferedoutputstream">gio.BufferedOutputStream</link></methodname>(),
+            or <methodname><link linkend="function-gio--buffered-output-stream-new-sized">gio.buffered_output_stream_new_sized</link></methodname>()
+            to specify the buffer's size at construction.
+        </para>
+        <para>
+            To get the size of a buffer within a buffered output stream, use
+            <methodname><link linkend="method-giobufferedoutputstream--get-buffer-size">gio.BufferedOutputStream.get_buffer_size</link></methodname>().
+            To change the size of a buffered output stream's buffer, use
+            <methodname><link linkend="method-giobufferedoutputstream--set-buffer-size">gio.BufferedOutputStream.set_buffer_size</link></methodname>().
+            Note that the buffer's size cannot be reduced below the size of the data within the buffer.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giobufferedoutputstream">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.BufferedOutputStream</methodname>
+            <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><parameter>base_stream</parameter>&nbsp;:</term>
+                <listitem><simpara>a
+                <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
+                for the given base_stream.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new buffered output stream for a base stream.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giobufferedoutputstream--get-auto-grow">
+            <title>gio.BufferedOutputStream.get_auto_grow</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_auto_grow</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the stream's
+                   buffer automatically grows, <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_auto_grow</methodname>() method checks if the
+               buffer automatically grows as data is added.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giobufferedoutputstream--get-buffer-size">
+            <title>gio.BufferedOutputStream.get_buffer_size</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_buffer_size</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the current buffer size.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_buffer_size</methodname>() method gets the size
+                of the buffer in the stream.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giobufferedoutputstream--set-auto-grow">
+            <title>gio.BufferedOutputStream.set_auto_grow</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_auto_grow</methodname>
+                <methodparam><parameter role="keyword">auto_grow</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">auto_grow</parameter>&nbsp;:</term>
+                  <listitem><simpara>a boolean.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_auto_grow</methodname>() method sets whether or not
+               the stream's buffer should automatically grow. If auto_grow is true,
+               then each write will just make the buffer larger, and you must manually
+               flush the buffer to actually write out the data to the underlying stream.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giobufferedoutputstream--set-buffer-size">
+            <title>gio.BufferedOutputStream.set_buffer_size</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_buffer_size</methodname>
+                <methodparam><parameter role="keyword">size</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">size</parameter>&nbsp;:</term>
+                  <listitem><simpara>the new buffer size.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_buffer_size</methodname>() method sets the size of
+               the internal buffer to size.
+            </para>
+        </refsect2>
+    </refsect1>
+    
+    <refsect1>
+        <title>Functions</title>
+
+        <refsect2 id="function-gio--buffered-output-stream-new-sized">
+            <title>gio.buffered_output_stream_new_sized</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>buffered_output_stream_new_sized</methodname>
+                <methodparam><parameter role="keyword">size</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>size</parameter>&nbsp;:</term>
+                    <listitem><simpara>the requested buffer size.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A new
+                    <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
+                   with an internal buffer set to size..
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>buffered_output_stream_new_sized</methodname>() function creates
+                a new <link linkend="class-giobufferedoutputstream"><classname>gio.BufferedOutputStream</classname></link>
+                from the given base_stream, with a buffer set to size.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-cancellable.xml b/docs/reference/pygio-cancellable.xml
new file mode 100644 (file)
index 0000000..c35388d
--- /dev/null
@@ -0,0 +1,290 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giocancellable">
+    <refnamediv>
+        <refname>gio.Cancellable</refname>
+        <refpurpose>Thread-safe Operation Cancellation Stack.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.Cancellable</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-giocancellable">gio.Cancellable</link></methodname>
+       <methodparam></methodparam>
+    </constructorsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giocancellable--cancel">cancel</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giocancellable--get-fd">get_fd</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giocancellable--is-cancelled">is_cancelled</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giocancellable--pop-current">pop_current</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giocancellable--push-current">push_current</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giocancellable--reset">reset</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giocancellable--set-error-if-cancelled">set_error_if_cancelled</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+<methodsynopsis language="python">
+    <methodname><link linkend="function-gio--cancellable-get-current">gio.cancellable_get_current</link></methodname>
+    <methodparam></methodparam>
+</methodsynopsis></programlisting>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giocancellable">gio.Cancellable</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            The <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+            is a thread-safe operation cancellation stack used throughout GIO to allow for
+            cancellation of synchronous and asynchronous operations.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giocancellable">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.Cancellable</methodname>
+            <methodparam></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link> object.
+        </para>
+        <para>
+            Applications that want to start one or more operations that should be cancellable should create a
+            <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+            and pass it to the operations. 
+        </para>
+        <para>
+            One <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+            can be used in multiple consecutive operations, but not in multiple concurrent operations.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giocancellable--cancel">
+            <title>gio.Cancellable.cancel</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>cancel</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+            </variablelist>
+    
+            <para>
+                The <methodname>cancel</methodname>() method will set cancellable to cancelled,
+                and will emit the "cancelled" signal. (However, see the warning about race conditions
+                in the documentation for that signal if you are planning to connect to it.) 
+            </para>
+            <para>
+                This function is thread-safe. In other words, you can safely call it from a thread
+                other than the one running the operation that was passed the cancellable. 
+            </para>
+            <para>
+                The convention within gio is that cancelling an asynchronous operation causes it
+                to complete asynchronously. That is, if you cancel the operation from the same thread
+                in which it is running, then the operation's GAsyncReadyCallback will not be invoked
+                until the application returns to the main loop.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giocancellable--get-fd">
+            <title>gio.Cancellable.get_fd</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_fd</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>A valid file descriptor. -1 if the file descriptor
+                is not supported, or on errors.</simpara></listitem>
+            </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_fd</methodname>() method gets the file descriptor
+                for a cancellable job. This can be used to implement cancellable operations
+                on Unix systems. The returned fd will turn readable when cancellable is cancelled. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giocancellable--is-cancelled">
+            <title>gio.Cancellable.is_cancelled</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>is_cancelled</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara><literal>True</literal> if cancellable is cancelled,
+                <literal>False</literal> if called with <literal>None</literal> or if
+                item is not cancelled. </simpara></listitem>
+            </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_fd</methodname>() method gets the file descriptor
+                for a cancellable job. This can be used to implement cancellable operations
+                on Unix systems. The returned fd will turn readable when cancellable is cancelled. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giocancellable--pop-current">
+            <title>gio.Cancellable.pop_current</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>pop_current</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+            </variablelist>
+    
+            <para>
+                The <methodname>pop_current</methodname>() method pops cancellable off
+                the cancellable stack (verifying that cancellable is on the top of the stack).
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giocancellable--push-current">
+            <title>gio.Cancellable.push_current</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>push_current</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+            </variablelist>
+    
+            <para>
+                The <methodname>push_current</methodname>() method pushes cancellable onto
+                the cancellable stack. The current cancllable can then be recieved using
+                <methodname><link linkend="function-gio--cancellable-get-current">gio.cancellable_get_current</link></methodname>(). 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giocancellable--reset">
+            <title>gio.Cancellable.reset</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>reset</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+            </variablelist>
+    
+            <para>
+                The <methodname>reset</methodname>() method resets cancellable to its uncancelled state.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giocancellable--set-error-if-cancelled">
+            <title>gio.Cancellable.set_error_if_cancelled</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_error_if_cancelled</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if cancellable was cancelled,
+                    <literal>False</literal> if it was not.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_error_if_cancelled</methodname>() method, if the cancellable
+                is cancelled, sets the error to notify that the operation was cancelled.
+            </para>
+        </refsect2>
+    </refsect1>
+    
+    <refsect1>
+        <title>Functions</title>
+
+        <refsect2 id="function-gio--cancellable-get-current">
+            <title>gio.cancellable_get_current</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>cancellable_get_current</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    from the top of the stack, or <literal>None</literal> if the stack is empty.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>cancellable_get_current</methodname>() function gets the top cancellable from the stack.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-classes.xml b/docs/reference/pygio-classes.xml
new file mode 100644 (file)
index 0000000..17761f8
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<chapter id="gio-class-reference"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<title>PyGio Class Reference</title>
+
+<!-- GIO CLASSES -->
+<xi:include href="pygio-appinfo.xml"/>
+<xi:include href="pygio-applaunchcontext.xml"/>
+<xi:include href="pygio-asyncresult.xml"/>
+<xi:include href="pygio-bufferedinputstream.xml"/>
+<xi:include href="pygio-bufferedoutputstream.xml"/>
+<xi:include href="pygio-cancellable.xml"/>
+<xi:include href="pygio-datainputstream.xml"/>
+<xi:include href="pygio-dataoutputstream.xml"/>
+<xi:include href="pygio-drive.xml"/>
+<xi:include href="pygio-emblem.xml"/>
+<xi:include href="pygio-emblemedicon.xml"/>
+<xi:include href="pygio-file.xml"/>
+<xi:include href="pygio-fileattributeinfo.xml"/>
+<xi:include href="pygio-fileenumerator.xml"/>
+<xi:include href="pygio-fileicon.xml"/>
+<xi:include href="pygio-fileinfo.xml"/>
+<xi:include href="pygio-fileinputstream.xml"/>
+<xi:include href="pygio-filemonitor.xml"/>
+<xi:include href="pygio-fileoutputstream.xml"/>
+<xi:include href="pygio-filterinputstream.xml"/>
+<xi:include href="pygio-filteroutputstream.xml"/>
+<xi:include href="pygio-icon.xml"/>
+<xi:include href="pygio-inputstream.xml"/>
+<xi:include href="pygio-loadableicon.xml"/>
+<xi:include href="pygio-memoryinputstream.xml"/>
+<xi:include href="pygio-memoryoutputstream.xml"/>
+<xi:include href="pygio-mount.xml"/>
+<xi:include href="pygio-mountoperation.xml"/>
+<xi:include href="pygio-outputstream.xml"/>
+<xi:include href="pygio-seekable.xml"/>
+<xi:include href="pygio-simpleasyncresult.xml"/>
+<xi:include href="pygio-themedicon.xml"/>
+<xi:include href="pygio-volume.xml"/>
+<xi:include href="pygio-volumemonitor.xml"/>
+<xi:include href="pygio-functions.xml"/>
+<xi:include href="pygio-constants.xml"/>
+
+</chapter>
diff --git a/docs/reference/pygio-constants.xml b/docs/reference/pygio-constants.xml
new file mode 100644 (file)
index 0000000..343927e
--- /dev/null
@@ -0,0 +1,1540 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="gio-constants">
+  <refnamediv>
+    <refname>gio Constants</refname>
+    <refpurpose>the built-in constants of the gio module</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Synopsis</title>
+
+<programlisting>
+<xref linkend="gio-app-info-constants" endterm="gio-app-info-constants-title"></xref>
+<xref linkend="gio-ask-password-flags-constants" endterm="gio-ask-password-flags-constants-title"></xref>
+<xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref>
+<xref linkend="gio-data-stream-newline-type-constants" endterm="gio-data-stream-newline-type-constants-title"></xref>
+<xref linkend="gio-emblem-origin-constants" endterm="gio-emblem-origin-constants-title"></xref>
+<xref linkend="gio-error-constants" endterm="gio-error-constants-title"></xref>
+<xref linkend="gio-file-attribute-constants" endterm="gio-file-attribute-constants-title"></xref>
+<xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+<xref linkend="gio-file-attribute-flags-constants" endterm="gio-file-attribute-flags-constants-title"></xref>
+<xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+<xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>
+<xref linkend="gio-file-monitor-flags-constants" endterm="gio-file-monitor-flags-constants-title"></xref>
+<xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+<xref linkend="gio-file-type-constants" endterm="gio-file-type-constants-title"></xref>
+<xref linkend="gio-mount-mount-flags-constants" endterm="gio-mount-mount-flags-constants-title"></xref>
+<xref linkend="gio-mount-operation-result-constants" endterm="gio-mount-operation-result-constants-title"></xref>
+<xref linkend="gio-mount-unmount-flags-constants" endterm="gio-mount-unmount-flags-constants-title"></xref>
+<xref linkend="gio-password-save-constants" endterm="gio-password-save-constants-title"></xref>
+</programlisting>
+
+  </refsect1>
+
+  <refsect1 id="gio-constants-description">
+    <title>Description</title>
+
+    <refsect2 id="gio-ask-password-flags-constants">
+      <title id="gio-ask-password-flags-constants-title">Gio Ask Password Flags Constants</title>
+
+      <para>
+         Flags that are used to request specific information from the user, or to
+         notify the user of their choices in an authentication situation.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.ASK_PASSWORD_ANONYMOUS_SUPPORTED</literal></term>
+         <listitem>
+           <simpara>operation supports anonymous users.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ASK_PASSWORD_NEED_DOMAIN</literal></term>
+         <listitem>
+           <simpara>operation requires a domain.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ASK_PASSWORD_NEED_PASSWORD</literal></term>
+         <listitem>
+           <simpara>operation requires a password.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ASK_PASSWORD_NEED_USERNAME</literal></term>
+         <listitem>
+           <simpara>operation requires a username.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ASK_PASSWORD_SAVING_SUPPORTED</literal></term>
+         <listitem>
+           <simpara>operation supports saving settings.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-app-info-constants">
+      <title id="gio-app-info-constants-title">Gio AppInfo Create Flags Constants</title>
+
+      <para>
+         Flags used when creating a <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.APP_INFO_CREATE_NONE</literal></term>
+         <listitem>
+           <simpara>No flags.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.APP_INFO_CREATE_NEEDS_TERMINAL</literal></term>
+         <listitem>
+           <simpara>Application opens in a terminal window. </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.APP_INFO_CREATE_SUPPORTS_URIS</literal></term>
+         <listitem>
+           <simpara>Application supports URI arguments. </simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-data-stream-byte-order-constants">
+      <title id="gio-data-stream-byte-order-constants-title">Gio Data Stream Byte Order Constants</title>
+
+      <para>
+         Used to ensure proper endianness of streaming data sources across various machine architectures.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN</literal></term>
+         <listitem>
+           <simpara>Selects Big Endian byte order.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.DATA_STREAM_BYTE_ORDER_HOST_ENDIAN</literal></term>
+         <listitem>
+           <simpara>Selects endianness based on host machine's architecture.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN</literal></term>
+         <listitem>
+           <simpara>Selects Little Endian byte order.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-data-stream-newline-type-constants">
+      <title id="gio-data-stream-newline-type-constants-title">Gio Data Stream Newline Type Constants</title>
+
+      <para>
+         Used when checking for or setting the line endings for a given file.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.DATA_STREAM_NEWLINE_TYPE_LF</literal></term>
+         <listitem>
+           <simpara>Selects "LF" line endings, common on most modern UNIX platforms.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.DATA_STREAM_NEWLINE_TYPE_CR</literal></term>
+         <listitem>
+           <simpara>Selects "CR" line endings.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.DATA_STREAM_NEWLINE_TYPE_CR_LF</literal></term>
+         <listitem>
+           <simpara>Selects "CR, LF" line ending, common on Microsoft Windows.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.DATA_STREAM_NEWLINE_TYPE_ANY</literal></term>
+         <listitem>
+           <simpara>Automatically try to handle any line ending type.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-emblem-origin-constants">
+      <title id="gio-emblem-origin-constants-title">Gio Emblem Origin Constants</title>
+
+      <para>
+         GEmblemOrigin is used to add information about the origin of the emblem to GEmblem.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.EMBLEM_ORIGIN_DEVICE</literal></term>
+         <listitem>
+           <simpara>Embleme adds device-specific information.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.EMBLEM_ORIGIN_LIVEMETADATA</literal></term>
+         <listitem>
+           <simpara>Emblem depicts live metadata, such as "readonly".</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.EMBLEM_ORIGIN_TAG</literal></term>
+         <listitem>
+           <simpara>Emblem comes from a user-defined tag, e.g. set by nautilus (in the future).</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.EMBLEM_ORIGIN_UNKNOWN</literal></term>
+         <listitem>
+           <simpara>Emblem of unknown origin.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-error-constants">
+      <title id="gio-error-constants-title">Gio Error Constants</title>
+
+      <para>
+        GIOError Error codes returned by GIO functions.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.ERROR_ALREADY_MOUNTED</literal></term>
+         <listitem>
+           <simpara>File is already mounted.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_BUSY</literal></term>
+         <listitem>
+           <simpara>File is busy.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_CANCELLED</literal></term>
+         <listitem>
+           <simpara>Operation was cancelled. See
+               <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>.
+           </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_CANT_CREATE_BACKUP</literal></term>
+         <listitem>
+           <simpara>Backup couldn't be created.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_CLOSED</literal></term>
+         <listitem>
+           <simpara>File was closed.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_EXISTS</literal></term>
+         <listitem>
+           <simpara>File already exists error.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_FAILED</literal></term>
+         <listitem>
+           <simpara>Generic error condition for when any operation fails.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_FAILED_HANDLED</literal></term>
+         <listitem>
+           <simpara>Operation failed and a helper program has already interacted with
+           the user. Do not display any error dialog. </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_FILENAME_TOO_LONG</literal></term>
+         <listitem>
+           <simpara>Filename is too many characters.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_HOST_NOT_FOUND</literal></term>
+         <listitem>
+           <simpara>Host couldn't be found (remote operations).</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_INVALID_ARGUMENT</literal></term>
+         <listitem>
+           <simpara>Invalid argument.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_INVALID_FILENAME</literal></term>
+         <listitem>
+           <simpara>Filename is invalid or contains invalid characters.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_IS_DIRECTORY</literal></term>
+         <listitem>
+           <simpara>File is a directory error.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_NOT_DIRECTORY</literal></term>
+         <listitem>
+           <simpara>File is not a directory.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_NOT_EMPTY</literal></term>
+         <listitem>
+           <simpara>File is a directory that isn't empty.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_NOT_FOUND</literal></term>
+         <listitem>
+           <simpara>File not found error.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_NOT_MOUNTABLE_FILE</literal></term>
+         <listitem>
+           <simpara>File cannot be mounted.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_NOT_MOUNTED</literal></term>
+         <listitem>
+           <simpara>File isn't mounted. </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_NOT_REGULAR_FILE</literal></term>
+         <listitem>
+           <simpara>File is not a regular file.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_NOT_SUPPORTED</literal></term>
+         <listitem>
+           <simpara>Operation not supported for the current backend.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_NOT_SYMBOLIC_LINK</literal></term>
+         <listitem>
+           <simpara>File is not a symbolic link.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_NO_SPACE</literal></term>
+         <listitem>
+           <simpara>No space left on drive. </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_PENDING</literal></term>
+         <listitem>
+           <simpara>Operations are still pending.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_PERMISSION_DENIED</literal></term>
+         <listitem>
+           <simpara>Permission denied.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_READ_ONLY</literal></term>
+         <listitem>
+           <simpara>File is read only. </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_TIMED_OUT</literal></term>
+         <listitem>
+           <simpara>Operation timed out. </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_TOO_MANY_LINKS</literal></term>
+         <listitem>
+           <simpara>File contains too many symbolic links. </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_TOO_MANY_OPEN_FILES</literal></term>
+         <listitem>
+           <simpara>The current process has too many files open and can't open any
+           more. Duplicate descriptors do count toward this limit. Since 2.20</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_WOULD_BLOCK</literal></term>
+         <listitem>
+           <simpara>Operation would block.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_WOULD_MERGE</literal></term>
+         <listitem>
+           <simpara>Operation would merge files.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_WOULD_RECURSE</literal></term>
+         <listitem>
+           <simpara>Operation would be recursive.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.ERROR_WRONG_ETAG</literal></term>
+         <listitem>
+           <simpara>File's Entity Tag was incorrect. </simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-file-attribute-constants">
+      <title id="gio-file-attribute-constants-title">Gio File Attribute Constants</title>
+
+      <para>
+         The file attributes.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_TYPE</literal></term>
+         <listitem>
+           <simpara>
+                "standard::type" A key in the "standard" namespace for storing file types. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32. The value for this key should contain a
+                <xref linkend="gio-file-type-constants" endterm="gio-file-type-constants-title"></xref>
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</literal></term>
+         <listitem>
+           <simpara>
+                "standard::is-hidden" A key in the "standard" namespace for checking if a file is hidden. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_IS_BACKUP</literal></term>
+         <listitem>
+           <simpara>
+                "standard::is-backup" A key in the "standard" namespace for checking if a file is a backup file. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</literal></term>
+         <listitem>
+           <simpara>
+                "standard::is-symlink" A key in the "standard" namespace for checking if the file is a symlink.
+                Typically the actual type is something else, if we followed the symlink to get the type. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</literal></term>
+         <listitem>
+           <simpara>
+                "standard::is-virtual" A key in the "standard" namespace for checking if a file is virtual. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_NAME</literal></term>
+         <listitem>
+           <simpara>
+                "standard::name" A key in the "standard" namespace for getting the name of the file.
+                The name is the on-disk filename which may not be in any known encoding,
+                and can thus not be generally displayed as is. Use
+                gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the name in a user
+                interface. Corresponding GFileAttributeType is gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</literal></term>
+         <listitem>
+           <simpara>
+                "standard::display-name" A key in the "standard" namespace for getting the display
+                name of the file. A display name is guaranteed to be in UTF8 and can thus be displayed
+                in the UI. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_EDIT_NAME</literal></term>
+         <listitem>
+           <simpara>
+                "standard::edit-name" A key in the "standard" namespace for edit name of the file.
+                An edit name is similar to the display name, but it is meant to be used when you want
+                to rename the file in the UI. The display name might contain information you don't
+                want in the new filename (such as "(invalid unicode)" if the filename was in an
+                invalid encoding). Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_COPY_NAME</literal></term>
+         <listitem>
+           <simpara>
+                "standard::copy-name" A key in the "standard" namespace for getting the copy
+                name of the file. The copy name is an optional version of the name. If available
+                it's always in UTF8, and corresponds directly to the original filename (only transcoded
+                to UTF8). This is useful if you want to copy the file to another filesystem that might
+                have a different encoding. If the filename is not a valid string in the encoding selected
+                for the filesystem it is in then the copy name will not be set. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_ICON</literal></term>
+         <listitem>
+           <simpara>
+                "standard::icon" A key in the "standard" namespace for getting the icon for the file. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a
+                <link linkend="class-gioicon"><classname>gio.Icon</classname></link>.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</literal></term>
+         <listitem>
+           <simpara>
+                "standard::content-type" A key in the "standard" namespace for getting the content type of the file. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING. The value for this key should contain a valid content type.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</literal></term>
+         <listitem>
+           <simpara>
+                "standard::fast-content-type" A key in the "standard" namespace for getting the fast
+                content type. The fast content type isn't as reliable as the regular one, as it
+                only uses the filename to guess it, but it is faster to calculate than the regular
+                content type. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_SIZE</literal></term>
+         <listitem>
+           <simpara>
+                "standard::size" A key in the "standard" namespace for getting the file's size (in bytes). Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT64.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</literal></term>
+         <listitem>
+           <simpara>
+                "standard::symlink-target" A key in the "standard" namespace for getting the target URI
+                for the file, in the case of gio.FILE_TYPE_SHORTCUT or gio.FILE_TYPE_MOUNTABLE files. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_SORT_ORDER</literal></term>
+         <listitem>
+           <simpara>
+                "standard::sort-order" A key in the "standard" namespace for setting the sort order of a file. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_INT32. An example use would be in file managers, which would use this
+                key to set the order files are displayed. Files with smaller sort order should be sorted first,
+                and files without sort order as if sort order was zero.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_ETAG_VALUE</literal></term>
+         <listitem>
+           <simpara>
+                "etag::value" A key in the "etag" namespace for getting the value of the file's entity tag. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_ID_FILE</literal></term>
+         <listitem>
+           <simpara>
+                "id::file" A key in the "id" namespace for getting a file identifier. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during listing files,
+                to avoid recursive directory scanning.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_ID_FILESYSTEM</literal></term>
+         <listitem>
+           <simpara>
+                "id::filesystem" A key in the "id" namespace for getting the file system identifier. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING. An example use would be during drag and
+                drop to see if the source and target are on the same filesystem (default to move) or not (default to copy).
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_READ</literal></term>
+         <listitem>
+           <simpara>
+                "access::can-read" A key in the "access" namespace for getting read privileges. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
+                if the user is able to read the file.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_WRITE</literal></term>
+         <listitem>
+           <simpara>
+                "access::can-write" A key in the "access" namespace for getting write privileges.Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
+                if the user is able to write to the file.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</literal></term>
+         <listitem>
+           <simpara>
+                "access::can-execute" A key in the "access" namespace for getting execution privileges. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
+                if the user is able to execute the file.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_DELETE</literal></term>
+         <listitem>
+           <simpara>
+                "access::can-delete" A key in the "access" namespace for checking deletion privileges. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
+                if the user is able to delete the file.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_TRASH</literal></term>
+         <listitem>
+           <simpara>
+                "access::can-trash" A key in the "access" namespace for checking trashing privileges. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
+                if the user is able to move the file to the trash.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_ACCESS_CAN_RENAME</literal></term>
+         <listitem>
+           <simpara>
+                "access::can-rename" A key in the "access" namespace for checking renaming privileges. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be <literal>True</literal>
+                if the user is able to rename the file.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</literal></term>
+         <listitem>
+           <simpara>
+                "mountable::can-mount" A key in the "mountable" namespace for checking if
+                a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</literal></term>
+         <listitem>
+           <simpara>
+                "mountable::can-unmount" A key in the "mountable" namespace for checking if a file
+                (of type G_FILE_TYPE_MOUNTABLE) is unmountable. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</literal></term>
+         <listitem>
+           <simpara>
+                "mountable::can-eject" A key in the "mountable" namespace for checking if a file
+                (of type G_FILE_TYPE_MOUNTABLE) can be ejected. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</literal></term>
+         <listitem>
+           <simpara>
+                "mountable::unix-device" A key in the "mountable" namespace for getting the unix device. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</literal></term>
+         <listitem>
+           <simpara>
+                "mountable::hal-udi" A key in the "mountable" namespace for getting the
+                HAL UDI for the mountable file. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TIME_MODIFIED</literal></term>
+         <listitem>
+           <simpara>
+                "time::modified" A key in the "time" namespace for getting the time the file was last modified. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was modified.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TIME_MODIFIED_USEC</literal></term>
+         <listitem>
+           <simpara>
+                "time::modified-usec" A key in the "time" namespace for getting the miliseconds
+                of the time the file was last modified. This should be used in conjunction
+                with G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_UINT32.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TIME_ACCESS</literal></term>
+         <listitem>
+           <simpara>
+                "time::access" A key in the "time" namespace for getting the time the file was last accessed. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last accessed.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TIME_ACCESS_USEC</literal></term>
+         <listitem>
+           <simpara>
+                "time::access-usec" A key in the "time" namespace for getting the microseconds of
+                the time the file was last accessed. This should be used in conjunction
+                with G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TIME_CHANGED</literal></term>
+         <listitem>
+           <simpara>
+                "time::changed" A key in the "time" namespace for getting the time the
+                file was last changed. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was last changed.
+                This corresponds to the traditional UNIX ctime.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TIME_CHANGED_USEC</literal></term>
+         <listitem>
+           <simpara>
+                "time::changed-usec" A key in the "time" namespace for getting the microseconds
+                of the time the file was last changed. This should be used in conjunction
+                with G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TIME_CREATED</literal></term>
+         <listitem>
+           <simpara>
+                "time::created" A key in the "time" namespace for getting the time the file was created. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the file was created.
+                This corresponds to the NTFS ctime.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TIME_CREATED_USEC</literal></term>
+         <listitem>
+           <simpara>
+                "time::created-usec" A key in the "time" namespace for getting the microseconds of the time the
+                file was created. This should be used in conjunction with G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_UNIX_DEVICE</literal></term>
+         <listitem>
+           <simpara>
+                "unix::device" A key in the "unix" namespace for getting the device id of the device the file
+                is located on (see stat() documentation). This attribute is only available
+                for UNIX file systems. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_UNIX_INODE</literal></term>
+         <listitem>
+           <simpara>
+                "unix::inode" A key in the "unix" namespace for getting the inode of the file. This attribute is only
+                available for UNIX file systems. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_UINT64.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_UNIX_MODE</literal></term>
+         <listitem>
+           <simpara>
+                "unix::mode" A key in the "unix" namespace for getting the mode of the file (e.g.
+                whether the file is a regular file, symlink, etc). See lstat() documentation.
+                This attribute is only available for UNIX file systems. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_UNIX_NLINK</literal></term>
+         <listitem>
+           <simpara>
+                "unix::nlink" A key in the "unix" namespace for getting the number of hard links
+                for a file. See lstat() documentation. This attribute is only available for UNIX
+                file systems. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_UNIX_UID</literal></term>
+         <listitem>
+           <simpara>
+                "unix::uid" A key in the "unix" namespace for getting the user ID for the file. This attribute
+                is only available for UNIX file systems. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_UNIX_GID</literal></term>
+         <listitem>
+           <simpara>
+                "unix::gid" A key in the "unix" namespace for getting the group ID for the file.
+                This attribute is only available for UNIX file systems. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_UNIX_RDEV</literal></term>
+         <listitem>
+           <simpara>
+                "unix::rdev" A key in the "unix" namespace for getting the device ID for the file
+                (if it is a special file). See lstat() documentation. This attribute is only available
+                for UNIX file systems. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</literal></term>
+         <listitem>
+           <simpara>
+                "unix::block-size" A key in the "unix" namespace for getting the block size for
+                the file system. This attribute is only available for UNIX file systems. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is gio.FILE_ATTRIBUTE_TYPE_UINT32.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_UNIX_BLOCKS</literal></term>
+         <listitem>
+           <simpara>
+                "unix::blocks" A key in the "unix" namespace for getting the number of blocks allocated
+                for the file. This attribute is only available for UNIX file systems. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_UINT64.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</literal></term>
+         <listitem>
+           <simpara>
+                "unix::is-mountpoint" A key in the "unix" namespace for checking if the file represents
+                a UNIX mount point. This attribute is <literal>True</literal> if the file is a UNIX mount point.
+                This attribute is only available for UNIX file systems. Corresponding
+                GFileAttributeType
+                is gio.FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_DOS_IS_ARCHIVE</literal></term>
+         <listitem>
+           <simpara>
+                "dos::is-archive" A key in the "dos" namespace for checking if the file's archive
+                flag is set. This attribute is <literal>True</literal> if the archive flag is set.
+                This attribute is only available for DOS file systems. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_DOS_IS_SYSTEM</literal></term>
+         <listitem>
+           <simpara>
+                "dos::is-system" A key in the "dos" namespace for checking if the file's backup
+                flag is set. This attribute is <literal>True</literal> if the backup flag is set.
+                This attribute is only available for DOS file systems. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref> is
+                G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_OWNER_USER</literal></term>
+         <listitem>
+           <simpara>
+                "owner::user" A key in the "owner" namespace for getting the user name
+                of the file's owner. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_OWNER_USER_REAL</literal></term>
+         <listitem>
+           <simpara>
+                "owner::user-real" A key in the "owner" namespace for getting the real name
+                of the user that owns the file. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref> is
+                G_FILE_ATTRIBUTE_TYPE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_OWNER_GROUP</literal></term>
+         <listitem>
+           <simpara>
+                "owner::group" A key in the "owner" namespace for getting the file owner's
+                group. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_THUMBNAIL_PATH</literal></term>
+         <listitem>
+           <simpara>
+                "thumbnail::path" A key in the "thumbnail" namespace for getting the path
+                to the thumbnail image. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_THUMBNAILING_FAILED</literal></term>
+         <listitem>
+           <simpara>
+                "thumbnail::failed" A key in the "thumbnail" namespace for checking if thumbnailing failed. This attribute
+                is <literal>True</literal> if thumbnailing failed. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref> is
+                G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_PREVIEW_ICON</literal></term>
+         <listitem>
+           <simpara>
+                "preview::icon" A key in the "preview" namespace for getting a
+                <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+                that can be used to get preview of the file. For example, it
+                may be a low resolution thumbnail without metadata. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref> is
+                G_FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a GIcon.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE</literal></term>
+         <listitem>
+           <simpara>
+                "filesystem::size" A key in the "filesystem" namespace for getting the total
+                size (in bytes) of the file system, used in
+                <methodname><link linkend="method-giofile--query-filesystem-info">query_filesystem_info</link></methodname>().
+                Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_UINT64.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_FREE</literal></term>
+         <listitem>
+           <simpara>
+                "filesystem::free" A key in the "filesystem" namespace for getting the number of bytes of free space left
+                on the file system. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_UINT64.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_TYPE</literal></term>
+         <listitem>
+           <simpara>
+                "filesystem::type" A key in the "filesystem" namespace for getting the file system's type. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_READONLY</literal></term>
+         <listitem>
+           <simpara>
+                "filesystem::readonly" A key in the "filesystem" namespace for checking if the
+                file system is read only. Is set to <literal>True</literal> if the file system
+                is read only. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_GVFS_BACKEND</literal></term>
+         <listitem>
+           <simpara>
+                "gvfs::backend" A key in the "gvfs" namespace that gets the name of the current GVFS backend in use. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_SELINUX_CONTEXT</literal></term>
+         <listitem>
+           <simpara>
+                "selinux::context" A key in the "selinux" namespace for getting the file's SELinux context. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+                Note that this attribute is only available if GLib has been built with SELinux support.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TRASH_ITEM_COUNT</literal></term>
+         <listitem>
+           <simpara>
+                "trash::item-count" A key in the "trash" namespace. When requested against "trash:///" returns the number
+                of (toplevel) items in the trash folder. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_UINT32.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW</literal></term>
+         <listitem>
+           <simpara>
+                "filesystem::use-preview" A key in the "filesystem" namespace for hinting a file manager
+                application whether it should preview (e.g. thumbnail) files on the file system.
+                The value for this key contain a GFilesystemPreviewType.
+            </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_STANDARD_DESCRIPTION</literal></term>
+         <listitem>
+           <simpara>
+                "standard::description" A key in the "standard" namespace for getting the description
+                of the file. The description is a utf8 string that describes the file, generally containing
+                the filename, but can also contain furter information. Example descriptions could be
+                "filename (on hostname)" for a remote file or "filename (in trash)" for a
+                file in the trash. This is useful for instance as the window title when
+                displaying a directory or for a bookmarks menu. Corresponding
+                <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                is G_FILE_ATTRIBUTE_TYPE_STRING.
+            </simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-file-attribute-type-constants">
+      <title id="gio-file-attribute-type-constants-title">Gio File Attribute Type Constants</title>
+
+      <para>
+         The data types for file attributes.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TYPE_BOOLEAN</literal></term>
+         <listitem>
+           <simpara>a boolean value.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING</literal></term>
+         <listitem>
+           <simpara>a zero terminated string of non-zero bytes.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TYPE_INT32</literal></term>
+         <listitem>
+           <simpara>a signed 4-byte/32-bit integer.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TYPE_INT64</literal></term>
+         <listitem>
+           <simpara>a signed 8-byte/64-bit integer.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TYPE_INVALID</literal></term>
+         <listitem>
+           <simpara>indicates an invalid or uninitalized type.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TYPE_OBJECT</literal></term>
+         <listitem>
+           <simpara>a <link linkend="class-gobject">gobject.GObject</link>.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TYPE_STRING</literal></term>
+         <listitem>
+           <simpara>a null terminated UTF8 string.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TYPE_UINT32</literal></term>
+         <listitem>
+           <simpara>an unsigned 4-byte/32-bit integer.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_TYPE_UINT64</literal></term>
+         <listitem>
+           <simpara>an unsigned 8-byte/64-bit integer.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-file-attribute-flags-constants">
+      <title id="gio-file-attribute-flags-constants-title">Gio File Attribute Flags Constants</title>
+
+      <para>
+         Flags specifying the behaviour of an attribute.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_INFO_NONE</literal></term>
+         <listitem>
+           <simpara>no flags set.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_INFO_COPY_WITH_FILE</literal></term>
+         <listitem>
+           <simpara>copy the attribute values when the file is copied.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED</literal></term>
+         <listitem>
+           <simpara>copy the attribute values when the file is moved.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-file-create-flags-constants">
+      <title id="gio-file-create-flags-constants-title">Gio File Create Flags Constants</title>
+
+      <para>
+         Flags used when an operation may create a file.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.FILE_CREATE_NONE</literal></term>
+         <listitem>
+           <simpara>No flags set.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_CREATE_PRIVATE</literal></term>
+         <listitem>
+           <simpara>Create a file that can only be accessed by the current user.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_CREATE_REPLACE_DESTINATION</literal></term>
+         <listitem>
+           <simpara>
+               Replace the destination as if it didn't exist before. Don't try
+               to keep any old permissions, replace instead of following links. This is
+               generally useful if you're doing a "copy over" rather than a "save new version of"
+               replace operation. You can think of it as "unlink destination" before writing
+               to it, although the implementation may not be exactly like that.
+           </simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-file-copy-flags-constants">
+      <title id="gio-file-copy-flags-constants-title">Gio File Copy Flags Constants</title>
+
+      <para>
+         Flags used when copying or moving files.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.FILE_COPY_NONE</literal></term>
+         <listitem>
+           <simpara>No flags set.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_COPY_OVERWRITE</literal></term>
+         <listitem>
+           <simpara>Overwrite any existing files.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_COPY_BACKUP</literal></term>
+         <listitem>
+           <simpara>Make a backup of any existing files.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_COPY_NOFOLLOW_SYMLINKS</literal></term>
+         <listitem>
+           <simpara>Don't follow symlinks.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_COPY_ALL_METADATA</literal></term>
+         <listitem>
+           <simpara>Copy all file metadata instead of just default set used for copy
+           (see <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>).</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_COPY_NO_FALLBACK_FOR_MOVE</literal></term>
+         <listitem>
+           <simpara>Don't use copy and delete fallback if native move not supported.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_COPY_TARGET_DEFAULT_PERMS</literal></term>
+         <listitem>
+           <simpara>Leaves target file with default perms, instead of setting the source file perms.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-file-monitor-flags-constants">
+      <title id="gio-file-monitor-flags-constants-title">Gio File Monitor Flags Constants</title>
+
+      <para>
+            Flags used to set what a
+            <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
+            will watch for.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.FILE_MONITOR_NONE</literal></term>
+         <listitem>
+           <simpara>No flags set.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_MONITOR_WATCH_MOUNTS</literal></term>
+         <listitem>
+           <simpara>Watch for mount events.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-file-query-info-flags-constants">
+      <title id="gio-file-query-info-flags-constants-title">Gio File Query Info Flags Constants</title>
+
+      <para>
+         Flags used when querying a
+         <link linkend="class-giofile"><classname>gio.FileInfo</classname></link>.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.FILE_QUERY_INFO_NONE</literal></term>
+         <listitem>
+           <simpara>No flags set.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS</literal></term>
+         <listitem>
+           <simpara>Don't follow symlinks.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-file-type-constants">
+      <title id="gio-file-type-constants-title">Gio File Type Constants</title>
+
+      <para>
+         Indicates the file's on-disk type.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.FILE_TYPE_DIRECTORY</literal></term>
+         <listitem>
+           <simpara>File handle represents a directory.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_TYPE_MOUNTABLE</literal></term>
+         <listitem>
+           <simpara>File is a mountable location.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_TYPE_REGULAR</literal></term>
+         <listitem>
+           <simpara>File handle represents a regular file.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_TYPE_SHORTCUT</literal></term>
+         <listitem>
+           <simpara>File is a shortcut (Windows systems).</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_TYPE_SPECIAL</literal></term>
+         <listitem>
+           <simpara>File is a "special" file, such as a socket, fifo, block device, or character device.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_TYPE_SYMBOLIC_LINK</literal></term>
+         <listitem>
+           <simpara>File handle represents a symbolic link (Unix systems).</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.FILE_TYPE_UNKNOWN</literal></term>
+         <listitem>
+           <simpara>File's type is unknown.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-mount-mount-flags-constants">
+      <title id="gio-mount-mount-flags-constants-title">Gio Mount Mount Flags Constants</title>
+
+      <para>
+         Flags used when mounting a mount.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.MOUNT_MOUNT_NONE</literal></term>
+         <listitem>
+           <simpara>No flags set.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-mount-unmount-flags-constants">
+      <title id="gio-mount-unmount-flags-constants-title">Gio Mount Unmount Flags Constants</title>
+
+      <para>
+         Flags used when unmounting a mount.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.MOUNT_UNMOUNT_NONE</literal></term>
+         <listitem>
+           <simpara>No flags set.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.MOUNT_UNMOUNT_FORCE</literal></term>
+         <listitem>
+           <simpara>Unmount even if there are outstanding file operations on the mount.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-mount-operation-result-constants">
+      <title id="gio-mount-operation-result-constants-title">Gio Mount Operation Result Constants</title>
+
+      <para>
+         returned as a result when a request for information is send by the mounting operation.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.MOUNT_OPERATION_HANDLED</literal></term>
+         <listitem>
+           <simpara>The request was fulfilled and the user specified data is now available.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.MOUNT_OPERATION_ABORTED</literal></term>
+         <listitem>
+           <simpara>The user requested the mount operation to be aborted.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.MOUNT_OPERATION_UNHANDLED</literal></term>
+         <listitem>
+           <simpara>The request was unhandled (i.e. not implemented).</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-password-save-constants">
+      <title id="gio-password-save-constants-title">Gio Password Save Constants</title>
+
+      <para>
+         is used to indicate the lifespan of a saved password.
+      </para>
+      <para>
+         Gvfs stores passwords in the Gnome keyring when this flag allows it to,
+         and later retrieves it again from there.
+      </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gio.PASSWORD_SAVE_FOR_SESSION</literal></term>
+         <listitem>
+           <simpara>save a password for the session.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.PASSWORD_SAVE_NEVER</literal></term>
+         <listitem>
+           <simpara>never save a password.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gio.PASSWORD_SAVE_PERMANENTLY</literal></term>
+         <listitem>
+           <simpara>save a password permanently.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+  </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygio-datainputstream.xml b/docs/reference/pygio-datainputstream.xml
new file mode 100644 (file)
index 0000000..403bb3e
--- /dev/null
@@ -0,0 +1,799 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giodatainputstream">
+    <refnamediv>
+        <refname>gio.DataInputStream</refname>
+        <refpurpose>Data Input Stream</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.DataInputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-giobufferedinputstream">gio.BufferedInputStream</link></classname></ooclass>
+
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-giodatainputstream">gio.DataInputStream</link></methodname>
+       <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+    </constructorsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--get-byte-order">get_byte_order</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--get-newline-type">get_newline_type</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--read-byte">read_byte</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--read-int16">read_int16</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--read-int32">read_int32</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--read-int64">read_int64</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--read-line">read_line</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--read-line-async">read_line_async</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--read-line-finish">read_line_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--read-uint16">read_uint16</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--read-uint32">read_uint32</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--read-uint64">read_uint64</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--read-until">read_until</link></methodname>
+        <methodparam><parameter role="keyword">stop_chars</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--read-until-async">read_until_async</link></methodname>
+        <methodparam><parameter role="keyword">stop_chars</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--read-until-finish">read_until_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--set-byte-order">set_byte_order</link></methodname>
+        <methodparam><parameter role="keyword">order</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodatainputstream--set-newline-type">set_newline_type</link></methodname>
+        <methodparam><parameter role="keyword">type</parameter></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+    +-- <link linkend="class-giofilterinputstream">gio.FilterInputStream</link>
+      +-- <link linkend="class-giobufferedinputstream">gio.BufferedInputStream</link>
+        +-- <link linkend="class-giodatainputstream">gio.DataInputStream</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1 id="properties-giodatainputstream">
+        <title>gio.DataInputStream Properties</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"byte-order"</entry>
+                            <entry>Read - Write</entry>
+                            <entry>The byte order. Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"newline-type"</entry>
+                            <entry>Read - Write</entry>
+                            <entry>The accepted types of line ending. Default value: gio.DATA_STREAM_NEWLINE_TYPE_LF.</entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giodatainputstream"><classname>gio.DataInputStream</classname></link>
+            implements <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+            and includes functions for reading structured data directly from a binary input stream.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giodatainputstream">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.DataInputStream</methodname>
+            <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><parameter>base_stream</parameter>&nbsp;:</term>
+                <listitem><simpara>a
+                <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giodatainputstream"><classname>gio.DataInputStream</classname></link>
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new <link linkend="class-giodatainputstream"><classname>gio.DataInputStream</classname></link>
+            from the given base_stream.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giodatainputstream--get-byte-order">
+            <title>gio.DataInputStream.get_byte_order</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_byte_order</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the stream's current
+                    <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref>.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_byte_order</methodname>() method gets the byte
+                order for the data input stream.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--get-newline-type">
+            <title>gio.DataInputStream.get_newline_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_newline_type</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><xref linkend="gio-data-stream-newline-type-constants" endterm="gio-data-stream-newline-type-constants-title"></xref>
+                    for the given stream.                    
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_newline_type</methodname>() method gets the current
+                newline type for the stream.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--read-byte">
+            <title>gio.DataInputStream.read_byte</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_byte</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>an unsigned 8-bit/1-byte value read from the
+                    stream or 0 if an error occurred.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_byte</methodname>() method reads an unsigned 8-bit/1-byte value from stream.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--read-int16">
+            <title>gio.DataInputStream.read_int16</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_int16</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a signed 16-bit/2-byte value read from stream or 0 if an error occurred.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_int16</methodname>() method reads a 16-bit/2-byte value from stream.
+            </para>
+            <para>
+                In order to get the correct byte order for this read operation, see
+                <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
+                and
+                <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--read-int32">
+            <title>gio.DataInputStream.read_int32</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_int32</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a signed 32-bit/4-byte value read from the stream
+                    or 0 if an error occurred.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_int32</methodname>() method reads a signed 32-bit/4-byte value from stream.
+            </para>
+            <para>
+                In order to get the correct byte order for this read operation, see
+                <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
+                and
+                <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--read-int64">
+            <title>gio.DataInputStream.read_int64</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_int64</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a signed 64-bit/8-byte value read from the stream
+                    or 0 if an error occurred.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_int64</methodname>() method reads a signed 64-bit/8-byte value from stream.
+            </para>
+            <para>
+                In order to get the correct byte order for this read operation, see
+                <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
+                and
+                <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--read-line">
+            <title>gio.DataInputStream.read_line</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_line</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string with the line that was read in (without the newlines).
+                    Set length to a gsize to get the length of the read line. On an error, it will return
+                    <literal>None</literal> and error will be set. If there's no content to read, it
+                    will still return <literal>None</literal>, but error won't be set.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_line</methodname>() reads a line from the data input stream.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can
+                be cancelled by triggering the cancellable object from another thread.
+                If the operation was cancelled, the error gio.ERROR_CANCELLED will be
+                returned. If an operation was partially finished when the operation was
+                cancelled the partial result will be returned, without an error.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--read-line-async">
+            <title>gio.DataInputStream.read_line_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_line_async</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_line_async</methodname>() method is the asynchronous version of
+                <methodname><link linkend="method-giodatainputstream--read-line">gio.DataInputStream.read_line</link></methodname>().
+                It is an error to have two outstanding calls to this function.
+            </para>
+            <para>
+                For the synchronous version of this function, see
+                <methodname><link linkend="method-giodatainputstream--read-line">gio.DataInputStream.read_line</link></methodname>().
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was
+                cancelled, the error gio.ERROR_CANCELLED will be set
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--read-line-finish">
+            <title>gio.DataInputStream.read_line_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_line_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string with the line that was read in (without the newlines).
+                    On an error, it will return <literal>None</literal> and error will be set.
+                    If there's no content to read, it will still return <literal>None</literal>,
+                    but error won't be set.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_line_finish</methodname>() method finishes an asynchronous
+                file append operation started with
+                <methodname><link linkend="method-giodatainputstream--read-line-async">gio.DataInputStream.read_line_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--read-uint16">
+            <title>gio.DataInputStream.read_uint16</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_uint16</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a signed 16-bit/2-byte value read from stream or 0 if an error occurred.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_uint16</methodname>() method reads a 16-bit/2-byte value from stream.
+            </para>
+            <para>
+                In order to get the correct byte order for this read operation, see
+                <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
+                and
+                <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--read-uint32">
+            <title>gio.DataInputStream.read_uint32</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_uint32</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a signed 32-bit/4-byte value read from the stream
+                    or 0 if an error occurred.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_uint32</methodname>() method reads a signed 32-bit/4-byte value from stream.
+            </para>
+            <para>
+                In order to get the correct byte order for this read operation, see
+                <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
+                and
+                <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--read-uint64">
+            <title>gio.DataInputStream.read_uint64</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_uint64</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a signed 64-bit/8-byte value read from the stream
+                    or 0 if an error occurred.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_uint64</methodname>() method reads a signed 64-bit/8-byte value from stream.
+            </para>
+            <para>
+                In order to get the correct byte order for this read operation, see
+                <methodname><link linkend="method-giodatainputstream--get-byte_order">gio.DataInputStream.get_byte_order</link></methodname>()
+                and
+                <methodname><link linkend="method-giodatainputstream--set-byte_order">gio.DataInputStream.set_byte_order</link></methodname>().
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--read-until">
+            <title>gio.DataInputStream.read_until</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_until</methodname>
+                <methodparam><parameter role="keyword">stop_chars</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">stop_chars</parameter>&nbsp;:</term>
+                  <listitem><simpara>characters to terminate the read.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string with the data that was read before encountering
+                    any of the stop characters. This function will return NULL on an error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_until</methodname>() reads a string from the data input
+                stream, up to the first occurrence of any of the stop characters.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--read-until-async">
+            <title>gio.DataInputStream.read_until_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_until_async</methodname>
+                <methodparam><parameter role="keyword">stop_chars</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">stop_chars</parameter>&nbsp;:</term>
+                  <listitem><simpara>characters to terminate the read.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_until_async</methodname>() method it's the asynchronous version of
+                <methodname><link linkend="method-giodatainputstream--read-until">gio.DataInputStream.read_until</link></methodname>().
+                It is an error to have two outstanding calls to this function.
+            </para>
+            <para>
+                For the synchronous version of this function, see
+                <methodname><link linkend="method-giodatainputstream--read-until">gio.DataInputStream.read_until</link></methodname>().
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was
+                cancelled, the error gio.ERROR_CANCELLED will be set
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giodatainputstream--read-until-finish">gio.DataInputStream.read_until_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--read-until-finish">
+            <title>gio.DataInputStream.read_until_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_until_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string with the data that was read before encountering
+                    any of the stop characters. This function will return <literal>None</literal> on an error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_until_finish</methodname>() method finishes an asynchronous
+                file append operation started with
+                <methodname><link linkend="method-giodatainputstream--read-until-async">gio.DataInputStream.read_until_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--set-byte-order">
+            <title>gio.DataInputStream.set_byte_order</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_byte_order</methodname>
+                <methodparam><parameter role="keyword">order</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">order</parameter>&nbsp;:</term>
+                  <listitem><simpara>a
+                  <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref> to set.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_byte_order</methodname>() method sets the byte order for
+                the given stream. All subsequent reads from the stream will be read in the given order.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodatainputstream--set-newline-type">
+            <title>gio.DataInputStream.set_newline_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_newline_type</methodname>
+                <methodparam><parameter role="keyword">type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">type</parameter>&nbsp;:</term>
+                  <listitem><simpara>a
+                  <xref linkend="gio-data-stream-newline-type-constants" endterm="gio-data-stream-newline-type-constants-title"></xref> to set.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_newline_type</methodname>() method sets the newline type for the stream.
+            </para>
+            <note>
+                Note that using gio.DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a
+                read chunk ends in "CR" we must read an additional byte to know if this is
+                "CR" or "CR LF", and this might block if there is no more data availible.
+            </note>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-dataoutputstream.xml b/docs/reference/pygio-dataoutputstream.xml
new file mode 100644 (file)
index 0000000..4cbc904
--- /dev/null
@@ -0,0 +1,504 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giodataoutputstream">
+    <refnamediv>
+        <refname>gio.DataOutputStream</refname>
+        <refpurpose>Data Output Stream</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.DataOutputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-giobufferedoutputstream">gio.BufferedOutputStream</link></classname></ooclass>
+
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-giodataoutputstream">gio.DataOutputStream</link></methodname>
+       <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+    </constructorsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodataoutputstream--get-byte-order">get_byte_order</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodataoutputstream--put-byte">put_byte</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodataoutputstream--put-int16">put_int16</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodataoutputstream--put-int32">put_int32</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodataoutputstream--put-int64">put_int64</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodataoutputstream--put-string">put_string</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodataoutputstream--put-uint16">put_uint16</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodataoutputstream--put-uint32">put_uint32</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodataoutputstream--put-uint64">put_uint64</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodataoutputstream--set-byte-order">set_byte_order</link></methodname>
+        <methodparam><parameter role="keyword">order</parameter></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+    +-- <link linkend="class-giofilteroutputstream">gio.FilterOutputStream</link>
+      +-- <link linkend="class-giobufferedoutputstream">gio.BufferedOutputStream</link>
+        +-- <link linkend="class-giodataoutputstream">gio.DataOutputStream</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1 id="properties-giodataoutputstream">
+        <title>gio.DataOutputStream Properties</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"byte-order"</entry>
+                            <entry>Read - Write</entry>
+                            <entry>Determines the byte ordering that is used when writing
+                           multi-byte entities (such as integers) to the stream.
+                           Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giodataoutputstream"><classname>gio.DataOutputStream</classname></link>
+            implements <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+            and includes functions for writing data directly to an output stream.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giodataoutputstream">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.DataOutputStream</methodname>
+            <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><parameter>base_stream</parameter>&nbsp;:</term>
+                <listitem><simpara>a
+                <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giodataoutputstream"><classname>gio.DataOutputStream</classname></link>
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new <link linkend="class-giodataoutputstream"><classname>gio.DataOutputStream</classname></link>
+            from the given base_stream.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giodataoutputstream--get-byte-order">
+            <title>gio.DataOutputStream.get_byte_order</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_byte_order</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the stream's current
+                    <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref>.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_byte_order</methodname>() method gets the byte
+                order for the stream.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodataoutputstream--put-byte">
+            <title>gio.DataOutputStream.put_byte</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>put_byte</methodname>
+                <methodparam><parameter role="keyword">data</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+                  <listitem><simpara>a char.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if data was successfully added to the stream. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>put_byte</methodname>() method puts a byte into the output stream.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodataoutputstream--put-int16">
+            <title>gio.DataOutputStream.put_int16</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>put_int16</methodname>
+                <methodparam><parameter role="keyword">data</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+                  <listitem><simpara>a gint16.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if data was successfully added to the stream. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>put_int16</methodname>() method puts a signed 16-bit integer into the output stream.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodataoutputstream--put-int32">
+            <title>gio.DataOutputStream.put_int32</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>put_int32</methodname>
+                <methodparam><parameter role="keyword">data</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+                  <listitem><simpara>a gint32.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>put_int32</methodname>() method puts a signed 32-bit integer into the output stream.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodataoutputstream--put-int64">
+            <title>gio.DataOutputStream.put_int64</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>put_int64</methodname>
+                <methodparam><parameter role="keyword">data</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+                  <listitem><simpara>a gint64.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>put_int64</methodname>() method puts a signed 64-bit integer into the output stream.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodataoutputstream--put-string">
+            <title>gio.DataOutputStream.put_string</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>put_string</methodname>
+                <methodparam><parameter role="keyword">str</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">str</parameter>&nbsp;:</term>
+                  <listitem><simpara>a string.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if string was successfully added to the stream. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>put_string</methodname>() method puts a string into the output stream.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodataoutputstream--put-uint16">
+            <title>gio.DataOutputStream.put_uint16</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>put_uint16</methodname>
+                <methodparam><parameter role="keyword">data</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+                  <listitem><simpara>a guint16.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if data was successfully added to the stream. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>put_uint16</methodname>() method puts an unsigned 16-bit integer into the output stream.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodataoutputstream--put-uint32">
+            <title>gio.DataOutputStream.put_uint32</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>put_uint32</methodname>
+                <methodparam><parameter role="keyword">data</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+                  <listitem><simpara>a guint32.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>put_uint32</methodname>() method puts an unsigned 32-bit integer into the output stream.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodataoutputstream--put-uint64">
+            <title>gio.DataOutputStream.put_uint64</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>put_uint64</methodname>
+                <methodparam><parameter role="keyword">data</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+                  <listitem><simpara>a guint64.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>put_uint64</methodname>() method puts an unsigned 64-bit integer into the output stream.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodataoutputstream--set-byte-order">
+            <title>gio.DataOutputStream.set_byte_order</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_byte_order</methodname>
+                <methodparam><parameter role="keyword">order</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">order</parameter>&nbsp;:</term>
+                  <listitem><simpara>a
+                  <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref> to set.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_byte_order</methodname>() method sets the byte order for
+                the given stream. All subsequent reads from the stream will be read in the given order.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-drive.xml b/docs/reference/pygio-drive.xml
new file mode 100644 (file)
index 0000000..73766cd
--- /dev/null
@@ -0,0 +1,546 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giodrive">
+    <refnamediv>
+        <refname>gio.Drive</refname>
+        <refpurpose>Virtual File System drive management.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.Drive</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--can-eject">can_eject</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--can-poll-for-media">can_poll_for_media</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--eject">eject</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--eject-finish">eject_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--enumerate-identifiers">enumerate_identifiers</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--get-icon">get_icon</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--get-identifier">get_identifier</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--get-name">get_name</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--get-volumes">get_volumes</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--has-media">has_media</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--has-volumes">has_volumes</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--is-media-check-automatic">is_media_check_automatic</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--is-media-removable">is_media_removable</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--poll-for-media">poll_for_media</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giodrive--poll-for-media-finish">poll_for_media_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+  +-- <link linkend="class-giodrive">gio.Drive</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Prerequisites</title>
+        <para>
+            <link linkend="class-giodrive"><classname>gio.Drive</classname></link> requires
+            <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+            - this represent a piece of hardware connected to the machine. Its generally
+            only created for removable hardware or hardware with removable media. 
+        </para>
+        <para>
+            <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+            is a container class for GVolume objects that stem from the same piece of media.
+            As such, <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+            abstracts a drive with (or without) removable media and provides operations for
+            querying whether media is available, determing whether media change is automatically
+            detected and ejecting the media. 
+        </para>
+        <para>
+            If the <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+            reports that media isn't automatically detected, one can poll for media; typically
+            one should not do this periodically as a poll for media operation is potententially
+            expensive and may spin up the drive creating noise. 
+        </para>
+        <para>
+            For porting from GnomeVFS note that there is no equivalent of
+            <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+            in that API.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+        
+        <refsect2 id="method-giodrive--can-eject">
+            <title>gio.Drive.can_eject</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>can_eject</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the drive can be ejected,
+                    <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>can_eject</methodname>() method checks if a drive can be ejected.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giodrive--can-poll-for-media">
+            <title>gio.Drive.can_poll_for_media</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>can_poll_for_media</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the drive can be polled
+                    for media changes, <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>can_poll_for_media</methodname>() method checks if a drive
+                can be polled for media changes.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodrive--eject">
+            <title>gio.Drive.eject</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>eject</methodname>
+                <methodparam>
+                    <parameter role="keyword">callback</parameter>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
+                </methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+                  <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+                  <listitem><simpara>flags affecting the unmount if required for eject.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>Optional
+                  <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                  object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+                  <listitem><simpara>The data to pass to callback function.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>eject</methodname>() method asynchronously ejects a drive. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giodrive--eject-finish">gio.Drive.eject_finish</link></methodname>()
+                to obtain the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodrive--eject-finish">
+            <title>gio.Drive.eject_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>eject_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the drive has been ejected
+                    successfully, <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>eject_finish</methodname>() method finishes ejecting a drive.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodrive--enumerate-identifiers">
+            <title>gio.Drive.enumerate_identifiers</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>enumerate_identifiers</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a list of strings containing kinds of identifiers.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>enumerate_identifiers</methodname>() method gets the kinds
+                of identifiers that drive has. Use
+                <methodname><link linkend="method-giodrive--get-identifier">gio.Drive.get_identifier</link></methodname>()
+                to obtain the identifiers themselves.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giodrive--get-icon">
+            <title>gio.Drive.get_icon</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_icon</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+                    for the drive.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_icon</methodname>() method gets the icon for drive.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giodrive--get-identifier">
+            <title>gio.Drive.get_identifier</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_identifier</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A string containing the requested identfier, or
+                    <literal>None</literal> if the
+                    <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+                    doesn't have this kind of identifier. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_identifier</methodname>() method gets the identifier of
+                the given kind for drive.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giodrive--get-name">
+            <title>gio.Drive.get_name</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_name</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A string containing drive's name.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_name</methodname>() method gets the name of drive.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giodrive--get-volumes">
+            <title>gio.Drive.get_volumes</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_volumes</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A list containing any
+                    <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                    objects on the given drive. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_volumes</methodname>() method get a list of mountable
+                volumes for drive. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodrive--has-media">
+            <title>gio.Drive.has_media</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>has_media</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if drive has media,
+                    <literal>False</literal> otherwise.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>has_media</methodname>() method checks if the drive
+                has media. Note that the OS may not be polling the drive for media changes; see
+                <methodname><link linkend="method-giodrive--is-media-check-automatic">gio.Drive.is_media_check_automatic</link></methodname>()
+                for more details.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodrive--has-volumes">
+            <title>gio.Drive.has_volumes</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>has_volumes</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if drive contains volumes,
+                    <literal>False</literal> otherwise.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>has_volumes</methodname>() method check if drive has any mountable volumes.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodrive--is-media-check-automatic">
+            <title>gio.Drive.is_media_check_automatic</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>is_media_check_automatic</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if drive is capabable
+                    of automatically detecting media changes,
+                    <literal>False</literal> otherwise.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>is_media_check_automatic</methodname>() method checks if
+                drive is capabable of automatically detecting media changes.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodrive--is-media-removable">
+            <title>gio.Drive.is_media_removable</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>is_media_removable</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if drive supports removable media,
+                    <literal>False</literal> otherwise.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>is_media_removable</methodname>() method checks if the
+                drive supports removable media.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodrive--poll-for-media">
+            <title>gio.Drive.poll_for_media</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>poll_for_media</methodname>
+                <methodparam>
+                    <parameter role="keyword">callback</parameter>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
+                </methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+                  <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>Optional
+                  <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                  object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+                  <listitem><simpara>The data to pass to callback function.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>poll_for_media</methodname>() method asynchronously polls
+                drive to see if media has been inserted or removed. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giodrive--poll-for-media-finish">gio.Drive.poll_for_media_finish</link></methodname>()
+                to obtain the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giodrive--poll-for-media-finish">
+            <title>gio.Drive.poll_for_media_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>poll_for_media_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the drive has been poll_for_mediaed
+                    successfully, <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>poll_for_media_finish</methodname>() method finishes
+                an operation started with
+                <methodname><link linkend="method-giodrive--poll-for-media">gio.Drive.poll_for_media</link></methodname>()
+                on a drive.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-emblem.xml b/docs/reference/pygio-emblem.xml
new file mode 100644 (file)
index 0000000..032b0ff
--- /dev/null
@@ -0,0 +1,232 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioemblem">
+    <refnamediv>
+        <refname>gio.Emblem</refname>
+        <refpurpose>An object for emblems.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.Emblem</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+        <ooclass><classname><link linkend="class-gioicon">gio.Icon</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-gioemblem">gio.Emblem</link></methodname>
+       <methodparam><parameter role="keyword">icon</parameter></methodparam>
+       <methodparam><parameter role="keyword">origin</parameter><initializer><literal>gio.EMBLEM_ORIGIN_UNKNOWN</literal></initializer></methodparam>
+    </constructorsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioemblem--get-icon">get_icon</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioemblem--get-origin">get_origin</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+<methodsynopsis language="python">
+    <methodname><link linkend="function-gio--emblem-new-with-origin">gio.emblem_new_with_origin</link></methodname>
+    <methodparam><parameter role="keyword">icon</parameter></methodparam>
+    <methodparam><parameter role="keyword">origin</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-gioemblem">gio.Emblem</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Implemented Interfaces</title>
+        <para>
+            <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
+            implements
+            <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1 id="properties-gioemblem">
+        <title>gio.Emblem Properties</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"icon"</entry>
+                            <entry>Read - Write - Construct Only</entry>
+                            <entry>The actual icon of the emblem.</entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"origin"</entry>
+                            <entry>Read - Write - Construct Only</entry>
+                            <entry>Tells which origin the emblem is derived from.</entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            The <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
+            class is an implementation of <classname><link linkend="class-gioicon">gio.Icon</link></classname>
+            that supports having an emblem, which is an icon with additional properties.
+            It can then be added to a
+            <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>.
+        </para>
+        <para>
+            Currently, only metainformation about the emblem's origin is supported.
+            More may be added in the future.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-gioemblem">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.Emblem</methodname>
+            <methodparam><parameter role="keyword">icon</parameter></methodparam>
+            <methodparam><parameter role="keyword">origin</parameter><initializer><literal>gio.EMBLEM_ORIGIN_UNKNOWN</literal></initializer></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><parameter>icon</parameter>&nbsp;:</term>
+                <listitem><simpara>a
+                <link linkend="class-gioicon"><classname>gio.Icon</classname></link> containing the icon.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><parameter>origin</parameter>&nbsp;:</term>
+                <listitem><simpara>
+                <link linkend="gio-emblem-origin-constants">origin</link> of the emblem.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+
+        <note>
+          Parameter <parameter>origin</parameter> is available since PyGObject 2.20.
+        </note>
+    
+        <para>
+            Creates a new <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link> for icon.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-gioemblem--get-icon">
+            <title>gio.Emblem.get_icon</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_icon</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-gioicon"><classname>gio.Icon</classname></link>.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_icon</methodname>() method gives back the icon from emblem.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioemblem--get-origin">
+            <title>gio.Emblem.get_origin</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_origin</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the origin of the emblem.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_origin</methodname>() method gets the origin of the emblem.
+            </para>
+        </refsect2>
+    </refsect1>
+    
+    <refsect1>
+        <title>Functions</title>
+
+        <refsect2 id="function-gio--emblem-new-with-origin">
+            <title>gio.emblem_new_with_origin</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>emblem_new_with_origin</methodname>
+                <methodparam><parameter role="keyword">icon</parameter></methodparam>
+                <methodparam><parameter role="keyword">origin</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>origin</parameter>&nbsp;:</term>
+                    <listitem><simpara>a <xref linkend="gio-emblem-origin-constants" endterm="gio-emblem-origin-constants-title"></xref>
+                    defining the emblem's origin.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <note>
+              While this method is not deprecated, with 2.20 and up it is recommended
+              to use the constructor instead.
+            </note>
+
+
+            <para>
+                The <methodname>emblem_new_with_origin</methodname>() function creates
+                a new emblem for icon.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-emblemedicon.xml b/docs/reference/pygio-emblemedicon.xml
new file mode 100644 (file)
index 0000000..9b5ef8a
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioemblemedicon">
+    <refnamediv>
+        <refname>gio.EmblemedIcon</refname>
+        <refpurpose>Icon with emblems.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.EmblemedIcon</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+        <ooclass><classname><link linkend="class-gioicon">gio.Icon</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-gioemblemedicon">gio.EmblemedIcon</link></methodname>
+       <methodparam><parameter role="keyword">icon</parameter></methodparam>
+        <methodparam><parameter role="keyword">emblem</parameter></methodparam>
+    </constructorsynopsis>
+    
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioemblemedicon--add-emblem">add_emblem</link></methodname>
+        <methodparam><parameter role="keyword">emblem</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioemblemedicon--get-icon">get_icon</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-gioemblemedicon">gio.EmblemedIcon</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Implemented Interfaces</title>
+        <para>
+            <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>
+            implements
+            <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            The <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>
+            class is an implementation of <classname><link linkend="class-gioicon">gio.Icon</link></classname>
+            that supports adding an emblem to an icon. Adding multiple emblems to an icon is ensured via
+            <methodname><link linkend="method-gioemblemedicon--add-emblem">gio.EmblemedIcon.add_emblem</link></methodname>().
+        </para>
+        <para>
+            Note that
+            <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>
+            allows no control over the position of the emblems. See also
+            <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
+            for more information.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-gioemblemedicon">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.EmblemedIcon</methodname>
+            <methodparam><parameter role="keyword">icon</parameter></methodparam>
+            <methodparam><parameter role="keyword">emblem</parameter></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><parameter>icon</parameter>&nbsp;:</term>
+                <listitem><simpara>a
+                <link linkend="class-gioicon"><classname>gio.Icon</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><parameter>emblem</parameter>&nbsp;:</term>
+                <listitem><simpara>a
+                <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-gioicon"><classname>gio.Icon</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+            for icon with the emblem emblem.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-gioemblemedicon--add-emblem">
+            <title>gio.EmblemedIcon.add_emblem</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>add_emblem</methodname>
+                <methodparam><parameter role="keyword">emblem</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>emblem</parameter>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>add_emblem</methodname>() method adds emblem to the
+                list of <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>s.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioemblemedicon--get-icon">
+            <title>gio.EmblemedIcon.get_icon</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_icon</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+                    that is owned by emblemed.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_icon</methodname>() method gets the main icon for emblemed.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-file.xml b/docs/reference/pygio-file.xml
new file mode 100644 (file)
index 0000000..ac85840
--- /dev/null
@@ -0,0 +1,4534 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofile">
+    <refnamediv>
+        <refname>gio.File</refname>
+        <refpurpose>File and Directory Handling.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.File</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-giofile">gio.File</link></methodname>
+       <methodparam><parameter role="keyword">commandline</parameter></methodparam>
+        <methodparam><parameter role="keyword">path</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">uri</parameter><initializer>None</initializer></methodparam>
+    </constructorsynopsis>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--append-to">append_to</link></methodname>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--append-to-async">append_to_async</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--append-to-finish">append_to_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--copy">copy</link></methodname>
+        <methodparam><parameter role="keyword">destination</parameter></methodparam>
+        <methodparam><parameter role="keyword">progress_callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--copy-async">copy_async</link></methodname>
+        <methodparam><parameter role="keyword">destination</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">progress_callback</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">progress_callback_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--copy-attributes">copy_attributes</link></methodname>
+        <methodparam><parameter role="keyword">destination</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--copy-finish">copy_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--create">create</link></methodname>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--create-async">create_async</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--create-finish">create_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--delete">delete</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--dup">dup</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--eject-mountable">eject_mountable</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--eject-mountable-finish">eject_mountable_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--enumerate-children">enumerate_children</link></methodname>
+        <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--enumerate-children-async">enumerate_children_async</link></methodname>
+        <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--enumerate-children-finish">enumerate_children_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--equal">equal</link></methodname>
+        <methodparam><parameter role="keyword">file2</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--find-enclosing-mount">find_enclosing_mount</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--find-enclosing-mount-async">find_enclosing_mount_async</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--find-enclosing-mount-finish">find_enclosing_mount_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--get-basename">get_basename</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--get-child">get_child</link></methodname>
+        <methodparam><parameter role="keyword">name</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--get-child-for-display-name">get_child_for_display_name</link></methodname>
+        <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--get-parent">get_parent</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--get-parse-name">get_parse_name</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--get-path">get_path</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--get-relative-path">get_relative_path</link></methodname>
+        <methodparam><parameter role="keyword">descendant</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--get-uri">get_uri</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--get-uri-scheme">get_uri_scheme</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--has-prefix">has_prefix</link></methodname>
+        <methodparam><parameter role="keyword">prefix</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--has-uri-scheme">has_uri_scheme</link></methodname>
+        <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--is-native">is_native</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--load-contents">load_contents</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--load-contents-async">load_contents_async</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--load-contents-finish">load_contents_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--make-directory">make_directory</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--make-directory-with-parents">make_directory_with_parents</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--make-symbolic-link">make_symbolic_link</link></methodname>
+        <methodparam><parameter role="keyword">symlink_value</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--monitor">monitor</link></methodname>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--monitor-directory">monitor_directory</link></methodname>
+        <methodparam><parameter role="keyword">flags</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--monitor-file">monitor_file</link></methodname>
+        <methodparam><parameter role="keyword">flags</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--mount-enclosing-volume">mount_enclosing_volume</link></methodname>
+        <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.MOUNT_MOUNT_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--mount-enclosing-volume-finish">mount_enclosing_volume_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--mount-mountable">mount_mountable</link></methodname>
+        <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.MOUNT_MOUNT_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--mount-mountable-finish">mount_mountable_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--move">move</link></methodname>
+        <methodparam><parameter role="keyword">destination</parameter></methodparam>
+        <methodparam><parameter role="keyword">progress_callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--query-default-handler">query_default_handler</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--query-exists">query_exists</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--query-file-type">query_file_type</link></methodname>
+        <methodparam><parameter role="keyword">flags</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--query-filesystem-info">query_filesystem_info</link></methodname>
+        <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--query-filesystem-info-async">query_filesystem_info_async</link></methodname>
+        <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--query-filesystem-info-finish">query_filesystem_info_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--query-info">query_info</link></methodname>
+        <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--query-info-async">query_info_async</link></methodname>
+        <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--query-info-finish">query_info_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--query-settable-attributes">query_settable_attributes</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--query-writable-namespace">query_writable_namespace</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--read">read</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--read-async">read_async</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--read-finish">read_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--replace">replace</link></methodname>
+        <methodparam><parameter role="keyword">etag</parameter></methodparam>
+        <methodparam><parameter role="keyword">make_backup</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--replace-async">replace_async</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--replace-contents">replace_contents</link></methodname>
+        <methodparam><parameter role="keyword">contents</parameter></methodparam>
+        <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--replace-contents-async">replace_contents_async</link></methodname>
+        <methodparam><parameter role="keyword">contents</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--replace-contents-finish">replace_contents_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--replace-finish">replace_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--resolve-relative-path">resolve_relative_path</link></methodname>
+        <methodparam><parameter role="keyword">relative_path</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--set-attribute">set_attribute</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">type</parameter></methodparam>
+        <methodparam><parameter role="keyword">value_p</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--set-attribute-byte-string">set_attribute_byte_string</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">value</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--set-attribute-int32">set_attribute_int32</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">value</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--set-attribute-int64">set_attribute_int64</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">value</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--set-attribute-string">set_attribute_string</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">value</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--set-attribute-uint32">set_attribute_uint32</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">value</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--set-attribute-uint64">set_attribute_uint64</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">value</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--set-attributes-async">set_attributes_async</link></methodname>
+        <methodparam><parameter role="keyword">info</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--set-attributes-finish">set_attributes_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--set-attributes-from-info">set_attributes_from_info</link></methodname>
+        <methodparam><parameter role="keyword">info</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--set-display-name">set_dispay_name</link></methodname>
+        <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--set-display-name-async">set_display_name_async</link></methodname>
+        <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--set-display-name-finish">set_display_name_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--trash">trash</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--unmount-mountable">unmount_mountable</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.MOUNT_UNMOUNT_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofile--unmount-mountable-finish">unmount_mountable_finish</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+<methodsynopsis language="python">
+    <methodname><link linkend="function-gio--file-parse-name">gio.file_parse_name</link></methodname>
+    <methodparam><parameter role="keyword">parse_name</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+  +-- <link linkend="class-giofile">gio.File</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Prerequisites</title>
+        <para>
+            <link linkend="class-giofile"><classname>gio.File</classname></link> is implemented by
+            <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giofile"><classname>gio.File</classname></link> is a high
+            level abstraction for manipulating files on a virtual file system.
+            <link linkend="class-giofile"><classname>gio.File</classname></link>s are lightweight,
+            immutable objects that do no I/O upon creation. It is necessary to understand that
+            <link linkend="class-giofile"><classname>gio.File</classname></link>
+            objects do not represent files, merely an identifier for a file. All file content
+            I/O is implemented as streaming operations (see
+            <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link> and
+            <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>). 
+        </para>
+        <para>
+            To construct a <link linkend="class-giofile"><classname>gio.File</classname></link>, you can use
+            it's constructor either with a path, an uri or a commandline argument.
+            <methodname><link linkend="function-gio--file-parse-name">gio.file_parse_name</link></methodname>()
+            from a utf8 string gotten from
+            <methodname><link linkend="method-giofile--get-parse-name">gio.File.get_parse_name</link></methodname>().
+        </para>
+        <para>
+            One way to think of a <link linkend="class-giofile"><classname>gio.File</classname></link> is as
+            an abstraction of a pathname. For normal files the system pathname is what is stored internally,
+            but as <link linkend="class-giofile"><classname>gio.File</classname></link>s are extensible it
+            could also be something else that corresponds to a pathname in a userspace implementation of a filesystem. 
+        </para>
+        <para>
+            <link linkend="class-giofile"><classname>gio.File</classname></link>s make up hierarchies of
+            directories and files that correspond to the files on a filesystem. You can move through the
+            file system with GFile using
+            <methodname><link linkend="method-giofile--get-parent">gio.File.get_parent</link></methodname>()
+            to get an identifier for the parent directory,
+            <methodname><link linkend="method-giofile--get-child">gio.File.get_child</link></methodname>()
+            to get a child within a directory,
+            <methodname><link linkend="method-giofile--resolve-relative-path">gio.File.resolve_relative_path</link></methodname>()
+            to resolve a relative path between two <link linkend="class-giofile"><classname>gio.File</classname></link>s.
+            There can be multiple hierarchies, so you may not end up at the same root if you repeatedly call
+            <methodname><link linkend="method-giofile--get-parent">gio.File.get_parent</link></methodname>()
+            on two different files. 
+        </para>
+        <para>
+            All <link linkend="class-giofile"><classname>gio.File</classname></link>s have a basename (get with
+            <methodname><link linkend="method-giofile--get-basename">gio.File.get_basename</link></methodname>()
+            ). These names are byte strings that are used to identify the file on the filesystem
+            (relative to its parent directory) and there is no guarantees that they have any particular charset
+            encoding or even make any sense at all. If you want to use filenames in a user interface you should
+            use the display name that you can get by requesting the gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with
+            <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>().
+            This is guaranteed to be in utf8 and can be used in a user interface. But always store the real basename or the
+            GFile to use to actually access the file, because there is no way to go from a display name to the actual name. 
+        </para>
+        <para>
+            Using <link linkend="class-giofile"><classname>gio.File</classname></link> as an identifier has the same
+            weaknesses as using a path in that there may be multiple aliases for the same file. For instance,
+            hard or soft links may cause two different <link linkend="class-giofile"><classname>gio.File</classname></link>s
+            to refer to the same file. Other possible causes for aliases are: case insensitive filesystems, short and
+            long names on Fat/NTFS, or bind mounts in Linux. If you want to check if two GFiles point to the same file
+            you can query for the gio.FILE_ATTRIBUTE_ID_FILE attribute. Note that
+            <link linkend="class-giofile"><classname>gio.File</classname></link> does some trivial canonicalization
+            of pathnames passed in, so that trivial differences in the path string used at creation
+            (duplicated slashes, slash at end of path, "." or ".." path segments, etc) does not create different
+            <link linkend="class-giofile"><classname>gio.File</classname></link>s. 
+        </para>
+        <para>
+            Many <link linkend="class-giofile"><classname>gio.File</classname></link> operations have both synchronous
+            and asynchronous versions to suit your application. Asynchronous versions of synchronous functions simply
+            have _async() appended to their function names. The asynchronous I/O functions call a
+            GAsyncReadyCallback which is then used to finalize the operation, producing a GAsyncResult
+            which is then passed to the function's matching _finish() operation. 
+        </para>
+        <para>
+            Some <link linkend="class-giofile"><classname>gio.File</classname></link> operations do not have
+            synchronous analogs, as they may take a very long time to finish, and blocking may leave an application
+            unusable. Notable cases include:
+            <methodname><link linkend="method-giofile--mount-mountable">gio.File.mount_mountable</link></methodname>()
+            to mount a mountable file.
+            <methodname><link linkend="method-giofile--unmount-mountable">gio.File.unmount_mountable</link></methodname>()
+            to unmount a mountable file.
+            <methodname><link linkend="method-giofile--eject-mountable">gio.File.eject_mountable</link></methodname>()
+            to eject a mountable file. 
+        </para>
+        <para>
+            One notable feature of <link linkend="class-giofile"><classname>gio.File</classname></link>s are
+            entity tags, or "etags" for short. Entity tags are somewhat like a more abstract
+            version of the traditional mtime, and can be used to quickly determine if the file
+            has been modified from the version on the file system. See the HTTP 1.1
+            specification for HTTP Etag headers, which are a very similar concept. 
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giofile">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.File</methodname>
+            <methodparam><parameter role="keyword">commandline</parameter></methodparam>
+            <methodparam><parameter role="keyword">path</parameter><initializer><literal>None</literal></initializer></methodparam>
+            <methodparam><parameter role="keyword">uri</parameter><initializer>None</initializer></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><parameter>commandline</parameter>&nbsp;:</term>
+                <listitem><simpara>a command line string. 
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><parameter>path</parameter>&nbsp;:</term>
+                <listitem><simpara>a string containing a relative or absolute path.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><parameter>uri</parameter>&nbsp;:</term>
+                <listitem><simpara>a string containing a URI.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giofile"><classname>gio.File</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new <link linkend="class-giofile"><classname>gio.File</classname></link> either from a commandline,
+            a path or an uri.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giofile--append-to">
+            <title>gio.File.append_to</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>append_to</methodname>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>append_to</methodname>() method gets an output stream for
+                appending data to the file. If the file doesn't already exist it is created. 
+            </para>
+            <para>
+                By default files created are generally readable by everyone, but if you pass
+                gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to the
+                current user, to the level that is supported on the target filesystem. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If
+                the operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+            <para>
+                Some file systems don't allow all file names, and may return an
+                gio.ERROR_INVALID_FILENAME error. If the file is a directory the
+                gio.ERROR_IS_DIRECTORY error will be returned. Other errors are possible too,
+                and depend on what kind of filesystem the file is on.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--append-to-async">
+            <title>gio.File.append_to_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>append_to_async</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>append_to_async</methodname>() method asynchronously opens file for appending. 
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-giofile--append-to">gio.File.append_to</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giofile--append-to-finish">gio.File.append_to_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--append-to-finish">
+            <title>gio.File.append_to_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>append_to_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a valid
+                    <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>append_to_finish</methodname>() method finishes an asynchronous
+                file append operation started with
+                <methodname><link linkend="method-giofile--append-to-async">gio.File.append_to_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--copy">
+            <title>gio.File.copy</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>copy</methodname>
+                <methodparam><parameter role="keyword">destination</parameter></methodparam>
+                <methodparam><parameter role="keyword">progress_callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>destination</parameter>&nbsp;:</term>
+                    <listitem><simpara>destination <link linkend="class-giofile"><classname>gio.File</classname></link>.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>progress_callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>function to callback with progress information.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to the progress callback function.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> on success,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>copy</methodname>() method copies the file source to
+                the location specified by destination. Can not handle recursive copies of directories. 
+            </para>
+            <para>
+                If the flag gio.FILE_COPY_OVERWRITE is specified an already existing
+                destination file is overwritten. 
+            </para>
+            <para>
+                If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will
+                be copied as symlinks, otherwise the target of the source symlink will be copied. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+            <para>
+                If progress_callback is not <literal>None</literal>, then the operation can be
+                monitored by setting this to a GFileProgressCallback function. user_data
+                will be passed to this function. It is guaranteed that this callback will be
+                called after all data has been transferred with the total number of bytes
+                copied during the operation. 
+            </para>
+            <para>
+                If the source file does not exist then the gio.ERROR_NOT_FOUND error is returned,
+                independent on the status of the destination. 
+            </para>
+            <para>
+                If gio.FILE_COPY_OVERWRITE is not specified and the target exists,
+                then the error gio.ERROR_EXISTS is returned. 
+            </para>
+            <para>
+                If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY error
+                is returned. If trying to overwrite a directory with a directory the
+                gio.ERROR_WOULD_MERGE error is returned. 
+            </para>
+            <para>
+                If the source is a directory and the target does not exist, or gio.FILE_COPY_OVERWRITE
+                is specified and the target is a file, then the gio.ERROR_WOULD_RECURSE error is returned. 
+            </para>
+            <para>
+                If you are interested in copying the
+                <link linkend="class-giofile"><classname>gio.File</classname></link> object
+                itself (not the on-disk file), see
+                <methodname><link linkend="method-giofile--dup">gio.File.dup</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--copy-async">
+            <title>gio.File.copy_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>append_to_async</methodname>
+                <methodparam><parameter role="keyword">destination</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">progress_callback</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">progress_callback_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>destination</parameter>&nbsp;:</term>
+                    <listitem><simpara>destination <link linkend="class-giofile"><classname>gio.File</classname></link>.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>progress_callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>function to callback with progress information.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>progress_callback_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to the progress callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>copy_async</methodname>() method copies the file source to
+                the location specified by destination asynchronously. For details of the behaviour,
+                see <methodname><link linkend="method-giofile--copy">gio.File.copy</link></methodname>(). 
+            </para>
+            <para>
+                If progress_callback is not <literal>None</literal>, then that function that will
+                be called just like in
+                <methodname><link linkend="method-giofile--copy">gio.File.copy</link></methodname>(),
+                however the callback will run in the main loop, not in the thread that is doing the I/O operation. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giofile--copy-finish">gio.File.copy_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--copy-attributes">
+            <title>gio.File.copy_attributes</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>copy_attributes</methodname>
+                <methodparam><parameter role="keyword">destination</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>destination</parameter>&nbsp;:</term>
+                    <listitem><simpara>destination <link linkend="class-giofile"><classname>gio.File</classname></link>
+                    to copy attributes to.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the attributes were copied successfully,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>copy_attributes</methodname>() method copies the file attributes
+                from source to destination. 
+            </para>
+            <para>
+                Normally only a subset of the file attributes are copied, those that are copies
+                in a normal file copy operation (which for instance does not include e.g. owner).
+                However if gio.FILE_COPY_ALL_METADATA is specified in flags, then all the metadata
+                that is possible to copy is copied. This is useful when implementing move by copy + delete source.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--copy-finish">
+            <title>gio.File.copy_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>copy_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> on success,
+                    <literal>False</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>copy_finish</methodname>() method finishes an asynchronous
+                copy operation started with
+                <methodname><link linkend="method-giofile--copy-async">gio.File.copy_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--create">
+            <title>gio.File.create</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>create</methodname>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>create</methodname>() method creates a new file and returns
+                an output stream for writing to it. The file must not already exist. 
+            </para>
+            <para>
+                By default files created are generally readable by everyone, but if you pass
+                gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to the
+                current user, to the level that is supported on the target filesystem. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+            <para>
+                If a file or directory with this name already exists the gio.ERROR_EXISTS
+                error will be returned. Some file systems don't allow all file names, and
+                may return an gio.ERROR_INVALID_FILENAME error, and if the name is to long
+                gio.ERROR_FILENAME_TOO_LONG will be returned. Other errors are possible too,
+                and depend on what kind of filesystem the file is on.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--create-async">
+            <title>gio.File.create_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>create_async</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>create_async</methodname>() method asynchronously creates a new
+                file and returns an output stream for writing to it. The file must not already exist. 
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-giofile--create">gio.File.create</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giofile--create-finish">gio.File.create_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--create-finish">
+            <title>gio.File.create_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>create_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>create_finish</methodname>() method finishes an asynchronous
+                copy operation started with
+                <methodname><link linkend="method-giofile--create-async">gio.File.create_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--delete">
+            <title>gio.File.delete</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>delete</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the file was deleted,
+                    <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>deleted</methodname>() method deletes a file. If the file is a
+                directory, it will only be deleted if it is empty. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was
+                cancelled, the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--dup">
+            <title>gio.File.dup</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>dup</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a new <link linkend="class-giofile"><classname>gio.File</classname></link>
+                    that is a duplicate of the given <link linkend="class-giofile"><classname>gio.File</classname></link>.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>dup</methodname>() method duplicates a
+                <link linkend="class-giofile"><classname>gio.File</classname></link>
+                handle. This operation does not duplicate the actual file or directory represented
+                by the <link linkend="class-giofile"><classname>gio.File</classname></link>; see
+                <methodname><link linkend="method-giofile--copy">gio.File.copy</link></methodname>()
+                if attempting to copy a file. 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--eject-mountable">
+            <title>gio.File.eject_mountable</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>eject_mountable</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>eject_mountable</methodname>() method starts an asynchronous eject on a
+                mountable. When this operation has completed, callback will be called with
+                user_user data, and the operation can be finalized with
+                <methodname><link linkend="method-giofile--eject-mountable-finish">gio.File.eject_mountable_finish</link></methodname>(). 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--eject-mountable-finish">
+            <title>gio.File.eject_mountable_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>eject_mountable_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the file was ejected successfully,
+                    <literal>False</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>create_finish</methodname>() method finishes an asynchronous
+                copy operation started with
+                <methodname><link linkend="method-giofile--create-async">gio.File.create_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--enumerate-children">
+            <title>gio.File.enumerate_children</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>enumerate_children</methodname>
+                <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>attributes</parameter>&nbsp;:</term>
+                    <listitem><simpara>an attribute query string.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>enumerate_children</methodname>() method gets the requested information
+                about the files in a directory. The result is a GFileEnumerator object that will give out
+                <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link> objects
+                for all the files in the directory. 
+            </para>
+            <para>
+                The attribute value is a string that specifies the file attributes that should be gathered.
+                It is not an error if it's not possible to read a particular requested attribute from a file -
+                it just won't be set. attribute should be a comma-separated list of attribute or attribute
+                wildcards. The wildcard "*" means all attributes, and a wildcard like "standard::*" means all
+                attributes in the standard namespace. An example attribute query be "standard::*,owner::user".
+                The standard attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+            <para>
+                If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned. If the file
+                is not a directory, the gio.FILE_ERROR_NOTDIR error will be returned.
+                Other errors are possible too.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--enumerate-children-async">
+            <title>gio.File.enumerate_children_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>enumerate_children_async</methodname>
+                <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>attributes</parameter>&nbsp;:</term>
+                    <listitem><simpara>an attribute query string.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>enumerate_children_async</methodname>() method asynchronously gets the
+                requested information about the files in a directory. The result is a
+                <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+                object that will give out <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+                objects for all the files in the directory. 
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-giofile--enumerate-children">enumerate_children</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--enumerate-children-finish">
+            <title>gio.File.eject_mountable_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>enumerate_children_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+                    or <literal>None</literal> if an error occurred.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>enumerate_children_finish</methodname>() method finishes an asynchronous
+                copy operation started with
+                <methodname><link linkend="method-giofile--enumerate-children-async">gio.File.enumerate_children_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--equal">
+            <title>gio.File.equal</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>equal</methodname>
+                <methodparam><parameter role="keyword">file2</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">file2</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if file1 and file2 are equal.
+                    <literal>False</literal> if either is not a
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>equal</methodname>() method checks equality of two given
+                <link linkend="class-giofile"><classname>gio.File</classname></link>s.
+                Note that two <link linkend="class-giofile"><classname>gio.File</classname></link>s
+                that differ can still refer to the same file on the filesystem due to various
+                forms of filename aliasing. 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--find-enclosing-mount">
+            <title>gio.File.find_enclosing_mount</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>enumerate_children</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>find_enclosing_mount</methodname>() method gets a
+                <link linkend="class-giomount"><classname>gio.Mount</classname></link> for the
+                <link linkend="class-giofile"><classname>gio.File</classname></link>.
+            </para>
+            <para>
+                If the interface for file does not have a mount (e.g. possibly a remote share),
+                error will be set to gio.ERROR_NOT_FOUND and <literal>None</literal> will be returned. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--find-enclosing-mount-async">
+            <title>gio.File.find_enclosing_mount_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>find_enclosing_mount_async</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>find_enclosing_mount_async</methodname>() method asynchronously
+                gets the mount for the file. 
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-giofile--find-enclosing-mount">gio.File.find_enclosing_mount</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--find-enclosing-mount-finish">
+            <title>gio.File.find_enclosing_mount_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>find_enclosing_mount_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+                    or <literal>None</literal> if an error occurred.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>find_enclosing_mount_finish</methodname>() method finishes an asynchronous
+                find mount started with
+                <methodname><link linkend="method-giofile--find-enclosing-mount-async">gio.File.find_enclosing_mount_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--get-basename">
+            <title>gio.File.get_basename</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_basename</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>string containing the
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>'s
+                    base name, or <literal>None</literal> if given
+                    <link linkend="class-giofile"><classname>gio.File</classname></link> is invalid.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_basename</methodname>() method gets the base name
+                (the last component of the path) for a given
+                <link linkend="class-giofile"><classname>gio.File</classname></link>. 
+            </para>
+            <para>
+                If called for the top level of a system (such as the filesystem root or
+                a uri like sftp://host/) it will return a single directory separator
+                (and on Windows, possibly a drive letter). 
+            </para>
+            <para>
+                The base name is a byte string (*not* UTF-8). It has no defined encoding
+                or rules other than it may not contain zero bytes. If you want to use filenames
+                in a user interface you should use the display name that you can get by requesting
+                the gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with
+                <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>(). 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--get-child">
+            <title>gio.File.get_child</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_child</methodname>
+                <methodparam><parameter role="keyword">name</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">name</parameter>&nbsp;:</term>
+                  <listitem><simpara>string containing the child's basename.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>
+                    to a child specified by name.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_child</methodname>() method gets a child of file
+                with basename equal to name. 
+            </para>
+            <para>
+                Note that the file with that specific name might not exist, but you can
+                still have a <link linkend="class-giofile"><classname>gio.File</classname></link>
+                that points to it. You can use this for instance to create that file. 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--get-child-for-display-name">
+            <title>gio.File.get_child_for_display_name</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_child_for_display_name</methodname>
+                <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">display_name</parameter>&nbsp;:</term>
+                  <listitem><simpara>string to a possible child.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>
+                    to the specified child or <literal>None</literal>
+                    if the display name couldn't be converted.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_child_for_display_name</methodname>() method gets the
+                child of file for a given display_name (i.e. a UTF8 version of the name).
+                If this function fails, it returns NULL and error will be set. This is very
+                useful when constructing a GFile for a new file and the user entered the filename
+                in the user interface, for instance when you select a directory and type a filename
+                in the file selector. 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--get-parent">
+            <title>gio.File.get_parent</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_parent</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>
+                    structure to the parent of the given
+                    <link linkend="class-giofile"><classname>gio.File</classname></link> or
+                    <literal>None</literal> if there is no parent.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_parent</methodname>() method gets the parent directory for the file.
+                If the file represents the root directory of the file system, then <literal>None</literal>
+                will be returned. 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--get-parse-name">
+            <title>gio.File.get_parse_name</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_parse_name</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string containing the
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>'s parse name.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_parse_name</methodname>() method gets the parse name
+                of the file. A parse name is a UTF-8 string that describes the file such
+                that one can get the <link linkend="class-giofile"><classname>gio.File</classname></link>
+                back using
+                <methodname><link linkend="function-gio--file-parse-name">gio.file_parse_name</link></methodname>(). 
+            </para>
+            <para>
+                This is generally used to show the <link linkend="class-giofile"><classname>gio.File</classname></link>
+                as a nice full-pathname kind of string in a user interface, like in a location entry. 
+            </para>
+            <para>
+                For local files with names that can safely be converted to UTF8 the pathname is used,
+                otherwise the IRI is used (a form of URI that allows UTF8 characters unescaped). 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--get-path">
+            <title>gio.File.get_path</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_path</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string containing the
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>'s path,
+                    or <literal>None</literal> if no such path exists.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_path</methodname>() method gets the local pathname for
+                <link linkend="class-giofile"><classname>gio.File</classname></link>, if one exists. 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--get-relative-path">
+            <title>gio.File.get_relative_path</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_relative_path</methodname>
+                <methodparam><parameter role="keyword">descendant</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">descendant</parameter>&nbsp;:</term>
+                  <listitem><simpara>input <link linkend="class-giofile"><classname>gio.File</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>string with the relative path from descendant to parent,
+                    or <literal>None</literal> if descendant doesn't have parent as prefix.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_relative_path</methodname>() method gets the path for
+                descendant relative to parent. 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--get-uri">
+            <title>gio.File.get_uri</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_uri</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string containing the
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>'s URI.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_uri</methodname>() method gets the URI for the file. 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--get-uri-scheme">
+            <title>gio.File.get_uri_scheme</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_uri_scheme</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string containing the URI scheme for the
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_uri_scheme</methodname>() method gets the URI scheme for a
+                <link linkend="class-giofile"><classname>gio.File</classname></link>.
+                RFC 3986 decodes the scheme as: 
+            </para>
+<programlisting>
+URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
+</programlisting>
+            <para>
+                Common schemes include "file", "http", "ftp", etc. 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--has-prefix">
+            <title>gio.File.has_prefix</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>has_prefix</methodname>
+                <methodparam><parameter role="keyword">prefix</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">prefix</parameter>&nbsp;:</term>
+                  <listitem><simpara>input <link linkend="class-giofile"><classname>gio.File</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the files's parent, grandparent,
+                    etc is prefix. <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>has_prefix</methodname>() method checks whether file has the prefix
+                specified by prefix. In other word, if the names of inital elements of files pathname
+                match prefix. Only full pathname elements are matched, so a path like /foo is not
+                considered a prefix of /foobar, only of /foo/bar. 
+            </para>
+            <para>
+                This call does no blocking i/o, as it works purely on names. As such it can sometimes
+                return <literal>False</literal> even if file is inside a prefix (from a filesystem point
+                of view), because the prefix of file is an alias of prefix.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--has-uri-scheme">
+            <title>gio.File.has_uri_scheme</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>has_uri_scheme</methodname>
+                <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">uri_scheme</parameter>&nbsp;:</term>
+                  <listitem><simpara>a string containing a URI scheme.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>'s
+                    backend supports the given URI scheme, <literal>False</literal> if URI scheme
+                    is <literal>None</literal>, not supported, or
+                    <link linkend="class-giofile"><classname>gio.File</classname></link> is invalid. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>has_uri_scheme</methodname>() method checks to see if a
+                <link linkend="class-giofile"><classname>gio.File</classname></link>
+                has a given URI scheme. 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--is-native">
+            <title>gio.File.is_native</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>is_native</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if file is native. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>is_native</methodname>() method checks to see if a file
+                is native to the platform. 
+            </para>
+            <para>
+                A native file s one expressed in the platform-native filename format, e.g.
+                "C:\Windows" or "/usr/bin/". This does not mean the file is local, as it
+                might be on a locally mounted remote filesystem. 
+            </para>
+            <para>
+                On some systems non-native files may be available using the native filesystem
+                via a userspace filesystem (FUSE), in these cases this call will return
+                <literal>False</literal>, but
+                <methodname><link linkend="method-giofile--get-path">gio.File.get_path</link></methodname>()
+                will still return a native path. 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--load-contents">
+            <title>gio.File.load_contents</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>load_contents</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a three tuple containing the contents of the file,
+                    the length of the contents of the file and the current entity tag for the file.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>load_contents</methodname>() method loads the content of the file into memory.
+                The data is always zero-terminated, but this is not included in the resultant length.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--load-contents-async">
+            <title>gio.File.load_contents_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>load_contents_async</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>load_contents_async</methodname>() method starts an asynchronous load of the file's contents. 
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-giofile--load-contents">gio.File.load_contents</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the load operation has completed, callback will be called with user data. To finish
+                the operation, call
+                <methodname><link linkend="method-giofile--load-contents-finish">gio.File.load_contents_finish</link></methodname>()
+                with the GAsyncResult returned by the callback. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--load-contents-finish">
+            <title>gio.File.load_contents_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>load_contents_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a three tuple containing the contents of the file,
+                    the length of the contents of the file and the current entity tag for the file.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>load_contents_finish</methodname>() method finishes an asynchronous
+                find mount started with
+                <methodname><link linkend="method-giofile--load-contents-async">gio.File.load_contents_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--make-directory">
+            <title>gio.File.make_directory</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>make_directory</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> on successful creation,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>make_directory</methodname>() method creates a directory.
+                Note that this will only create a child directory of the immediate parent directory
+                of the path or URI given by the <link linkend="class-giofile"><classname>gio.File</classname></link>.
+                To recursively create directories, see
+                <methodname><link linkend="method-giofile--make-directory-with-parents">gio.File.make_directory_with_parents</link></methodname>().
+                This function will fail if the parent directory does not exist, setting error to
+                gio.ERROR_NOT_FOUND. If the file system doesn't support creating directories, this
+                function will fail, setting error to gio.ERROR_NOT_SUPPORTED. 
+            </para>
+            <para>
+                For a local <link linkend="class-giofile"><classname>gio.File</classname></link> the newly
+                created directory will have the default (current) ownership and permissions of the current process. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--make-directory-with-parents">
+            <title>gio.File.make_directory_with_parents</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>make_directory_with_parents</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if all directories have been successfully created,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>make_directory_with_parents</methodname>() method creates a directory
+                and any parent directories that may not exist similar to 'mkdir -p'. If the file system
+                does not support creating directories, this function will fail, setting error to gio.ERROR_NOT_SUPPORTED. 
+            </para>
+            <para>
+                For a local <link linkend="class-giofile"><classname>gio.File</classname></link> the newly
+                created directories will have the default (current) ownership and permissions of the current process. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--make-symbolic-link">
+            <title>gio.File.make_symbolic_link</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>make_symbolic_link</methodname>
+                <methodparam><parameter role="keyword">symlink_value</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>symlink_value</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string with the value of the new symlink.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> on the creation of a new symlink,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>make_symbolic_link</methodname>() method creates a symbolic link. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--monitor">
+            <title>gio.File.monitor</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>monitor</methodname>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>
+                    a <xref linkend="gio-file-monitor-flags-constants" endterm="gio-file-monitor-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
+                    for the given file, or <literal>None</literal> on error
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>monitor</methodname>() method obtains a file or directory
+                monitor for the given file, depending on the type of the file. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--monitor-directory">
+            <title>gio.File.monitor_directory</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>monitor_directory</methodname>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>
+                    a <xref linkend="gio-file-monitor-flags-constants" endterm="gio-file-monitor-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
+                    for the given file, or <literal>None</literal> on error
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>monitor_directory</methodname>() method obtains a directory monitor
+                for the given file. This may fail if directory monitoring is not supported. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--monitor-file">
+            <title>gio.File.monitor_file</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>monitor_file</methodname>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>
+                    a <xref linkend="gio-file-monitor-flags-constants" endterm="gio-file-monitor-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
+                    for the given file, or <literal>None</literal> on error
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>monitor_file</methodname>() method obtains a file monitor for the
+                given file. If no file notification mechanism exists, then regular polling
+                of the file is used. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--mount-enclosing-volume">
+            <title>gio.File.mount_enclosing_volume</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>mount_enclosing_volume</methodname>
+                <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>mount_operation</parameter>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+                    or <literal>None</literal> to avoid user interaction. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request
+                    is satisfied, or <literal>None</literal>. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-mount-mount-flags-constants" endterm="gio-mount-mount-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to the progress callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>mount_enclosing_volume</methodname>() method starts a mount_operation,
+                mounting the volume that contains the file location. 
+            </para>
+            <para>
+                When this operation has completed, callback will be called with user_user data,
+                and the operation can be finalized with
+                <methodname><link linkend="method-giofile--mount-enclosing-volume-finish">gio.File.mount_enclosing_volume_finish</link></methodname>(). 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--mount-enclosing-volume-finish">
+            <title>gio.File.mount_enclosing_volume_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>mount_enclosing_volume_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if successful. If an error has occurred,
+                    this function will return <literal>False</literal> and set error appropriately if present. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>mount_enclosing_volume_finish</methodname>() method finishes an asynchronous
+                find mount started with
+                <methodname><link linkend="method-giofile--mount-enclosing-volume">gio.File.mount_enclosing_volume</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--mount-mountable">
+            <title>gio.File.mount_mountable</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>mount_mountable</methodname>
+                <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>mount_operation</parameter>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+                    or <literal>None</literal> to avoid user interaction. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request
+                    is satisfied, or <literal>None</literal>. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-mount-mount-flags-constants" endterm="gio-mount-mount-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to the progress callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>mount_mountable</methodname>() method mounts a file of type
+                gio.FILE_TYPE_MOUNTABLE. Using mount_operation, you can request callbacks when,
+                for instance, passwords are needed during authentication. 
+            </para>
+            <para>
+                When this operation has completed, callback will be called with user_user data,
+                and the operation can be finalized with
+                <methodname><link linkend="method-giofile--mount-mountable-finish">gio.File.mount_mountable_finish</link></methodname>(). 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--mount-mountable-finish">
+            <title>gio.File.mount_mountable_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>mount_mountable_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>mount_mountable_finish</methodname>() method finishes an asynchronous
+                find mount started with
+                <methodname><link linkend="method-giofile--mount-mountable">gio.File.mount_mountable</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--move">
+            <title>gio.File.move</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>copy</methodname>
+                <methodparam><parameter role="keyword">destination</parameter></methodparam>
+                <methodparam><parameter role="keyword">progress_callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_COPY_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>destination</parameter>&nbsp;:</term>
+                    <listitem><simpara>destination <link linkend="class-giofile"><classname>gio.File</classname></link>.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>progress_callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>function to callback with progress information.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-copy-flags-constants" endterm="gio-file-copy-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to the progress callback function.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> on success,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>move</methodname>() method tries to move the file or directory
+                source to the location specified by destination. If native move operations are
+                supported then this is used, otherwise a copy + delete fallback is used. The native
+                implementation may support moving directories (for instance on moves inside the same
+                filesystem), but the fallback code does not. 
+            </para>
+            <para>
+                If the flag gio.FILE_COPY_OVERWRITE is specified an already existing destination file is overwritten. 
+            </para>
+            <para>
+                If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks will be copied
+                as symlinks, otherwise the target of the source symlink will be copied. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+            <para>
+                If progress_callback is not <literal>None</literal>, then the operation can be monitored
+                by setting this to a GFileProgressCallback function. progress_callback_data will be passed
+                to this function. It is guaranteed that this callback will be called after all data has been
+                transferred with the total number of bytes copied during the operation. 
+            </para>
+            <para>
+                If the source file does not exist then the gio.ERROR_NOT_FOUND error is returned,
+                independent on the status of the destination. 
+            </para>
+            <para>
+                If gio.FILE_COPY_OVERWRITE is not specified and the target exists, then the error
+                gio.ERROR_EXISTS is returned. 
+            </para>
+            <para>
+                If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY error is returned.
+                If trying to overwrite a directory with a directory the gio.ERROR_WOULD_MERGE error is returned. 
+            </para>
+            <para>
+                If the source is a directory and the target does not exist, or gio.FILE_COPY_OVERWRITE is specified
+                and the target is a file, then the gio.ERROR_WOULD_RECURSE error may be returned
+                (if the native move operation isn't available).
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--query-default-handler">
+            <title>gio.File.query_default_handler</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_default_handler</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    if the handle was found, <literal>None</literal> if there were errors.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_default_handler</methodname>() method returns the
+                <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link> that
+                is registered as the default application to handle the file specified by file. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be
+                cancelled by triggering the cancellable object from another thread. If the
+                operation was cancelled, the error gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--query-exists">
+            <title>gio.File.query_exists</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_exists</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the file exists (and can be detected
+                    without error), <literal>False</literal> otherwise (or if cancelled). 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_exists</methodname>() method is an tility function to check
+                if a particular file exists. This is implemented using
+                <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>()
+                and as such does blocking I/O. 
+            </para>
+            <para>
+                Note that in many cases it is racy to first check for file existence and then execute
+                something based on the outcome of that, because the file might have been created or
+                removed in between the operations. The general approach to handling that is to not check,
+                but just do the operation and handle the errors as they come. 
+            </para>
+            <para>
+                As an example of race-free checking, take the case of reading a file, and if it doesn't
+                exist, creating it. There are two racy versions: read it, and on error create it; and:
+                check if it exists, if not create it. These can both result in two processes creating the
+                file (with perhaps a partially written file as the result). The correct approach is to
+                always try to create the file with
+                <methodname><link linkend="method-giofile--create">gio.File.create</link></methodname>()
+                which will either atomically create the file or fail with a gio.ERROR_EXISTS error. 
+            </para>
+            <para>
+                However, in many cases an existence check is useful in a user interface, for instance
+                to make a menu item sensitive/insensitive, so that you don't have to fool users that
+                something is possible and then just show and error dialog. If you do this, you should
+                make sure to also handle the errors that can happen due to races when you execute the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--query-file-type">
+            <title>gio.File.query_file_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_file_type</methodname>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_MONITOR_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>
+                    a <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>
+                    <xref linkend="gio-file-type-constants" endterm="gio-file-type-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_file_type</methodname>() method it's an utility function to inspect
+                the <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                of a file. This is implemented using
+                <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>()
+                and as such does blocking I/O. 
+            </para>
+            <para>
+                The primary use case of this method is to check if a file is a regular file, directory, or symlink.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--query-filesystem-info">
+            <title>gio.File.query_filesystem_info</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_filesystem_info</methodname>
+                <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>attributes</parameter>&nbsp;:</term>
+                    <listitem><simpara>an attribute query string.                    
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+                    or <literal>None</literal> if there was an error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_filesystem_info</methodname>() method it's similar to
+                <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>(),
+                but obtains information about the filesystem the file is on, rather than the
+                file itself. For instance the amount of space available and the type of the filesystem. 
+            </para>
+            <para>
+                The attribute value is a string that specifies the file attributes that should be gathered.
+                It is not an error if it's not possible to read a particular requested attribute from a file -
+                it just won't be set. attribute should be a comma-separated list of attribute or attribute
+                wildcards. The wildcard "*" means all attributes, and a wildcard like "fs:*" means all attributes
+                in the fs namespace. The standard namespace for filesystem attributes is "fs". Common attributes
+                of interest are gio.FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem in bytes),
+                gio.FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), and gio.FILE_ATTRIBUTE_FILESYSTEM_TYPE
+                (type of the filesystem). 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+            <para>
+                If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned. Other errors
+                are possible too, and depend on what kind of filesystem the file is on.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--query-filesystem-info-async">
+            <title>gio.File.query_filesystem_info_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_filesystem_info_async</methodname>
+                <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>attributes</parameter>&nbsp;:</term>
+                    <listitem><simpara>an attribute query string.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_filesystem_info_async</methodname>() method asynchronously
+                gets the requested information about the filesystem that the specified file is on.
+                The result is a GFileInfo object that contains key-value attributes
+                (such as type or size for the file). 
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-giofile--query-filesystem-info">query_filesystem_info</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giofile--query-filesystem-info-finish">gio.File.query_filesystem_info_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--query-filesystem-info-finish">
+            <title>gio.File.query_filesystem_info_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_filesystem_info_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+                    or <literal>None</literal> if an error occurred.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_filesystem_info_finish</methodname>() method finishes an asynchronous
+                copy operation started with
+                <methodname><link linkend="method-giofile--query-filesystem-info-async">gio.File.query_filesystem_info_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--query-info">
+            <title>gio.File.query_filesystem_info</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_info</methodname>
+                <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>attributes</parameter>&nbsp;:</term>
+                    <listitem><simpara>an attribute query string.                    
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>
+                    a <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+                    for the given file or <literal>None</literal> if there was an error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_info</methodname>() method gets the requested
+                information about specified file. The result is a
+                <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+                object that contains key-value attributes (such as the type or size of the file). 
+            </para>
+            <para>
+                The attribute value is a string that specifies the file attributes that should
+                be gathered. It is not an error if it's not possible to read a particular
+                requested attribute from a file - it just won't be set. attribute should be
+                a comma-separated list of attribute or attribute wildcards. The wildcard "*"
+                means all attributes, and a wildcard like "standard::*" means all attributes
+                in the standard namespace. An example attribute query be "standard::*,owner::user".
+                The standard attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+            <para>
+                For symlinks, normally the information about the target of the symlink is returned,
+                rather than information about the symlink itself. However if you pass
+                gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in flags the information about
+                the symlink itself will be returned. Also, for symlinks that point to non-existing
+                files the information about the symlink itself will be returned. 
+            </para>
+            <para>
+                If the file does not exist, the gio.ERROR_NOT_FOUND error will be
+                returned. Other errors are possible too, and depend on what kind of
+                filesystem the file is on.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--query-info-async">
+            <title>gio.File.query_info_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_info_async</methodname>
+                <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>attributes</parameter>&nbsp;:</term>
+                    <listitem><simpara>an attribute query string.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>
+                    a <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_info_async</methodname>() method asynchronously gets the
+                requested information about specified file. The result is a
+                <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+                object that contains key-value attributes (such as type or size for the file). 
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-giofile--query-info">query_info</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giofile--query-info-finish">gio.File.query_info_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--query-info-finish">
+            <title>gio.File.query_info_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_info_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+                    for the given file or <literal>None</literal> if an error occurred.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_info_finish</methodname>() method finishes an asynchronous
+                copy operation started with
+                <methodname><link linkend="method-giofile--query-info-async">gio.File.query_info_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--query-settable-attributes">
+            <title>gio.File.query_settable_attributes</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_settable_attributes</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a list of
+                    <link linkend="class-giofileattributeinfo"><classname>gio.FileAttributeInfo</classname></link>
+                    describing the settable attributes.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_settable_attributes</methodname>() method obtain the
+                list of settable attributes for the file. 
+            </para>
+            <para>
+                Returns the type and full attribute name of all the attributes that can be
+                set on this file. This doesn't mean setting it will always succeed though,
+                you might get an access failure, or some specific file may not support a specific attribute. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--query-writable-namespace">
+            <title>gio.File.query_writable_namespace</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_writable_namespace</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a list of
+                    <link linkend="class-giofileattributeinfo"><classname>gio.FileAttributeInfo</classname></link>
+                    describing the writable namespaces.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_writable_namespace</methodname>() method obtain the
+                list of attribute namespaces where new attributes can be created by a user.
+                An example of this is extended attributes (in the "xattr" namespace). 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--read">
+            <title>gio.File.read</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a 
+                    <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read</methodname>() method opens a file for reading. The result
+                is a <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+                that can be used to read the contents of the file. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+            <para>
+                If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned.
+                If the file is a directory, the gio.ERROR_IS_DIRECTORY error will be returned.
+                Other errors are possible too, and depend on what kind of filesystem the file is on.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--read-async">
+            <title>gio.File.read_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_async</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_async</methodname>() method asynchronously opens file for reading. 
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-giofile--read">read</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giofile--read-finish">gio.File.read_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--read-finish">
+            <title>gio.File.read_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+                    file or <literal>None</literal> if an error occurred.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_finish</methodname>() method finishes an asynchronous
+                copy operation started with
+                <methodname><link linkend="method-giofile--read-async">gio.File.read_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--replace">
+            <title>gio.File.replace</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>replace</methodname>
+                <methodparam><parameter role="keyword">etag</parameter></methodparam>
+                <methodparam><parameter role="keyword">make_backup</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>etag</parameter>&nbsp;:</term>
+                    <listitem><simpara>an optional entity tag for the current
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>,
+                    or <literal>None</literal> to ignore.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>make_backup</parameter>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if a backup should be created. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a 
+                    <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>replace</methodname>() method returns an output stream for
+                overwriting the file, possibly creating a backup copy of the file first.
+                If the file doesn't exist, it will be created. 
+            </para>
+            <para>
+                This will try to replace the file in the safest way possible so that any
+                errors during the writing will not affect an already existing copy of the file.
+                For instance, for local files it may write to a temporary file and then atomically
+                rename over the destination when the stream is closed. 
+            </para>
+            <para>
+                By default files created are generally readable by everyone, but if you pass
+                gio.FILE_CREATE_PRIVATE in flags the file will be made readable only to
+                the current user, to the level that is supported on the target filesystem. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+            <para>
+                If you pass in a non-<literal>None</literal> etag value, then this value is compared
+                to the current entity tag of the file, and if they differ an gio.ERROR_WRONG_ETAG error
+                is returned. This generally means that the file has been changed since you last read it.
+                You can get the new etag from
+                <methodname><link linkend="method-giofileoutputstream--get-etag">gio.FileOutputStream.get_etag</link></methodname>()
+                after you've finished writing and closed the GFileOutputStream. When you load a new file you can use
+                <methodname><link linkend="method-giofileinputstream--query-info">gio.FileInputStream.query_info</link></methodname>()
+                to get the etag of the file. 
+            </para>
+            <para>
+                If make_backup is <literal>True</literal>, this function will attempt to make a backup
+                of the current file before overwriting it. If this fails a gio.ERROR_CANT_CREATE_BACKUP
+                error will be returned. If you want to replace anyway, try again
+                with make_backup set to <literal>False</literal>. 
+            </para>
+            <para>
+                If the file is a directory the gio.ERROR_IS_DIRECTORY error will be returned, and
+                if the file is some other form of non-regular file then a gio.ERROR_NOT_REGULAR_FILE
+                error will be returned. Some file systems don't allow all file names, and may return an
+                gio.ERROR_INVALID_FILENAME error, and if the name is to long gio.ERROR_FILENAME_TOO_LONG
+                will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--replace-async">
+            <title>gio.File.replace_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>replace_async</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>etag</parameter>&nbsp;:</term>
+                    <listitem><simpara>an optional entity tag for the current
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>,
+                    or <literal>None</literal> to ignore.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>make_backup</parameter>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if a backup should be created. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>replace_async</methodname>() method asynchronously overwrites the file,
+                replacing the contents, possibly creating a backup copy of the file first. 
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-giofile--replace">replace</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giofile--replace-finish">gio.File.replace_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--replace-contents">
+            <title>gio.File.replace_contents</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>replace_contents</methodname>
+                <methodparam><parameter role="keyword">contents</parameter></methodparam>
+                <methodparam><parameter role="keyword">etag</parameter></methodparam>
+                <methodparam><parameter role="keyword">make_backup</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>contents</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string containing the new contents for file. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>etag</parameter>&nbsp;:</term>
+                    <listitem><simpara>the old entity tag for the document
+                    or <literal>None</literal> to ignore.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>make_backup</parameter>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if a backup should be created. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the new entity tag  for the document.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>replace_contents</methodname>() method replaces the contents
+                of file with contents of length bytes. If etag is specified (not NULL) any existing
+                file must have that etag, or the error gio.ERROR_WRONG_ETAG will be returned. 
+            </para>
+            <para>
+                If make_backup is <literal>True</literal>, this function will attempt to make a backup of file. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+            <para>
+                The returned etag can be used to verify that the file hasn't changed the next time it is saved over.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--replace-contents-async">
+            <title>gio.File.replace_contents_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>replace_contents_async</methodname>
+                <methodparam><parameter role="keyword">contents</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">etag</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">make_backup</parameter><initializer>True</initializer></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_CREATE_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>contents</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string containing the new contents for file. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>etag</parameter>&nbsp;:</term>
+                    <listitem><simpara>an optional entity tag for the current
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>,
+                    or <literal>None</literal> to ignore.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>make_backup</parameter>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if a backup should be created. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-create-flags-constants" endterm="gio-file-create-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>replace_contents_async</methodname>() method starts an asynchronous
+                replacement of file with the given contents of length bytes. etag will
+                replace the document's current entity tag. 
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-giofile--replace-contents">replace_contents</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giofile--replace-contents-finish">gio.File.replace_contents_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--replace-contents-finish">
+            <title>gio.File.replace_contents_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>replace_contents_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the new entity tag  for the document.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>replace_contents_finish</methodname>() method finishes an asynchronous
+                copy operation started with
+                <methodname><link linkend="method-giofile--replace-contents-async">gio.File.replace_contents_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--replace-finish">
+            <title>gio.File.replace_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>replace_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+                    or <literal>None</literal> if an error occurred.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>replace_finish</methodname>() method finishes an asynchronous
+                copy operation started with
+                <methodname><link linkend="method-giofile--replace-async">gio.File.replace_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--resolve-relative-path">
+            <title>gio.File.resolve_relative_path</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>resolve_relative_path</methodname>
+                <methodparam><parameter role="keyword">relative_path</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">relative_path</parameter>&nbsp;:</term>
+                  <listitem><simpara>a given relative path string. 
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>
+                    to the resolved path. <literal>None</literal> if relative_path is <literal>None</literal>
+                    or if file is invalid.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>resolve_relative_path</methodname>() method resolves a
+                relative path for file to an absolute path. 
+            </para>
+            <para>
+                This call does no blocking i/o.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--set-attribute">
+            <title>gio.File.set_attribute</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_attribute</methodname>
+                <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+                <methodparam><parameter role="keyword">type</parameter></methodparam>
+                <methodparam><parameter role="keyword">value_p</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>attribute</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string containing the attribute's name. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>type</parameter>&nbsp;:</term>
+                    <listitem><simpara>the type of the attribute .
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>value_p</parameter>&nbsp;:</term>
+                    <listitem><simpara>the value.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the attribute was set,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_attribute</methodname>() method sets an attribute in
+                the file with attribute name attribute to value. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--set-attribute-byte-string">
+            <title>gio.File.set_attribute_byte_string</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_attribute_byte_string</methodname>
+                <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+                <methodparam><parameter role="keyword">value</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>attribute</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string containing the attribute's name. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>value</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string containing the attribute's new value.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the attribute was set,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_attribute_byte_string</methodname>() method Sets attribute of type
+                gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING to value. If attribute is of a different type,
+                this operation will fail, returning <literal>False</literal>. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--set-attribute-int32">
+            <title>gio.File.set_attribute_int32</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_attribute_int32</methodname>
+                <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+                <methodparam><parameter role="keyword">value</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>attribute</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string containing the attribute's name. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>value</parameter>&nbsp;:</term>
+                    <listitem><simpara>an int containing the attribute's new value.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the attribute was set,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_attribute_int32</methodname>() method sets attribute of type
+                gio.FILE_ATTRIBUTE_TYPE_INT32 to value. If attribute is of a different type,
+                this operation will fail. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--set-attribute-int64">
+            <title>gio.File.set_attribute_int64</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_attribute_int64</methodname>
+                <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+                <methodparam><parameter role="keyword">value</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>attribute</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string containing the attribute's name. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>value</parameter>&nbsp;:</term>
+                    <listitem><simpara>a long containing the attribute's new value.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the attribute was set,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_attribute_int64</methodname>() method sets attribute of type
+                gio.FILE_ATTRIBUTE_TYPE_INT64 to value. If attribute is of a different type,
+                this operation will fail. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--set-attribute-string">
+            <title>gio.File.set_attribute_string</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_attribute_string</methodname>
+                <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+                <methodparam><parameter role="keyword">value</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>attribute</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string containing the attribute's name. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>value</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string containing the attribute's new value.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the attribute was set,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_attribute_string</methodname>() method sets attribute of type
+                gio.FILE_ATTRIBUTE_TYPE_STRING to value. If attribute is of a different type,
+                this operation will fail. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--set-attribute-uint32">
+            <title>gio.File.set_attribute_uint32</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_attribute_uint32</methodname>
+                <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+                <methodparam><parameter role="keyword">value</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>attribute</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string containing the attribute's name. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>value</parameter>&nbsp;:</term>
+                    <listitem><simpara>an int containing the attribute's new value.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the attribute was set,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_attribute_uint32</methodname>() method sets attribute of type
+                gio.FILE_ATTRIBUTE_TYPE_UINT32 to value. If attribute is of a different type,
+                this operation will fail. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--set-attribute-uint64">
+            <title>gio.File.set_attribute_uint64</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_attribute_uint64</methodname>
+                <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+                <methodparam><parameter role="keyword">value</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>attribute</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string containing the attribute's name. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>value</parameter>&nbsp;:</term>
+                    <listitem><simpara>a long containing the attribute's new value.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the attribute was set,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_attribute_uint64</methodname>() method sets attribute of type
+                gio.FILE_ATTRIBUTE_TYPE_UINT64 to value. If attribute is of a different type,
+                this operation will fail. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by triggering
+                the cancellable object from another thread. If the operation was cancelled, the error
+                gio.ERROR_CANCELLED will be returned. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--set-attributes-async">
+            <title>gio.File.set_attributes_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_attributes_async</methodname>
+                <methodparam><parameter role="keyword">info</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>info</parameter>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_attributes_async</methodname>() method asynchronously
+                sets the attributes of file with info. 
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-giofile--set-attributes-from-info">set_attributes_from_info</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giofile--set-attributes-finish">gio.File.set_attributes_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--set-attributes-finish">
+            <title>gio.File.set_attributes_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_attributes_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the attributes were set correctly,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_attributes_finish</methodname>() method finishes an asynchronous
+                copy operation started with
+                <methodname><link linkend="method-giofile--set-attributes-async">gio.File.set_attributes_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--set-attributes-from-info">
+            <title>gio.File.set_attributes_from_info</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_attributes_from_info</methodname>
+                <methodparam><parameter role="keyword">info</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>info</parameter>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the attributes were set correctly,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_attributes_from_info</methodname>() method tries to set
+                all attributes in the GFileInfo on the target values, not stopping on the first error. 
+            </para>
+                If there is any error during this operation then error will be set to the
+                first error. Error on particular fields are flagged by setting the "status"
+                field in the attribute value to gio.FILE_ATTRIBUTE_STATUS_ERROR_SETTING,
+                which means you can also detect further errors. 
+            <para>
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--set-display-name">
+            <title>gio.File.set_display_name</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_display_name</methodname>
+                <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>display_name</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string conaining the name to display.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>
+                    specifying what file was renamed to, or <literal>None</literal> if there was an error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_display_name</methodname>() method renames file to
+                the specified display name. 
+            </para>
+            <para>
+                The display name is converted from UTF8 to the correct encoding for the
+                target filesystem if possible and the file is renamed to this. 
+            </para>
+            <para>
+                If you want to implement a rename operation in the user interface the
+                edit name (gio.FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the
+                initial value in the rename widget, and then the result after editing
+                should be passed to
+                <methodname><link linkend="method-giofile--set-display-name">gio.File.set_dispay_name</link></methodname>(). 
+            </para>
+            <para>
+                On success the resulting converted filename is returned. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--set-display-name-async">
+            <title>gio.File.set_display_name_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_display_name_async</methodname>
+                <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>display_name</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string conaining the name to display.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_display_name_async</methodname>() method asynchronously
+                sets the display name for a given GFile. 
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-giofile--set-display-name">set_display_name</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giofile--set-display-name-finish">gio.File.set_display_name_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--set-display-name-finish">
+            <title>gio.File.set_display_name_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_display_name_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_display_name_finish</methodname>() method finishes an asynchronous
+                copy operation started with
+                <methodname><link linkend="method-giofile--set-display-name-async">gio.File.set_display_name_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--trash">
+            <title>gio.File.trash</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>trash</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> on successful trash, <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>trash</methodname>() method sends file to the "Trashcan", if possible.
+                This is similar to deleting it, but the user can recover it before emptying the trashcan.
+                Not all file systems support trashing, so this call can return the gio.ERROR_NOT_SUPPORTED error. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--unmount-mountable">
+            <title>gio.File.unmount_mountable</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>unmount_mountable</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer>gio.FILE_QUERY_INFO_NONE</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-file-query-info-flags-constants" endterm="gio-file-query-info-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>unmount_mountable</methodname>() method unmounts a file of type gio.FILE_TYPE_MOUNTABLE. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giofile--unmount-mountable-finish">gio.File.unmount_mountable_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofile--unmount-mountable-finish">
+            <title>gio.File.unmount_mountable_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>unmount_mountable_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the operation finished successfully,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>unmount_mountable_finish</methodname>() method finishes an asynchronous
+                copy operation started with
+                <methodname><link linkend="method-giofile--unmount-mountable">gio.File.unmount_mountable</link></methodname>().
+            </para>
+        </refsect2>
+    </refsect1>
+    
+    <refsect1>
+        <title>Functions</title>
+
+        <refsect2 id="function-gio--file-parse-name">
+            <title>gio.file_parse_name</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>file_parse_name</methodname>
+                <methodparam><parameter role="keyword">parse_name</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>parse_name</parameter>&nbsp;:</term>
+                    <listitem><simpara>a file name or path to be parsed.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a new <link linkend="class-giofile"><classname>gio.File</classname></link>.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>parse_name</methodname>() function constructs a
+                <link linkend="class-giofile"><classname>gio.File</classname></link>
+                with the given parse_name (i.e. something given by g_file_get_parse_name()).
+                This operation never fails, but the returned object might not support any I/O
+                operation if the parse_name cannot be parsed.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-fileattributeinfo.xml b/docs/reference/pygio-fileattributeinfo.xml
new file mode 100644 (file)
index 0000000..4b72c27
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofileattributeinfo">
+    <refnamediv>
+        <refname>gio.FileAttributeInfo</refname>
+        <refpurpose>Information about a specific attribute.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.FileAttributeInfo</classname></ooclass>
+        <ooclass><classname>__builtin__.object</classname></ooclass>    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- __builtin__.object
+  +-- <link linkend="class-giofileattributeinfo">gio.FileAttributeInfo</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            The <link linkend="class-giofileattributeinfo"><classname>gio.FileAttributeInfo</classname></link>
+            contains information about a specific attribute.
+        </para>
+    </refsect1>
+
+    <refsect1 id="attributes-giofileattributeinfo">
+        <title>gio.FileAttributeInfo Attributes</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"name"</entry>
+                            <entry>Read</entry>
+                            <entry>The name of the attribute.</entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"type"</entry>
+                            <entry>Read</entry>
+                            <entry>the
+                            <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                            type of the attribute.</entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"flags"</entry>
+                            <entry>Read</entry>
+                            <entry>a set of
+                            <xref linkend="gio-file-attribute-flags-constants" endterm="gio-file-attribute-flags-constants-title"></xref>.
+                            </entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-fileenumerator.xml b/docs/reference/pygio-fileenumerator.xml
new file mode 100644 (file)
index 0000000..4b16bf6
--- /dev/null
@@ -0,0 +1,488 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofileenumerator">
+    <refnamediv>
+        <refname>gio.FileEnumerator</refname>
+        <refpurpose>Enumerated Files Routines.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.FileEnumerator</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileenumerator--close">close</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileenumerator--close-async">close_async</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer><literal>glib.PRIORITY_DEFAULT</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileenumerator--close-finish">close_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileenumerator--get-container">get_container</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileenumerator--has-pending">has_pending</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileenumerator--is-closed">is_closed</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileenumerator--next-file">next_file</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileenumerator--next-files-async">next_files_async</link></methodname>
+        <methodparam><parameter role="keyword">num_files</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer><literal>glib.PRIORITY_DEFAULT</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileenumerator--next-files-finish">next_files_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileenumerator--set-pending">set_pending</link></methodname>
+        <methodparam><parameter role="keyword">pending</parameter></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giofileenumerator">gio.FileEnumerator</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1 id="properties-giofileenumerator">
+        <title>gio.FileEnumerator Properties</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"container"</entry>
+                            <entry>Write - Construct only</entry>
+                            <entry>The container that is being enumerated.</entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            The <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+            allows you to operate on a set of
+            <link linkend="class-giofile"><classname>gio.File</classname></link>s
+            returning a
+            <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+            structure for each file enumerated (e.g.
+            <methodname><link linkend="method-giofile--enumerate-children">gio.File.enumerate_children</link></methodname>()
+            will return a The <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+            for each of the children within a directory).
+        </para>
+        <para>
+            To get the next file's information from a
+            The <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link> use
+            <methodname><link linkend="method-giofileenumerator--next-file">gio.FileEnumerator.next_file</link></methodname>()
+            or its asynchronous version,
+            <methodname><link linkend="method-giofileenumerator--next-files-async">gio.FileEnumerator.next_files_async</link></methodname>().
+            Note that the asynchronous version will return a list of
+            <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>s,
+            whereas the synchronous will only return the next file in the enumerator. 
+        </para>
+        <para>
+            To close a <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+            use <methodname><link linkend="method-giofileenumerator--close">close</link></methodname>,
+            or its asynchronous version,
+            <methodname><link linkend="method-giofileenumerator--close-async">close_async</link></methodname>.
+            Once a <link linkend="class-giofileenumerator"><classname>gio.FileEnumerator</classname></link>
+            is closed, no further actions may be performed on it.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giofileenumerator--close">
+            <title>gio.FileEnumerator.close</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>close</methodname>
+                <methodparam>
+                    <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+                </methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>Optional
+                  <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                  object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> on success or
+                    <literal>False</literal> on error. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>close</methodname>() method releases all resources used by this
+                enumerator, making the
+                <xref linkend="gio-error-constants" endterm="gio-error-constants-title"></xref>
+                return gio.ERROR_CLOSED on all calls. 
+            </para>
+            <para>
+                This will be automatically called when the last reference is dropped,
+                but you might want to call this function to make sure resources are released
+                as early as possible.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileenumerator--close-async">
+            <title>gio.FileEnumerator.close_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>close_async</methodname>
+                <methodparam>
+                    <parameter role="keyword">callback</parameter>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">io_priority</parameter><initializer><literal>glib.PRIORITY_DEFAULT</literal></initializer>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
+                </methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+                  <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">io_priority</parameter>&nbsp;:</term>
+                  <listitem><simpara>The
+                  <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref> of the request. 
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>Optional
+                  <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                  object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+                  <listitem><simpara>The data to pass to callback function.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>close_async</methodname>() method asynchronously closes the file enumerator. 
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned in
+                <methodname><link linkend="method-giofileenumerator--close-finish">gio.FileEnumerator.close_finish</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileenumerator--close-finish">
+            <title>gio.FileEnumerator.close_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>close_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a GAsyncResult.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the close operation
+                    has finished successfully.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>close_finish</methodname>() method finishes closing a file enumerator, started from
+                <methodname><link linkend="method-giofileenumerator--close-async">gio.FileEnumerator.close_async</link></methodname>(). 
+            </para>
+            <para>
+                If the file enumerator was already closed when
+                <methodname><link linkend="method-giofileenumerator--close-async">gio.FileEnumerator.close_async</link></methodname>()
+                was called, then this function will report gio.ERROR_CLOSED in error, and return <literal>False</literal>.
+                If the file enumerator had pending operation when the close operation was started, then this function will report
+                gio.ERROR_PENDING, and return <literal>False</literal>. If cancellable was not <literal>None</literal>, then the operation
+                may have been cancelled by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be set, and <literal>False</literal> will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileenumerator--get-container">
+            <title>gio.FileEnumerator.get_container</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_container</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the <link linkend="class-giofile"><classname>gio.File</classname></link>
+                    which is being enumerated. </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_container</methodname>() method gets the
+                <link linkend="class-giofile"><classname>gio.File</classname></link>
+                container which is being enumerated.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileenumerator--has-pending">
+            <title>gio.FileEnumerator.has_pending</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>has_pending</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara><literal>True</literal> if the enumerator has pending operations.</simpara></listitem>
+            </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>has_pending</methodname>() method checks if the file enumerator has pending operations.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileenumerator--is-closed">
+            <title>gio.FileEnumerator.is_closed</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>is_closed</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the enumerator is closed.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>is_closed</methodname>() method checks if the file enumerator has been closed.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileenumerator--next-file">
+            <title>gio.FileEnumerator.next_file</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>next_file</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>Optional
+                  <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                  object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+                    or <literal>None</literal> on error or end of enumerator.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>next_file</methodname>() method returns information for the next
+                file in the enumerated object. Will block until the information is available.
+                The <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+                returned from this function will contain attributes that match the attribute string
+                that was passed when the GFileEnumerator was created. 
+            </para>
+            <para>
+                On error, returns <literal>None</literal> and sets error to the error. If the enumerator
+                is at the end, <literal>None</literal> will be returned and error will be unset.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileenumerator--next-files-async">
+            <title>gio.FileEnumerator.next_files_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>next_files_async</methodname>
+                <methodparam><parameter role="keyword">num_files</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam>
+                    <parameter role="keyword">io_priority</parameter><initializer><literal>glib.PRIORITY_DEFAULT</literal></initializer>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
+                </methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">num_files</parameter>&nbsp;:</term>
+                  <listitem><simpara>The number of file info objects to request.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+                  <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">io_priority</parameter>&nbsp;:</term>
+                  <listitem><simpara>The
+                  <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref> of the request. 
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>Optional
+                  <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                  object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+                  <listitem><simpara>The data to pass to callback function.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>next_files_async</methodname>() method requests information for a number
+                of files from the enumerator asynchronously. When all i/o for the operation is finished
+                the callback will be called with the requested information. 
+            </para>
+            <para>
+                The callback can be called with less than num_files files in case of error or at the
+                end of the enumerator. In case of a partial error the callback will be called with any
+                succeeding items and no error, and on the next request the error will be reported. If a
+                request is cancelled the callback will be called with gio.ERROR_CANCELLED. 
+            </para>
+            <para>
+                During an async request no other sync and async calls are allowed, and will result in gio.ERROR_PENDING errors. 
+            </para>
+            <para>
+                Any outstanding i/o request with higher priority (lower numerical value) will be executed
+                before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileenumerator--next-files-finish">
+            <title>gio.FileEnumerator.next_files_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>next_files_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a GAsyncResult.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A list of
+                    <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>s.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>next_files_finish</methodname>() method finishes the
+                asynchronous operation started with
+                <methodname><link linkend="method-giofileenumerator--next-files-async">gio.FileEnumerator.next_files_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileenumerator--set-pending">
+            <title>gio.FileEnumerator.set_pending</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_pending</methodname>
+                <methodparam><parameter role="keyword">pending</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">pending</parameter>&nbsp;:</term>
+                  <listitem><simpara>A boolean value.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>push_current</methodname>() method sets the file enumerator as having pending operations.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-fileicon.xml b/docs/reference/pygio-fileicon.xml
new file mode 100644 (file)
index 0000000..d4a443b
--- /dev/null
@@ -0,0 +1,109 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofileicon">
+    <refnamediv>
+        <refname>gio.FileIcon</refname>
+        <refpurpose>Icons pointing to an image file.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.FileIcon</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+        <ooclass><classname><link linkend="class-gioicon">gio.Icon</link></classname></ooclass>
+        <ooclass><classname><link linkend="class-gioloadableicon">gio.LoadableIcon</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-giofileicon">gio.FileIcon</link></methodname>
+       <methodparam><parameter role="keyword">file</parameter></methodparam>
+    </constructorsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileicon--get-file">get_file</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giofileicon">gio.FileIcon</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            The <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>
+            specifies an icon by pointing to an image file to be used as icon.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giofileicon">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.FileIcon</methodname>
+            <methodparam><parameter role="keyword">file</parameter></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><parameter>file</parameter>&nbsp;:</term>
+                <listitem><simpara>a
+                <link linkend="class-giofile"><classname>gio.File</classname></link>
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>
+                for the given file, or <literal>None</literal> on error.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new icon for a file.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giofileicon--get-file">
+            <title>gio.FileIcon.get_file</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_file</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <link linkend="class-giofile"><classname>gio.File</classname></link>
+                    or <literal>None</literal>.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_file</methodname>() method gets the
+                <link linkend="class-giofile"><classname>gio.File</classname></link>
+                associated with the given icon.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-fileinfo.xml b/docs/reference/pygio-fileinfo.xml
new file mode 100644 (file)
index 0000000..33eeae7
--- /dev/null
@@ -0,0 +1,346 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofileinfo">
+    <refnamediv>
+        <refname>gio.FileInfo</refname>
+        <refpurpose>File Information and Attributes</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.FileInfo</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+    <methodname><link linkend="constructor-giofileinfo">gio.FileInfo</link></methodname>
+        <methodparam></methodparam>
+    </constructorsynopsis>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--clear-status">clear_status</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--copy-into">copy_into</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--dup">dup</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-attribute-as-string">get_attribute_as_string</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-attribute-boolean">get_attribute_boolean</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-attribute-byte-string">get_attribute_byte_string</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-attribute-data">get_attribute_data</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-attribute-int32">get_attribute_int32</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-attribute-int64">get_attribute_int64</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-attribute-object">get_attribute_object</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-attribute-status">get_attribute_status</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-attribute-string">get_attribute_string</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-attribute-type">get_attribute_type</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-attribute-uint32">get_attribute_uint32</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-attribute-uint64">get_attribute_uint64</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-content-type">get_content_type</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-display-name">get_display_name</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-edit-name">get_edit_name</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-etag">get_etag</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-file-type">get_file_type</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-icon">get_icon</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-is-backup">get_is_backup</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-is-hidden">get_is_hidden</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-is-symlink">get_is_symlink</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-modification-time">get_modification_time</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-name">get_name</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-size">get_size</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-sort-order">get_sort_order</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--get-symlink-target">get_symlink_target</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--has-attribute">has_attribute</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--list-attributes">list_attributes</link></methodname>
+        <methodparam><parameter role="keyword">name_space</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--remove-attribute">remove_attribute</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-attribute">set_attribute</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">type</parameter></methodparam>
+        <methodparam><parameter role="keyword">value_p</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-attribute-boolean">set_attribute_boolean</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-attribute-byte-string">set_attribute_byte_string</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-attribute-data">set_attribute_data</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-attribute-int32">set_attribute_int32</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-attribute-int64">set_attribute_int64</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-attribute-int64">set_attribute_mask</link></methodname>
+        <methodparam><parameter role="keyword">mask</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-attribute-object">set_attribute_object</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-attribute-status">set_attribute_status</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-attribute-string">set_attribute_string</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+        <methodparam><parameter role="keyword">attr_value</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-attribute-uint32">set_attribute_uint32</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-attribute-uint64">set_attribute_uint64</link></methodname>
+        <methodparam><parameter role="keyword">attribute</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-content-type">set_content_type</link></methodname>
+        <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-display-name">set_display_name</link></methodname>
+        <methodparam><parameter role="keyword">display_name</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-edit-name">set_edit_name</link></methodname>
+        <methodparam><parameter role="keyword">edit_name</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-file-type">set_file_type</link></methodname>
+        <methodparam><parameter role="keyword">type</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-icon">set_icon</link></methodname>
+        <methodparam><parameter role="keyword">icon</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-is-hidden">set_is_hidden</link></methodname>
+        <methodparam><parameter role="keyword">is_hidden</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-is-symlink">set_is_symlink</link></methodname>
+        <methodparam><parameter role="keyword">is_symlink</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-modification-time">set_modification_time</link></methodname>
+        <methodparam><parameter role="keyword">mtime</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-name">set_name</link></methodname>
+        <methodparam><parameter role="keyword">name</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-size">set_size</link></methodname>
+        <methodparam><parameter role="keyword">size</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-sort-order">set_sort_order</link></methodname>
+        <methodparam><parameter role="keyword">sort_order</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--set-symlink-tarset">set_symlink_tarset</link></methodname>
+        <methodparam><parameter role="keyword">symlink_target</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinfo--unset-attribute-mask">unset_attribute_mask</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giofileinfo">gio.FileInfo</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            Functionality for manipulating basic metadata for files.
+            <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+            implements methods for getting information that all files should contain,
+            and allows for manipulation of extended attributes.
+        </para>
+        <para>
+            See <link linkend="class-giofileattribute"><classname>gio.FileAttribute</classname></link>
+            for more information on how GIO handles file attributes.
+        </para>
+        <para>
+           To obtain a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+           for a <link linkend="class-giofile"><classname>gio.File</classname></link>, use
+           <methodname><link linkend="method-giofile--query-info">gio.File.query_info</link></methodname>()
+           (or its async variant). To obtain a
+           <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+           for a file input or output stream, use
+           <methodname><link linkend="method-giofileinputstream--query-info">gio.FileInputStream.query_info</link></methodname>() or
+           <methodname><link linkend="method-giofileoutputstream--query-info">gio.FileOutputStream.query_info</link></methodname>()
+           (or their async variants).
+        </para>
+        <para>
+           To change the actual attributes of a file, you should then set the attribute in the
+           <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link> and call
+           <methodname><link linkend="method-giofile--set-attributes-from-info">gio.File.set_attributes_from_info</link></methodname>() or
+           <methodname><link linkend="method-giofile--set-attributes-async">gio.File.set_attributes_async</link></methodname>()
+           on a <link linkend="class-giofile"><classname>gio.File</classname></link>.
+        </para>
+        <para>
+           However, not all attributes can be changed in the file. For instance, the
+           actual size of a file cannot be changed via
+           <methodname><link linkend="method-giofileinfo--set-size">gio.FileInfo.set_size</link></methodname>(). You may call
+           <methodname><link linkend="method-giofile--query-settable-attributes">gio.File.query_settable_attributes</link></methodname>() and
+           <methodname><link linkend="method-giofile--query-writable-namespace">gio.File.query_writable_namespace</link></methodname>()
+           to discover the settable attributes of a particular file at runtime.
+        </para>
+        <para>
+           <link linkend="class-giofileattributematcher"><classname>gio.FileAttributeMatcher</classname></link>
+           allows for searching through a GFileInfo for attributes.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giofileinfo">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.FileInfo</methodname>
+            <methodparam></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+        <para> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</para>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-fileinputstream.xml b/docs/reference/pygio-fileinputstream.xml
new file mode 100644 (file)
index 0000000..723dc64
--- /dev/null
@@ -0,0 +1,214 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofileinputstream">
+    <refnamediv>
+        <refname>gio.FileInputStream</refname>
+        <refpurpose>Base class for implementing streaming input</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.FileInputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-gioinputstream">gio.InputStream</link></classname></ooclass>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinputstream--query-info">query_info</link></methodname>
+        <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinputstream--query-info-async">query_info_async</link></methodname>
+        <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileinputstream--query-info-finish">query_info_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+    +-- <link linkend="class-giofileinputstream">gio.FileInputStream</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Implemented Interfaces</title>
+        <para>
+            <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+            implements
+            <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+            provides input streams that take their content from a file.
+        </para>
+        <para>
+            <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+            implements <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>,
+            which allows the input stream to jump to arbitrary positions in the file, provided the filesystem
+            of the file allows it. In addition to the generic g_seekable_ API,
+            <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link>
+            has its own API for seeking and positioning. To find the position of a file input stream, use
+            <methodname><link linkend="method-gioseekable--tell">gio.Seekable.tell</link></methodname>().
+            To find out if a file input stream supports seeking, use
+            <methodname><link linkend="method-gioseekable--can_seek">gio.Seekable.can_seek</link></methodname>().
+            To position a file input stream, use
+            <methodname><link linkend="method-gioseekable--seek">gio.Seekable.seek</link></methodname>().
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giofileinputstream--query-info">
+            <title>gio.FileInputStream.query_info</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_info</methodname>
+                <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">attributes</parameter>&nbsp;:</term>
+                  <listitem><simpara>a file attribute query string.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>,
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_info</methodname>() method queries a file input stream
+                the given attributes. This function blocks while querying the stream.
+                For the asynchronous (non-blocking) version of this function, see
+                <methodname><link linkend="method-giofileinputstream--query-info-async">gio.FileInputStream.query_info_async</link></methodname>().
+                While the stream is blocked, the stream will set the pending flag internally,
+                and any other operations on the stream will fail with gio.ERROR_PENDING.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileinputstream--query-info-async">
+            <title>gio.FileInputStream.query_info_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_info_async</methodname>
+                <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">attributes</parameter>&nbsp;:</term>
+                  <listitem><simpara>a file attribute query string.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_info_async</methodname>() method queries the stream
+                information asynchronously. When the operation is finished callback will be
+                called. You can then call
+                <methodname><link linkend="method-giofileinputstream--query-info-finish">gio.FileInputStream.query_info_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+            <para>
+                For the synchronous version of this function, see
+                <methodname><link linkend="method-giofileinputstream--query-info">gio.FileInputStream.query_info</link></methodname>().
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was
+                cancelled, the error gio.ERROR_CANCELLED will be set
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileinputstream--query-info-finish">
+            <title>gio.FileInputStream.query_info_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_info_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>,
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_info_finish</methodname>() method finishes an asynchronous
+                file append operation started with
+                <methodname><link linkend="method-giofileinputstream--query-info-async">gio.FileInputStream.query_info_async</link></methodname>().
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-filemonitor.xml b/docs/reference/pygio-filemonitor.xml
new file mode 100644 (file)
index 0000000..ef9ca33
--- /dev/null
@@ -0,0 +1,128 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofilemonitor">
+    <refnamediv>
+        <refname>gio.FileMonitor</refname>
+        <refpurpose>File Monitor</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.FileMonitor</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofilemonitor--cancel">cancel</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofilemonitor--emit-event">emit_event</link></methodname>
+        <methodparam><parameter role="keyword">child</parameter></methodparam>
+        <methodparam><parameter role="keyword">other_file</parameter></methodparam>
+        <methodparam><parameter role="keyword">event_type</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofilemonitor--is-cancelled">is_cancelled</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofilemonitor--set-rate-limit">set_rate_limit</link></methodname>
+        <methodparam><parameter role="keyword">limit_msecs</parameter></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giofilemonitor">gio.FileMonitor</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1 id="properties-giofilemonitor">
+        <title>gio.FileMonitor Properties</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"cancelled"</entry>
+                            <entry>Read</entry>
+                            <entry>
+                                Whether the monitor has been cancelled. Default value: <literal>False</literal>.
+                            </entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"rate-limit"</entry>
+                            <entry>Read/Write</entry>
+                            <entry>
+                                The limit of the monitor to watch for changes, in milliseconds.
+                                Allowed values: >= 0. Default value: 800.
+                            </entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+  
+    </refsect1>
+
+    <refsect1 id="signal-prototypes-giofilemonitor">
+        <title>gio.FileMonitor Signal Prototypes</title>
+  
+        <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
+  
+        <variablelist>
+            <varlistentry>
+                <term><link linkend="signal-giofilemonitor--aborted">"changed"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>filemonitor</parameter></methodparam>
+                        <methodparam><parameter>file</parameter></methodparam>
+                        <methodparam><parameter>other_file</parameter></methodparam>
+                        <methodparam><parameter>event_type</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            The <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
+            monitors a file or directory for changes.
+        </para>
+        <para>
+            To obtain a <link linkend="class-giofilemonitor"><classname>gio.FileMonitor</classname></link>
+            for a file or directory, use
+            <methodname><link linkend="method-giofile--monitor">gio.FileMonitor.monitor</link></methodname>(),
+            <methodname><link linkend="method-giofile--monitor-file">gio.FileMonitor.monitor_file</link></methodname>(), or
+            <methodname><link linkend="method-giofile--monitor-directory">gio.FileMonitor.monitor_directory</link></methodname>().
+        </para>
+        <para>
+            To get informed about changes to the file or directory you are monitoring,
+            connect to the "changed" signal.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+        <para> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</para>
+  </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-fileoutputstream.xml b/docs/reference/pygio-fileoutputstream.xml
new file mode 100644 (file)
index 0000000..f4367d7
--- /dev/null
@@ -0,0 +1,257 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofileoutputstream">
+    <refnamediv>
+        <refname>gio.FileOutputStream</refname>
+        <refpurpose>Base class for implementing streaming input</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.FileOutputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileoutputstream--get-etag">get_etag</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileoutputstream--query-info">query_info</link></methodname>
+        <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileoutputstream--query-info-async">query_info_async</link></methodname>
+        <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofileoutputstream--query-info-finish">query_info_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+    +-- <link linkend="class-giofileoutputstream">gio.FileOutputStream</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Implemented Interfaces</title>
+        <para>
+            <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+            implements
+            <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+            provides output streams that write their content to a file.
+        </para>
+        <para>
+            <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+            implements <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>,
+            which allows the output stream to jump to arbitrary positions in the file and to truncate
+            the file, provided the filesystem of the file supports these operations. In addition to the
+            generic gio.Seekable. API,
+            <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>
+            has its own API for seeking and positioning. To find the position of a file output stream, use
+            <methodname><link linkend="method-gioseekable--tell">gio.Seekable.tell</link></methodname>().
+            To find out if a file output stream supports seeking, use
+            <methodname><link linkend="method-gioseekable--can_seek">gio.Seekable.can_seek</link></methodname>().
+            To position a file output stream, use
+            <methodname><link linkend="method-gioseekable--seek">gio.Seekable.seek</link></methodname>().
+            To find out if a file output stream supports truncating, use
+            <methodname><link linkend="method-gioseekable--can_truncate">gio.FileOutputStream.can_truncate</link></methodname>().
+            To truncate a file output stream, use
+            <methodname><link linkend="method-gioseekable--truncate">gio.Seekable.truncate</link></methodname>().
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giofileoutputstream--get-etag">
+            <title>gio.FileOutputStream.get_etag</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_etag</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the entity tag for the stream.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_etag</methodname>() method gets the entity tag
+                for the file when it has been written. This must be called after the
+                stream has been written and closed, as the etag can change while writing.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileoutputstream--query-info">
+            <title>gio.FileOutputStream.query_info</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_info</methodname>
+                <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">attributes</parameter>&nbsp;:</term>
+                  <listitem><simpara>a file attribute query string.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>,
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_info</methodname>() method queries a file input stream
+                the given attributes. This function blocks while querying the stream.
+                For the asynchronous (non-blocking) version of this function, see
+                <methodname><link linkend="method-giofileoutputstream--query-info-async">gio.FileOutputStream.query_info_async</link></methodname>().
+                While the stream is blocked, the stream will set the pending flag internally,
+                and any other operations on the stream will fail with gio.ERROR_PENDING.
+            </para>
+            <para>
+                Can fail if the stream was already closed (with error being set to gio.ERROR_CLOSED),
+                the stream has pending operations (with error being set to gio.ERROR_PENDING), or
+                if querying info is not supported for the stream's interface (with error being set to
+                gio.ERROR_NOT_SUPPORTED). In all cases of failure, NULL will be returned.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be set, and <literal>None</literal> will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileoutputstream--query-info-async">
+            <title>gio.FileOutputStream.query_info_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_info_async</methodname>
+                <methodparam><parameter role="keyword">attributes</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">attributes</parameter>&nbsp;:</term>
+                  <listitem><simpara>a file attribute query string.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_info_async</methodname>() method queries the stream
+                information asynchronously. When the operation is finished callback will be
+                called. You can then call
+                <methodname><link linkend="method-giofileoutputstream--query-info-finish">gio.FileOutputStream.query_info_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+            <para>
+                For the synchronous version of this function, see
+                <methodname><link linkend="method-giofileoutputstream--query-info">gio.FileOutputStream.query_info</link></methodname>().
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was
+                cancelled, the error gio.ERROR_CANCELLED will be set
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofileoutputstream--query-info-finish">
+            <title>gio.FileOutputStream.query_info_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>query_info_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofileinfo"><classname>gio.FileInfo</classname></link>,
+                    or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>query_info_finish</methodname>() method finishes an asynchronous
+                file append operation started with
+                <methodname><link linkend="method-giofileoutputstream--query-info-async">gio.FileOutputStream.query_info_async</link></methodname>().
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-filterinputstream.xml b/docs/reference/pygio-filterinputstream.xml
new file mode 100644 (file)
index 0000000..e6fb90b
--- /dev/null
@@ -0,0 +1,152 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofilterinputstream">
+    <refnamediv>
+        <refname>gio.FilterInputStream</refname>
+        <refpurpose>Filter Input Stream</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.FilterInputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-gioinputstream">gio.InputStream</link></classname></ooclass>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofilterinputstream--get-base-stream">get_base_stream</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofilterinputstream--get-close-base-stream">get_close_base_stream</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofilterinputstream--set-close-base-stream">set_close_base_stream</link></methodname>
+        <methodparam><parameter role="keyword">close_base</parameter></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+    +-- <link linkend="class-giofilterinputstream">gio.FilterInputStream</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1 id="properties-giofilterinputstream">
+        <title>gio.FilterInputStream Properties</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"base-stream"</entry>
+                            <entry>Read - Write - Construct only</entry>
+                            <entry>The underlying base stream on which the io ops will be done.</entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"close-base-stream"</entry>
+                            <entry>Read - Write - Construct only</entry>
+                            <entry>If the base stream should be closed when the filter stream is closed.
+                            Default value: <literal>True</literal>.</entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            Filter Input Stream.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giofilterinputstream--get-base-stream">
+            <title>gio.FilterInputStream.get_base_stream</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_base_stream</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A
+                    <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_base_stream</methodname>() method gets the base
+                stream for the filter stream.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofilterinputstream--get-close-base-stream">
+            <title>gio.FilterInputStream.get_close_base_stream</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_close_base_stream</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the base stream
+                    will be closed.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_close_base_stream</methodname>() method returns
+                whether the base stream will be closed when stream is closed.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofilterinputstream--set-close-base-stream">
+            <title>gio.FilterInputStream.set_close_base_stream</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_close_base_stream</methodname>
+                <methodparam><parameter role="keyword">close_base</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">close_base</parameter>&nbsp;:</term>
+                  <listitem><simpara><literal>True</literal> to close the base stream.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_close_base_stream</methodname>() method sets whether
+                the base stream will be closed when stream is closed.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-filteroutputstream.xml b/docs/reference/pygio-filteroutputstream.xml
new file mode 100644 (file)
index 0000000..78feaa2
--- /dev/null
@@ -0,0 +1,152 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giofilteroutputstream">
+    <refnamediv>
+        <refname>gio.FilterOutputStream</refname>
+        <refpurpose>Filter Output Stream</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.FilterOutputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofilteroutputstream--get-base-stream">get_base_stream</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofilteroutputstream--get-close-base-stream">get_close_base_stream</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giofilteroutputstream--set-close-base-stream">set_close_base_stream</link></methodname>
+        <methodparam><parameter role="keyword">close_base</parameter></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+    +-- <link linkend="class-giofilteroutputstream">gio.FilterOutputStream</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1 id="properties-giofilteroutputstream">
+        <title>gio.FilterOutputStream Properties</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"base-stream"</entry>
+                            <entry>Read - Write - Construct only</entry>
+                            <entry>The underlying base stream on which the io ops will be done.</entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"close-base-stream"</entry>
+                            <entry>Read - Write - Construct only</entry>
+                            <entry>If the base stream should be closed when the filter stream is closed.
+                            Default value: <literal>True</literal>.</entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            Filter Output Stream.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giofilteroutputstream--get-base-stream">
+            <title>gio.FilterOutputStream.get_base_stream</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_base_stream</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A
+                    <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_base_stream</methodname>() method gets the base
+                stream for the filter stream.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofilteroutputstream--get-close-base-stream">
+            <title>gio.FilterOutputStream.get_close_base_stream</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_close_base_stream</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the base stream
+                    will be closed.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_close_base_stream</methodname>() method returns
+                whether the base stream will be closed when stream is closed.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giofilteroutputstream--set-close-base-stream">
+            <title>gio.FilterOutputStream.set_close_base_stream</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_close_base_stream</methodname>
+                <methodparam><parameter role="keyword">close_base</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">close_base</parameter>&nbsp;:</term>
+                  <listitem><simpara><literal>True</literal> to close the base stream.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_close_base_stream</methodname>() method sets whether
+                the base stream will be closed when stream is closed.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-functions.xml b/docs/reference/pygio-functions.xml
new file mode 100644 (file)
index 0000000..c690a2f
--- /dev/null
@@ -0,0 +1,395 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="gio-functions">
+    <refnamediv>
+        <refname>gio Functions</refname>
+        <refpurpose></refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+<programlisting><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--content-type-can-be-executable">gio.content_type_can_be_executable</link></methodname>
+    <methodparam><parameter role="keyword">type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--content-type-equals">gio.content_type_equals</link></methodname>
+    <methodparam><parameter role="keyword">type1</parameter></methodparam>
+    <methodparam><parameter role="keyword">type2</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--content-type-from-mime-type">gio.content_type_from_mime_type</link></methodname>
+    <methodparam><parameter role="keyword">mime_type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--content-type-get-description">gio.content_type_get_description</link></methodname>
+    <methodparam><parameter role="keyword">type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--content-type-get-icon">gio.content_type_get_icon</link></methodname>
+    <methodparam><parameter role="keyword">type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--content-type-get-mime-type">gio.content_type_get_mime_type</link></methodname>
+    <methodparam><parameter role="keyword">type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--content-type-guess">gio.content_type_guess</link></methodname>
+    <methodparam><parameter role="keyword">filename</parameter></methodparam>
+    <methodparam><parameter role="keyword">data</parameter></methodparam>
+    <methodparam><parameter role="keyword">want_uncertain</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--content-type-is-a">gio.content_type_is_a</link></methodname>
+    <methodparam><parameter role="keyword">type</parameter></methodparam>
+    <methodparam><parameter role="keyword">supertype</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--content-type-is-unknown">gio.content_type_is_unknown</link></methodname>
+    <methodparam><parameter role="keyword">type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--content-types-get-registered">gio.content_types_get_registered</link></methodname>
+    <methodparam></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--io-error-from-errno">gio.io_error_from_errno</link></methodname>
+    <methodparam><parameter role="keyword">err_no</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+           These functions are part of the <literal>PyGObject</literal> gio module
+          but are not directly associated with a specific class
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Functions</title>
+
+        <refsect2 id="function-gio--content-type-can-be-executable">
+            <title>gio.content_type_can_be_executable</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>content_type_can_be_executable</methodname>
+                <methodparam><parameter role="keyword">type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>type</parameter>&nbsp;:</term>
+                    <listitem><simpara>a content type string.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the file type corresponds
+                   to a type that can be executable, <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>content_type_can_be_executable</methodname>() function checks
+               if a content type can be executable. Note that for instance things like text files
+               can be executables (i.e. scripts and batch files).
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--content-type-equals">
+            <title>gio.content_type_equals</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>content_type_equals</methodname>
+                <methodparam><parameter role="keyword">type1</parameter></methodparam>
+                <methodparam><parameter role="keyword">type2</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>type1</parameter>&nbsp;:</term>
+                    <listitem><simpara>a content type string. 
+                   </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>type2</parameter>&nbsp;:</term>
+                    <listitem><simpara>a content type string. 
+                   </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the two strings are
+                   identical or equivalent, <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>content_type_equals</methodname>() function compares
+               two content types for equality.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--content-type-from-mime-type">
+            <title>gio.content_type_from_mime_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>content_type_from_mime_type</methodname>
+                <methodparam><parameter role="keyword">mime_type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>mime_type</parameter>&nbsp;:</term>
+                    <listitem><simpara>a mime type string.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>The content type or <literal>None</literal> when does not know. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>content_type_from_mime_type</methodname>() function tries
+               to find a content type based on the mime type name.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--content-type-get-description">
+            <title>gio.content_type_get_description</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>content_type_get_description</methodname>
+                <methodparam><parameter role="keyword">type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>type</parameter>&nbsp;:</term>
+                    <listitem><simpara>a content type string.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a short description of the content type type. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>content_type_get_description</methodname>() function
+               gets the human readable description of the content type.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--content-type-get-icon">
+            <title>gio.content_type_get_icon</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>content_type_get_icon</methodname>
+                <methodparam><parameter role="keyword">type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>type</parameter>&nbsp;:</term>
+                    <listitem><simpara>a content type string.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+                   corresponding to the content type. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>content_type_get_icon</methodname>() function
+               gets the icon for a content type.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--content-type-get-mime-type">
+            <title>gio.content_type_get_mime_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>content_type_get_mime_type</methodname>
+                <methodparam><parameter role="keyword">type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>type</parameter>&nbsp;:</term>
+                    <listitem><simpara>a content type string.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the registered mime-type for the given type,
+                   or <literal>None</literal> if unknown. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>content_type_get_mime_type</methodname>() function
+               gets the mime-type for the content type. If one is registered
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--content-type-guess">
+            <title>gio.content_type_guess</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>content_type_guess</methodname>
+                <methodparam><parameter role="keyword">filename</parameter></methodparam>
+                <methodparam><parameter role="keyword">data</parameter></methodparam>
+                <methodparam><parameter role="keyword">want_uncertain</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>filename</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string, or <literal>None</literal>. 
+                   </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>data</parameter>&nbsp;:</term>
+                    <listitem><simpara>a stream of data, or <literal>None</literal>. 
+                   </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>want_uncertain</parameter>&nbsp;:</term>
+                    <listitem><simpara>a flag indicating the certainty of the result.
+                   </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string indicating a guessed content type for the given data.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>content_type_guess</methodname>() function guesses
+               the content type based on example data. If the function is uncertain,
+               result_uncertain will be set to <literal>True</literal>. Either filename
+               or data may be <literal>None</literal>, in which case the guess will be
+               based solely on the other argument.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--content-type-is-a">
+            <title>gio.content_type_is_a</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>content_type_is_a</methodname>
+                <methodparam><parameter role="keyword">type</parameter></methodparam>
+                <methodparam><parameter role="keyword">supertype</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>type</parameter>&nbsp;:</term>
+                    <listitem><simpara>a content type string. 
+                   </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>supertype</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string.
+                   </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if type is a kind of
+                   supertype, <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>content_type_is_a</methodname>() function determines
+               if type is a subset of supertype.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--content-type-is-unknown">
+            <title>gio.content_type_is_unknown</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>content_type_is_unknown</methodname>
+                <methodparam><parameter role="keyword">type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>type</parameter>&nbsp;:</term>
+                    <listitem><simpara>a content type string. 
+                   </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the type is the unknown type.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>content_type_is_unknown</methodname>() function checks if
+               the content type is the generic "unknown" type. On unix this is the
+               "application/octet-stream" mimetype, while on win32 it is "*".
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--content-types-get-registered">
+            <title>gio.content_types_get_registered</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>content_types_get_registered</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a list of the registered content types.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>content_types_get_registered</methodname>() function
+               gets a list of strings containing all the registered content types
+               known to the system.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--io-error-from-errno">
+            <title>gio.io_error_from_errno</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>io_error_from_errno</methodname>
+                <methodparam><parameter role="keyword">err_no</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>err_no</parameter>&nbsp;:</term>
+                    <listitem><simpara>Error number.
+                   </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a
+                   <xref linkend="gio-error-constants" endterm="gio-error-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>io_error_from_errno</methodname>() function converts
+               error codes into GIO error codes.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-icon.xml b/docs/reference/pygio-icon.xml
new file mode 100644 (file)
index 0000000..5a32d28
--- /dev/null
@@ -0,0 +1,217 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioicon">
+    <refnamediv>
+        <refname>gio.Icon</refname>
+        <refpurpose>Interface for icons.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.Icon</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioicon--equal">equal</link></methodname>
+        <methodparam><parameter role="keyword">icon2</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioicon--to-string">to_string</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+<methodsynopsis language="python">
+    <methodname><link linkend="function-gio--icon-new-from-string">gio.icon_new_from_string</link></methodname>
+    <methodparam></methodparam>
+</methodsynopsis></programlisting>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+  +-- <link linkend="class-gioicon">gio.Icon</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Known Derived Interfaces</title>
+        <para>
+            <link linkend="class-gioicon"><classname>gio.Icon</classname></link> is required by
+            <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link>.
+        </para>
+    </refsect1>
+    
+    <refsect1>
+       <title>Known Implementation</title>
+        <para>
+            <link linkend="class-gioicon"><classname>gio.Icon</classname></link> is implemented by
+            <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>,
+            <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>,
+            <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>,
+            <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+            is a very minimal interface for icons. It provides functions for checking
+            the equality of two icons, hashing of icons and serializing an icon to and from strings. 
+        </para>
+        <para>
+            <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+            does not provide the actual pixmap for the icon as this is out of GIO's
+            scope, however implementations of
+            <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+            may contain the name of an icon (see
+            <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>),
+            or the path to an icon (see
+            <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link>).
+        </para>
+        <!--
+        <para>
+            To obtain a hash of a <link linkend="class-gioicon"><classname>gio.Icon</classname></link>, see
+            <methodname><link linkend="method-gioicon- -hash">gio.Icon.hash</link></methodname>().
+        </para>
+        -->
+        <para>
+            To check if two GIcons are equal, see
+            <methodname><link linkend="method-gioicon--equal">gio.Icon.equal</link></methodname>().
+        </para>
+        <para>
+            For serializing a <link linkend="class-gioicon"><classname>gio.Icon</classname></link>,
+            use <methodname><link linkend="method-gioicon- -to-string">gio.Icon.to_string</link></methodname>() and
+            <methodname><link linkend="method-gioicon- -new-from-string">gio.Icon.new_from_string</link></methodname>(). 
+        </para>
+        <para>
+            If your application or library provides one or more
+            <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+            implementations you need to ensure that each GType is registered
+            with the type system prior to calling
+            <methodname><link linkend="function-gioicon--new-from-string">gio.icon_new_from_string</link></methodname>(). 
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-gioicon--equal">
+            <title>gio.Icon.equal</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>equal</methodname>
+                <methodparam><parameter role="keyword">icon2</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>icon2</parameter>&nbsp;:</term>
+                    <listitem><simpara>the second
+                    <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>equal</methodname>() method checks if two icons are equal.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioicon--to-string">
+            <title>gio.Icon.to_string</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>to_string</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>An UTF8 string or <literal>None</literal>
+                   if icon can't be serialized.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>to_string</methodname>() method generates a textual
+               representation of icon that can be used for serialization such as when
+               passing icon to a different process or saving it to persistent storage. Use
+               <methodname><link linkend="function-gio--icon-new-from-string">gio.icon_new_from_string</link></methodname>()
+               to get icon back from the returned string.
+            </para>
+           <para>
+               The encoding of the returned string is proprietary to GIcon except in the following two cases
+           </para>
+           <para>
+               If icon is a <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>,
+               the returned string is a native path (such as /path/to/my icon.png) without escaping
+               if the <link linkend="class-giofile"><classname>gio.File</classname></link>
+               for icon is a native file. If the file is not native, the returned string is the result of
+               <methodname><link linkend="method-giofile--get-uri">gio.File.get_uri</link></methodname>()
+               (such as sftp://path/to/my%20icon.png).
+           </para>
+           <para>
+               If icon is a <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>
+               with exactly one name, the encoding is simply the name (such as network-server).
+           </para>
+        </refsect2>
+    </refsect1>
+    
+    <refsect1>
+        <title>Functions</title>
+
+        <refsect2 id="function-gio--icon-new-from-string">
+            <title>gio.icon_new_from_string</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>icon_new_from_string</methodname>
+                <methodparam><parameter role="keyword">str</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>str</parameter>&nbsp;:</term>
+                    <listitem><simpara>A string obtained via
+                   <methodname><link linkend="method-gioicon--to-string">gio.Icon.to_string</link></methodname>().
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>An object implementing the
+                   <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+                   interface or <literal>None</literal> if error is set.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>icon_new_from_string</methodname>() function generate a
+               <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+               instance from str. This function can fail if str is not valid - see
+               <methodname><link linkend="method-gioicon--to-string">gio.Icon.to_string</link></methodname>()
+               for discussion.
+            </para>
+            <para>
+                If your application or library provides one or more GIcon implementations you need
+               to ensure that each GType is registered with the type system prior to calling
+               <methodname><link linkend="function-gio--icon-new-from-string">gio.icon_new_from_string</link></methodname>().
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-inputstream.xml b/docs/reference/pygio-inputstream.xml
new file mode 100644 (file)
index 0000000..1bef333
--- /dev/null
@@ -0,0 +1,730 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioinputstream">
+    <refnamediv>
+        <refname>gio.InputStream</refname>
+        <refpurpose>Base class for implementing streaming input</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.InputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--clear-pending">clear_pending</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--close">close</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--close-async">close_async</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--close-finish">close_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--has-pending">has_pending</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--is-closed">is_closed</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--read">read</link></methodname>
+        <methodparam><parameter role="keyword">count</parameter><initializer>-1</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--read-async">read_async</link></methodname>
+        <methodparam><parameter role="keyword">count</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--read-finish">read_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--read-part">read_part</link></methodname>
+        <methodparam><parameter role="keyword">count</parameter><initializer>-1</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--set-pending">set_pending</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--skip">skip</link></methodname>
+        <methodparam><parameter role="keyword">count</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--skip-async">skip_async</link></methodname>
+        <methodparam><parameter role="keyword">count</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioinputstream--skip-finish">skip_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+            has functions to read from a stream (
+            <methodname><link linkend="method-gioinputstream--read">gio.InputStream.read</link></methodname>()
+            ), to close a stream (
+            <methodname><link linkend="method-gioinputstream--close">gio.InputStream.close</link></methodname>()
+            ) and to skip some content (
+            <methodname><link linkend="method-gioinputstream--skip">gio.InputStream.skip</link></methodname>()
+            ).
+        </para>
+        <para>
+            To copy the content of an input stream to an output stream without manually
+            handling the reads and writes, use
+            <methodname><link linkend="method-giooutputstream--skip">gio.OutputStream.splice</link></methodname>().
+        </para>
+        <para>
+            All of these functions have async variants too.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-gioinputstream--clear-pending">
+            <title>gio.InputStream.clear_pending</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>clear_pending</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+            </variablelist>
+    
+            <para>
+                The <methodname>clear_pending</methodname>() method clears the pending flag on stream.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioinputstream--close">
+            <title>gio.InputStream.close</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>close</methodname>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> on success
+                    <literal>False</literal> on failure.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>close</methodname>() method closes the stream, releasing
+                resources related to it.
+            </para>
+            <para>
+                Once the stream is closed, all other operations will return gio.ERROR_CLOSED.
+                Closing a stream multiple times will not return an error.
+            </para>
+            <para>
+                Streams will be automatically closed when the last reference is dropped, but
+                you might want to call this function to make sure resources are released as
+                early as possible.
+            </para>
+            <para>
+                Some streams might keep the backing store of the stream (e.g. a file descriptor)
+                open after the stream is closed. See the documentation for the individual
+                stream for details.
+            </para>
+            <para>
+                On failure the first error that happened will be reported, but the close operation
+                will finish as much as possible. A stream that failed to close will still return
+                gio.ERROR_CLOSED for all operations. Still, it is important to check and report
+                the error to the user.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+                the stream closed, but some streams can use a faster close that doesn't block to e.g.
+                check errors.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioinputstream--close-async">
+            <title>gio.InputStream.close_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>close_async</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>close_async</methodname>() method asynchronously requests an
+                asynchronous closes of the stream, releasing resources related to it.
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-gioinputstream--close">gio.InputStream.close</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-gioinputstream--close-finish">gio.InputStream.close_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioinputstream--close-finish">
+            <title>gio.InputStream.close_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>close_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the stream was closed successfully.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>close_finish</methodname>() method finishes an asynchronous
+                file append operation started with
+                <methodname><link linkend="method-gioinputstream--close-async">gio.InputStream.close_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioinputstream--has-pending">
+            <title>gio.InputStream.has_pending</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>has_pending</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if stream has pending actions.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>has_pending</methodname>() method checks if an input stream has pending actions.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioinputstream--is-closed">
+            <title>gio.InputStream.is_closed</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>is_closed</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the stream is closed.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>is_closed</methodname>() method checks if an input stream is closed.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioinputstream--read">
+            <title>gio.InputStream.read</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read</methodname>
+                <methodparam><parameter role="keyword">count</parameter><initializer>-1</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">count</parameter>&nbsp;:</term>
+                  <listitem><simpara>optionally the number of bytes that will be read from the stream.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>The number of bytes read, or -1 on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read</methodname>() method tries to read count bytes from
+                the stream into the buffer starting at buffer. Will block during this read.
+            </para>
+            <para>
+                This function is similar to
+                <methodname><link linkend="method-gioinputstream--read-part">gio.InputStream.read_part</link></methodname>(),
+                except it tries to read as many bytes as requested, only stopping on an error or end of stream.
+            </para>
+            <para>
+                On a successful read of count bytes, or if we reached the end of the stream,
+                <literal>True</literal> is returned, and bytes_read is set to the number of bytes read into buffer.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+                the stream closed, but some streams can use a faster close that doesn't block to e.g.
+                check errors.
+            </para>
+            <para>
+                If there is an error during the operation <literal>False</literal> is returned and error
+                is set to indicate the error status, bytes_read is updated to contain the number of
+                bytes read into buffer before the error occurred.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioinputstream--read-async">
+            <title>gio.InputStream.read_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_async</methodname>
+                <methodparam><parameter role="keyword">count</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>count</parameter>&nbsp;:</term>
+                    <listitem><simpara>the number of bytes that will be read from the stream.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_async</methodname>() method requests an asynchronous read
+                of count bytes from the stream into the buffer.
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-gioinputstream--read">gio.InputStream.read</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-gioinputstream--read-finish">gio.InputStream.read_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+            <para>
+                During an async request no other sync and async calls are allowed, and
+                will result in gio.ERROR_PENDING errors.
+            </para>
+            <para>
+                A value of count larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+            </para>
+            <para>
+                On success, the number of bytes read into the buffer will be passed to the callback.
+                It is not an error if this is not the same as the requested size, as it can happen e.g.
+                near the end of a file, but generally we try to read as many bytes as requested. Zero
+                is returned on end of file (or if count is zero), but never otherwise.
+            </para>
+            <para>
+                Any outstanding i/o request with higher priority (lower numerical value) will be
+                executed before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
+            </para>
+            <para>
+                The asyncronous methods have a default fallback that uses threads to implement asynchronicity, so
+                they are optional for inheriting classes. However, if you override one you must override all.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioinputstream--read-finish">
+            <title>gio.InputStream.read_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>The number of bytes read in, or -1 on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_finish</methodname>() method finishes an asynchronous
+                stream read operation started by
+                <methodname><link linkend="method-gioinputstream--read-async">gio.InputStream.read_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioinputstream--read-part">
+            <title>gio.InputStream.read_part</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>read_part</methodname>
+                <methodparam><parameter role="keyword">count</parameter><initializer>-1</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">count</parameter>&nbsp;:</term>
+                  <listitem><simpara>optionally the number of bytes that will be read from the stream.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>The number of bytes read, or -1 on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>read_part</methodname>() method tries to read count bytes from
+                the stream into the buffer starting at buffer. Will block during this read.
+            </para>
+            <para>
+                If count is zero returns zero and does nothing. A value of count larger than
+                G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+            </para>
+            <para>
+                On success, the number of bytes read into the buffer is returned. It is
+                not an error if this is not the same as the requested size, as it can
+                happen e.g. near the end of a file. Zero is returned on end of file
+                (or if count is zero), but never otherwise.
+            </para>
+            <para>
+               If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+                the stream closed, but some streams can use a faster close that doesn't block to e.g.
+                check errors.
+            </para>
+            <para>
+                On error -1 is returned and error is set accordingly.
+            </para>
+            <note>
+                This method roughly corresponds to C GIO g_input_stream_read.
+            </note>
+        </refsect2>
+
+        <refsect2 id="method-gioinputstream--set-pending">
+            <title>gio.InputStream.set_pending</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_pending</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if pending was previously
+                    unset and is now set.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_pending</methodname>() method sets stream to have actions pending.
+                If the pending flag is already set or stream is closed,
+                it will return <literal>False</literal> and set error.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioinputstream--skip">
+            <title>gio.InputStream.skip</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>skip</methodname>
+                <methodparam><parameter role="keyword">count</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">count</parameter>&nbsp;:</term>
+                  <listitem><simpara>the number of bytes that will be skipped from the stream.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>The number of bytes skipped, or -1 on error
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>skip</methodname>() method tries to skip count bytes
+                from the stream. Will block during the operation.
+            </para>
+            <para>
+                This is identical to
+                <methodname><link linkend="method-gioinputstream--read">read</link></methodname>(),
+                from a behaviour standpoint, but the bytes that are skipped are not
+                returned to the user. Some streams have an implementation that is more
+                efficient than reading the data.
+            </para>
+            <para>
+                This function is optional for inherited classes, as the default implementation emulates it using read.
+            </para>
+            <para>
+               If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+                triggering the cancellable object from another thskip. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned. Cancelling a close will still leave
+                the stream closed, but some streams can use a faster close that doesn't block to e.g.
+                check errors.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioinputstream--skip-async">
+            <title>gio.InputStream.skip_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>skip_async</methodname>
+                <methodparam><parameter role="keyword">count</parameter></methodparam>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>count</parameter>&nbsp;:</term>
+                    <listitem><simpara>the number of bytes that will be skipped from the stream.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncskipyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>io_priority</parameter>&nbsp;:</term>
+                    <listitem><simpara>the
+                    <xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+                    of the request. 
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>skip_async</methodname>() method request an asynchronous
+                skip of count bytes from the stream.
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-gioinputstream--skip">gio.InputStream.skip</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-gioinputstream--skip-finish">gio.InputStream.skip_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+            <para>
+                During an async request no other sync and async calls are allowed, and
+                will result in gio.ERROR_PENDING errors.
+            </para>
+            <para>
+                A value of count larger than G_MAXSSIZE will cause a gio.ERROR_INVALID_ARGUMENT error.
+            </para>
+            <para>
+                On success, the number of bytes skipped will be passed to the callback. It is
+                not an error if this is not the same as the requested size, as it can happen
+                e.g. near the end of a file, but generally we try to skip as many bytes as requested.
+                Zero is returned on end of file (or if count is zero), but never otherwise.
+            </para>
+            <para>
+                Any outstanding i/o request with higher priority (lower numerical value) will be
+                executed before an outstanding request with lower priority. Default priority is glib.PRIORITY_DEFAULT.
+            </para>
+            <para>
+                The asyncronous methods have a default fallback that uses thskips to implement asynchronicity, so
+                they are optional for inheriting classes. However, if you override one you must override all.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioinputstream--skip-finish">
+            <title>gio.InputStream.skip_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>skip_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>The number of bytes skipped in, or -1 on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>skip_finish</methodname>() method finishes an asynchronous
+                stream skip operation started by
+                <methodname><link linkend="method-gioinputstream--skip-async">gio.InputStream.skip_async</link></methodname>().
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-loadableicon.xml b/docs/reference/pygio-loadableicon.xml
new file mode 100644 (file)
index 0000000..93198c4
--- /dev/null
@@ -0,0 +1,198 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioloadableicon">
+    <refnamediv>
+        <refname>gio.LoadableIcon</refname>
+        <refpurpose>Interface for icons.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.LoadableIcon</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioloadableicon--load">load</link></methodname>
+        <methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
+       <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioloadableicon--load-async">load_async</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+       <methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
+       <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+       <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioloadableicon--load-finish">load_finish</link></methodname>
+       <methodparam><parameter role="keyword">res</parameter></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+  +-- <link linkend="class-gioloadableicon">gio.LoadableIcon</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Prerequisites</title>
+        <para>
+            <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link> requires
+            <link linkend="class-gioicon"><classname>gio.Icon</classname></link>. and
+           <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
+        </para>
+    </refsect1>
+    
+    <refsect1>
+       <title>Known Implementation</title>
+        <para>
+            <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link> is implemented by
+            <link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link>
+            extends the <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+           interface and adds the ability to load icons from streams.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-gioloadableicon--load">
+            <title>gio.LoadableIcon.load</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>load</methodname>
+                <methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
+               <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>size</parameter>&nbsp;:</term>
+                    <listitem><simpara>an integer
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a 2 tuple containing a
+                   <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+                   to read the icon from and a string containing the icon type.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>load</methodname>() method loads a loadable icon.
+               For the asynchronous version of this function, see
+               <methodname><link linkend="method-gioloadableicon--load-async">gio.LoadableIcon.load_async</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioloadableicon--load-async">
+            <title>gio.LoadableIcon.load_async</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>load_async</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+               <methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
+               <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+               <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>callback</parameter>&nbsp;:</term>
+                    <listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>size</parameter>&nbsp;:</term>
+                    <listitem><simpara>an integer
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>optional
+                    <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    object, <literal>None</literal> to ignore.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_data</parameter>&nbsp;:</term>
+                    <listitem><simpara>the data to pass to callback function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>load_async</methodname>() method loads an icon asynchronously.
+            </para>
+            <para>
+                For more details, see
+                <methodname><link linkend="method-gioloadableicon--load">gio.LoadableIcon.load</link></methodname>()
+                which is the synchronous version of this call. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-gioloadableicon--load-finish">gio.LoadableIcon.load_finish</link></methodname>()
+                to get the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioloadableicon--load-finish">
+            <title>gio.LoadableIcon.load_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>load_finish</methodname>
+                <methodparam><parameter role="keyword">res</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>res</parameter>&nbsp;:</term>
+                    <listitem><simpara>a
+                   <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a 2 tuple containing a
+                   <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+                   to read the icon from and a string containing the icon type.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>load_finish</methodname>() method finishes an asynchronous
+                icon load started in 
+                <methodname><link linkend="method-gioloadableicon--load-async">gio.LoadableIcon.load_async</link></methodname>().
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-memoryinputstream.xml b/docs/reference/pygio-memoryinputstream.xml
new file mode 100644 (file)
index 0000000..7d8cffb
--- /dev/null
@@ -0,0 +1,151 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giomemoryinputstream">
+    <refnamediv>
+        <refname>gio.MemoryInputStream</refname>
+        <refpurpose>Base class for implementing streaming input</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.MemoryInputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-gioinputstream">gio.InputStream</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-giomemoryinputstream">gio.MemoryInputStream</link></methodname>
+       <methodparam></methodparam>
+    </constructorsynopsis>
+    
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomemoryinputstream--add-data">add_data</link></methodname>
+        <methodparam><parameter role="keyword">data</parameter></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+<methodsynopsis language="python">
+    <methodname><link linkend="function-gio--memory-input-stream-new-from-data">gio.memory_input_stream_new_from_data</link></methodname>
+    <methodparam><parameter role="keyword">data</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+    +-- <link linkend="class-giomemoryinputstream">gio.MemoryInputStream</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Implemented Interfaces</title>
+        <para>
+            <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>
+            implements
+            <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>
+            is a class for using arbitrary memory chunks as input for GIO streaming input operations.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giomemoryinputstream">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.MemoryInputStream</methodname>
+            <methodparam><parameter role="keyword">icon</parameter></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates an empty
+            <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giomemoryinputstream--add-data">
+            <title>gio.MemoryInputStream.add_data</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>add_data</methodname>
+                <methodparam><parameter role="keyword">data</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+                  <listitem><simpara>input data.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>add_data</methodname>() method appends data to data
+                that can be read from the input stream
+            </para>
+        </refsect2>
+    </refsect1>
+    
+    <refsect1>
+        <title>Functions</title>
+
+        <refsect2 id="function-gio--memory-input-stream-new-from-data">
+            <title>gio.memory_input_stream_new_from_data</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>memory_input_stream_new_from_data</methodname>
+                <methodparam><parameter role="keyword">data</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>data</parameter>&nbsp;:</term>
+                    <listitem><simpara>input data.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A new
+                    <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>
+                    read from data
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>memory_input_stream_new_from_data</methodname>() function creates
+                a new <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>
+                with data in memory.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-memoryoutputstream.xml b/docs/reference/pygio-memoryoutputstream.xml
new file mode 100644 (file)
index 0000000..f044496
--- /dev/null
@@ -0,0 +1,175 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giomemoryoutputstream">
+    <refnamediv>
+        <refname>gio.MemoryOutputStream</refname>
+        <refpurpose>Streaming output operations on memory chunks</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.MemoryOutputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-giomemoryoutputstream">gio.MemoryOutputStream</link></methodname>
+       <methodparam></methodparam>
+    </constructorsynopsis>
+    
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomemoryoutputstream--get-contents">get_contents</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomemoryoutputstream--get-data-size">get_data_size</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomemoryoutputstream--get-size">get_size</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+    +-- <link linkend="class-giomemoryoutputstream">gio.MemoryOutputStream</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Implemented Interfaces</title>
+        <para>
+            <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>
+            implements
+            <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>
+            is a class for using arbitrary memory chunks as output for GIO streaming output operations.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giomemoryoutputstream">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.MemoryOutputStream</methodname>
+            <methodparam></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new
+            <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giomemoryoutputstream--get-contents">
+            <title>gio.MemoryOutputStream.get_contents</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_contents</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the stream's data
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_contents</methodname>() method gets any loaded data
+                from the ostream.
+            </para>
+            <para>
+                Note that the returned data may become invalid on the next write or truncate
+                operation on the stream.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomemoryoutputstream--get-data-size">
+            <title>gio.MemoryOutputStream.get_data_size</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_data_size</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the number of bytes written to the stream
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_data_size</methodname>() method returns the number
+                of bytes from the start up to including the last byte written in the
+                stream that has not been truncated away.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomemoryoutputstream--get-size">
+            <title>gio.MemoryOutputStream.get_size</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_size</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the number of bytes allocated for the data buffer
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_size</methodname>() method gets the size of the
+                currently allocated data area (availible from
+                <methodname><link linkend="method-giomemoryoutputstream--get-contents">gio.MemoryOutputStream.get_contents</link></methodname>()
+                ).
+            </para>
+            <para>
+                Note that for growable streams the returned size may become invalid on the next write or truncate operation on the stream.
+            </para>
+            <para>
+                If you want the number of bytes currently written to the stream, use
+                <methodname><link linkend="method-giomemoryoutputstream--get-data-size">gio.MemoryOutputStream.get_data_size</link></methodname>().
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-mount.xml b/docs/reference/pygio-mount.xml
new file mode 100644 (file)
index 0000000..f01b155
--- /dev/null
@@ -0,0 +1,962 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giomount">
+    <refnamediv>
+        <refname>gio.Mount</refname>
+        <refpurpose>Mount management</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.Mount</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--can-eject">can_eject</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis><methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--can-unmount">can_unmount</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--eject">eject</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--eject-finish">eject_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--get-drive">get_drive</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--get-icon">get_icon</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--get-name">get_name</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--get-root">get_root</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--get-uuid">get_uuid</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--get-volume">get_volume</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--guess-content-type">guess_content_type</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">force_rescan</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--guess-content-type-finish">guess_content_type_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--guess-content-type-sync">guess_content_type_sync</link></methodname>
+        <methodparam><parameter role="keyword">force_rescan</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--is-shadowed">is_shadowed</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--remount">remount</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">mount_operation</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--remount-finish">remount_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--shadow">shadow</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--unmount">unmount</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--unmount-finish">unmount_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomount--unshadow">unshadow</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+  +-- <link linkend="class-giomount">gio.Mount</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Prerequisites</title>
+        <para>
+            <link linkend="class-giomount"><classname>gio.Mount</classname></link> requires
+            <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1 id="signal-prototypes-giomount">
+        <title>gio.Mount Signal Prototypes</title>
+  
+        <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
+  
+        <variablelist>
+            <varlistentry>
+                <term><link linkend="signal-giomount--aborted">"aborted"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>mount</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giomount--changed">"changed"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>mount</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giomount--unmounted">"unmounted"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>mount</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            The <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+            interface represents user-visible mounts. Note, when porting from GnomeVFS,
+            <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+            is the moral equivalent of GnomeVFSVolume.
+            
+        </para>
+        <para>
+            <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+            is a "mounted" filesystem that you can access. Mounted is in quotes because
+            it's not the same as a unix mount, it might be a gvfs mount, but you can still
+            access the files on it if you use GIO. Might or might not be related to a volume object.
+        </para>
+        <para>
+            Unmounting a GMount instance is an asynchronous operation. For more information
+            about asynchronous operations, see GAsyncReady and GSimpleAsyncReady. To unmount
+            a <link linkend="class-giomount"><classname>gio.Mount</classname></link> instance,
+            first call
+            g_mount_unmount()
+            with (at least) the GMount instance and a GAsyncReadyCallback. The callback will
+            be fired when the operation has resolved (either with success or failure), and a
+            GAsyncReady structure will be passed to the callback. That callback should then call
+            g_mount_unmount_finish()
+            with the GMount and the GAsyncReady data to see if the operation was completed successfully.
+            If an error is present when g_mount_unmount_finish() is called, then it will be filled
+            with any error information.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+        
+        <refsect2 id="method-giomount--can-eject">
+            <title>gio.Mount.can_eject</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>can_eject</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the mount can be ejected,
+                    <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>can_eject</methodname>() method checks if a mount can be ejected.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giomount--can-unmount">
+            <title>gio.Mount.can_unmount</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>can_unmount</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the mount can be unmounted,
+                    <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>can_eject</methodname>() method checks if a mount can be unmounted.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomount--eject">
+            <title>gio.Mount.eject</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>eject</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+                  <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+                  <listitem><simpara>flags affecting the unmount if required for eject
+                  <xref linkend="gio-mount-unmount-flags-constants" endterm="gio-mount-unmount-flags-constants-title"></xref>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>Optional
+                  <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                  object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+                  <listitem><simpara>The data to pass to callback function.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>eject</methodname>() method asynchronously ejects a mount. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giomount--eject-finish">gio.Mount.eject_finish</link></methodname>()
+                to obtain the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomount--eject-finish">
+            <title>gio.Mount.eject_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>eject_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the mount has been ejected
+                    successfully, <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>eject_finish</methodname>() method finishes ejecting a mount.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giomount--get-drive">
+            <title>gio.Mount.get_drive</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_drive</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+                    or <literal>None</literal> if mount is not associated with a volume or a drive.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_drive</methodname>() method gets the drive for the mount.
+            </para>
+            <para>
+                This is a convenience method for getting the
+                <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                and then using that object to get the
+                <link linkend="class-giodrive"><classname>gio.Drive</classname></link>.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giomount--get-icon">
+            <title>gio.Mount.get_icon</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_icon</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+                    for the mount.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_icon</methodname>() method gets the icon for mount.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giomount--get-name">
+            <title>gio.Mount.get_name</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_name</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the name for the given mount.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_name</methodname>() method gets the name of mount.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giomount--get-root">
+            <title>gio.Mount.get_root</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_root</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giofile"><classname>gio.File</classname></link>.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_root</methodname>() method gets the root directory on mount.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giomount--get-uuid">
+            <title>gio.Mount.get_uuid</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_uuid</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the UUID for mount or <literal>None</literal>
+                    if no UUID can be computed.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_uuid</methodname>() method gets the UUID for the mount.
+                The reference is typically based on the file system UUID for the mount in
+                question and should be considered an opaque string. Returns <literal>None</literal>
+                if there is no UUID available
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giomount--get-volume">
+            <title>gio.Mount.get_volume</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_volume</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                    or <literal>None</literal> if mount is not associated with a volume.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_volume</methodname>() method gets the volume for the mount.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomount--guess-content-type">
+            <title>gio.Mount.guess_content_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>guess_content_type</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">force_rescan</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+                  <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">force_rescan</parameter>&nbsp;:</term>
+                  <listitem><simpara>Whether to force a rescan of the content. Otherwise a cached result will be used if available.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>Optional
+                  <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                  object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+                  <listitem><simpara>The data to pass to callback function.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>guess_content_type</methodname>() method asynchronously tries to guess the type of
+                content stored on mount. Returns one or more textual identifiers of well-known content
+                types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory
+                cards. See the shared-mime-info specification for more on x-content types.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giomount--guess-content-type-finish">gio.Mount.guess_content_type_finish</link></methodname>()
+                to obtain the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomount--guess-content-type-finish">
+            <title>gio.Mount.guess_content_type_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>guess_content_type_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A list of types or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <!-- XXX This description must be incorrect! -->
+            <para>
+                The <methodname>guess_content_type_finish</methodname>() method finishes guessing content
+                types of mount. If any errors occured during the operation, error will be set to
+                contain the errors and <literal>False</literal> will be returned. In particular, you may get an
+                gio.ERROR_NOT_SUPPORTED if the mount does not support content guessing.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomount--guess-content-type-sync">
+            <title>gio.Mount.guess_content_type_sync</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>guess_content_type_sync</methodname>
+                <methodparam><parameter role="keyword">force_rescan</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">force_rescan</parameter>&nbsp;:</term>
+                  <listitem><simpara>Whether to force a rescan of the content. Otherwise a cached result will be used if available.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>Optional
+                  <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                  object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>guess_content_type_sync</methodname>() method tries to guess
+                the type of content stored on mount. Returns one or more textual identifiers
+                of well-known content types (typically prefixed with "x-content/"), e.g.
+                x-content/image-dcf for camera memory cards. See the shared-mime-info specification
+                for more on x-content types.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+            <para>
+                This is an synchronous operation and as such may block doing IO; see
+                <methodname><link linkend="method-giomount--guess-content-type">gio.Mount.guess_content_type</link></methodname>()
+                for the asynchronous version.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giomount--is-shadowed">
+            <title>gio.Mount.is_shadowed</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>is_shadowed</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if mount is shadowed.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>is_shadowed</methodname>() method determines if mount
+                is shadowed. Applications or libraries should avoid displaying mount
+                in the user interface if it is shadowed.
+            </para>
+            <para>
+                A mount is said to be shadowed if there exists one or more user visible
+                objects (currently
+                <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+                objects) with a root that is inside the root of mount.
+            </para>
+            <para>
+                One application of shadow mounts is when exposing a single file system
+                that is used to address several logical volumes. In this situation, a
+                <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+                implementation would create two
+                <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                objects (for example, one for the camera functionality of the device
+                and one for a SD card reader on the device) with activation URIs
+                gphoto2://[usb:001,002]/store1/ and gphoto2://[usb:001,002]/store2/.
+                When the underlying mount (with root gphoto2://[usb:001,002]/) is
+                mounted, said
+                <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+                implementation would create two
+                <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+                objects (each with their root matching the corresponding volume
+                activation root) that would shadow the original mount.
+            </para>
+            <para>
+                The proxy monitor in GVfs 2.26 and later, automatically creates and
+                manage shadow mounts (and shadows the underlying mount) if the activation
+                root on a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                is set.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomount--remount">
+            <title>gio.Mount.remount</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>remount</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+                <methodparam><parameter role="keyword">mount_operation</parameter><initializer><literal>None</literal></initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+                  <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+                  <listitem><simpara>flags affecting the unmount if required for eject
+                  <xref linkend="gio-mount-unmount-flags-constants" endterm="gio-mount-unmount-flags-constants-title"></xref>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">mount_operation</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+                  or <literal>None</literal> to avoid user interaction.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>Optional
+                  <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                  object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+                  <listitem><simpara>The data to pass to callback function.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>remount</methodname>() method asynchronously remounts a mount.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giomount--remount-finish">gio.Mount.remount_finish</link></methodname>()
+                to obtain the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomount--remount-finish">
+            <title>gio.Mount.remount_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>remount_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the mount has been remounted
+                    successfully, <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>remount_finish</methodname>() method finishes remounting a mount.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giomount--shadow">
+            <title>gio.Mount.shadow</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>shadow</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+            </variablelist>
+    
+            <para>
+                The <methodname>shadow</methodname>() method increments the shadow
+                count on mount. Usually used by
+                <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+                implementations when creating a shadow mount for mount, see
+                <methodname><link linkend="method-giomount--is-shadowed">gio.Mount.is_shadowed</link></methodname>()
+                for more information. The caller will need to emit the "changed"
+                signal on mount manually.
+            </para>
+            
+        </refsect2>
+
+        <refsect2 id="method-giomount--unmount">
+            <title>gio.Mount.unmount</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>unmount</methodname>
+                <methodparam><parameter role="keyword">callback</parameter></methodparam>
+                <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+                <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+                  <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+                  <listitem><simpara>flags affecting the unmount if required for eject
+                  <xref linkend="gio-mount-unmount-flags-constants" endterm="gio-mount-unmount-flags-constants-title"></xref>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>Optional
+                  <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                  object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+                  <listitem><simpara>The data to pass to callback function.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>unmount</methodname>() method asynchronously unmounts a mount.
+            </para>
+            <para>
+                If cancellable is not <literal>None</literal>, then the operation can be cancelled
+                by triggering the cancellable object from another thread. If the operation was cancelled,
+                the error gio.ERROR_CANCELLED will be returned.
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giomount--unmount-finish">gio.Mount.unmount_finish</link></methodname>()
+                to obtain the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomount--unmount-finish">
+            <title>gio.Mount.unmount_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>unmount_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the mount has been unmounted
+                    successfully, <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>unmount_finish</methodname>() method finishes unmounting a mount.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giomount--unshadow">
+            <title>gio.Mount.unshadow</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>unshadow</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+            </variablelist>
+    
+            <para>
+                The <methodname>unshadow</methodname>() method decrements the shadow
+                count on mount. Usually used by
+                <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+                implementations when destroying a shadow mount for mount, see
+                <methodname><link linkend="method-giomount--is-shadowed">gio.Mount.is_shadowed</link></methodname>()
+                for more information. The caller will need to emit the "changed"
+                signal on mount manually.
+            </para>
+            
+        </refsect2>
+    </refsect1>
+
+    <refsect1>
+        <title>Signals</title>
+    
+        <refsect2 id="signal-giomount--aborted">
+            <title>The "aborted" gio.Mount Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>mount</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>mount</parameter>&nbsp;:</term>
+                    <listitem><simpara>the mount</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted by the backend when e.g. a device becomes unavailable while a
+                mount operation is in progress.
+            </para>
+            <para>
+                Implementations of <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+                should handle this signal by dismissing open password dialogs.
+            </para>
+        </refsect2>
+        <refsect2 id="signal-giomount--changed">
+            <title>The "changed" gio.Mount Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>mount</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>mount</parameter>&nbsp;:</term>
+                    <listitem><simpara>the mount</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted when the mount has been changed.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giomount--unmounted">
+            <title>The "unmounted" gio.Mount Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>mount</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>mount</parameter>&nbsp;:</term>
+                    <listitem><simpara>the mount</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                This signal is emitted when the
+                <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+                have been unmounted.
+            </para>
+        </refsect2>
+  
+  </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-mountoperation.xml b/docs/reference/pygio-mountoperation.xml
new file mode 100644 (file)
index 0000000..34dec13
--- /dev/null
@@ -0,0 +1,726 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giomountoperation">
+    <refnamediv>
+        <refname>gio.MountOperation</refname>
+        <refpurpose>Authentication methods for mountable locations.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.MountOperation</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+    <methodname><link linkend="constructor-giomountoperation">gio.MountOperation</link></methodname>
+    <methodparam></methodparam>
+    </constructorsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomountoperation--get-anonymous">get_anonymous</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomountoperation--get-choice">get_choice</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomountoperation--get-domain">get_domain</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomountoperation--get-password">get_password</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomountoperation--get-password-save">get_password_save</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomountoperation--get-username">get_username</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomountoperation--reply">replay</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomountoperation--set-anonymous">set_anonymous</link></methodname>
+        <methodparam><parameter role="keyword">anonymous</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomountoperation--set-choice">set_choice</link></methodname>
+        <methodparam><parameter role="keyword">choice</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomountoperation--set-domain">set_domain</link></methodname>
+        <methodparam><parameter role="keyword">domain</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomountoperation--set-password">set_password</link></methodname>
+        <methodparam><parameter role="keyword">password</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomountoperation--set-password-save">set_password_save</link></methodname>
+        <methodparam><parameter role="keyword">save</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomountoperation--set-username">set_username</link></methodname>
+        <methodparam><parameter role="keyword">username</parameter></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giomountoperation">gio.MountOperation</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1 id="properties-giomountoperation">
+        <title>gio.MountOperation Properties</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"anonymous"</entry>
+                            <entry>Read/Write</entry>
+                            <entry>
+                                Whether to use an anonymous user when authenticating.
+                                Default value: <literal>False</literal>
+                            </entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"choice"</entry>
+                            <entry>Read/Write</entry>
+                            <entry>
+                                The index of the user's choice when a question is asked during
+                                the mount operation. See the "ask-question" signal.
+                                Allowed values: >= 0 Default value: 0
+                            </entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"domain"</entry>
+                            <entry>Read/Write</entry>
+                            <entry>
+                                The domain to use for the mount operation. Default value: <literal>None</literal>
+                            </entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"password"</entry>
+                            <entry>Read/Write</entry>
+                            <entry>
+                                The password that is used for authentication when carrying out the
+                                mount operation. Default value: <literal>None</literal>
+                            </entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"password-save"</entry>
+                            <entry>Read/Write</entry>
+                            <entry>
+                                Determines if and how the password information should be saved.
+                                Default value: gio.PASSWORD_SAVE_NEVER
+                            </entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"username"</entry>
+                            <entry>Read/Write</entry>
+                            <entry>
+                                The user name that is used for authentication when carrying out the
+                                mount operation. Default value: <literal>None</literal>
+                            </entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+  
+    </refsect1>
+
+    <refsect1 id="signal-prototypes-giomountoperation">
+        <title>gio.MountOperation Signal Prototypes</title>
+  
+        <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
+  
+        <variablelist>
+            <varlistentry>
+                <term><link linkend="signal-giomountoperation--aborted">"aborted"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>mountoperation</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giomountoperation--ask-password">"ask-password"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>mountoperation</parameter></methodparam>
+                        <methodparam><parameter>message</parameter></methodparam>
+                        <methodparam><parameter>default_user</parameter></methodparam>
+                        <methodparam><parameter>default_domain</parameter></methodparam>
+                        <methodparam><parameter>flags</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giomountoperation--ask-question">"ask-question"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>mountoperation</parameter></methodparam>
+                        <methodparam><parameter>message</parameter></methodparam>
+                        <methodparam><parameter>choices</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giomountoperation--reply">"reply"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>mountoperation</parameter></methodparam>
+                        <methodparam><parameter>result</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            The <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+        provides a mechanism for authenticating mountable operations, such as loop mounting files,
+        hard drive partitions or server locations.
+        </para>
+        <para>
+            Mounting operations are handed a
+            <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+            that then can use if they require any privileges or authentication for their volumes to be
+            mounted (e.g. a hard disk partition or an encrypted filesystem), or if they are implementing
+            a remote server protocol which requires user credentials such as FTP or WebDAV.
+        </para>
+        <para>
+            Users should instantiate a subclass of this that implements all the various callbacks
+            to show the required dialogs, such as
+            <link linkend="class-gtkmountoperation"><classname>gtk.MountOperation</classname></link>.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giomountoperation">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.MountOperation</methodname>
+            <methodparam></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new mount operation.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giomountoperation--get-anonymous">
+            <title>gio.MountOperation.get_anonymous</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_anonymous</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if mount operation is anonymous.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_anonymous</methodname>() method check to see whether
+                the mount operation is being used for an anonymous user
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomountoperation--get-choice">
+            <title>gio.MountOperation.get_choice</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_choice</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>an integer containing an index of the user's
+                    choice from the choice's list, or 0.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_anonymous</methodname>() method gets a choice
+                from the mount operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomountoperation--get-domain">
+            <title>gio.MountOperation.get_domain</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_domain</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string set to the domain.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_domain</methodname>() method gets the domain
+                of the mount operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomountoperation--get-password">
+            <title>gio.MountOperation.get_password</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_password</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string containing the password within
+                    the mountoperation.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_password</methodname>() method gets a password
+                from the mount operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomountoperation--get-password-save">
+            <title>gio.MountOperation.get_password_save</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_password_save</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <xref linkend="gio-password-save-constants" endterm="gio-password-save-constants-title"></xref>
+                    flag.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_password_save</methodname>() method gets the state
+                of saving passwords for the mount operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomountoperation--get-username">
+            <title>gio.MountOperation.get_username</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_username</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string containing the user name.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_username</methodname>() method get the user
+                name from the mount operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomountoperation--reply">
+            <title>gio.MountOperation.reply</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>reply</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>result</parameter>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <xref linkend="gio-mount-operation-result-constants" endterm="gio-mount-operation-result-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>reply</methodname>() method emits the "reply" signal.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomountoperation--set-anonymous">
+            <title>gio.MountOperation.set_anonymous</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_anonymous</methodname>
+                <methodparam><parameter role="keyword">anonymous</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>anonymous</parameter>&nbsp;:</term>
+                    <listitem><simpara>boolean value.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_anonymous</methodname>() method sets the mount operation
+                to use an anonymous user if anonymous is <literal>True</literal>.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomountoperation--set-choice">
+            <title>gio.MountOperation.set_choice</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_choice</methodname>
+                <methodparam><parameter role="keyword">choice</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>choice</parameter>&nbsp;:</term>
+                    <listitem><simpara>an integer.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_choice</methodname>() method sets a default choice for the mount operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomountoperation--set-domain">
+            <title>gio.MountOperation.set_domain</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_domain</methodname>
+                <methodparam><parameter role="keyword">domain</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>domain</parameter>&nbsp;:</term>
+                    <listitem><simpara>the domain to set.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_domain</methodname>() method sets the mount operation's domain.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomountoperation--set-password">
+            <title>gio.MountOperation.set_password</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_password</methodname>
+                <methodparam><parameter role="keyword">password</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>password</parameter>&nbsp;:</term>
+                    <listitem><simpara>password to set.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_password</methodname>() method sets the mount
+                operation's password to password.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomountoperation--set-password-save">
+            <title>gio.MountOperation.set_password_save</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_password_save</methodname>
+                <methodparam><parameter role="keyword">save</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>save</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-password-save-constants" endterm="gio-password-save-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_password_save</methodname>() method sets the state
+                of saving passwords for the mount operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomountoperation--set-username">
+            <title>gio.MountOperation.set_username</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_username</methodname>
+                <methodparam><parameter role="keyword">username</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>username</parameter>&nbsp;:</term>
+                    <listitem><simpara>input username.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_anonymous</methodname>() method sets the user
+                name within op to username.
+            </para>
+        </refsect2>
+    </refsect1>
+
+    <refsect1>
+        <title>Signals</title>
+    
+        <refsect2 id="signal-giomountoperation--aborted">
+            <title>The "aborted" gio.MountOperation Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>mountoperation</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>mountoperation</parameter>&nbsp;:</term>
+                    <listitem><simpara>the mountoperation</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted by the backend when e.g. a device becomes unavailable while a mount operation is in progress.
+                Implementations of <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+                should handle this signal by dismissing open password dialogs.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giomountoperation--ask-password">
+            <title>The "ask-password" gio.MountOperation Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>mountoperation</parameter></methodparam>
+                <methodparam><parameter>message</parameter></methodparam>
+                <methodparam><parameter>default_user</parameter></methodparam>
+                <methodparam><parameter>default_domain</parameter></methodparam>
+                <methodparam><parameter>flags</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>mountoperation</parameter>&nbsp;:</term>
+                    <listitem><simpara>the mountoperation</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>message</parameter>&nbsp;:</term>
+                    <listitem><simpara>string containing a message to display to the user.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>default_user</parameter>&nbsp;:</term>
+                    <listitem><simpara>string containing the default user name.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>default_domain</parameter>&nbsp;:</term>
+                    <listitem><simpara>string containing the default domain.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>flags</parameter>&nbsp;:</term>
+                    <listitem><simpara>a set of
+                    <xref linkend="gio-ask-password-flags-constants" endterm="gio-ask-password-flags-constants-title"></xref>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                This signal is emitted when a mount operation asks the user for a password.
+                If the message contains a line break, the first line should be presented as a heading.
+                For example, it may be used as the primary text in a
+                <link linkend="class-gtkmessagedialog"><classname>gtk.MessageDialog</classname></link>.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giomountoperation--ask-question">
+            <title>The "ask-question" gio.MountOperation Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>mountoperation</parameter></methodparam>
+                <methodparam><parameter>message</parameter></methodparam>
+                <methodparam><parameter>choices</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>mountoperation</parameter>&nbsp;:</term>
+                    <listitem><simpara>the mountoperation</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>message</parameter>&nbsp;:</term>
+                    <listitem><simpara>string containing a message to display to the user.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>choices</parameter>&nbsp;:</term>
+                    <listitem><simpara>a list of strings for each possible choice.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                This signal is emitted when asking the user a question and gives a list of choices
+                for the user to choose from. If the message contains a line break, the first line should be
+                presented as a heading. For example, it may be used as the primary text in a
+                <link linkend="class-gtkmessagedialog"><classname>gtk.MessageDialog</classname></link>.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giomountoperation--reply">
+            <title>The "reply" gio.MountOperation Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>mountoperation</parameter></methodparam>
+                <methodparam><parameter>result</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>mountoperation</parameter>&nbsp;:</term>
+                    <listitem><simpara>the mountoperation</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>result</parameter>&nbsp;:</term>
+                    <listitem><simpara>a
+                    <xref linkend="gio-mount-operation-result-constants" endterm="gio-mount-operation-result-constants-title"></xref>
+                    indicating how the request was handled</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                This signal is emitted when the user has replied to the mount operation.
+            </para>
+        </refsect2>
+  
+  </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-outputstream.xml b/docs/reference/pygio-outputstream.xml
new file mode 100644 (file)
index 0000000..00ddf2e
--- /dev/null
@@ -0,0 +1,140 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giooutputstream">
+    <refnamediv>
+        <refname>gio.OutputStream</refname>
+        <refpurpose>Base class for implementing streaming input</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.OutputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--clear-pending">clear_pending</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--close">close</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--close-async">close_async</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--close-finish">close_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--flush">flush</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--flush-async">flush_async</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--flush-finish">flush_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--has-pending">has_pending</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--is-closed">is_closed</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--set-pending">set_pending</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--splice">splice</link></methodname>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.OUTPUT_STREAM_SPLICE_NONE</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--splice-async">splice_async</link></methodname>
+        <methodparam><parameter role="keyword">source</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer>gio.OUTPUT_STREAM_SPLICE_NONE</initializer></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--splice-finish">splice_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--write">write</link></methodname>
+        <methodparam><parameter role="keyword">buffer</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--write-async">write_async</link></methodname>
+        <methodparam><parameter role="keyword">buffer</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">io_priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giooutputstream--write-finish">write_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
+            has functions to write from a stream (
+            <methodname><link linkend="method-giooutputstream--write">gio.OutputStream.write</link></methodname>()
+            ), to close a stream (
+            <methodname><link linkend="method-giooutputstream--close">gio.OutputStream.close</link></methodname>()
+            ) and to flush pending writes (
+            <methodname><link linkend="method-giooutputstream--flush">gio.OutputStream.flush</link></methodname>()
+            ).
+        </para>
+        <para>
+            To copy the content of an input stream to an output stream without manually
+            handling the reads and writes, use
+            <methodname><link linkend="method-giooutputstream--splice">gio.OutputStream.splice</link></methodname>().
+        </para>
+        <para>
+            All of these functions have async variants too.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+        <para> Unfinished section, you may want to see the relevant C API docs for methods descriptions.</para>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-seekable.xml b/docs/reference/pygio-seekable.xml
new file mode 100644 (file)
index 0000000..1081143
--- /dev/null
@@ -0,0 +1,231 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gioseekable">
+    <refnamediv>
+        <refname>gio.Seekable</refname>
+        <refpurpose>Stream seeking interface.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.Seekable</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioseekable--tell">tell</link></methodname>
+    </methodsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioseekable--can_seek">can_seek</link></methodname>
+    </methodsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioseekable--seek">seek</link></methodname>
+        <methodparam><parameter role="keyword">offset</parameter></methodparam>
+        <methodparam><parameter role="keyword">type</parameter><initializer>0</initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioseekable--can_truncate">can_truncate</link></methodname>
+    </methodsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioseekable--truncate">truncate</link></methodname>
+        <methodparam><parameter role="keyword">offset</parameter></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+  +-- <link linkend="class-gioseekable">gio.Seekable</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1>
+       <title>Known Implementation</title>
+        <para>
+            <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link> is implemented by
+            <link linkend="class-giofileoutputstream"><classname>gio.FileOutputStream</classname></link>,
+            <link linkend="class-giomemoryinputstream"><classname>gio.MemoryInputStream</classname></link>,
+            <link linkend="class-giofileinputstream"><classname>gio.FileInputStream</classname></link> and
+            <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
+            is implemented by streams (implementations of 
+            <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link> or
+            <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>)
+            that support seeking.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-gioseekable--tell">
+            <title>gio.Seekable.tell</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>tell</methodname>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>
+                            the offset from the beginning of the buffer
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                Tells the current position within the stream.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioseekable--can_seek">
+            <title>gio.Seekable.can_seek</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>can_seek</methodname>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if this
+                    <classname>gio.Seekable</classname> can be seeked with
+                    the <methodname>seek</methodname>() method, <literal>False</literal>
+                    if not. </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>can_seek</methodname>() method checks if the
+                <link linkend="method-gioseekable--seek"><methodname>seek</methodname>()</link>
+                can be used on this <classname>gio.Seekable</classname>.
+            </para>
+        </refsect2>
+        <refsect2 id="method-gioseekable--seek">
+            <title>gio.Seekable.seek</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>seek</methodname>
+                <methodparam><parameter role="keyword">offset</parameter></methodparam>
+                <methodparam><parameter role="keyword">type</parameter><initializer>0</initializer></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>offset</parameter>&nbsp;:</term>
+                    <listitem><simpara>the offset that is added to the position determined by the <literal>type</literal> parameter.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>type</parameter>&nbsp;:</term>
+                    <listitem><simpara>0=current position, 1=start of the file, 2=end of the file.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    or <literal>None</literal>.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> on successful seek,
+                    <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                Seeks in the stream by the given <literal>offset</literal>, modified by <literal>type</literal>.
+            </para>
+            <para>
+                If <literal>cancellable</literal> is not <literal>None</literal>, then the
+                operation can be cancelled by triggering the cancellable object from another thread.
+            </para>
+        </refsect2>
+        <refsect2 id="method-gioseekable--can_truncate">
+            <title>gio.Seekable.can_truncate</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>can_truncate</methodname>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if this
+                    <classname>gio.Seekable</classname> can be truncated with
+                    the <methodname>truncate</methodname>() method, <literal>False</literal>
+                    if not. </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>can_truncate</methodname>() method checks if the
+                <link linkend="method-gioseekable--truncate"><methodname>truncate</methodname>()</link>
+                can be used on this <classname>gio.Seekable</classname>.
+            </para>
+        </refsect2>
+        <refsect2 id="method-gioseekable--truncate">
+            <title>gio.Seekable.truncate</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>truncate</methodname>
+                <methodparam><parameter role="keyword">offset</parameter></methodparam>
+                <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>offset</parameter>&nbsp;:</term>
+                    <listitem><simpara>the offset at which the stream should be truncated
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>cancellable</parameter>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                    or <literal>None</literal>.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if successful,
+                    <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                Truncates a stream with a given <literal>offset</literal>.
+            </para>
+            <para>
+                If <literal>cancellable</literal> is not <literal>None</literal>, then the
+                operation can be cancelled by triggering the cancellable object from another thread.
+            </para>
+            <para>
+                If an operation was partially finished when the operation was cancelled the
+                partial result will be returned, without an error.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-simpleasyncresult.xml b/docs/reference/pygio-simpleasyncresult.xml
new file mode 100644 (file)
index 0000000..f6a0787
--- /dev/null
@@ -0,0 +1,317 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giosimpleasyncresult">
+    <refnamediv>
+        <refname>gio.SimpleAsyncResult</refname>
+        <refpurpose>Simple asynchronous results implementation.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.SimpleAsyncResult</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giosimpleasyncresult--complete">complete</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giosimpleasyncresult--complete-in-idle">complete_in_idle</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giosimpleasyncresult--get-op-res-gboolean">get_op_res_gboolean</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giosimpleasyncresult--get-op-res-gssize">get_op_res_gssize</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giosimpleasyncresult--propagate-error">propagate_error</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giosimpleasyncresult--set-handle-cancellation">set_handle_cancellation</link></methodname>
+        <methodparam><parameter role="keyword">handle_cancellation</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giosimpleasyncresult--set-op-res-gboolean">set_op_res_gboolean</link></methodname>
+        <methodparam><parameter role="keyword">op_res</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giosimpleasyncresult--set-op-res-gssize">set_op_res_gssize</link></methodname>
+        <methodparam><parameter role="keyword">op_res</parameter></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giosimpleasyncresult">gio.SimpleAsyncResult</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+       <title>Implemented Interface</title>
+        <para>
+            <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link> implements
+            <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            Implements <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+            for simple cases. Most of the time, this will be all an application needs, and will be used transparently
+            Because of this, GSimpleAsyncResult is used throughout GIO for handling asynchronous functions.            
+        </para>
+        <para>
+            <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link>
+            handles GAsyncReadyCallbacks, error reporting, operation cancellation and the final state of an
+            operation, completely transparent to the application. Results can be returned as a pointer e.g.
+            for functions that return data that is collected asynchronously, a boolean value for checking the
+            success or failure of an operation, or a gssize for operations which return the number of bytes modified
+            by the operation; all of the simple return cases are covered. 
+        </para>
+        <para>
+            Most of the time, an application will not need to know of the details of this API; it is handled
+            transparently, and any necessary operations are handled by GAsyncResult's interface. However, if
+            implementing a new GIO module, for writing language bindings, or for complex applications that need
+            better control of how asynchronous operations are completed, it is important to understand this functionality. 
+        </para>
+        <para>
+            <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link>
+            are tagged with the calling function to ensure that asynchronous functions and
+            their finishing functions are used together correctly. 
+        </para>
+        <!-- NEEDS LOVE
+        <para>
+            To create a new <link linkend="class-giosimpleasyncresult"><classname>gio.SimpleAsyncResult</classname></link>,
+            call g_simple_async_result_new(). If the result needs to be created for a GError, use g_simple_async_result_new_from_error().
+            If a GError is not available (e.g. the asynchronous operation's doesn't take a GError argument), but the result still needs
+            to be created for an error condition, use g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
+            if your application or binding requires passing a variable argument list directly), and the error can then be propegated
+            through the use of g_simple_async_result_propagate_error(). 
+        </para>
+        -->
+        <para>
+            An asynchronous operation can be made to ignore a cancellation event by calling
+            <methodname><link linkend="method-giosimpleasyncresult--set-handle-cancellation">gio.SimpleAsyncResult.set_handle_cancellation</link></methodname>()
+            with a
+            <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+            for the operation and <literal>False</literal>. This is useful for operations that are dangerous to cancel,
+            such as close (which would cause a leak if cancelled before being run). 
+        </para>
+        <para>
+            <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>
+            can integrate into GLib's event loop, GMainLoop, or it can use GThreads if available.
+            <methodname><link linkend="method-giosimpleasyncresult--complete">gio.SimpleAsyncResult.complete</link></methodname>()
+            will finish an I/O task directly within the main event loop.
+            <methodname><link linkend="method-giosimpleasyncresult--complete-in-idle">gio.SimpleAsyncResult.complete_in_idle</link></methodname>()
+            will integrate the I/O task into the main event loop as an idle function.
+            <!--
+            and g_simple_async_result_run_in_thread()
+            will run the job in a separate thread.
+            -->
+        </para>
+        <para>
+            To set the results of an asynchronous function,
+            <methodname><link linkend="method-giosimpleasyncresult--set-op-res-gboolean">gio.SimpleAsyncResult.set_op_res_gboolean</link></methodname>(), and
+            <methodname><link linkend="method-giosimpleasyncresult--set-op-res-gssize">gio.SimpleAsyncResult.set_op_res_gssize</link></methodname>()
+            are provided, setting the operation's result to a gboolean, or gssize, respectively. 
+        </para>
+        <para>
+            Likewise, to get the result of an asynchronous function,
+            <methodname><link linkend="method-giosimpleasyncresult--get-op-res-gboolean">gio.SimpleAsyncResult.get_op_res_gboolean</link></methodname>() and
+            <methodname><link linkend="method-giosimpleasyncresult--get-op-res-gssize">gio.SimpleAsyncResult.get_op_res_gssize</link></methodname>()
+            are provided, getting the operation's result as a gboolean and gssize, respectively.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giosimpleasyncresult--complete">
+            <title>gio.SimpleAsyncResult.complete</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>complete</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+            </variablelist>
+    
+            <para>
+                The <methodname>complete</methodname>() method completes an asynchronous I/O job.
+                Must be called in the main thread, as it invokes the callback that should be called
+                in the main thread. If you are in a different thread use
+                <methodname><link linkend="method-giosimpleasyncresult--complete-in-idle">gio.SimpleAsyncResult.complete_in_idle</link></methodname>().
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giosimpleasyncresult--complete-in-idle">
+            <title>gio.SimpleAsyncResult.complete_in_idle</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>complete_in_idle</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+            </variablelist>
+    
+            <para>
+                The <methodname>complete_in_idle</methodname>() method completes an asynchronous
+                function in the main event loop using an idle function.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giosimpleasyncresult--get-op-res-gboolean">
+            <title>gio.SimpleAsyncResult.get_op_res_gboolean</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_op_res_gboolean</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the operation's result was
+                    <literal>True</literal>, <literal>False</literal> if the operation's result
+                    was <literal>False</literal>. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_op_res_gboolean</methodname>() method gets the operation
+                result boolean from within the asynchronous result.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giosimpleasyncresult--get-op-res-gssize">
+            <title>gio.SimpleAsyncResult.get_op_res_gssize</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_op_res_gssize</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a gssize returned from the asynchronous function.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_op_res_gssize</methodname>() method gets a gssize
+                from the asynchronous result.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giosimpleasyncresult--propagate-error">
+            <title>gio.SimpleAsyncResult.propagate_error</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>propagate_error</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the error was propegated
+                    to dest. <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>propagate_error</methodname>() method propagates an error
+                from within the simple asynchronous result to a given destination.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giosimpleasyncresult--set-handle-cancellation">
+            <title>gio.SimpleAsyncResult.set_handle_cancellation</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_handle_cancellation</methodname>
+                <methodparam><parameter role="keyword">handle_cancellation</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">handle_cancellation</parameter>&nbsp;:</term>
+                  <listitem><simpara>a boolean.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_handle_cancellation</methodname>() method sets whether
+                to handle cancellation within the asynchronous operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giosimpleasyncresult--set-op-res-gboolean">
+            <title>gio.SimpleAsyncResult.set_op_res_gboolean</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_op_res_gboolean</methodname>
+                <methodparam><parameter role="keyword">op_res</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">op_res</parameter>&nbsp;:</term>
+                  <listitem><simpara>a boolean.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_op_res_gboolean</methodname>() method sets the operation
+                result to a boolean within the asynchronous result.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giosimpleasyncresult--set-op-res-gssize">
+            <title>gio.SimpleAsyncResult.set_op_res_gssize</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_op_res_gssize</methodname>
+                <methodparam><parameter role="keyword">op_res</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">op_res</parameter>&nbsp;:</term>
+                  <listitem><simpara>a gssize.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_op_res_gssize</methodname>() method sets the operation
+                result within the asynchronous result to the given op_res.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-themedicon.xml b/docs/reference/pygio-themedicon.xml
new file mode 100644 (file)
index 0000000..fe0e44c
--- /dev/null
@@ -0,0 +1,204 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giothemedicon">
+    <refnamediv>
+        <refname>gio.ThemedIcon</refname>
+        <refpurpose>Icon theming support.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.ThemedIcon</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+    <methodname><link linkend="constructor-giothemedicon">gio.ThemedIcon</link></methodname>
+    <methodparam></methodparam>
+    </constructorsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giothemedicon--append-name">append_name</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giothemedicon--get-names">get_names</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giothemedicon--prepend-name">prepend_name</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giothemedicon">gio.ThemedIcon</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1 id="properties-giomountoperation">
+        <title>gio.ThemedIcon Properties</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"name"</entry>
+                            <entry>Write/Contruct Only</entry>
+                            <entry>
+                                The icon name. Default value: <literal>None</literal>
+                            </entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"names"</entry>
+                            <entry>Read/Write/Contruct Only</entry>
+                            <entry>
+                                A list of icon names.
+                            </entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"use-default-fallbacks"</entry>
+                            <entry>Read/Write/Contruct Only</entry>
+                            <entry>
+                                Whether to use the default fallbacks found by shortening the
+                                icon name at '-' characters. If the "names" array has more
+                                than one element, ignores any past the first.
+                            </entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>
+            is an implementation of <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+            that supports icon themes. GThemedIcon contains a list of all of the icons present in an icon
+            theme, so that icons can be looked up quickly.
+        </para>
+        <para>
+            <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>
+            does not provide actual pixmaps for icons, just the icon names. Ideally something like
+            <methodname><link linkend="method-gtkicontheme--choose-icon">gtk.IconTheme.choose_icon</link></methodname>()
+            should be used to resolve the list of names so that fallback icons work nicely
+            with themes that inherit other themes
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giothemedicon">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.ThemedIcon</methodname>
+            <methodparam><parameter>name</parameter></methodparam>
+            <methodparam><parameter>use_default_fallbacks</parameter><initializer><literal>False</literal></initializer></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><parameter>name</parameter>&nbsp;:</term>
+                <listitem><simpara>a string containing an icon name.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new themed icon from icon name, if instead of an icon name you
+            provide a list of icon names, the <link linkend="class-giothemedicon"><classname>gio.ThemedIcon</classname></link>
+            will be constructed using the items in the list.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giothemedicon--append-name">
+            <title>gio.ThemedIcon.append_name</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>append_name</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>name</emphasis>&nbsp;:</term>
+                    <listitem><simpara>name of icon to append to list of icons from within icon.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>append_name</methodname>() method appends a name to
+                the list of icons from within icon.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giothemedicon--get-names">
+            <title>gio.ThemedIcon.get_names</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_names</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a list of icon names.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_names</methodname>() method gets the names
+                of icons from within icon.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giothemedicon--prepend-name">
+            <title>gio.ThemedIcon.prepend_name</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>prepend_name</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>name</emphasis>&nbsp;:</term>
+                    <listitem><simpara>name of icon to prepend to list of icons from within icon.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>prepend_name</methodname>() method prepends a name to
+                the list of icons from within icon.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-unixinputstream.xml b/docs/reference/pygio-unixinputstream.xml
new file mode 100644 (file)
index 0000000..5ef4cde
--- /dev/null
@@ -0,0 +1,202 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giounixinputstream">
+    <refnamediv>
+        <refname>gio.unix.InputStream</refname>
+        <refpurpose>Streaming input operations for UNIX file descriptors.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.unix.InputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-gioinputstream">gio.InputStream</link></classname></ooclass>
+
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-giounixinputstream">gio.unix.InputStream</link></methodname>
+       <methodparam><parameter role="keyword">fd</parameter></methodparam>
+       <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+    </constructorsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giounixinputstream--get-close-fd">get_close_fd</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giounixinputstream--get-fd">get_fd</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giounixinputstream--set-close-fd">set_close_fd</link></methodname>
+        <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-gioinputstream">gio.InputStream</link>
+    +-- <link linkend="class-giounixinputstream">gio.unix.InputStream</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1 id="properties-giounixinputstream">
+        <title>gio.unix.InputStream Properties</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"close-fd"</entry>
+                            <entry>Read - Write</entry>
+                            <entry>Whether to close the file descriptor when the stream is closed.
+                           Default value: <literal>True</literal>.</entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"fd"</entry>
+                            <entry>Read - Write - Construct only</entry>
+                            <entry>The file descriptor that the stream reads from. Default value: -1.</entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giounixinputstream"><classname>gio.unix.InputStream</classname></link>
+            implements <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+           for reading from a UNIX file descriptor, including asynchronous operations.
+           The file descriptor must be selectable, so it doesn't work with opened files.
+       </para>
+       <para>
+           Note that <link linkend="class-giounixinputstream"><classname>gio.unix.InputStream</classname></link>
+           belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file
+           when using it.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giounixinputstream">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.unix.InputStream</methodname>
+            <methodparam><parameter role="keyword">fd</parameter></methodparam>
+           <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><parameter>fd</parameter>&nbsp;:</term>
+                <listitem><simpara>a UNIX file descriptor.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><parameter>close_fd</parameter>&nbsp;:</term>
+                <listitem><simpara><literal>True</literal>
+               to close the file descriptor when done 
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giounixinputstream"><classname>gio.unix.InputStream</classname></link>
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new <link linkend="class-giounixinputstream"><classname>gio.unix.InputStream</classname></link>
+            from the given fd.
+        </para>
+       <para>
+           If close_fd is <literal>True</literal>, the file descriptor will be closed when the stream is closed.
+       </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giounixinputstream--get-close-fd">
+            <title>gio.unix.InputStream.get_close_fd</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_close_fd</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the file descriptor is closed when done.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_close_fd</methodname>() method returns whether the file
+               descriptor of stream will be closed when the stream is closed.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giounixinputstream--get-fd">
+            <title>gio.unix.InputStream.get_fd</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_fd</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>The file descriptor of stream.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_fd</methodname>() method return the UNIX file descriptor
+               that the stream reads from.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giounixinputstream--set-close-fd">
+            <title>gio.unix.InputStream.set_close_fd</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_close_fd</methodname>
+                <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">close_fd</parameter>&nbsp;:</term>
+                  <listitem><simpara><literal>True</literal> to close the file descriptor when done .
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_close_fd</methodname>() method sets whether the file descriptor
+               of stream shall be closed when the stream is closed.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-unixoutputstream.xml b/docs/reference/pygio-unixoutputstream.xml
new file mode 100644 (file)
index 0000000..02e4be8
--- /dev/null
@@ -0,0 +1,202 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giounixoutputstream">
+    <refnamediv>
+        <refname>gio.unix.OutputStream</refname>
+        <refpurpose>Streaming output operations for UNIX file descriptors.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.unix.OutputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
+
+    <constructorsynopsis language="python">
+       <methodname><link linkend="constructor-giounixoutputstream">gio.unix.OutputStream</link></methodname>
+       <methodparam><parameter role="keyword">fd</parameter></methodparam>
+       <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+    </constructorsynopsis>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giounixoutputstream--get-close-fd">get_close_fd</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giounixoutputstream--get-fd">get_fd</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giounixoutputstream--set-close-fd">set_close_fd</link></methodname>
+        <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+    +-- <link linkend="class-giounixoutputstream">gio.unix.OutputStream</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1 id="properties-giounixoutputstream">
+        <title>gio.unix.OutputStream Properties</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"close-fd"</entry>
+                            <entry>Read - Write</entry>
+                            <entry>Whether to close the file descriptor when the stream is closed.
+                           Default value: <literal>True</literal>.</entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"fd"</entry>
+                            <entry>Read - Write - Construct only</entry>
+                            <entry>The file descriptor that the stream writes to. Default value: -1.</entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
+            implements <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
+           for writing to a UNIX file descriptor, including asynchronous operations.
+           The file descriptor must be selectable, so it doesn't work with opened files.
+       </para>
+       <para>
+           Note that <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
+           belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file
+           when using it.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giounixoutputstream">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.unix.OutputStream</methodname>
+            <methodparam><parameter role="keyword">fd</parameter></methodparam>
+           <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><parameter>fd</parameter>&nbsp;:</term>
+                <listitem><simpara>a UNIX file descriptor.
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><parameter>close_fd</parameter>&nbsp;:</term>
+                <listitem><simpara><literal>True</literal>
+               to close the file descriptor when done 
+                </simpara></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
+            from the given fd.
+        </para>
+       <para>
+           If close_fd is <literal>True</literal>, the file descriptor will be closed when the stream is closed.
+       </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giounixoutputstream--get-close-fd">
+            <title>gio.unix.OutputStream.get_close_fd</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_close_fd</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the file descriptor is closed when done.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_close_fd</methodname>() method returns whether the file
+               descriptor of stream will be closed when the stream is closed.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giounixoutputstream--get-fd">
+            <title>gio.unix.OutputStream.get_fd</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_fd</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>The file descriptor of stream.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_fd</methodname>() method return the UNIX file descriptor
+               that the stream reads from.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giounixoutputstream--set-close-fd">
+            <title>gio.unix.OutputStream.set_close_fd</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_close_fd</methodname>
+                <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">close_fd</parameter>&nbsp;:</term>
+                  <listitem><simpara><literal>True</literal> to close the file descriptor when done .
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_close_fd</methodname>() method sets whether the file descriptor
+               of stream shall be closed when the stream is closed.
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-volume.xml b/docs/reference/pygio-volume.xml
new file mode 100644 (file)
index 0000000..cf0fa50
--- /dev/null
@@ -0,0 +1,718 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giovolume">
+    <refnamediv>
+        <refname>gio.Volume</refname>
+        <refpurpose>Volume management.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.Volume</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--can-eject">can_eject</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--can-mount">can_mount</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--eject">eject</link></methodname>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--eject-finish">eject_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--enumerate-identifiers">enumerate_identifiers</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--get-activation-root">get_activation_root</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--get-drive">get_drive</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--get-icon">get_icon</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--get-identifier">get_identifier</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--get-mount">get_mount</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--get-name">get_name</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--get-uuid">get_uuid</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--mount">mount</link></methodname>
+        <methodparam><parameter role="keyword">mount_operation</parameter></methodparam>
+        <methodparam><parameter role="keyword">callback</parameter></methodparam>
+        <methodparam><parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_MOUNT_NONE</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--mount-finish">mount_finish</link></methodname>
+        <methodparam><parameter role="keyword">result</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolume--should-automount">should_automount</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+  +-- <link linkend="class-giovolume">gio.Volume</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+        <title>Prerequisites</title>
+        <para>
+            <link linkend="class-giovolume"><classname>gio.Volume</classname></link> requires
+            <link linkend="class-gobject"><classname>gobject.GObject</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1 id="signal-prototypes-giovolume">
+        <title>gio.Volume Signal Prototypes</title>
+  
+        <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
+  
+        <variablelist>
+            <varlistentry>
+                <term><link linkend="signal-giovolume--changed">"changed"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>volume</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giovolume--removed">"removed"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>volume</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            The <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+            interface represents user-visible objects that can be mounted. Note, when porting
+            from GnomeVFS, <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+            is the moral equivalent of GnomeVFSDrive. 
+        </para>
+        <para>
+            Mounting a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+            instance is an asynchronous operation. For more information about asynchronous operations.
+            To mount a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>, first call
+            <methodname><link linkend="method-giovolume--mount">gio.Volume.mount</link></methodname>()
+            with (at least) the <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+            instance, optionally a
+            <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+            object and a GAsyncReadyCallback. 
+        </para>
+        <para>
+            Typically, one will only want to pass <literal>None</literal> for the GMountOperation
+            if automounting all volumes when a desktop session starts since it's not desirable
+            to put up a lot of dialogs asking for credentials. 
+        </para>
+        <para>
+            The callback will be fired when the operation has resolved (either with success or failure),
+            and a GAsyncReady structure will be passed to the callback. That callback should then call
+            <methodname><link linkend="method-giovolume--mount-finish">gio.Volume.mount_finish</link></methodname>()
+            with the GVolume instance and the GAsyncReady data to see if the operation was completed
+            successfully. If an error is present when
+            <methodname><link linkend="method-giovolume--mount-finish">gio.Volume.mount_finish</link></methodname>()
+            is called, then it will be filled with any error information. 
+        </para>
+        <para>
+            It is sometimes necessary to directly access the underlying operating system object behind a volume
+            (e.g. for passing a volume to an application via the commandline). For this purpose, GIO allows to obtain
+            an 'identifier' for the volume. There can be different kinds of identifiers, such as Hal UDIs,
+            filesystem labels, traditional Unix devices (e.g. /dev/sda2), uuids. GIO uses predefind strings
+            as names for the different kinds of identifiers:
+            "hal-udi", "label", etc. Use
+            <methodname><link linkend="method-giovolume--get-identifier">gio.Volume.get_identifier</link></methodname>()
+            to obtain an identifier for a volume. 
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+        
+        <refsect2 id="method-giovolume--can-eject">
+            <title>gio.Volume.can_eject</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>can_eject</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the volume can be ejected,
+                    <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>can_eject</methodname>() method checks if a volume can be ejected.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giovolume--can-mount">
+            <title>gio.Volume.can_mount</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>can_mount</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the volume can be mounted
+                    for media changes, <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>can_mount</methodname>() method checks if a volume
+                can be mounted.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giovolume--eject">
+            <title>gio.Volume.eject</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>eject</methodname>
+                <methodparam>
+                    <parameter role="keyword">callback</parameter>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_UNMOUNT_NONE</literal></initializer>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
+                </methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+                  <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+                  <listitem><simpara>flags affecting the unmount if required for eject.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>Optional
+                  <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                  object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+                  <listitem><simpara>The data to pass to callback function.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>eject</methodname>() method asynchronously ejects a volume. 
+            </para>
+            <para>
+                When the operation is finished, callback will be called. You can then call
+                <methodname><link linkend="method-giovolume--eject-finish">gio.Volume.eject_finish</link></methodname>()
+                to obtain the result of the operation.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giovolume--eject-finish">
+            <title>gio.Volume.eject_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>eject_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the volume has been ejected
+                    successfully, <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>eject_finish</methodname>() method finishes ejecting a volume.
+                If any errors occured during the operation, error will be set to contain the
+                errors and <literal>False</literal> will be returned.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giovolume--enumerate-identifiers">
+            <title>gio.Volume.enumerate_identifiers</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>enumerate_identifiers</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a list of strings containing kinds of identifiers.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>enumerate_identifiers</methodname>() method gets the kinds
+                of identifiers that volume has. Use
+                <methodname><link linkend="method-giovolume--get-identifier">gio.Volume.get_identifier</link></methodname>()
+                to obtain the identifiers themselves.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giovolume--get-activation-root">
+            <title>gio.Volume.get_activation_root</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_activation_root</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the activation root of volume or <literal>None</literal>.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_activation_root</methodname>() method gets the activation
+                root for a <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                if it is known ahead of mount time. Returns <literal>None</literal> otherwise.
+                If not <literal>None</literal> and if volume is mounted, then the result of
+                <methodname><link linkend="method-giomount--get-root">gio.Mount.get_root</link></methodname>()
+                on the GMount object obtained from
+                <methodname><link linkend="method-giovolume--get-mount">gio.Volume.get_mount</link></methodname>()
+                will always either be equal or a prefix of what this function returns.
+                In other words, in code:
+            </para>
+<programlisting>
+mount = volume.get_mount() # mounted, so never None
+mount_root = mount.get_root()
+volume_activation_root = volume.get_activation_root() # assume not None
+</programlisting>
+            <para>
+                then the expression
+            </para>
+<programlisting>
+volume_activation_root.has_prefix(mount_root) || volume_activation_root.equal(mount_root)
+</programlisting>
+            <para>
+                will always be <literal>True</literal>.
+            </para>
+            <para>
+                Activation roots are typically used in
+                <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+                implementations to find the underlying mount to shadow, see
+                <methodname><link linkend="method-giomount--is-shadowed">gio.Mount.is_shadowed</link></methodname>()
+                for more details.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giovolume--get-drive">
+            <title>gio.Volume.get_drive</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_drive</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A <link linkend="class-giodrive"><classname>gio.Drive</classname></link>
+                    or <literal>None</literal> if volume is not associated with a drive.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_drive</methodname>() method gets the drive for the volume.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giovolume--get-icon">
+            <title>gio.Volume.get_icon</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_icon</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><link linkend="class-gioicon"><classname>gio.Icon</classname></link>
+                    for the volume.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_icon</methodname>() method gets the icon for volume.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giovolume--get-identifier">
+            <title>gio.Volume.get_identifier</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_identifier</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A string containing the requested identfier, or
+                    <literal>None</literal> if the
+                    <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                    doesn't have this kind of identifier. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_identifier</methodname>() method gets the identifier of
+                the given kind for volume.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giovolume--get-mount">
+            <title>gio.Volume.get_mount</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_mount</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A 
+                    <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+                    or <literal>None</literal> if volume isn't mounted.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_mount</methodname>() method gets the mount for the volume.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giovolume--get-name">
+            <title>gio.Volume.get_name</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_name</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A string containing volume's name.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_name</methodname>() method gets the name of volume.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giovolume--get-uuid">
+            <title>gio.Volume.get_uuid</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_uuid</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the UUID for volume or <literal>None</literal>
+                    if no UUID can be computed.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_uuid</methodname>() method gets the UUID for the volume.
+                The reference is typically based on the file system UUID for the volume in
+                question and should be considered an opaque string.
+                Returns <literal>None</literal> if there is no UUID available.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giovolume--mount">
+            <title>gio.Volume.mount</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>mount</methodname>
+                <methodparam>
+                    <parameter role="keyword">mount_operation</parameter>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">callback</parameter>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">flags</parameter><initializer><literal>gio.MOUNT_MOUNT_NONE</literal></initializer>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer>
+                </methodparam>
+                <methodparam>
+                    <parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer>
+                </methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">mount_operation</parameter>&nbsp;:</term>
+                  <listitem><simpara>A
+                  <link linkend="class-giomountoperation"><classname>gio.MountOperation</classname></link>
+                  or <literal>None</literal> to avoid user interaction. 
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">callback</parameter>&nbsp;:</term>
+                  <listitem><simpara>A GAsyncReadyCallback to call when the request is satisfied.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+                  <listitem><simpara>Flags affecting the operation 
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+                  <listitem><simpara>Optional
+                  <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+                  object, <literal>None</literal> to ignore.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+                  <listitem><simpara>The data to pass to callback function.
+                  </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>mount</methodname>() method mounts a volume. This is an
+                asynchronous operation, and is finished by calling
+                <methodname><link linkend="method-giovolume--mount-finish">gio.Volume.mount_finish</link></methodname>()
+                with the volume and GAsyncResult returned in the callback.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giovolume--mount-finish">
+            <title>gio.Volume.mount_finish</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>mount_finish</methodname>
+                <methodparam><parameter role="keyword">result</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">result</parameter>&nbsp;:</term>
+                  <listitem><simpara>a <link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the volume has been mounted
+                    successfully, <literal>False</literal> otherwise.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>mounted</methodname>() method finishes mounting a volume.
+                If any errors occured during the operation, error will be set to contain
+                the errors and <literal>False</literal> will be returned. 
+            </para>
+            <para>
+                If the mount operation succeeded,
+                <methodname><link linkend="method-giovolume--get-mount">get_mount</link></methodname>()
+                on volume is guaranteed to return the mount right after calling this function;
+                there's no need to listen for the 'mount-added' signal on
+                <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-giovolume--should-automount">
+            <title>gio.Volume.should_automount</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>should_automount</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the volume should
+                    be automatically mounted. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>should_automount</methodname>() method returns whether
+                the volume should be automatically mounted.
+            </para>
+        </refsect2>
+    </refsect1>
+
+    <refsect1>
+        <title>Signals</title>
+    
+        <refsect2 id="signal-giovolume--changed">
+            <title>The "changed" gio.Volume Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>volume</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>volume</parameter>&nbsp;:</term>
+                    <listitem><simpara>the volume</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted when the volume has been changed.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giovolume--removed">
+            <title>The "removed" gio.Volume Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>volume</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>volume</parameter>&nbsp;:</term>
+                    <listitem><simpara>the volume</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                This signal is emitted when the
+                <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                have been removed. If the recipient is holding references to the object
+                they should release them so the object can be finalized.
+            </para>
+        </refsect2>
+  
+  </refsect1>
+</refentry>
diff --git a/docs/reference/pygio-volumemonitor.xml b/docs/reference/pygio-volumemonitor.xml
new file mode 100644 (file)
index 0000000..399d07e
--- /dev/null
@@ -0,0 +1,844 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-giovolumemonitor">
+    <refnamediv>
+        <refname>gio.VolumeMonitor</refname>
+        <refpurpose>Volume Monitor.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.VolumeMonitor</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
+    
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolumemonitor--get-connected-drives">get_connected_drives</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolumemonitor--get-mount-for-uuid">get_mount_for_uuid</link></methodname>
+        <methodparam><parameter role="keyword">uuid</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolumemonitor--get-mounts">get_mounts</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolumemonitor--get-volume-for-uuid">get_volume_for_uuid</link></methodname>
+        <methodparam><parameter role="keyword">uuid</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giovolumemonitor--get-volumes">get_volumes</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+<methodsynopsis language="python">
+    <methodname><link linkend="function-gio--volume-monitor-adopt-orphan-mount">gio.volume_monitor_adopt_orphan_mount</link></methodname>
+    <methodparam></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--volume-monitor-get">gio.volume_monitor_get</link></methodname>
+    <methodparam></methodparam>
+</methodsynopsis></programlisting>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giovolumemonitor">gio.VolumeMonitor</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1 id="signal-prototypes-giovolumemonitor">
+        <title>gio.VolumeMonitor Signal Prototypes</title>
+  
+        <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
+  
+        <variablelist>
+            <varlistentry>
+                <term><link linkend="signal-giovolumemonitor--drive-changed">"drive-changed"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>volume_monitor</parameter></methodparam>
+                        <methodparam><parameter>drive</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giovolumemonitor--drive-connected">"drive-connected"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>volume_monitor</parameter></methodparam>
+                        <methodparam><parameter>drive</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giovolumemonitor--drive-disconnected">"drive-disconnected"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>volume_monitor</parameter></methodparam>
+                        <methodparam><parameter>drive</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giovolumemonitor--drive-eject-button">"drive-eject-button"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>volume_monitor</parameter></methodparam>
+                        <methodparam><parameter>drive</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giovolumemonitor--mount-added">"mount-added"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>volume_monitor</parameter></methodparam>
+                        <methodparam><parameter>mount</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giovolumemonitor--mount-changed">"mount-changed"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>volume_monitor</parameter></methodparam>
+                        <methodparam><parameter>mount</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giovolumemonitor--mount-pre-unmount">"mount-pre-unmount"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>volume_monitor</parameter></methodparam>
+                        <methodparam><parameter>mount</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giovolumemonitor--mount-removed">"mount-removed"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>volume_monitor</parameter></methodparam>
+                        <methodparam><parameter>mount</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giovolumemonitor--volume-added">"volume-added"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>volume_monitor</parameter></methodparam>
+                        <methodparam><parameter>volume</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giovolumemonitor--volume-changed">"volume-changed"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>volume_monitor</parameter></methodparam>
+                        <methodparam><parameter>volume</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><link linkend="signal-giovolumemonitor--volume-removed">"volume-removed"</link></term>
+                <listitem>
+                    <methodsynopsis language="python"><methodname>callback</methodname>
+                        <methodparam><parameter>volume_monitor</parameter></methodparam>
+                        <methodparam><parameter>volume</parameter></methodparam>
+                        <methodparam><parameter>user_param1</parameter></methodparam>
+                        <methodparam><parameter>...</parameter></methodparam>
+                    </methodsynopsis>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            The <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+            is for listing the user interesting devices and volumes on the computer. In other words,
+            what a file selector or file manager would show in a sidebar.
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giovolumemonitor--get-connected-drives">
+            <title>gio.VolumeMonitor.get_connected_drives</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_connected_drives</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a list of connected
+                    <link linkend="class-giodrive"><classname>gio.Drive</classname></link> objects. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_connected_drives</methodname>() method gets a list
+                of drives connected to the system. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giovolumemonitor--get-mount-for-uuid">
+            <title>gio.VolumeMonitor.get_mount_for_uuid</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_mount_for_uuid</methodname>
+                <methodparam><parameter role="keyword">uuid</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">uuid</parameter>&nbsp;:</term>
+                  <listitem><simpara>The UUID to look for.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A
+                    <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+                    or <literal>None</literal> if no such mount is available.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_mount_for_uuid</methodname>() method finds a
+                <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+                object by it's UUID (see
+                <methodname><link linkend="method-giomount--get-uuid">gio.Mount.get_uuid</link></methodname>())
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giovolumemonitor--get-mounts">
+            <title>gio.VolumeMonitor.get_mounts</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_mounts</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A list of
+                    <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+                    objects.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_mounts</methodname>() method gets a list of the mounts on the system.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giovolumemonitor--get-volume-for-uuid">
+            <title>gio.VolumeMonitor.get_volume_for_uuid</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_volume_for_uuid</methodname>
+                <methodparam><parameter role="keyword">uuid</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                  <term><parameter role="keyword">uuid</parameter>&nbsp;:</term>
+                  <listitem><simpara>The UUID to look for.
+                  </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A
+                    <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                    or <literal>None</literal> if no such volume is available.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_mount_for_uuid</methodname>() method finds a
+                <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+                object by it's UUID (see
+                <methodname><link linkend="method-giomount--get-uuid">gio.Mount.get_uuid</link></methodname>())
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giovolumemonitor--get-volumes">
+            <title>gio.VolumeMonitor.get_volumes</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_volumes</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A list of
+                    <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                    objects.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_volumes</methodname>() method gets a list of the volumes on the system.
+            </para>
+        </refsect2>
+    </refsect1>
+    
+    <refsect1>
+        <title>Functions</title>
+
+        <refsect2 id="function-gio--volume-monitor-adopt-orphan-mount">
+            <title>gio.volume_monitor_adopt_orphan_mount</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>volume_monitor_adopt_orphan_mount</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>The <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                    object that is the parent for mount or <literal>None</literal> if no wants to adopt the
+                    <link linkend="class-giomount"><classname>gio.Mount</classname></link>.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <warning>
+                <para>This method will be deprecated starting from GIO 2.20</para>
+            </warning>
+
+            <para>
+                The <methodname>volume_monitor_adopt_orphan_mount</methodname>() function should
+                be called by any <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+                implementation when a new <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+                object is created that is not associated with a
+                <link linkend="class-giovolume"><classname>gio.Volume</classname></link> object.
+                It must be called just before emitting the mount_added signal.
+            </para>
+            <para>
+                If the return value is not <literal>None</literal>, the caller must associate the returned
+                <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                object with the
+                <link linkend="class-giomount"><classname>gio.Mount</classname></link>.
+                This involves returning it in it's
+                <methodname><link linkend="method-giomount--get-volumes">gio.Mount.get_volumes</link></methodname>()
+                implementation. The caller must also listen for the "removed" signal on the
+                returned object and give up it's reference when handling that signal 
+            </para>
+            <para>
+                Similary, if implementing
+                <methodname><link linkend="function-gio--volume-monitor-adopt-orphan-mount">gio.volume_monitor_adopt_orphan_mount</link></methodname>(),
+                the implementor must take a reference to mount and return it in it's
+                <methodname><link linkend="method-giovolume--get-mount">gio.Volume.get_mount</link></methodname>()
+                implemented. Also, the implementor must listen for the "unmounted" signal
+                on mount and give up it's reference upon handling that signal. 
+            </para>
+            <para>
+                There are two main use cases for this function. 
+            </para>
+            <para>
+                One is when implementing a user space file system driver that reads blocks of
+                a block device that is already represented by the native volume monitor
+                (for example a CD Audio file system driver). Such a driver will generate it's own
+                <link linkend="class-giomount"><classname>gio.Mount</classname></link>
+                object that needs to be assoicated with the
+                <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                object that represents the volume. 
+            </para>
+            <para>
+                The other is for implementing a
+                <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+                whose sole purpose is to return
+                <link linkend="class-giovolume"><classname>gio.Volume</classname></link>
+                objects representing entries in the users "favorite servers" list or similar.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--volume-monitor-get">
+            <title>gio.volume_monitor_get</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>volume_monitor_get</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A reference to the
+                    <link linkend="class-giovolumemonitor"><classname>gio.VolumeMonitor</classname></link>
+                    used by gio.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>volume_monitor_get</methodname>() function gets the
+                volume monitor used by gio.
+            </para>
+        </refsect2>
+    </refsect1>
+
+    <refsect1>
+        <title>Signals</title>
+    
+        <refsect2 id="signal-giovolumemonitor--drive-changed">
+            <title>The "drive-changed" gio.Volume Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>volume_monitor</parameter></methodparam>
+                <methodparam><parameter>drive</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+                    <listitem><simpara>the volume monitor</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>drive</parameter>&nbsp;:</term>
+                    <listitem><simpara>the drive that changed</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted when a drive changes.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giovolumemonitor--drive-connected">
+            <title>The "drive-connected" gio.Volume Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>volume_monitor</parameter></methodparam>
+                <methodparam><parameter>drive</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+                    <listitem><simpara>the volume monitor</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>drive</parameter>&nbsp;:</term>
+                    <listitem><simpara>the drive that was connected</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted when a drive is connected to the system.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giovolumemonitor--drive-disconnected">
+            <title>The "drive-disconnected" gio.Volume Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>volume_monitor</parameter></methodparam>
+                <methodparam><parameter>drive</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+                    <listitem><simpara>the volume monitor</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>drive</parameter>&nbsp;:</term>
+                    <listitem><simpara>the drive that was disconnected</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted when a drive is disconnected from the system.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giovolumemonitor--drive-eject-button">
+            <title>The "drive-eject-button" gio.Volume Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>volume_monitor</parameter></methodparam>
+                <methodparam><parameter>drive</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+                    <listitem><simpara>the volume monitor</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>drive</parameter>&nbsp;:</term>
+                    <listitem><simpara>the drive where the eject button was pressed</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted when the eject button is pressed on drive.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giovolumemonitor--mount-added">
+            <title>The "mount-added" gio.Volume Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>volume</parameter></methodparam>
+                <methodparam><parameter>mount</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+                    <listitem><simpara>the volume monitor</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>mount</parameter>&nbsp;:</term>
+                    <listitem><simpara>a Mount that was added.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted when a mount is added.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giovolumemonitor--mount-changed">
+            <title>The "mount-changed" gio.Volume Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>volume_monitor</parameter></methodparam>
+                <methodparam><parameter>mount</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+                    <listitem><simpara>the volume monitor</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>mount</parameter>&nbsp;:</term>
+                    <listitem><simpara>the Mount that changed.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted when a mount changes.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giovolumemonitor--mount-pre-unmount">
+            <title>The "mount-pre-unmount" gio.Volume Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>volume_monitor</parameter></methodparam>
+                <methodparam><parameter>mount</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+                    <listitem><simpara>the volume monitor</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>mount</parameter>&nbsp;:</term>
+                    <listitem><simpara>the Mount that is being unmounted.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted when a mount is about to be removed.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giovolumemonitor--mount-removed">
+            <title>The "mount-removed" gio.Volume Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>volume_monitor</parameter></methodparam>
+                <methodparam><parameter>mount</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+                    <listitem><simpara>the volume monitor</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>mount</parameter>&nbsp;:</term>
+                    <listitem><simpara>the Mount that was removed.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted when a mount is removed.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giovolumemonitor--volume-added">
+            <title>The "volume-added" gio.Volume Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>volume_monitor</parameter></methodparam>
+                <methodparam><parameter>volume</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+                    <listitem><simpara>the volume monitor</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>volume</parameter>&nbsp;:</term>
+                    <listitem><simpara>a Volume that was added.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted when a mountable volume is added to the system.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giovolumemonitor--volume-changed">
+            <title>The "volume-changed" gio.Volume Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>volume_monitor</parameter></methodparam>
+                <methodparam><parameter>volume</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+                    <listitem><simpara>the volume monitor</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>volume</parameter>&nbsp;:</term>
+                    <listitem><simpara>a Volume that changed.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted when mountable volume is changed.
+            </para>
+        </refsect2>
+    
+        <refsect2 id="signal-giovolumemonitor--volume-removed">
+            <title>The "volume-removed" gio.Volume Signal</title>
+      
+            <programlisting><methodsynopsis language="python"><methodname>callback</methodname>
+                <methodparam><parameter>volume_monitor</parameter></methodparam>
+                <methodparam><parameter>volume</parameter></methodparam>
+                <methodparam><parameter>user_param1</parameter></methodparam>
+                <methodparam><parameter>...</parameter></methodparam>
+            </methodsynopsis></programlisting>
+      
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>volume_monitor</parameter>&nbsp;:</term>
+                    <listitem><simpara>the volume monitor</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>volume</parameter>&nbsp;:</term>
+                    <listitem><simpara>a Volume that was removed.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>user_param1</parameter>&nbsp;:</term>
+                    <listitem><simpara>the first user parameter (if any) specified
+                    with the <link
+                    linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+                    method</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>...</parameter>&nbsp;:</term>
+                    <listitem><simpara>additional user parameters (if any)</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+      
+            <para>
+                Emitted when a mountable volume is removed from the system.
+            </para>
+        </refsect2>  
+  </refsect1>
+</refentry>
diff --git a/docs/reference/pygiounix-classes.xml b/docs/reference/pygiounix-classes.xml
new file mode 100644 (file)
index 0000000..72b0081
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<chapter id="giounix-class-reference"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<title>PyGio Unix Class Reference</title>
+
+<!-- GIOUNIX CLASSES -->
+<xi:include href="pygio-unixinputstream.xml"/>
+<xi:include href="pygio-unixoutputstream.xml"/>
+
+</chapter>
diff --git a/docs/reference/pyglib-classes.xml b/docs/reference/pyglib-classes.xml
new file mode 100644 (file)
index 0000000..ecc4e5b
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<chapter id="glib-class-reference"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<title>PyGlibClass Reference</title>
+
+<!-- GLIB CLASSES -->
+<xi:include href="pyglib-maincontext.xml"/>
+<xi:include href="pyglib-mainloop.xml"/>
+<xi:include href="pyglib-functions.xml"/>
+<xi:include href="pyglib-constants.xml"/>
+
+</chapter>
diff --git a/docs/reference/pyglib-constants.xml b/docs/reference/pyglib-constants.xml
new file mode 100644 (file)
index 0000000..0f1bf8d
--- /dev/null
@@ -0,0 +1,282 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="glib-constants">
+  <refnamediv>
+    <refname>glib Constants</refname>
+    <refpurpose>the built-in constants of the glib module</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Synopsis</title>
+
+    <programlisting>
+<xref linkend="glib-io-condition-constants" endterm="glib-io-condition-constants-title"></xref>
+<xref linkend="glib-priority-constants" endterm="glib-priority-constants-title"></xref>
+<xref linkend="glib-spawn-flag-constants" endterm="glib-spawn-flag-constants-title"></xref>
+<xref linkend="glib-user-directory-constants" endterm="glib-user-directory-constants-title"></xref>
+<xref linkend="glib-version-constants" endterm="glib-version-constants-title"></xref>
+</programlisting>
+
+  </refsect1>
+
+  <refsect1 id="glib-constants-description">
+    <title>Description</title>
+
+    <refsect2 id="glib-io-condition-constants">
+      <title id="glib-io-condition-constants-title">Glib IO Condition Constants</title>
+
+      <para>The IO Condition constants are a set of bit-flags that specify a
+condition to watch for on an event source.</para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>glib.IO_IN</literal></term>
+         <listitem>
+           <simpara>There is data to read</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.IO_OUT</literal></term>
+         <listitem>
+           <simpara>Data can be written (without blocking).</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.IO_PRI</literal></term>
+         <listitem>
+           <simpara>There is urgent data to read.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.IO_ERR</literal></term>
+         <listitem>
+           <simpara>Error condition.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.IO_HUP</literal></term>
+         <listitem>
+           <simpara>Hung up (the connection has been broken, usually for
+           pipes and sockets).</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.IO_NVAL</literal></term>
+         <listitem>
+           <simpara>Invalid request. The file descriptor is not
+           open.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+
+    </refsect2>
+
+    <refsect2 id="glib-priority-constants">
+      <title id="glib-priority-constants-title">Glib Priority Constants</title>
+
+      <para>The Priority constants specify </para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>glib.PRIORITY_HIGH</literal></term>
+         <listitem>
+           <simpara>Use this for high priority event sources.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.PRIORITY_DEFAULT</literal></term>
+         <listitem>
+           <simpara>Use this for default priority event sources.  This
+           priority is used when adding timeout functions with the <link
+           linkend="function-glib--timeout-add"><function>glib.timeout_add</function>()</link>
+           function. This priority is also used for events from the X
+           server.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.PRIORITY_HIGH_IDLE</literal></term>
+         <listitem>
+           <simpara>Use this for high priority idle functions. For example,
+           glib.PRIORITY_HIGH_IDLE + 10 is used for resizing operations;
+           and, glib.PRIORITY_HIGH_IDLE + 20, for redrawing
+           operations. (This is done to ensure that any pending resizes are
+           processed before any pending redraws, so that widgets are not
+           redrawn twice unnecessarily.)</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.PRIORITY_DEFAULT_IDLE</literal></term>
+         <listitem>
+           <simpara>Use this for default priority idle functions. This
+           priority is used when adding idle functions with the <link
+           linkend="function-glib--idle-add"><function>glib.idle_add</function>()</link>
+           function.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.PRIORITY_LOW</literal></term>
+         <listitem>
+           <simpara>Use this for very low priority background
+           tasks.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+
+    </refsect2>
+
+    <refsect2 id="glib-spawn-flag-constants">
+      <title id="glib-spawn-flag-constants-title">Glib Spawn Flag Constants</title>
+
+      <para>The Spawn Flag constants are a set of bit-flags that can be
+passed to the <link
+linkend="function-glib--spawn-async"><function>glib.spawn_async</function>()</link>
+function.</para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>glib.SPAWN_LEAVE_DESCRIPTORS_OPEN</literal></term>
+         <listitem>
+           <simpara>the parent's open file descriptors will be inherited by
+the child; otherwise all descriptors except stdin/stdout/stderr will be
+closed before calling <function>exec</function>() in the child.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.SPAWN_DO_NOT_REAP_CHILD</literal></term>
+         <listitem>
+           <simpara>the child will not be automatically reaped; you must
+call <function>waitpid</function>() or handle <literal>SIGCHLD</literal>
+yourself, or the child will become a zombie.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.SPAWN_SEARCH_PATH</literal></term>
+         <listitem>
+           <simpara><parameter>argv</parameter>[0] need not be an absolute
+path, it will be looked for in the user's <envar>PATH</envar>.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.SPAWN_STDOUT_TO_DEV_NULL</literal></term>
+         <listitem>
+           <simpara>the child's standard output will be discarded, instead
+of going to the same location as the parent's standard output.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.SPAWN_STDERR_TO_DEV_NULL</literal></term>
+         <listitem>
+           <simpara>the child's standard error will be discarded.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.SPAWN_CHILD_INHERITS_STDIN</literal></term>
+         <listitem>
+           <simpara>the child will inherit the parent's standard input (by
+default, the child's standard input is attached to /dev/null).</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.SPAWN_FILE_AND_ARGV_ZERO</literal></term>
+         <listitem>
+           <simpara>the first element of <parameter>argv</parameter> is the
+file to execute, while the remaining elements are the actual argument vector
+to pass to the file. Normally <link
+linkend="function-glib--spawn-async"><function>glib.spawn_async</function>()</link>
+uses <parameter>argv</parameter>[0] as the file to execute, and passes all
+of <parameter>argv</parameter> to the child.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+
+    </refsect2>
+
+    <refsect2 id="glib-user-directory-constants">
+      <title id="glib-user-directory-constants-title">Glib User Directory Constants</title>
+
+      <para>The User Directory constants are integer values that are currently used only as arguments to
+        <link linkend="function-glib--get-user-special-dir"><function>glib.get_user_special_dir</function>()</link>
+        function.  See function documentation for details.</para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>glib.USER_DIRECTORY_DESKTOP</literal></term>
+         <listitem>
+           <simpara>the user's Desktop directory</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.USER_DIRECTORY_DOCUMENTS</literal></term>
+         <listitem>
+           <simpara>the user's Documents directory</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.USER_DIRECTORY_DOWNLOAD</literal></term>
+         <listitem>
+           <simpara>the user's Downloads directory</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.USER_DIRECTORY_MUSIC</literal></term>
+         <listitem>
+           <simpara>the user's Music directory</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.USER_DIRECTORY_PICTURES</literal></term>
+         <listitem>
+           <simpara>the user's Pictures directory</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.USER_DIRECTORY_PUBLIC_SHARE</literal></term>
+         <listitem>
+           <simpara>the user's shared directory</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.USER_DIRECTORY_TEMPLATES</literal></term>
+         <listitem>
+           <simpara>the user's Templates directory</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.USER_DIRECTORY_VIDEOS</literal></term>
+         <listitem>
+           <simpara>the user's Movies directory</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="glib-version-constants">
+      <title id="glib-version-constants-title">Glib Version Constants</title>
+      <para>The Version constants specify the version of
+<literal>Glib</literal> used by PyGObject as a 3-tuple containing the major,
+minor and patch release numbers.</para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>glib.glib_version</literal></term>
+         <listitem>
+           <simpara>A 3-tuple containing (major, minor, patch) release
+           numbers of glib.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.pyglib_version</literal></term>
+         <listitem>
+           <simpara>A 3-tuple containing (major, minor, patch) release
+           numbers of the python bindings.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+
+    </refsect2>
+
+  </refsect1>
+
+</refentry>
diff --git a/docs/reference/pyglib-functions.xml b/docs/reference/pyglib-functions.xml
new file mode 100644 (file)
index 0000000..3e11251
--- /dev/null
@@ -0,0 +1,1047 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="glib-functions">
+  <refnamediv>
+    <refname>glib Functions</refname>
+    <refpurpose>miscellaneous functions</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Synopsis</title>
+
+    <programlisting>
+<methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--idle-add">glib.idle_add</link></methodname>
+       <methodparam><parameter>callback</parameter></methodparam>
+       <methodparam><parameter>...</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--timeout-add">glib.timeout_add</link></methodname>
+       <methodparam><parameter>interval</parameter></methodparam>
+       <methodparam><parameter>callback</parameter></methodparam>
+       <methodparam><parameter>...</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--timeout-add-seconds">glib.timeout_add_seconds</link></methodname>
+       <methodparam><parameter>interval</parameter></methodparam>
+       <methodparam><parameter>callback</parameter></methodparam>
+       <methodparam><parameter>...</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--io-add-watch">glib.io_add_watch</link></methodname>
+       <methodparam><parameter>fd</parameter></methodparam>
+       <methodparam><parameter>condition</parameter></methodparam>
+       <methodparam><parameter>callback</parameter></methodparam>
+       <methodparam><parameter>...</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--source-remove">glib.source_remove</link></methodname>
+       <methodparam><parameter>tag</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--main-context-default">glib.main_context_default</link></methodname>
+       <methodparam></methodparam>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--markup-escape-text">glib.markup_escape_text</link></methodname>
+       <methodparam><parameter role="keyword">text</parameter></methodparam>
+      </methodsynopsis><methodsynopsis language="python">
+        <methodname><link linkend="function-glib--child-watch-add">glib.child_watch_add</link></methodname>
+        <methodparam><parameter role="keyword">pid</parameter></methodparam>
+        <methodparam><parameter role="keyword">function</parameter></methodparam>
+        <methodparam><parameter role="keyword">data</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--spawn-async">glib.spawn_async</link></methodname>
+       <methodparam><parameter role="keyword">argv</parameter></methodparam>
+       <methodparam><parameter role="keyword">envp</parameter><initializer>None</initializer></methodparam>
+       <methodparam><parameter role="keyword">working_directory</parameter><initializer>None</initializer></methodparam>
+       <methodparam><parameter role="keyword">flags</parameter><initializer>0</initializer></methodparam>
+       <methodparam><parameter role="keyword">child_setup</parameter><initializer>None</initializer></methodparam>
+       <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+       <methodparam><parameter role="keyword">standard_input</parameter><initializer>None</initializer></methodparam>
+       <methodparam><parameter role="keyword">standard_output</parameter><initializer>None</initializer></methodparam>
+       <methodparam><parameter role="keyword">standard_error</parameter><initializer>None</initializer></methodparam>
+     </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--get-current-time">glib.get_current_time</link></methodname>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+          linkend="function-glib--get-user-cache-dir">glib.get_user_cache_dir</link></methodname>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+          linkend="function-glib--get-user-config-dir">glib.get_user_config_dir</link></methodname>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+          linkend="function-glib--get-user-data-dir">glib.get_user_data_dir</link></methodname>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+          linkend="function-glib--get-user-special-dir">glib.get_user_special_dir</link></methodname>
+       <methodparam><parameter role="keyword">directory</parameter></methodparam>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--main-depth">glib.main_depth</link></methodname>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--threads-init">glib.threads_init</link></methodname>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--filename-display-name">glib.filename_display_name</link></methodname>
+       <methodparam><parameter>filename</parameter></methodparam>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--filename-display-basename">glib.filename_display_basename</link></methodname>
+       <methodparam><parameter>filename</parameter></methodparam>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-glib--filename-from-utf8">glib.filename_from_utf8</link></methodname>
+       <methodparam><parameter>utf8string</parameter></methodparam>
+      </methodsynopsis></programlisting>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para>These functions are part of the <literal>PyGObject</literal> glib
+module but are not directly associated with a specific class.</para>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Functions</title>
+
+    <refsect2 id="function-glib--idle-add">
+      <title>glib.idle_add</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>glib.idle_add</methodname>
+         <methodparam><parameter>callback</parameter></methodparam>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>callback</parameter>&nbsp;:</term>
+         <listitem><simpara>a function to call when
+<literal>PyGTK</literal> is idle</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>...</parameter>&nbsp;:</term>
+         <listitem><simpara>optionals arguments to be passed to
+<parameter>callback</parameter></simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>an integer ID</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>glib.idle_add</function>() function adds a
+function (specified by <parameter>callback</parameter>) to be called
+whenever there are no higher priority events pending to the default main
+loop. The function is given the default idle priority,
+<literal>glib.PRIORITY_DEFAULT_IDLE</literal>. Additional arguments to
+pass to <parameter>callback</parameter> can be specified after
+<parameter>callback</parameter>. The idle priority can be specified as a
+keyword-value pair with the keyword "priority". If
+<parameter>callback</parameter> returns <literal>False</literal> it is
+automatically removed from the list of event sources and will not be called
+again.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--timeout-add">
+      <title>glib.timeout_add</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>glib.timeout_add</methodname>
+         <methodparam><parameter>interval</parameter></methodparam>
+         <methodparam><parameter>callback</parameter></methodparam>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>interval</parameter>&nbsp;:</term>
+         <listitem><simpara>the time between calls to the function, in
+milliseconds </simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>callback</parameter>&nbsp;:</term>
+         <listitem><simpara>the function to call</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>...</parameter>&nbsp;:</term>
+         <listitem><simpara>zero or more arguments that will be passed to
+<parameter>callback</parameter></simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>an integer ID of the event
+source</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>glib.timeout_add</function>() function sets a
+function (specified by <parameter>callback</parameter>) to be called at
+regular intervals (specified by <parameter>interval</parameter>, with the
+default priority, <literal>glib.PRIORITY_DEFAULT</literal>. Additional
+arguments to pass to <parameter>callback</parameter> can be specified after
+<parameter>callback</parameter>. The idle priority may be specified as a
+keyword-value pair with the keyword "priority".</para>
+
+      <para>The function is called repeatedly until it returns
+<literal>False</literal>, at which point the timeout is automatically
+destroyed and the function will not be called again. The first call to the
+function will be at the end of the first interval. Note that timeout
+functions may be delayed, due to the processing of other event sources. Thus
+they should not be relied on for precise timing. After each call to the
+timeout function, the time of the next timeout is recalculated based on the
+current time and the given interval (it does not try to 'catch up' time lost
+in delays).</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--timeout-add-seconds">
+      <title>glib.timeout_add_seconds</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>glib.timeout_add_seconds</methodname>
+         <methodparam><parameter>interval</parameter></methodparam>
+         <methodparam><parameter>callback</parameter></methodparam>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>interval</parameter>&nbsp;:</term>
+         <listitem><simpara>the time between calls to the function, in
+seconds </simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>callback</parameter>&nbsp;:</term>
+         <listitem><simpara>the function to call</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>...</parameter>&nbsp;:</term>
+         <listitem><simpara>zero or more arguments that will be passed to
+<parameter>callback</parameter></simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>an integer ID of the event
+source</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>glib.timeout_add_seconds</function>() is similar to
+       <function>glib.timeout_add</function>() except
+       that <parameter>interval</parameter> must be specified in seconds, not
+       milliseconds, and the function should cause less CPU wakeups, which is important
+       for laptops' batteries.</para>
+
+      <para>Unlike <function>glib.timeout_add</function>(), this function operates at
+       whole second granularity.  The initial starting point of the timer is determined
+       by the implementation and the implementation is expected to group multiple timers
+       together so that they fire all at the same time.  To allow this grouping, the
+       interval to the first timer is rounded and can deviate up to one second from the
+       specified interval.  Subsequent timer iterations will generally run at the
+       specified interval.</para>
+
+      <para>Note that timeout functions may be delayed, due to the processing of other
+       event sources.  Thus they should not be relied on for precise timing.  After each
+       call to the timeout function, the time of the next timeout is recalculated based
+       on the current time and the given interval.</para>
+
+      <para>The grouping of timers to fire at the same time results in a more power and
+       CPU efficient behavior so if your timer is in multiples of seconds and you don't
+       require the first timer exactly one second from now, the use of
+       <function>glib.timeout_add_seconds</function>() is preferred
+       over <function>glib.timeout_add</function>().</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--io-add-watch">
+      <title>glib.io_add_watch</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>glib.io_add_watch</methodname>
+         <methodparam><parameter>fd</parameter></methodparam>
+         <methodparam><parameter>condition</parameter></methodparam>
+         <methodparam><parameter>callback</parameter></methodparam>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>fd</parameter>&nbsp;:</term>
+         <listitem><simpara>a Python file object or an integer file
+descriptor ID</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>condition</parameter>&nbsp;:</term>
+         <listitem><simpara>a condition mask</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>callback</parameter>&nbsp;:</term>
+         <listitem><simpara>a function to call</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>...</parameter>&nbsp;:</term>
+         <listitem><simpara>additional arguments to pass to
+<parameter>callback</parameter></simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>an integer ID of the event source</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>glib.io_add_watch</function>() function
+arranges for the file (specified by <parameter>fd</parameter>) to be
+monitored by the main loop for the specified
+<parameter>condition</parameter>. <parameter>fd</parameter> may be a Python
+file object or an integer file descriptor. The value of condition is a
+combination of:</para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>glib.IO_IN</literal></term>
+         <listitem>
+           <simpara>There is data to read.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.IO_OUT</literal></term>
+         <listitem>
+           <simpara>Data can be written (without blocking). </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.IO_PRI</literal></term>
+         <listitem>
+           <simpara>There is urgent data to read.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.IO_ERR</literal></term>
+         <listitem>
+           <simpara>Error condition.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>glib.IO_HUP</literal></term>
+         <listitem>
+           <simpara>Hung up (the connection has been broken, usually for
+pipes and sockets).</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>Additional arguments to pass to <parameter>callback</parameter>
+can be specified after <parameter>callback</parameter>. The idle priority
+may be specified as a keyword-value pair with the keyword "priority". The
+signature of the callback function is:</para>
+
+      <programlisting>
+  def callback(source, cb_condition, ...)
+</programlisting>
+
+      <para>where <parameter>source</parameter> is
+<parameter>fd</parameter>, the file descriptor;
+<parameter>cb_condition</parameter> is the condition that triggered the
+signal; and, <parameter>...</parameter> are the zero or more arguments that
+were passed to the <function>glib.io_add_watch</function>()
+function.</para>
+
+      <para>If the callback function returns <literal>False</literal> it
+will be automatically removed from the list of event sources and will not be
+called again. If it returns <literal>True</literal> it will be called again
+when the condition is matched.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--source-remove">
+      <title>glib.source_remove</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>glib.source_remove</methodname>
+         <methodparam><parameter>tag</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>tag</parameter>&nbsp;:</term>
+         <listitem><simpara>an integer ID</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara><literal>True</literal> if the event source was
+removed</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>glib.source_remove</function>() function
+removes the event source specified by tag (as returned by the <link
+linkend="function-glib--idle-add"><function>glib.idle_add</function>()</link>, 
+<link
+linkend="function-glib--timeout-add"><function>glib.timeout_add</function></link>() 
+and <link
+linkend="function-glib--io-add-watch"><function>glib.io_add_watch</function>()</link> 
+functions)</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--main-context-default">
+      <title>glib.main_context_default</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>glib.main_context_default</methodname>
+         <methodparam></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>the default glib.MainContext
+object</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>glib.main_context_default</function>() function
+returns the default glib.MainContext object.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--markup-escape-text">
+      <title>glib.markup_escape_text</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>glib.markup_escape_text</methodname>
+         <methodparam><parameter>text</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>text</parameter>&nbsp;:</term>
+         <listitem><simpara>the UTF-8 string to be
+escaped</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>the escaped text</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <note>
+        <para>This function is available in PyGTK 2.8 and above.</para>
+      </note>
+
+      <para>The <function>glib.markup_escape_text</function>() function
+escapes the string specified by <parameter>text</parameter> so that the
+markup parser will parse it verbatim. Less than, greater than, ampersand,
+etc. are replaced with the corresponding entities. This function would
+typically be used when writing out a file to be parsed with the markup
+parser.</para>
+
+      <para>Note that this function doesn't protect whitespace and line
+endings from being processed according to the XML rules for normalization of
+line endings and attribute values.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--child-watch-add">
+      <title>glib.child_watch_add</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>glib.child_watch_add</methodname>
+        <methodparam><parameter role="keyword">pid</parameter></methodparam>
+        <methodparam><parameter role="keyword">function</parameter></methodparam>
+        <methodparam><parameter role="keyword">data</parameter><initializer>None</initializer></methodparam>
+        <methodparam><parameter role="keyword">priority</parameter><initializer>glib.PRIORITY_DEFAULT</initializer></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><parameter role="keyword">pid</parameter>&nbsp;:</term>
+          <listitem><simpara>process id of a child process to watch</simpara></listitem>
+        </varlistentry>
+        <varlistentry><term><parameter role="keyword">function</parameter>&nbsp;:</term>
+          <listitem><simpara>the function to call</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+          <listitem><simpara>the optional data to pass to
+<parameter>function</parameter></simpara></listitem>
+        </varlistentry>
+         <varlistentry>
+          <term><parameter role="keyword">priority</parameter>&nbsp;:</term>
+          <listitem><simpara>the priority of the idle source - one of the
+<xref linkend="glib-priority-constants"
+endterm="glib-priority-constants-title"></xref></simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem><simpara>the id of event source.</simpara></listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGTK 2.6 and above.</para>
+      </note>
+
+      <para>The <function>glib.child_watch_add</function>() function sets
+the function specified by <parameter>function</parameter> to be called with
+the user data specified by <parameter>data</parameter> when the child
+indicated by <parameter>pid</parameter> exits. The signature for the
+callback is:</para>
+
+      <programlisting>
+def callback(pid, condition, user_data)
+</programlisting>
+
+      <para>where <parameter>pid</parameter> is is the child process id,
+<parameter>condition</parameter> is the status information about the child
+process and <parameter>user_data</parameter> is <parameter>data</parameter>
+PyGTK supports only a single callback per process id.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--spawn-async">
+      <title>glib.spawn_async</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>glib.spawn_async</methodname>
+          <methodparam><parameter role="keyword">argv</parameter></methodparam>
+          <methodparam><parameter role="keyword">envp</parameter><initializer>None</initializer></methodparam>
+          <methodparam><parameter role="keyword">working_directory</parameter><initializer>None</initializer></methodparam>
+          <methodparam><parameter role="keyword">flags</parameter><initializer>0</initializer></methodparam>
+          <methodparam><parameter role="keyword">child_setup</parameter><initializer>None</initializer></methodparam>
+          <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
+          <methodparam><parameter role="keyword">standard_input</parameter><initializer>None</initializer></methodparam>
+          <methodparam><parameter role="keyword">standard_output</parameter><initializer>None</initializer></methodparam>
+          <methodparam><parameter role="keyword">standard_error</parameter><initializer>None</initializer></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><parameter role="keyword">argv</parameter>&nbsp;:</term>
+          <listitem><simpara>a sequence of strings containing the arguments
+of the child process</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><parameter role="keyword">envp</parameter>&nbsp;:</term>
+          <listitem><simpara>the child's environment or
+<literal>None</literal> to inherit the parent's
+environment.</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><parameter role="keyword">working_directory</parameter>&nbsp;:</term>
+          <listitem><simpara>the child's current working directory, or
+<literal>None</literal> to inherit parent's</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
+          <listitem><simpara>flags from the <xref
+linkend="glib-spawn-flag-constants"
+endterm="glib-spawn-flag-constants-title"></xref>.</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><parameter role="keyword">child_setup</parameter>&nbsp;:</term>
+          <listitem><simpara>a function to run in the child just before
+calling <function>exec</function>()</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
+          <listitem><simpara>the user data for the
+<parameter>child_setup</parameter> function</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><parameter role="keyword">standard_input</parameter>&nbsp;:</term>
+          <listitem><simpara>if <literal>True</literal> return the file
+descriptor for the child's stdin</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><parameter role="keyword">standard_output</parameter>&nbsp;:</term>
+          <listitem><simpara>if <literal>True</literal> return the file
+descriptor for the child's stdout</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><parameter role="keyword">standard_error</parameter>&nbsp;:</term>
+          <listitem><simpara>if <literal>True</literal> return the file
+descriptor for the child's stderr</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem><simpara>a 4-tuple containing the child's process id and
+the stdin, stdout and stderr file descriptor integers.</simpara></listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGTK 2.6 and above.</para>
+      </note>
+
+      <para>The <function>glib.spawn_async</function>() function executes
+a child program asynchronously (your program will not block waiting for the
+child to exit). The child program is specified by the only argument that
+must be provided, <parameter>argv</parameter>. <parameter>argv</parameter>
+should be a sequence of strings, to be passed as the argument vector for the
+child. The first string in <parameter>argv</parameter> is of course the name
+of the program to execute. By default, the name of the program must be a
+full path; the <envar>PATH</envar> shell variable will only be searched if
+you pass the <literal>glib.SPAWN_SEARCH_PATH</literal> flag in
+<parameter>flags</parameter>. The function returns a 4-tuple containing the
+child's process id and the file descriptors for the child's stdin, stdout
+and stderr. The stdin, stdout and stderr file descriptors are returned only
+ofthe corresponding <parameter>standard_input</parameter>,
+<parameter>standard_output</parameter> or
+<parameter>standard_error</parameter> params are
+<literal>True</literal>.</para>
+
+      <para>On Windows, the low-level child process creation API
+(<function>CreateProcess</function>()) doesn't use argument vectors, but a
+command line. The C runtime library's <function>spawn*</function>() family
+of functions (which <link
+linkend="function-glib--spawn-async"><function>glib.spawn_async</function>()</link>
+eventually calls) paste the argument vector elements into a command line,
+and the C runtime startup code does a corresponding reconstruction of an
+argument vector from the command line, to be passed to
+<function>main</function>(). Complications arise when you have argument
+vector elements that contain spaces of double quotes. The
+<function>spawn*</function>() functions don't do any quoting or escaping,
+but on the other hand the startup code does do unquoting and unescaping in
+order to enable receiving arguments with embedded spaces or double
+quotes. To work around this asymmetry, the <link
+linkend="function-glib--spawn-async"><function>glib.spawn_async</function>()</link>
+function will do quoting and escaping on argument vector elements that need
+it before calling the C runtime <function>spawn</function>()
+function.</para>
+
+      <para><parameter>envp</parameter> is a sequence of strings, where each
+ string has the form <literal>KEY=VALUE</literal>. This will become the
+ child's environment. If <parameter>envp</parameter> is
+ <parameter>None</parameter> or not specified, the child inherits its
+ parent's environment.</para>
+
+      <para><parameter>flags</parameter> should be the bitwise
+<literal>OR</literal> of the <xref linkend="glib-spawn-flag-constants"
+endterm="glib-spawn-flag-constants-title"></xref> you want to affect the
+function's behaviour. The <literal>glib.SPAWN_DO_NOT_REAP_CHILD</literal>
+flag means that the child will not automatically be reaped; you must use a
+GChildWatch source to be notified about the death of the child
+process. Eventually you must call g_spawn_close_pid() on the child_pid, in
+order to free resources which may be associated with the child process. (On
+Unix, using a GChildWatch source is equivalent to calling
+<function>waitpid</function>() or handling the <literal>SIGCHLD</literal>
+signal manually. On Windows, calling g_spawn_close_pid() is equivalent to
+calling <function>CloseHandle</function>() on the process handle
+returned).</para>
+
+      <para><literal>glib.SPAWN_LEAVE_DESCRIPTORS_OPEN</literal> means
+that the parent's open file descriptors will be inherited by the child;
+otherwise all descriptors except stdin/stdout/stderr will be closed before
+calling <function>exec</function>() in the
+child. <literal>glib.SPAWN_SEARCH_PATH</literal> means that
+<parameter>argv</parameter>[0] need not be an absolute path, it will be
+looked for in the user's
+<envar>PATH</envar>. <literal>glib.SPAWN_STDOUT_TO_DEV_NULL</literal>
+means that the child's standard output will be discarded, instead of going
+to the same location as the parent's standard output. If you use this flag,
+<parameter>standard_output</parameter> must be
+<literal>None</literal>. <literal>glib.SPAWN_STDERR_TO_DEV_NULL</literal>
+means that the child's standard error will be discarded, instead of going to
+the same location as the parent's standard error. If you use this flag,
+<parameter>standard_error</parameter> must be
+<literal>None</literal>. <literal>glib.SPAWN_CHILD_INHERITS_STDIN</literal>
+means that the child will inherit the parent's standard input (by default,
+the child's standard input is attached to
+<filename>/dev/null</filename>). If you use this flag,
+<parameter>standard_input</parameter> must be
+<literal>None</literal>. <literal>glib.SPAWN_FILE_AND_ARGV_ZERO</literal>
+means that the first element of <parameter>argv</parameter> is the file to
+execute, while the remaining elements are the actual argument vector to pass
+to the file. Normally the <link
+linkend="function-glib--spawn-async"><function>glib.spawn_async</function>()</link>
+function uses <parameter>argv</parameter>[0] as the file to execute, and
+passes all of <parameter>argv</parameter> to the child.</para>
+
+      <para><parameter>child_setup</parameter> and
+<parameter>user_data</parameter> are a function and user data. On POSIX
+platforms, the function is called in the child after GLib has performed all
+the setup it plans to perform (including creating pipes, closing file
+descriptors, etc.) but before calling <function>exec</function>(). That is,
+<parameter>child_setup</parameter> is called just before calling
+<function>exec</function>() in the child. Obviously actions taken in this
+function will only affect the child, not the parent. On Windows, there is no
+separate <function>fork</function>() and <function>exec</function>()
+functionality. Child processes are created and run right away with one API
+call,
+<function>CreateProcess</function>(). <parameter>child_setup</parameter> is
+called in the parent process just before creating the child process. You
+should carefully consider what you do in <parameter>child_setup</parameter>
+if you intend your software to be portable to Windows.</para>
+
+      <para>The returned child process id can be used to send signals to the
+child, or to wait for the child if you specified the
+<literal>glib.SPAWN_DO_NOT_REAP_CHILD</literal> flag.  On Windows, child
+pid will be returned only if you specified the
+<literal>glib.SPAWN_DO_NOT_REAP_CHILD</literal> flag.</para>
+
+      <para>The caller of the <link
+linkend="function-glib--spawn-async"><function>glib.spawn_async</function>()</link>
+must close any returned file descriptors when they are no longer in
+use.</para>
+
+      <para>If <parameter>standard_input</parameter> is
+<literal>None</literal>, the child's standard input is attached to
+<filename>/dev/null</filename> unless
+<literal>glib.SPAWN_CHILD_INHERITS_STDIN</literal> is set.</para>
+
+      <para>If <parameter>standard_error</parameter> is
+<literal>None</literal>, the child's standard error goes to the same
+location as the parent's standard error unless
+<literal>glib.SPAWN_STDERR_TO_DEV_NULL</literal> is set.</para>
+
+      <para>If <parameter>standard_output</parameter> is
+<literal>None</literal>, the child's standard output goes to the same
+location as the parent's standard output unless
+<literal>glib.SPAWN_STDOUT_TO_DEV_NULL</literal> is set.</para>
+
+      <para>If an error occurs, the glib.GError exception will be
+raised.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--get-current-time">
+      <title>glib.get_current_time</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>glib.get_current_time</methodname>
+       </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem><simpara>the current time as the number of seconds and
+microseconds from the epoch.</simpara></listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGTK 2.8 and above.</para>
+      </note>
+
+      <para>The <function>glib.get_current_time</function>() function
+reurns the current time of day as the number of seconds and microseconds
+from the epoch.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--get-user-cache-dir">
+      <title>glib.get_user_cache_dir</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>glib.get_user_cache_dir</methodname>
+      </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem>
+            <simpara>
+              a strings with a path to user's cache directory.
+            </simpara>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGObject 2.18 and above.</para>
+      </note>
+
+      <para>Returns a base directory in which to store non-essential,
+        cached data specific to particular user.</para>
+
+      <para>On UNIX platforms this is determined using the mechanisms
+        described in the
+        <ulink url="http://www.freedesktop.org/Standards/basedir-spec">XDG
+          Base Directory Specification</ulink>.</para>
+    </refsect2>
+
+    <refsect2 id="function-glib--get-user-config-dir">
+      <title>glib.get_user_config_dir</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>glib.get_user_config_dir</methodname>
+      </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem>
+            <simpara>
+              a strings with a path to user's configuration directory.
+            </simpara>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGObject 2.18 and above.</para>
+      </note>
+
+      <para>Returns a base directory in which to store user-specific
+        application configuration information such as user preferences
+        and settings. </para>
+
+      <para>On UNIX platforms this is determined using the mechanisms
+        described in the
+        <ulink url="http://www.freedesktop.org/Standards/basedir-spec">XDG
+          Base Directory Specification</ulink>.</para>
+    </refsect2>
+
+    <refsect2 id="function-glib--get-user-data-dir">
+      <title>glib.get_user_data_dir</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>glib.get_user_data_dir</methodname>
+      </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem>
+            <simpara>
+              a strings with a path to user's data directory.
+            </simpara>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGObject 2.18 and above.</para>
+      </note>
+
+      <para>Returns a base directory in which to access application
+        data such as icons that is customized for a particular
+        user</para>
+
+      <para>On UNIX platforms this is determined using the mechanisms
+        described in the
+        <ulink url="http://www.freedesktop.org/Standards/basedir-spec">XDG
+          Base Directory Specification</ulink>.</para>
+    </refsect2>
+
+    <refsect2 id="function-glib--get-user-special-dir">
+      <title>glib.get_user_special_dir</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>glib.get_user_special_dir</methodname>
+        <methodparam><parameter>directory</parameter></methodparam>
+      </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><emphasis>directory</emphasis>&nbsp;:</term>
+          <listitem>
+            <simpara>
+              the logical id of special directory,
+              see <link linkend="glib-user-directory-constants">User
+              Directory constants</link> for the list of supported
+              values
+            </simpara>
+          </listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem>
+            <simpara>
+              a strings with a path to the requested directory.
+            </simpara>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGObject 2.18 and above.</para>
+      </note>
+
+      <para>Returns the full path of a special directory using its
+        logical id.</para>
+
+      <para>On Unix this is done using the XDG special user
+        directories.  For compatibility with existing practise,
+        <link linkend="glib-user-directory-constants">glib.USER_DIRECTORY_DESKTOP</link>
+        falls back to <literal>$HOME/Desktop</literal> when XDG
+        special user directories have not been set up.</para>
+
+      <para>Depending on the platform, the user might be able to
+        change the path of the special directory without requiring the
+        session to restart; GLib will not reflect any change once the
+        special directories are loaded.</para>
+    </refsect2>
+
+    <refsect2 id="function-glib--main-depth">
+      <title>glib.main_depth</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>glib.main_depth</methodname>
+       </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem><simpara>the depth of the stack of calls to the main
+context.</simpara></listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGTK 2.8 and above.</para>
+      </note>
+
+      <para>The <function>main_depth</function>() function returns the depth
+of the stack of calls in the main context. That is, when called from the
+toplevel, it gives 0. When called from within a callback from the <link
+linkend="method-glibmaincontext--iteration"><methodname>glib.MainContext.iteration</methodname>()</link>
+method (or the <link
+linkend="method-glibmainloop--run"><methodname>glib.MainLoop.run</methodname>()</link>
+method, etc.) it returns 1. When called from within a callback to a
+recursive call to the <link
+linkend="method-glibmaincontext--iteration"><methodname>glib.MainContext.iteration</methodname>()</link>
+method), it returns 2. And so forth.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--threads-init">
+      <title>glib.threads_init</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>glib.threads_init</methodname>
+        <methodparam><parameter></parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem><simpara></simpara></listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGTK 2.4 and above.</para>
+      </note>
+
+      <para>The <function>threads_init</function>() function initializes the
+      the use of Python threading in the glib module. This function is
+      different than the <link
+      linkend="function-gdk--threads-init"><function>gtk.gdk.threads_init</function>()</link>
+      function as that function also initializes the gdk threads.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--signal-accumulator-true-handled">
+      <title>glib.signal_accumulator_true_handled</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>glib.signal_accumulator_true_handled</methodname>
+       </methodsynopsis></programlisting>
+
+      <note>
+        <para>This function is available in PyGTK 2.8 and above.</para>
+      </note>
+
+      <para>The <function>signal_accumulator_true_handled</function>()
+      function is only used as accumulator argument when registering
+      signals.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--filename-display-name">
+      <title>glib.filename_display_name</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>glib.filename_display_name</methodname>
+        <methodparam><parameter>filename</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><emphasis>filename</emphasis>&nbsp;:</term>
+          <listitem><simpara>a pathname in the file name
+          encoding</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem><simpara>an UTF8 rendition of
+          <parameter>filename</parameter>.</simpara></listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGTK 2.10 and above.</para>
+      </note>
+
+      <para>The <function>filename_display_name</function>() function
+      converts a filename into a valid UTF-8 string. The conversion is not
+      necessarily reversible, so you should keep the original around and use
+      the return value of this function only for display purposes. Unlike
+      g_filename_to_utf8(), the result is guaranteed to be non-None even if
+      the filename actually isn't in the file name encoding.</para>
+
+      <para>If you know the whole pathname of the file you should use the
+      <link
+      linkend="function-glib--filename-display-basename"><function>glib.filename_display_basename</function>()</link>
+      function, since that allows location-based translation of
+      filenames.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--filename-display-basename">
+      <title>glib.filename_display_basename</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>glib.filename_display_basename</methodname>
+        <methodparam><parameter>filename</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><emphasis>filename</emphasis>&nbsp;:</term>
+          <listitem><simpara>an absolute pathname in the file name
+          encoding</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem><simpara>an UTF8 rendition of
+          <parameter>filename</parameter>.</simpara></listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGTK 2.10 and above.</para>
+      </note>
+
+      <para>The <function>filename_display_basename</function>() function
+      returns the display basename for the particular filename, guaranteed
+      to be valid UTF-8. The display name might not be identical to the
+      filename, for instance there might be problems converting it to UTF-8,
+      and some files can be translated in the display.</para>
+
+      <para>You must pass the whole absolute pathname to this functions so
+      that translation of well known locations can be done.</para>
+
+      <para>This function is preferred over the <link
+      linkend="function-glib--filename-display-name"><function>glib.filename_display_name</function>()</link>
+      function if you know the whole path, as it allows translation.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-glib--filename-from-utf8">
+      <title>glib.filename_from_utf8</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>glib.filename_from_utf8</methodname>
+       <methodparam><parameter>utf8string</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><emphasis>utf8string</emphasis>&nbsp;:</term>
+          <listitem><simpara>a UTF-8 encoded string.</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem><simpara>a filename encoded in the GLib filename
+          encoding.</simpara></listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGTK 2.10 and above.</para>
+      </note>
+
+      <para>The <function>filename_from_utf8</function>() function converts
+      a string from UTF-8 to the encoding GLib uses for filenames. Note that
+      on Windows GLib uses UTF-8 for filenames.</para>
+
+    </refsect2>
+
+  </refsect1>
+
+</refentry>
diff --git a/docs/reference/pyglib-maincontext.xml b/docs/reference/pyglib-maincontext.xml
new file mode 100644 (file)
index 0000000..ee1e985
--- /dev/null
@@ -0,0 +1,152 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-glibmaincontext">
+  <refnamediv>
+    <refname>glib.MainContext</refname>
+
+    <refpurpose>an object representing a set of event sources to be handled
+in a <link
+linkend="class-glibmainloop"><classname>glib.MainLoop</classname></link>.</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Synopsis</title>
+
+<classsynopsis language="python">
+  <ooclass><classname>glib.MainContext</classname></ooclass>
+<constructorsynopsis language="python">
+    <methodname><link linkend="constructor-glibmaincontext">glib.MainContext</link></methodname>
+  </constructorsynopsis>
+<methodsynopsis language="python">
+    <methodname><link linkend="method-glibmaincontext--iteration">iteration</link></methodname>
+    <methodparam><parameter>may_block</parameter></methodparam>
+  </methodsynopsis>
+<methodsynopsis language="python">
+    <methodname><link linkend="method-glibmaincontext--pending">pending</link></methodname>
+  </methodsynopsis>
+</classsynopsis>
+
+</refsect1>
+
+  <refsect1>
+    <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-glibmaincontext">glib.MainContext</link>
+</synopsis>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para>A <link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+represents a set of event sources that can be run in a single thread. File
+descriptors (plain files, pipes or sockets) and timeouts are the standard
+event sources for <literal>GTK</literal> and <literal>PyGTK</literal> though
+others can be added. Each event source is assigned a priority. The default
+priority, <literal>glib.PRIORITY_DEFAULT</literal>, is 0. Values less
+than 0 denote higher priorities. Values greater than 0 denote lower
+priorities. Events from high priority sources are always processed before
+events from lower priority sources. Single iterations of a <link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+can be run with the <link
+linkend="method-glibmaincontext--iteration"><methodname>iteration</methodname>()</link>
+method.</para>
+
+  </refsect1>
+
+  <refsect1 id="constructor-glibmaincontext">
+    <title>Constructor</title>
+
+    <programlisting><constructorsynopsis language="python">
+        <methodname>glib.MainContext</methodname>
+      </constructorsynopsis></programlisting>
+    <variablelist>
+      <varlistentry>
+        <term><emphasis>Returns</emphasis>&nbsp;:</term>
+        <listitem><simpara>a new <link
+        linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+        object.</simpara></listitem>
+      </varlistentry>
+    </variablelist>
+
+    <para>Creates a new <link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+object.</para>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Methods</title>
+
+    <refsect2 id="method-glibmaincontext--iteration">
+      <title>glib.MainContext.iteration</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>iteration</methodname>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>may_block</parameter>&nbsp;:</term>
+         <listitem><simpara>if <literal>True</literal> the call may block
+         waiting for an event.</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+       <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara><literal>True</literal> if events were
+         dispatched.</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>iteration</methodname>() method runs a single
+iteration. This involves:</para>
+
+    <itemizedlist>
+      <listitem>
+       <simpara>checking to see if any associated event sources are ready
+to be processed;</simpara>
+      </listitem>
+      <listitem>
+       <simpara>then if no events sources are ready and
+<parameter>may_block</parameter> is <literal>True</literal>, waiting for a
+source to become ready;</simpara>
+      </listitem>
+      <listitem>
+       <simpara>and finally, dispatching the highest priority events
+sources that are ready</simpara>
+      </listitem>
+   </itemizedlist>
+
+      <para>Note that even when <parameter>may_block</parameter> is
+<literal>True</literal>, it is still possible for
+<methodname>iteration</methodname>() to return <literal>False</literal>,
+since the the wait may be interrupted for other reasons than an event source
+becoming ready.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-glibmaincontext--pending">
+      <title>glib.MainContext.pending</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>pending</methodname>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+       <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara><literal>True</literal> if events are
+         pending.</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>pending</methodname>() method checks if any
+associated sources have pending events.</para>
+
+    </refsect2>
+
+  </refsect1>
+
+</refentry>
diff --git a/docs/reference/pyglib-mainloop.xml b/docs/reference/pyglib-mainloop.xml
new file mode 100644 (file)
index 0000000..913e743
--- /dev/null
@@ -0,0 +1,202 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-glibmainloop">
+  <refnamediv>
+    <refname>glib.MainLoop</refname>
+
+    <refpurpose>an object representing the main event loop of a PyGTK
+    application.</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Synopsis</title>
+
+<classsynopsis language="python">
+  <ooclass><classname>glib.MainLoop</classname></ooclass>
+<constructorsynopsis language="python">
+    <methodname><link linkend="constructor-glibmainloop">glib.MainLoop</link></methodname>
+    <methodparam><parameter>context</parameter><initializer>None</initializer></methodparam>
+    <methodparam><parameter>is_running</parameter><initializer>0</initializer></methodparam>
+  </constructorsynopsis>
+<methodsynopsis language="python">
+    <methodname><link linkend="method-glibmainloop--get-context">get_context</link></methodname>
+  </methodsynopsis>
+<methodsynopsis language="python">
+    <methodname><link linkend="method-glibmainloop--is-running">is_running</link></methodname>
+  </methodsynopsis>
+<methodsynopsis language="python">
+    <methodname><link linkend="method-glibmainloop--quit">quit</link></methodname>
+  </methodsynopsis>
+<methodsynopsis language="python">
+    <methodname><link linkend="method-glibmainloop--run">run</link></methodname>
+  </methodsynopsis>
+</classsynopsis>
+
+</refsect1>
+
+  <refsect1>
+    <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-glibmainloop">glib.MainLoop</link>
+</synopsis>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><link
+linkend="class-glibmainloop"><classname>glib.MainLoop</classname></link>
+represents a main event loop. A <link
+linkend="class-glibmainloop"><classname>glib.MainLoop</classname></link>
+is created with the <link
+linkend="constructor-glibmainloop">glib.MainLoop</link>()
+constructor. After adding the initial event sources, the <link
+linkend="method-glibmainloop--run"><methodname>run</methodname>()</link>
+method is called. This continuously checks for new events from each of the
+event sources and dispatches them. Finally, the processing of an event from
+one of the sources leads to a call to the <link
+linkend="method-glibmainloop--quit"><methodname>quit</methodname>()</link>
+method to exit the main loop, and the <link
+linkend="method-glibmainloop--run"><methodname>run</methodname>()</link>
+method returns.</para>
+
+    <para>It is possible to create new instances of <link
+linkend="class-glibmainloop"><classname>glib.MainLoop</classname></link>
+recursively. This is often used in <literal>PyGTK</literal> applications
+when showing modal dialog boxes. Note that event sources are associated with
+a particular <link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>,
+and will be checked and dispatched for all main loops associated with that
+<link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>.</para>
+
+    <para><literal>PyGTK</literal> contains wrappers of some of these
+functions, e.g. the <link
+linkend="function-gtk--main"><function>gtk.main</function>()</link>, <link
+linkend="function-gtk--main-quit"><function>gtk.main_quit</function>()</link>
+and <link
+linkend="function-gtk--events-pending"><function>gtk.events_pending</function>()</link>
+functions.</para>
+
+  </refsect1>
+
+  <refsect1 id="constructor-glibmainloop">
+    <title>Constructor</title>
+
+    <programlisting><constructorsynopsis language="python">
+       <methodname>glib.MainLoop</methodname>
+       <methodparam><parameter>context</parameter><initializer>None</initializer></methodparam>
+       <methodparam><parameter>is_running</parameter><initializer>None</initializer></methodparam>
+      </constructorsynopsis></programlisting>
+    <variablelist>
+      <varlistentry>
+       <term><parameter>context</parameter>&nbsp;:</term>
+       <listitem><simpara>a <link
+       linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+       or <literal>None</literal> to use the default
+       context.</simpara></listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><parameter>is_running</parameter>&nbsp;:</term>
+       <listitem><simpara>if <literal>True</literal> indicates that the
+       loop is running. This is not very important since calling the <link
+       linkend="method-glibmainloop--run"><methodname>run</methodname>()</link>
+       method will set this to <literal>True</literal>
+       anyway.</simpara></listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><emphasis>Returns</emphasis>&nbsp;:</term>
+       <listitem><simpara>a new <link
+       linkend="class-glibmainloop"><classname>glib.MainLoop</classname></link>
+       object.</simpara></listitem>
+      </varlistentry>
+    </variablelist>
+
+    <para>Creates a new <link
+linkend="class-glibmainloop"><classname>glib.MainLoop</classname></link>
+object.</para>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Methods</title>
+
+    <refsect2 id="method-glibmainloop--get-context">
+      <title>glib.MainLoop.get_context</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>get_context</methodname>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+       <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>the <link
+         linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+         the mainloop is associated with</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>get_context</methodname>() method returns the
+<link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>
+that the mainloop was created with.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-glibmainloop--is-running">
+      <title>glib.MainLoop.is_running</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>is_running</methodname>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+       <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara><literal>True</literal> if the mainloop is
+         currently being run.</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>is_running</methodname>() method checks to see
+if the mainloop is currently being run via the <link
+linkend="method-glibmainloop--run"><methodname>run</methodname>()</link>
+method.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-glibmainloop--quit">
+      <title>glib.MainLoop.quit</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>quit</methodname>
+       </methodsynopsis></programlisting>
+
+      <para>The <methodname>quit</methodname>() method stops the mainloop
+from running. Any subsequent calls to the <link
+linkend="method-glibmainloop--run"><methodname>run</methodname>()</link>
+method will return immediately.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-glibmainloop--run">
+      <title>glib.MainLoop.run</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>run</methodname>
+       </methodsynopsis></programlisting>
+
+      <para>The <methodname>run</methodname>() method runs a mainloop until
+the <link
+linkend="method-glibmainloop--quit"><methodname>quit</methodname>()</link>
+method is called. If this is called for the thread of the loop's <link
+linkend="class-glibmaincontext"><classname>glib.MainContext</classname></link>,
+it will process events from the loop, otherwise it will simply wait.</para>
+
+    </refsect2>
+
+  </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygobject-classes.xml b/docs/reference/pygobject-classes.xml
new file mode 100644 (file)
index 0000000..17f925c
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<chapter id="gobject-class-reference"
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<title>PyGObject Class Reference</title>
+
+<!-- GOBJECT CLASSES -->
+<xi:include href="pygobject.xml"/>
+<xi:include href="pygobject-gboxed.xml"/>
+<xi:include href="pygobject-gpointer.xml"/>
+<xi:include href="pygobject-ginterface.xml"/>
+<xi:include href="pygobject-functions.xml"/>
+<xi:include href="pygobject-constants.xml"/>
+
+</chapter>
diff --git a/docs/reference/pygobject-constants.xml b/docs/reference/pygobject-constants.xml
new file mode 100644 (file)
index 0000000..a8f9711
--- /dev/null
@@ -0,0 +1,390 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="gobject-constants">
+  <refnamediv>
+    <refname>gobject Constants</refname>
+    <refpurpose>the built-in constants of the gobject module</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Synopsis</title>
+
+    <programlisting>
+<xref linkend="gobject-param-constants" endterm="gobject-param-constants-title"></xref>
+<xref linkend="gobject-signal-constants" endterm="gobject-signal-constants-title"></xref>
+<xref linkend="gobject-type-constants" endterm="gobject-type-constants-title"></xref>
+<xref linkend="gobject-version-constants" endterm="gobject-version-constants-title"></xref>
+</programlisting>
+
+  </refsect1>
+
+  <refsect1 id="gobject-constants-description">
+    <title>Description</title>
+
+    <refsect2 id="gobject-param-constants">
+      <title id="gobject-param-constants-title">GObject Param Flag Constants</title>
+
+      <para>The Param Flag constants are a set of bit-flags that specify
+certain aspects of parameters that can be configured.</para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gobject.PARAM_READABLE</literal></term>
+         <listitem>
+           <simpara>The parameter is readable</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.PARAM_WRITABLE</literal></term>
+         <listitem>
+           <simpara>The parameter is writable</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.PARAM_CONSTRUCT</literal></term>
+         <listitem>
+           <simpara>The parameter will be set upon object
+           construction</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.PARAM_CONSTRUCT_ONLY</literal></term>
+         <listitem>
+           <simpara>The parameter will only be set upon object
+           construction</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.PARAM_LAX_VALIDATION</literal></term>
+         <listitem>
+           <simpara>Upon parameter conversion strict validation is not
+           required</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+
+    </refsect2>
+
+    <refsect2 id="gobject-signal-constants">
+      <title id="gobject-signal-constants-title">GObject Signal Flag Constants</title>
+
+      <para>The Signal Flag constants are a set of bit-flags that specify a
+signal's behavior. The overall signal description outlines how especially
+the <literal>RUN</literal> flags control the stages of a signal
+emission.</para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_RUN_FIRST</literal></term>
+         <listitem>
+           <simpara>Invoke the object method handler in the first emission
+           stage.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_RUN_LAST</literal></term>
+         <listitem>
+           <simpara>Invoke the object method handler in the third emission
+           stage.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_RUN_CLEANUP</literal></term>
+         <listitem>
+           <simpara>Invoke the object method handler in the last emission
+           stage.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_NO_RECURSE</literal></term>
+         <listitem>
+           <simpara>Signals being emitted for an object while currently
+           being in emission for this very object will not be emitted
+           recursively, but instead cause the first emission to be
+           restarted.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_DETAILED</literal></term>
+         <listitem>
+           <simpara>This signal supports "::detail" appendices to the
+           signal name upon handler connections and emissions.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_ACTION</literal></term>
+         <listitem>
+           <simpara>Action signals are signals that may freely be emitted
+           on alive objects from user code via the <link
+           linkend="method-gobject--emit"><methodname>gobject.emit</methodname>()</link>
+           method and friends, without the need of being embedded into
+           extra code that performs pre or post emission adjustments on the
+           object. They can also be thought of as object methods which can
+           be called generically by third-party code.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_NO_HOOKS</literal></term>
+         <listitem>
+           <simpara>No emissions hooks are supported for this
+           signal.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+
+    </refsect2>
+
+    <refsect2 id="gobject-spawn-flag-constants">
+      <title id="gobject-spawn-flag-constants-title">GObject Spawn Flag Constants</title>
+
+      <para>The Spawn Flag constants are a set of bit-flags that can be
+passed to the <link
+linkend="function-gobject--spawn-async"><function>gobject.spawn_async</function>()</link>
+function.</para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gobject.SPAWN_LEAVE_DESCRIPTORS_OPEN</literal></term>
+         <listitem>
+           <simpara>the parent's open file descriptors will be inherited by
+the child; otherwise all descriptors except stdin/stdout/stderr will be
+closed before calling <function>exec</function>() in the child.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SPAWN_DO_NOT_REAP_CHILD</literal></term>
+         <listitem>
+           <simpara>the child will not be automatically reaped; you must
+call <function>waitpid</function>() or handle <literal>SIGCHLD</literal>
+yourself, or the child will become a zombie.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SPAWN_SEARCH_PATH</literal></term>
+         <listitem>
+           <simpara><parameter>argv</parameter>[0] need not be an absolute
+path, it will be looked for in the user's <envar>PATH</envar>.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SPAWN_STDOUT_TO_DEV_NULL</literal></term>
+         <listitem>
+           <simpara>the child's standard output will be discarded, instead
+of going to the same location as the parent's standard output.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SPAWN_STDERR_TO_DEV_NULL</literal></term>
+         <listitem>
+           <simpara>the child's standard error will be discarded.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SPAWN_CHILD_INHERITS_STDIN</literal></term>
+         <listitem>
+           <simpara>the child will inherit the parent's standard input (by
+default, the child's standard input is attached to /dev/null).</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SPAWN_FILE_AND_ARGV_ZERO</literal></term>
+         <listitem>
+           <simpara>the first element of <parameter>argv</parameter> is the
+file to execute, while the remaining elements are the actual argument vector
+to pass to the file. Normally <link
+linkend="function-gobject--spawn-async"><function>gobject.spawn_async</function>()</link>
+uses <parameter>argv</parameter>[0] as the file to execute, and passes all
+of <parameter>argv</parameter> to the child.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+
+    </refsect2>
+
+    <refsect2 id="gobject-type-constants">
+      <title id="gobject-type-constants-title">GObject Built-in Type Constants</title>
+
+      <para>The Built-in Type constants specify the pre-defined types used
+by gobject.</para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gobject.TYPE_INVALID</literal></term>
+         <listitem>
+           <simpara>An invalid type, used as error return value in some
+           functions.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_NONE</literal></term>
+         <listitem>
+           <simpara>A fundamental type indicating no type.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_INTERFACE</literal></term>
+         <listitem>
+           <simpara>The fundamental type from which all interfaces are
+           derived.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_CHAR</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to a
+           character. This maps to a string in Python.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_UCHAR</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to an unsigned
+           character. This maps to a string in Python.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_BOOLEAN</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to a True or False
+           value. This maps to an integer in Python.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_INT</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to an
+           integer. This maps to an integer in Python.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_UINT</literal></term>
+         <listitem>
+           <simpara>he fundamental type corresponding to an unsigned
+           integer. This maps to an integer in Python.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_LONG</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to a long
+           integer. This maps to an integer in Python.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_ULONG</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to an unsigned
+           integer. This maps to an integer in Python.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_INT64</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to an long long
+           integer. This maps to a long integer in Python.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_UINT64</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to an unsigned long
+           long integer. This maps to a long integer in Python.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_ENUM</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to an enumeration
+           type. This maps to an integer in Python.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_FLAGS</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to a flag
+           type. This maps to an integer in Python.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_FLOAT</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to a floating point
+           number. This maps to a float in Python.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_DOUBLE</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to a double
+           floating point number. This maps to a float in Python.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_STRING</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to a string.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_POINTER</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to a pointer to an
+           anonymous type. This has no corresponding Python type.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_BOXED</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to a boxed object
+           type.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_PARAM</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to a GParamSpec
+           type.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_OBJECT</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to a GObject
+           type.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.TYPE_PYOBJECT</literal></term>
+         <listitem>
+           <simpara>The fundamental type corresponding to a Python Object
+           type.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+
+    </refsect2>
+
+    <refsect2 id="gobject-version-constants">
+      <title id="gobject-version-constants-title">GObject Version Constants</title>
+
+      <para>The Version constants specify the version of
+<literal>GLIB</literal> used by PyGTK as a 3-tuple containing the major,
+minor and patch release numbers.</para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gobject.glib_version</literal></term>
+         <listitem>
+           <simpara>A 3-tuple containing (major, minor, patch) release
+           numbers.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+
+    </refsect2>
+
+  </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygobject-functions.xml b/docs/reference/pygobject-functions.xml
new file mode 100644 (file)
index 0000000..1f50fbe
--- /dev/null
@@ -0,0 +1,889 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="gobject-functions">
+  <refnamediv>
+    <refname>gobject Functions</refname>
+    <refpurpose>miscellaneous functions</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Synopsis</title>
+
+    <programlisting>
+<methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--type-name">gobject.type_name</link></methodname>
+       <methodparam><parameter>type</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--type-from-name">gobject.type_from_name</link></methodname>
+       <methodparam><parameter>type_name</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--type-parent">gobject.type_parent</link></methodname>
+       <methodparam><parameter>type</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--type-is-a">gobject.type_is_a</link></methodname>
+       <methodparam><parameter>type</parameter></methodparam>
+       <methodparam><parameter>parent_type</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--type-children">gobject.type_children</link></methodname>
+       <methodparam><parameter>type</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--type-interfaces">gobject.type_interfaces</link></methodname>
+       <methodparam><parameter>type</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--type-register">gobject.type_register</link></methodname>
+       <methodparam><parameter>class</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--signal-new">gobject.signal_new</link></methodname>
+       <methodparam><parameter>signal_name</parameter></methodparam>
+       <methodparam><parameter>type</parameter></methodparam>
+       <methodparam><parameter>flags</parameter></methodparam>
+       <methodparam><parameter>return_type</parameter></methodparam>
+       <methodparam><parameter>param_types</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--signal-list-names">gobject.signal_list_names</link></methodname>
+       <methodparam><parameter role="keyword">type</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--signal-list-ids">gobject.signal_list_ids</link></methodname>
+       <methodparam><parameter role="keyword">type</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--signal-lookup">gobject.signal_lookup</link></methodname>
+       <methodparam><parameter role="keyword">name</parameter></methodparam>
+       <methodparam><parameter role="keyword">type</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--signal-name">gobject.signal_name</link></methodname>
+       <methodparam><parameter role="keyword">signal_id</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--signal-query1">gobject.signal_query</link></methodname>
+       <methodparam><parameter role="keyword">name</parameter></methodparam>
+       <methodparam><parameter role="keyword">type</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--signal-query2">gobject.signal_query</link></methodname>
+       <methodparam><parameter role="keyword">signal_id</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--list-properties">gobject.list_properties</link></methodname>
+       <methodparam><parameter>type</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--new">gobject.new</link></methodname>
+       <methodparam><parameter>type</parameter></methodparam>
+       <methodparam><parameter>...</parameter></methodparam>
+  </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--signal-accumulator-true-handled">gobject.signal_accumulator_true_handled</link></methodname>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--add-emission-hook">gobject.add_emission_hook</link></methodname>
+       <methodparam><parameter>type</parameter></methodparam>
+       <methodparam><parameter>name</parameter></methodparam>
+       <methodparam><parameter>callback</parameter></methodparam>
+       <methodparam><parameter>...</parameter></methodparam>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--remove-emission-hook">gobject.remove_emission_hook</link></methodname>
+       <methodparam><parameter>type</parameter></methodparam>
+       <methodparam><parameter>name</parameter></methodparam>
+       <methodparam><parameter>hook_id</parameter></methodparam>
+      </methodsynopsis><methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject---install-metaclass">gobject._install_metaclass</link></methodname>
+       <methodparam><parameter>metaclass</parameter></methodparam>
+      </methodsynopsis>
+    </programlisting>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para>These functions are part of the <literal>PyGTK</literal> gobject
+module but are not directly associated with a specific class.</para>
+
+    <note>
+      <para>
+        Many functions that previously were in this namespace got moved to <link
+        linkend="glib-functions"><literal>glib</literal></link> namespace instead.  They
+        are still available in <literal>gobject</literal> for backward compatibility, but
+        not documented here.  If you miss documentation for some function, be sure to
+        check <link linkend="glib-functions"><literal>glib</literal></link> first.
+      </para>
+    </note>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Functions</title>
+
+    <refsect2 id="function-gobject--type-name">
+      <title>gobject.type_name</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.type_name</methodname>
+         <methodparam><parameter>type</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>type</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara></simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>gobject.type_name</function>() function returns
+the unique name that is assigned to the specified
+<parameter>type</parameter>. <parameter>type</parameter> can be a GObject
+type, type ID or instance. This function raises a TypeError exception
+if <parameter>type</parameter> isn't a <literal>PyGTK</literal> type.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--type-from-name">
+      <title>gobject.type_from_name</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.type_from_name</methodname>
+         <methodparam><parameter>type_name</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>type_name</parameter>&nbsp;:</term>
+         <listitem><simpara>a string containing the name of a
+type</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>the type ID named
+<parameter>type_name</parameter></simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>gobject.type_from_name</function>() function
+returns the type ID of the <literal>PyGTK</literal> type with the name
+specified by <parameter>type_name</parameter>. This function raises a
+RuntimeError exception if no type matches
+<parameter>type_name</parameter>.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--type-parent">
+      <title>gobject.type_parent</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.type_parent</methodname>
+         <methodparam><parameter>type</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>type</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>the parent type ID</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>gobject.type_parent</function>() function returns
+the direct parent type ID of the specified <parameter>type</parameter>.
+<parameter>type</parameter> can be a GObject type, type ID or instance. If
+<parameter>type</parameter> has no parent, i.e. is a fundamental type, the
+RuntimeError exception is raised. </para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--type-is-a">
+      <title>gobject.type_is_a</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.type_is_a</methodname>
+         <methodparam><parameter>type</parameter></methodparam>
+         <methodparam><parameter>parent_type</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>type</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>parent_type</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara><literal>True</literal> if
+<parameter>parent_type</parameter> is an ancestor of
+<parameter>type</parameter></simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>gobject.type_is_a</function>() function returns
+<literal>True</literal> if the specified <parameter>type</parameter> is a
+descendant of the type specified by <parameter>parent_type</parameter>. This
+function also returns <literal>True</literal> if
+<parameter>parent_type</parameter> is an interface and
+<parameter>type</parameter> conforms to it.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--type-children">
+      <title>gobject.type_children</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.type_children</methodname>
+         <methodparam><parameter>type</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>type</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a list of the child types of
+<parameter>type</parameter></simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>gobject.type_children</function>() function
+returns a list containing the child types of the specified
+<parameter>type</parameter>.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--type-interfaces">
+      <title>gobject.type_interfaces</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.type_interfaces</methodname>
+         <methodparam><parameter>type</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>type</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a list of the interface types supported by
+<parameter>type</parameter></simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>gobject.type_interfaces</function>() function
+returns a list of the interface types supported by
+<parameter>type</parameter>. <parameter>type</parameter> can be a GObject
+type, type ID or instance. This function returns a RuntimeError exception if
+type is not a valid type or has no interfaces.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--type-register">
+      <title>gobject.type_register</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.type_register</methodname>
+         <methodparam><parameter>class</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>class</parameter>&nbsp;:</term>
+         <listitem><simpara>a Python class that is a descendant of <link
+linkend="class-gobject"><classname>gobject.GObject</classname></link></simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>gobject.type_register</function>() function
+registers the specified Python <parameter>class</parameter> as a PyGTK type.
+class must be a descendant of <link
+linkend="class-gobject"><classname>gobject.GObject</classname></link>. The function generates a name for the new type.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--signal-new">
+      <title>gobject.signal_new</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.signal_new</methodname>
+         <methodparam><parameter>signal_name</parameter></methodparam>
+         <methodparam><parameter>type</parameter></methodparam>
+         <methodparam><parameter>flags</parameter></methodparam>
+         <methodparam><parameter>return_type</parameter></methodparam>
+         <methodparam><parameter>param_types</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>signal_name</parameter>&nbsp;:</term>
+         <listitem><simpara>a string containing the name of the
+signal</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>type</parameter>&nbsp;:</term>
+         <listitem><simpara>the object type that the signal is associated
+with</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>flags</parameter>&nbsp;:</term>
+         <listitem><simpara>the signal flags</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>return_type</parameter>&nbsp;:</term>
+         <listitem><simpara>the return type of the signal
+handler</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>param_types</parameter>&nbsp;:</term>
+         <listitem><simpara>the parameter types passed to the signal
+handler</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a unique integer signal ID</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>gobject.signal_new</function>() function registers
+a signal with the specified <parameter>signal_name</parameter> for the
+specified object <parameter>type</parameter>. The value of
+<parameter>flags</parameter> is a combination of:</para>
+
+      <variablelist>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_RUN_FIRST</literal></term>
+         <listitem>
+           <simpara>Invoke the object method handler in the first emission
+stage. </simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_RUN_LAST</literal></term>
+         <listitem>
+           <simpara>Invoke the object method handler in the third emission
+stage.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_RUN_CLEANUP</literal></term>
+         <listitem>
+           <simpara>Invoke the object method handler in the last emission
+stage.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_NO_RECURSE</literal></term>
+         <listitem>
+           <simpara>Signals being emitted for an object while currently
+being in emission for this very object will not be emitted recursively, but
+instead cause the first emission to be restarted.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_DETAILED</literal></term>
+         <listitem>
+           <simpara>This signal supports "::detail" appendixes to the
+signal name upon handler connections and emissions.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_ACTION</literal></term>
+         <listitem>
+           <simpara>Action signals are signals that may freely be emitted
+on alive objects from user code via <link
+linkend="method-gobject--emit"><methodname>gobject.emit()</methodname>()</link> 
+and friends, without the need of being embedded into extra code that
+performs pre or post emission adjustments on the object. They can also be
+thought of as generically callable object methods.</simpara>
+         </listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><literal>gobject.SIGNAL_NO_HOOKS</literal></term>
+         <listitem>
+           <simpara> No emissions hooks are supported for this
+signal.</simpara>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para><parameter>return_type</parameter> is the type of the return
+value from a signal handler and may be a gobject type, type ID or instance.
+The <parameter>param_types</parameter> parameter is a list of additional
+types that are passed to the signal handler. Each parameter type may be
+specified as a gobject type, type ID or instance. For example, to add a
+signal to the gtk.Window type called "my-signal" that calls a handler with a
+gtk.Button widget and an integer value and a return value  that is a
+boolean, use:</para>
+
+      <programlisting>
+  gobject.signal_new("my_signal", gtk.Window, gobject.SIGNAL_RUN_LAST, gobject.TYPE_BOOLEAN, (gtk.Button, gobject.TYPE_INT))
+</programlisting>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--signal-list-names">
+      <title>gobject.signal_list_names</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.signal_list_names</methodname>
+         <methodparam><parameter role="keyword">type</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter role="keyword">type</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a list of the signal names supported by
+<parameter>type</parameter></simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>gobject.signal_list_names</function>() function
+returns a list of the names of the signals that are supported by the
+specified GObject <parameter>type</parameter></para>
+
+      <note>
+        <para>The type keyword is available in PyGTK 2.6 and above.</para>
+      </note>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--signal-list-ids">
+      <title>gobject.signal_list_ids</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.signal_list_ids</methodname>
+         <methodparam><parameter role="keyword">type</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter role="keyword">type</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a list of the signal ids supported by
+<parameter>type</parameter></simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <note>
+        <para>This method is available in PyGTK 2.6 and above.</para>
+      </note>
+
+      <para>The <function>gobject.signal_list_ids</function>() function
+returns a list of the integer ids of the signals that are supported by the
+GObject specified by <parameter>type</parameter></para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--signal-lookup">
+      <title>gobject.signal_lookup</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.signal_lookup</methodname>
+         <methodparam><parameter role="keyword">name</parameter></methodparam>
+         <methodparam><parameter role="keyword">type</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter role="keyword">name</parameter>&nbsp;:</term>
+         <listitem><simpara>the name of a signal for
+<parameter>type</parameter></simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter role="keyword">type</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>the integer id of a signal supported by
+<parameter>type</parameter></simpara> or 0.</listitem>
+       </varlistentry>
+      </variablelist>
+
+      <note>
+        <para>This method is available in PyGTK 2.6 and above.</para>
+      </note>
+
+      <para>The <function>gobject.signal_lookup</function>() function
+returns the id of the signal with the name specified by
+<parameter>name</parameter> that is supported by the GObject specified
+specified by<parameter>type</parameter>. 0 is returned if the signal is not
+found.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--signal-name">
+      <title>gobject.signal_name</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.signal_name</methodname>
+         <methodparam><parameter role="keyword">signal_id</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter role="keyword">signal_id</parameter>&nbsp;:</term>
+         <listitem><simpara>an integer signal id</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>the name of the signal or
+<literal>None</literal>.</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <note>
+        <para>This method is available in PyGTK 2.6 and above.</para>
+      </note>
+
+      <para>The <function>gobject.signal_name</function>() function returns
+the name of the signal that has the signal id specified by
+<parameter>id</parameter>.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--signal-query1">
+      <title>gobject.signal_query</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.signal_query</methodname>
+          <methodparam><parameter role="keyword">name</parameter></methodparam>
+         <methodparam><parameter role="keyword">type</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter role="keyword">name</parameter>&nbsp;:</term>
+         <listitem><simpara>the name of a signal for
+<parameter>type</parameter></simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter role="keyword">type</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a 6-tuple containing signal information or
+<literal>None</literal></simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <note>
+        <para>This method is available in PyGTK 2.6 and above.</para>
+      </note>
+
+      <para>The <function>gobject.signal_query</function>() function returns
+a 6-tuple containing information about the signal with the name specified by
+<parameter>name</parameter> that is supported by the GObject specified by
+<parameter>type</parameter>. If the signal is not found
+<literal>None</literal> is returned.</para>
+
+      <para>The signal information 6-tuple contains:</para>
+
+      <itemizedlist>
+        <listitem>
+          <simpara>the integer signal id</simpara>
+        </listitem>
+        <listitem>
+          <simpara>the signal name</simpara>
+        </listitem>
+        <listitem>
+          <simpara>the GType that the signal is registered for</simpara>
+        </listitem>
+        <listitem>
+          <simpara>the signal flags (see the <xref
+linkend="gobject-signal-constants"
+endterm="gobject-signal-constants-title"></xref>)</simpara>
+        </listitem>
+        <listitem>
+          <simpara>the GType of the return from the signal callback
+function</simpara>
+        </listitem>
+        <listitem>
+          <simpara>a tuple containing the GTypes of the parameters that are
+passed to the signal callback function. Note that these may not correspond
+exactly to the <literal>PyGTK</literal> signal callback parameters.</simpara>
+        </listitem>
+      </itemizedlist>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--signal-query2">
+      <title>gobject.signal_query</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.signal_query</methodname>
+          <methodparam><parameter role="keyword">signal_id</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter role="keyword">signal_id</parameter>&nbsp;:</term>
+         <listitem><simpara>the integer id of a signal</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a 6-tuple containing signal information or
+<literal>None</literal></simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <note>
+        <para>This method is available in PyGTK 2.6 and above.</para>
+      </note>
+
+      <para>The <function>gobject.signal_query</function>() function returns
+a 6-tuple containing information about the signal with the id specified by
+<parameter>signal_id</parameter>. If the signal is not found
+<literal>None</literal> is returned.</para>
+
+      <para>The signal information 6-tuple contains:</para>
+
+      <itemizedlist>
+        <listitem>
+          <simpara>the integer signal id</simpara>
+        </listitem>
+        <listitem>
+          <simpara>the signal name</simpara>
+        </listitem>
+        <listitem>
+          <simpara>the GType that the signal is registered for</simpara>
+        </listitem>
+        <listitem>
+          <simpara>the signal flags (see the <xref
+linkend="gobject-signal-constants"
+endterm="gobject-signal-constants-title"></xref>)</simpara>
+        </listitem>
+        <listitem>
+          <simpara>the GType of the return from the signal callback
+function</simpara>
+        </listitem>
+        <listitem>
+          <simpara>a tuple containing the GTypes of the parameters that are
+passed to the signal callback function. Note that these may not correspond
+exactly to the <literal>PyGTK</literal> signal callback parameters.</simpara>
+        </listitem>
+      </itemizedlist>
+
+    </refsect2>
+
+   <refsect2 id="function-gobject--list-properties">
+      <title>gobject.list_properties</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.list_properties</methodname>
+         <methodparam><parameter>type</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>type</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a list of the properties (as GParam objects)
+supported by <parameter>type</parameter></simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>gobject.list_properties</function>() function
+returns a list of the properties (as GParam objects) supported by
+<parameter>type</parameter>.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--new">
+      <title>gobject.new</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>gobject.new</methodname>
+         <methodparam><parameter>type</parameter></methodparam>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>type</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject type, type ID or
+instance</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>...</parameter>&nbsp;:</term>
+         <listitem><simpara>zero or more property-value
+pairs</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a new object if the specified
+<parameter>type</parameter></simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <function>gobject.new</function>() function returns a new
+object of the specified <parameter>type</parameter>. type must specify a
+type that is a descendant of <link
+linkend="class-gobject"><classname>gobject.GObject</classname></link>. A
+TypeError exception is raised if <parameter>type</parameter> specifies an
+abstract class or a type that is not a descendant of <link
+linkend="class-gobject"><classname>gobject.GObject</classname></link>. A set
+of property-value pairs may be specified to set the value of the object's
+properties.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--signal-accumulator-true-handled">
+      <title>gobject.signal_accumulator_true_handled</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>gobject.signal_accumulator_true_handled</methodname>
+       </methodsynopsis></programlisting>
+
+      <note>
+        <para>This function is available in PyGTK 2.8 and above.</para>
+      </note>
+
+      <para>The <function>signal_accumulator_true_handled</function>()
+      function is only used as accumulator argument when registering
+      signals.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--add-emission-hook">
+      <title>gobject.add_emission_hook</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>gobject.add_emission_hook</methodname>
+       <methodparam><parameter>type</parameter></methodparam>
+       <methodparam><parameter>name</parameter></methodparam>
+       <methodparam><parameter>callback</parameter></methodparam>
+       <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><emphasis>type</emphasis>&nbsp;:</term>
+          <listitem><simpara>a Python GObject instance or
+          type</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><emphasis>name</emphasis>&nbsp;:</term>
+          <listitem><simpara>a signal name</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><emphasis>callback</emphasis>&nbsp;:</term>
+          <listitem><simpara>a function</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><emphasis>...</emphasis>&nbsp;:</term>
+          <listitem><simpara>zero or more extra arguments that will be
+          passed to callback.</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem><simpara>the hook id, for later use with <link
+          linkend="function-gobject--signal-remove-emission-hook"><function>gobject.signal_remove_emission_hook</function>()</link>.</simpara></listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGTK 2.8 and above.</para>
+      </note>
+
+      <para>The <function>add_emission_hook</function>() function adds an
+      emission hook for the signal specified by <parameter>name</parameter>,
+      which will get called for any emission of that signal, independent of
+      the instance. This is possible only for signals which don't have the
+      <literal>gobject.SIGNAL_NO_HOOKS</literal> flag set.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject--remove-emission-hook">
+      <title>gobject.remove_emission_hook</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>gobject.remove_emission_hook</methodname>
+       <methodparam><parameter>type</parameter></methodparam>
+       <methodparam><parameter>name</parameter></methodparam>
+       <methodparam><parameter>hook_id</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><emphasis>type</emphasis>&nbsp;:</term>
+          <listitem><simpara>a Python GObject instance or
+          type</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><emphasis>name</emphasis>&nbsp;:</term>
+          <listitem><simpara>a signal name</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><emphasis>hook_id</emphasis>&nbsp;:</term>
+          <listitem><simpara>the id of the emission hook as returned by the
+          <link
+          linkend="function-gobject--add-emission-hook"><function>gobject.add_emission_hook</function>()</link>)
+          function.</simpara></listitem>
+        </varlistentry>
+        <varlistentry>
+          <term><emphasis>Returns</emphasis>&nbsp;:</term>
+          <listitem><simpara></simpara></listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGTK 2.8 and above.</para>
+      </note>
+
+      <para>The <function>remove_emission_hook</function>() function deletes
+      an emission hook.</para>
+
+    </refsect2>
+
+    <refsect2 id="function-gobject---install-metaclass">
+      <title>gobject._install_metaclass</title>
+      
+      <programlisting><methodsynopsis language="python">
+        <methodname>gobject._install_metaclass</methodname>
+       <methodparam><parameter>metaclass</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist role="params">
+        <varlistentry>
+          <term><emphasis>metaclass</emphasis>&nbsp;:</term>
+          <listitem><simpara></simpara></listitem>
+        </varlistentry>
+      </variablelist>
+      <note>
+        <para>This function is available in PyGTK 2.10 and above.</para>
+      </note>
+
+      <para>The <function>_install_metaclass</function>() function installs
+      the metaclass specified by <parameter>metaclass</parameter>.</para>
+
+    </refsect2>
+
+  </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygobject-gboxed.xml b/docs/reference/pygobject-gboxed.xml
new file mode 100644 (file)
index 0000000..f7f2438
--- /dev/null
@@ -0,0 +1,68 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gobjectgboxed">
+  <refnamediv>
+    <refname>gobject.GBoxed</refname>
+    <refpurpose>an object containing an opaque chunk of data</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Synopsis</title>
+
+<classsynopsis language="python">
+  <ooclass><classname>gobject.GBoxed</classname></ooclass>
+<methodsynopsis language="python">
+    <methodname><link linkend="method-gobjectgboxed--copy">copy</link></methodname>
+  </methodsynopsis>
+</classsynopsis>
+
+</refsect1>
+
+  <refsect1>
+    <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectgboxed">gobject.GBoxed</link>
+</synopsis>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><link
+linkend="class-gobjectgboxed"><classname>gobject.GBoxed</classname></link>
+is an abstract base class that encapsulates an opaque chunk of data to
+provide an object-oriented interface and a type that is registered with the
+<literal>GLIB</literal> type system. A boxed type is registered with
+functions that provide for the copying and freeing of the underlying data
+structure - this allows PyGTK to encapsulate these as Python objects.</para>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Methods</title>
+
+    <refsect2 id="method-gobjectgboxed--copy">
+      <title>gobject.GBoxed.copy</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>copy</methodname>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+       <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a copy of the <link
+         linkend="class-gobjectgboxed"><classname>gobject.GBoxed</classname></link>
+         object</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>copy</methodname>() method makes and returns a copy of the boxed object.</para>
+
+    </refsect2>
+
+  </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygobject-ginterface.xml b/docs/reference/pygobject-ginterface.xml
new file mode 100644 (file)
index 0000000..1b29ddf
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gobjectginterface">
+  <refnamediv>
+    <refname>gobject.GInterface</refname>
+
+    <refpurpose>an object representing a GInterface</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Synopsis</title>
+
+<classsynopsis language="python">
+  <ooclass><classname>gobject.GInterface</classname></ooclass>
+</classsynopsis>
+
+</refsect1>
+
+  <refsect1>
+    <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+</synopsis>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><link
+linkend="class-gobjectginterface"><classname>gobject.GInterface</classname></link>
+is an abstract base class that encapsulates a GInterface.</para>
+
+  </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygobject-gpointer.xml b/docs/reference/pygobject-gpointer.xml
new file mode 100644 (file)
index 0000000..da16954
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+<refentry id="class-gobjectgpointer">
+  <refnamediv>
+    <refname>gobject.GPointer</refname>
+
+    <refpurpose>an object containing a completely opaque chunk of
+    data</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Synopsis</title>
+
+<classsynopsis language="python">
+  <ooclass><classname>gobject.GPointer</classname></ooclass>
+</classsynopsis>
+
+</refsect1>
+
+  <refsect1>
+    <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectgpointer">gobject.GPointer</link>
+</synopsis>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><link
+linkend="class-gobjectgpointer"><classname>gobject.GPointer</classname></link>
+is an abstract base class that encapsulates an opaque chunk of data and
+registers it with the <literal>GLIB</literal> type system. A pointer type
+has no methods and generic ways of copying and freeing the data. It
+shouldn't be used in PyGTK.</para>
+
+  </refsect1>
+
+</refentry>
diff --git a/docs/reference/pygobject-introduction.xml b/docs/reference/pygobject-introduction.xml
new file mode 100644 (file)
index 0000000..fb3e6f2
--- /dev/null
@@ -0,0 +1,222 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+
+  <chapter id="pygobject-introduction">
+  <title>Introduction</title>
+
+  <para>This document describes many of the <literal>PyGObject</literal>
+  version 2.12 classes and their methods and associated
+  functions. Deprecated classes, functions and methods have been
+  specifically left out of this reference though classes that have become
+  deprecated since PyGObject 2.0 have been left in but annotated with a
+  deprecation warning. This document attempts to document as much of the
+  <literal>PyGObject</literal> <literal>API</literal> as possible but there
+  are undoubtedly errors and omissions. If you discover any of these please
+  file a bug report at <ulink
+  url="http://bugzilla.gnome.org">bugzilla.gnome.org</ulink> for the
+  <literal>pygobject</literal> project. Specific areas that have not been
+  documented include:</para>
+
+  <itemizedlist>
+    <listitem>
+      <simpara>The GParamSpec class</simpara>
+    </listitem>
+  </itemizedlist>
+
+  <para>This reference describes the API for <literal>PyGObject</literal> as
+  of version 2.11.0+ and assumes that the additional API changes for version
+  2.12 will not be significant. There will undoubtedly be changes that are
+  not reflected in this reference. The differences in the API between
+  version 2.0 and previous versions are denoted in this reference with a
+  Note that describes the availability of the object, constructor, method or
+  function. Any of these that do not have a notation can be assumed to be
+  available in all versions of PyGObject from 2.0 and up. The source code
+  must be consulted if this reference and your version of
+  <literal>PyGObject</literal> seem to differ. You are encouraged to use the
+  latest version of <literal>PyGObject</literal> that is available. See the
+  <ulink url="http://www.pygtk.org"><literal>PyGTK</literal>
+  homepage</ulink> for more information and more resources on how to use
+  PyGObject as well as help in its development.</para>
+
+  <para> The Reference contains a chapter for each
+  <literal>PyGObject</literal> module containing the class descriptions. The
+  class descriptions are arranged alphabetically within the
+  chapters. Currently there is one module chapter:</para>
+
+  <variablelist>
+    <varlistentry>
+      <term>The&nbsp;<literal>gobject</literal>&nbsp;module</term>
+      <listitem><simpara>The classes that are included in the
+<literal>gobject</literal> module of <literal>PyGObject</literal> and are
+accessed similar to: gobject.GObject. These classes are the base object
+classes that the <literal>gtk</literal> and <literal>gtk.gdk</literal>
+module classes are built on.</simpara>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+
+<!--
+  <sect1>
+    <title>Major Changes since Version 2.11</title>
+
+    <para>The major changes in this document since version 2.11
+    include:</para>
+
+    <itemizedlist>
+      <listitem>
+       <para></para>
+      </listitem>
+    </itemizedlist>
+
+  </sect1>
+-->
+
+  <sect1 id="pygobject-reference-format">
+    <title>Reference Page Format</title>
+
+    <para>Each <literal>PyGObject</literal> class is described in a reference
+page that has a number of sections in a fixed format. Each reference page
+will have a subset of the following sections:</para>
+
+    <variablelist>
+      <varlistentry>
+       <term>Name</term>
+       <listitem>
+         <simpara>The name and a one-line description of the
+class.</simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term>Synopsis</term>
+       <listitem>
+         <simpara>A synopsis of the class and its methods and
+optionally a list of associated functions.</simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term>Ancestry</term>
+       <listitem>
+         <simpara>The list of the parent classes of the class. This
+section may not be present in all class descriptions.</simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term>Properties</term>
+       <listitem>
+         <simpara>A list of the properties (internal state)
+supported by the class. This section may not be present in all classes. The
+property descriptions include the name, the access operations (e.g. Read,
+Write), and a brief description. Properties are accessed using the <link
+linkend="method-gobject--set-property"><methodname>gobject.set_property</methodname>()</link> 
+and <link
+linkend="method-gobject--get-property"><methodname>gobject.get_property</methodname>()</link> 
+methods that are available to every <literal>PyGObject</literal> object. This
+section may not be present in all class descriptions.</simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term>Attributes</term>
+       <listitem>
+         <simpara>A set of internal object state data accessible as Python
+         attributes (e.g. object.attr). The attribute descriptions include
+         a name by which the attribute data is accessed, the access mode
+         (e.g. Read, Write), and a brief description of the attribute. Most
+         <literal>PyGObject</literal> classes do not support attributes so
+         this section is not present in most class descriptions.</simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term>Signal&nbsp;Prototypes</term>
+       <listitem>
+         <simpara>A list of the signals supported by the class including
+         the signal name and a synopsis of the signal handler function
+         prototype. This section may not be present in all class
+         descriptions.</simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term>Description</term>
+       <listitem><simpara>A description of the class and possibly some of
+       the methods supported by the class.</simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term>Constructor</term>
+       <listitem>
+         <simpara>The description of the class object constructor including
+         the synopsis with brief parameter descriptions and a description
+         of th use of the constructor. There may be more than one
+         constructor description if the constructor supports different
+         parameter lists. This section may not be present in all class
+         descriptions.</simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term>Methods</term>
+       <listitem>
+         <simpara>A list of methods supported by the class. Each method
+         description includes: a synopsis of the method and its parameters
+         as well as a brief description of each parameter and return value
+         (if any); and, a description of the use of the method.</simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term>Functions</term>
+       <listitem>
+         <simpara>A list of related functions. Each function description
+         includes a synopsis of the function and its parameters and return
+         value (if any), and a description of the use of the
+         function.</simpara>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term>Signals</term>
+       <listitem>
+         <simpara>A list of signals including a synopsis of the signal
+         handler prototype function with its parameters and return value
+         (if any). The signal emission conditions are briefly
+         described. This section is not present in all class descriptions;
+         specifically, the <literal>gtk.gdk</literal> classes do not
+         usually support signals.</simpara>
+       </listitem>
+      </varlistentry>
+    </variablelist>
+
+    <para>The function and method synopsis parameters are displayed in
+    <emphasis role="bold">bold</emphasis> to denote Python keyword
+    parameters.  Also if the parameter is optional its default value will be
+    displayed. For example the <link
+    linkend="function-gobject--signal-lookup"><function>gobject.signal_lookup</function>()</link>
+    function synopsis is:</para>
+
+    <programlisting>
+<methodsynopsis language="python">
+       <methodname><link
+linkend="function-gobject--signal-lookup">gobject.signal_lookup</link></methodname>
+       <methodparam><parameter
+                      role="keyword">name</parameter></methodparam>
+       <methodparam><parameter
+                      role="keyword">type</parameter></methodparam>
+      </methodsynopsis>
+</programlisting>
+
+    <para>The parameters <parameter>name</parameter> and
+    <parameter>type</parameter> are keyword parameters that can be specified
+    in a call either by position or keyword (in which case position is not
+    important). The following calls have the same result:</para>
+
+    <programlisting>
+  id = gobject.signal_lookup("clicked", gtk.Button)
+  id = gobject.signal_lookup("clicked", type=gtk.Button)
+  id = gobject.signal_lookup(name="clicked", type=gtk.Button)
+  id = gobject.signal_lookup(type=gtk.Button, name="clicked")
+</programlisting>
+
+    <para>Parameters that are not keyword parameters are displayed in
+<emphasis>italic</emphasis> and must be specified positionally but may also
+be optional.</para>
+
+  </sect1>
+
+  </chapter>
diff --git a/docs/reference/pygobject-ref.xml b/docs/reference/pygobject-ref.xml
new file mode 100644 (file)
index 0000000..5fdd80b
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version='1.0'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "entities.docbook">
+%entities;
+<!ENTITY builddate SYSTEM "builddate.xml">
+]>
+
+<book id="pygobject-reference" xmlns:xi="http://www.w3.org/2001/XInclude">
+  <bookinfo>
+    <pubdate>&builddate;</pubdate>
+    <title>PyGObject Reference Manual</title>
+    <edition>for version &version;</edition>
+    <releaseinfo>for PyGObject version &version;</releaseinfo>
+    <abstract>
+      <para>This reference describes the classes of the python gobject
+module.</para>
+    </abstract>
+  </bookinfo>
+  <toc>
+  </toc>
+
+  <xi:include href="pygobject-introduction.xml"/>
+
+  <xi:include href="pyglib-classes.xml"/>
+  <xi:include href="pygobject-classes.xml"/>
+  <xi:include href="pygio-classes.xml"/>
+  <xi:include href="pygiounix-classes.xml"/>
+
+<!--
+  <index>
+    <title>Index</title>
+  </index>
+-->
+
+</book>
diff --git a/docs/reference/pygobject.xml b/docs/reference/pygobject.xml
new file mode 100644 (file)
index 0000000..42cd37b
--- /dev/null
@@ -0,0 +1,1016 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="class-gobject">
+  <refmeta>
+    <refentrytitle>gobject.GObject</refentrytitle>
+    <manvolnum>3</manvolnum>
+    <refmiscinfo>PyGTK Docs</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname>gobject.GObject</refname>
+      <refpurpose>the base class</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Synopsis</title>
+
+<classsynopsis language="python">
+       <ooclass><classname>gobject.GObject</classname></ooclass>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--get-property">get_property</link></methodname>
+         <methodparam><parameter>property_name</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--get-properties">get_properties</link></methodname>
+         <methodparam><parameter>first_property_name</parameter></methodparam>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--set-property">set_property</link></methodname>
+         <methodparam><parameter>property_name</parameter></methodparam>
+         <methodparam><parameter>value</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--set-properties">set_properties</link></methodname>
+         <methodparam><parameter>property_name</parameter>
+         <initializer>value</initializer></methodparam>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--freeze-notify">freeze_notify</link></methodname>
+         <methodparam></methodparam>  </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--notify">notify</link></methodname>
+         <methodparam><parameter>property_name</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--thaw-notify">thaw_notify</link></methodname>
+         <methodparam></methodparam>  </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--get-data">get_data</link></methodname>
+         <methodparam><parameter>key</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--set-data">set_data</link></methodname>
+         <methodparam><parameter>key</parameter></methodparam>
+         <methodparam><parameter>data</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--connect">connect</link></methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+         <methodparam><parameter>handler</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--connect-after">connect_after</link></methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+         <methodparam><parameter>handler</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--connect-object">connect_object</link></methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+         <methodparam><parameter>handler</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--connect-object-after">connect_object_after</link></methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+         <methodparam><parameter>handler</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--disconnect">disconnect</link></methodname>
+         <methodparam><parameter>handler_id</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--handler-disconnect">handler_disconnect</link></methodname>
+         <methodparam><parameter>handler_id</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--handler-is-connected">handler_is_connected</link></methodname>
+         <methodparam><parameter>handler_id</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--handler-block">handler_block</link></methodname>
+         <methodparam><parameter>handler_id</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--handler-unblock">handler_unblock</link></methodname>
+         <methodparam><parameter>handler_id</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--handler-block-by-func">handler_block_by_func</link></methodname>
+         <methodparam><parameter>callable</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--handler-unblock-by-func">handler_unblock_by_func</link></methodname>
+         <methodparam><parameter>callable</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--emit">emit</link></methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--stop-emission">stop_emission</link></methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--emit-stop-by-name">emit_stop_by_name</link></methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+       </methodsynopsis>
+       <methodsynopsis language="python">
+         <methodname><link
+linkend="method-gobject--chain">chain</link></methodname>
+         <methodparam></methodparam>  </methodsynopsis>
+</classsynopsis>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+</synopsis>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Attributes</title>
+
+    <blockquote role="properties">
+      <informaltable pgwide="1" frame="none">
+       <tgroup cols="3">
+       <?dbhtml cellpadding="5"?>
+         <colspec column="1" colwidth="1in"/>
+         <colspec column="2" colwidth="1in"/>
+         <colspec column="3" colwidth="4in"/>
+         <tbody>
+
+           <row valign="top">
+             <entry>"props"</entry>
+          <entry>Read/Write</entry>
+          <entry>
+              <para>This attribute gives full access to GObject properties as
+                  simple attributes. It can be used to iterate over all the object
+                  properties, and can be used both on class or instance objects.</para>
+              <para>Examples:</para>
+              <programlisting>
+button = Button()
+button_label = button.props.label
+button.props.label = 'Click on this fancy button'
+for pspec in button.props:
+    print pspec
+    print button.get_property(pspec.name)
+label_pspec = Button.props.label
+button_label = button.get_property(label_pspec.name)
+              </programlisting>
+            </entry>
+           </row>
+           <row valign="top">
+             <entry>"__doc__"</entry>
+             <entry>Read</entry>
+             <entry>The documentation for the object type. Uses
+             "__gdoc__" if no specific documentation set.</entry>
+           </row>
+           <row valign="top">
+             <entry>"__gdoc__"</entry>
+             <entry>Read</entry>
+             <entry>The generated documentation for the underlying GObject
+             type.</entry>
+           </row>
+           <row valign="top">
+             <entry>"__gtype__"</entry>
+             <entry>Read</entry>
+             <entry>The underlying GObject type.</entry>
+           </row>
+           <row valign="top">
+             <entry>"__grefcount__"</entry>
+             <entry>Read</entry>
+             <entry>The reference count for the underlying GObject.</entry>
+           </row>
+
+       </tbody>
+      </tgroup>
+      </informaltable>
+    </blockquote>
+
+  </refsect1>
+
+  <refsect1 id="signal-prototypes-gobject">
+    <title>gobject.GObject Signal Prototypes</title>
+
+
+    <variablelist>
+      <varlistentry>
+        <term>"<link linkend="signal-gobject--notify">notify</link>"</term>
+        <listitem>
+          <methodsynopsis language="python"><methodname>callback</methodname>
+            <methodparam><parameter>gobject</parameter></methodparam>
+            <methodparam><parameter>property_spec</parameter></methodparam>
+            <methodparam><parameter>user_param1</parameter></methodparam>
+            <methodparam><parameter>...</parameter></methodparam>
+          </methodsynopsis>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Description</title>
+    <para>The <link
+    linkend="class-gobject"><classname>gobject.GObject</classname></link>
+    class is the base class providing the common attributes and methods for
+    the PyGTK classes. The <link
+    linkend="class-gobject"><classname>gobject.GObject</classname></link>
+    class is not a user interface widget class.</para>
+
+    <para>The <link
+    linkend="class-gobject"><classname>gobject.GObject</classname></link>
+    class provides the signal management methods, the object property access
+    methods and the object data management methods.</para>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Methods</title>
+
+    <refsect2 id="method-gobject--get-property">
+      <title>gobject.GObject.get_property</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>get_property</methodname>
+         <methodparam><parameter>property_name</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>property_name</parameter>&nbsp;:</term>
+         <listitem><simpara>a string containing the property name for the
+GObject</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a Python object containing the value of the
+property</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>get_property</methodname>() method returns the
+value of the property specified by <parameter>property_name</parameter> or
+None if there is no value associated with the property.</para>
+      <para>The <exceptionname>TypeError</exceptionname> exception is raised
+if the property name is not registered with the object class.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--get-properties">
+      <title>gobject.GObject.get_properties</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>get_properties</methodname>
+         <methodparam><parameter>first_property_name</parameter></methodparam>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>first_property_name</parameter>&nbsp;:</term>
+         <listitem><simpara>a string containing the first property name for the
+GObject</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>...</parameter>&nbsp;:</term>
+         <listitem><simpara>additional property names 
+</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a tuple containing the property values 
+requested</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>get_properties</methodname>() method returns a tuple containing
+the values of the properties requested, or
+None if there is no value associated with the property.</para>
+      <para>The <exceptionname>TypeError</exceptionname> exception is raised
+if the property name is not registered with the object class.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--set-property">
+      <title>gobject.GObject.set_property</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>set_property</methodname>
+         <methodparam><parameter>property_name</parameter></methodparam>
+         <methodparam><parameter>value</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>property_name</parameter>&nbsp;:</term>
+         <listitem><simpara>a string containing the property
+name</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>value</parameter>&nbsp;:</term>
+         <listitem><simpara>a Python object containing the property value
+to be set</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>set_property</methodname>() method sets the
+property specified by <parameter>property_name</parameter> to the specified
+<parameter>value</parameter>.</para>
+      <para>The <exceptionname>TypeError</exceptionname> exception is raised
+if the property name is not registered with the object class or if the value
+specified could not be converted to the property type.</para>
+
+    </refsect2>
+    
+    <refsect2 id="method-gobject--set-properties">
+      <title>gobject.GObject.set_properties</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>set_properties</methodname>
+         <methodparam><parameter>property_name</parameter>
+         <initializer>value</initializer></methodparam>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>property_name</parameter>&nbsp;:</term>
+         <listitem><simpara>the property name</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>value</parameter>&nbsp;:</term>
+         <listitem><simpara>a Python object containing the property value
+to be set</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>...</parameter>&nbsp;:</term>
+         <listitem><simpara>additional property name and value 
+kwargs</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>set_properties</methodname>() method sets the
+property specified by <parameter>property_name</parameter> to the specified
+<parameter>value</parameter>, followed by pairs of property name 
+and value as keyword arguments.</para>
+      <para>The <exceptionname>TypeError</exceptionname> exception is raised
+if the property name is not registered with the object class or if the value
+specified could not be converted to the property type.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--freeze-notify">
+      <title>gobject.GObject.freeze_notify</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>freeze_notify</methodname>
+         <methodparam></methodparam>
+       </methodsynopsis></programlisting>
+
+      <para>The <methodname>freeze_notify</methodname>() method freezes the
+object's property-changed notification queue so that "notify" signals are
+blocked until the <methodname>thaw_notify</methodname>() method is
+called.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--notify">
+      <title>gobject.GObject.notify</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>notify</methodname>
+         <methodparam><parameter>property_name</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>property_name</parameter>&nbsp;:</term>
+         <listitem><simpara>a string containing a property
+name</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>notify</methodname>() method causes the "notify"
+signal for the property specified by <parameter>property_name</parameter> to
+be emitted.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--thaw-notify">
+      <title>gobject.GObject.thaw_notify</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>thaw_notify</methodname>
+         <methodparam></methodparam>
+       </methodsynopsis></programlisting>
+
+      <para>The <methodname>thaw_notify</methodname>() method thaws the
+object's property-changed notification queue so that "notify" signals are
+emitted.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--get-data">
+      <title>gobject.GObject.get_data</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>get_data</methodname>
+         <methodparam><parameter>key</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>key</parameter>&nbsp;:</term>
+         <listitem><simpara>a string used as the key</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a Python object containing the associated
+data</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>get_data</methodname>() method returns the
+Python object associated with the specified <parameter>key</parameter> or
+None if there is no data associated with the <parameter>key</parameter> or
+if there is no key associated with the object.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--set-data">
+      <title>gobject.GObject.set_data</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>set_data</methodname>
+         <methodparam><parameter>key</parameter></methodparam>
+         <methodparam><parameter>data</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>key</parameter>&nbsp;:</term>
+         <listitem><simpara>a string used as a key</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>data</parameter>&nbsp;:</term>
+         <listitem><simpara>a Python object that is the value to be
+associated with the key</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>set_data</methodname>() method associates the
+specified Python object (<parameter>data</parameter>) with
+<parameter>key</parameter>.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--connect">
+      <title>gobject.GObject.connect</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>connect</methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+         <methodparam><parameter>handler</parameter></methodparam>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+         <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>handler</parameter>&nbsp;:</term>
+         <listitem><simpara>a Python function or method
+object.</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>...</parameter>&nbsp;:</term>
+         <listitem><simpara>additional optional
+parameters</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>an integer identifier</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>connect</methodname>() method adds a function or
+method (<parameter>handler</parameter>)to the end of the list of signal
+handlers for the named <parameter>detailed_signal</parameter> but before the
+default class signal handler. An optional set of parameters may be specified
+after the <parameter>handler</parameter> parameter. These will all be passed
+to the signal handler when invoked.</para>
+      <para>For example if a function handler was connected to a signal
+using:</para>
+      <programlisting>
+  handler_id = object.connect("signal_name", handler, arg1, arg2, arg3)
+</programlisting>
+      <para>The handler should be defined as:</para>
+      <programlisting>
+  def handler(object, arg1, arg2, arg3):
+</programlisting>
+      <para>A method handler connected to a signal using:</para>
+      <programlisting>
+  handler_id = object.connect("signal_name", self.handler, arg1, arg2)
+</programlisting>
+      <para>requires an additional argument when defined:</para>
+      <programlisting>
+  def handler(self, object, arg1, arg2)
+</programlisting>
+      <para>A <exceptionname>TypeError</exceptionname> exception is raised
+if <parameter>detailed_signal</parameter> identifies a signal name that is
+not associated with the object.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--connect-after">
+      <title>gobject.GObject.connect_after</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>connect_after</methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+         <methodparam><parameter>handler</parameter></methodparam>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+         <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>handler</parameter>&nbsp;:</term>
+         <listitem><simpara>a Python function or method
+object</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>...</parameter>&nbsp;:</term>
+         <listitem><simpara>additional optional
+parameters</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>connect_after</methodname>() method is similar
+to the <methodname>connect</methodname>() method except that the
+<parameter>handler</parameter> is added to the signal handler list after the
+default class signal handler. Otherwise the details of
+<parameter>handler</parameter> definition and invocation are the
+same.</para>
+    
+    </refsect2>
+
+    <refsect2 id="method-gobject--connect-object">
+      <title>gobject.GObject.connect_object</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>connect_object</methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+         <methodparam><parameter>handler</parameter></methodparam>
+         <methodparam><parameter>gobject</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+         <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>handler</parameter>&nbsp;:</term>
+         <listitem><simpara>a Python function or method
+object</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>gobject</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>connect_object</methodname>() method is the same
+as the <methodname>connect</methodname>() method except that the
+<parameter>handler</parameter> is invoked with the specified
+<parameter>gobject</parameter> in place of the object invoking the
+<methodname>connect_object</methodname>() method. For example, a call with a
+function handler:</para>
+      <programlisting>
+  handler_id = object("signal_name", handler, gobject)
+</programlisting>
+      <para>will cause the <parameter>handler</parameter> to be invoked
+as:</para>
+      <programlisting>
+  handler(gobject)
+</programlisting>
+      <para>Likewise a method handler will be invoked as:</para>
+      <programlisting>
+  self.handler(gobject)
+</programlisting>
+      <para>This can be helpful in invoking PyGTK widget methods that
+require no arguments except the widget itself (e.g.
+<methodname>widget.destroy</methodname>()) by using the class method as the
+handler. For example, a Button "clicked" signal can be set up to invoke the
+Window <methodname>destroy</methodname>() method as:</para>
+
+      <programlisting>
+  handler_id = button.connect_object("clicked", Window.destroy, window)
+</programlisting>
+
+      <para>When the button is clicked the handler is invoked as:</para>
+
+      <programlisting>
+  Window.destroy(window)
+</programlisting>
+
+      <para>which is the same as:</para>
+
+      <programlisting>
+  window.destroy()
+</programlisting>
+
+      <para>Additional arguments may be passed to the handler as with the
+<methodname>connect</methodname>() method handler invocations.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--connect-object-after">
+      <title>gobject.GObject.connect_object_after</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>connect_object_after</methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+         <methodparam><parameter>handler</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+         <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>handler</parameter>&nbsp;:</term>
+         <listitem><simpara>a Python function or method
+object</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>gobject</parameter>&nbsp;:</term>
+         <listitem><simpara>a GObject</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>connect_object_after</methodname>() method is
+similar to the <methodname>connect_object</methodname>() method except that
+the <parameter>handler</parameter> is added to the signal handler list after
+the default class signal handler. Otherwise the details of
+<parameter>handler</parameter> definition and invocation are the
+same.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--disconnect">
+      <title>gobject.GObject.disconnect</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>disconnect</methodname>
+         <methodparam><parameter>handler_id</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>handler_id</parameter>&nbsp;:</term>
+         <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>disconnect</methodname>() method removes the
+signal handler with the specified <parameter>handler_id</parameter> from the
+list of signal handlers for the object.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--handler-disconnect">
+      <title>gobject.GObject.handler_disconnect</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>handler_disconnect</methodname>
+         <methodparam><parameter>handler_id</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>handler_id</parameter>&nbsp;:</term>
+         <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>handler_disconnect</methodname>() method removes
+the signal handler with the specified <parameter>handler_id</parameter> from
+the list of signal handlers for the object.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--handler-is-connected">
+      <title>gobject.GObject.handler_is_connected</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>handler_is_connected</methodname>
+         <methodparam><parameter>handler_id</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>handler_id</parameter>&nbsp;:</term>
+         <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara><literal>True</literal> if the signal handler
+is connected to the object.</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>handler_is_connected</methodname>() method
+returns <literal>True</literal> if the signal handler with the specified
+<parameter>handler_id</parameter> is connected to the object.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--handler-block">
+      <title>gobject.GObject.handler_block</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>handler_block</methodname>
+         <methodparam><parameter>handler_id</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>handler_id</parameter>&nbsp;:</term>
+         <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>handler_block</methodname>() method blocks the
+signal handler with the specified <parameter>handler_id</parameter> from
+being invoked until it is unblocked.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--handler-unblock">
+      <title>gobject.GObject.handler_unblock</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>handler_unblock</methodname>
+         <methodparam><parameter>handler_id</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>handler_id</parameter>&nbsp;:</term>
+         <listitem><simpara>an integer handler
+identifier</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--handler-block-by-func">
+      <title>gobject.GObject.handler_block_by_func</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>handler_block_by_func</methodname>
+         <methodparam><parameter>callable</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>callable</parameter>&nbsp;:</term>
+         <listitem><simpara>a callable python object</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>handler_block_by_func</methodname>() method blocks the
+all signal handler connected to a specific <parameter>callable</parameter> from
+being invoked until the callable is unblocked.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--handler-unblock-by-func">
+      <title>gobject.GObject.handler_unblock_by_func</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>handler_unblock_by_func</methodname>
+         <methodparam><parameter>callback</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>callable</parameter>&nbsp;:</term>
+         <listitem><simpara>a callable python object</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>handler_unblock_by_func</methodname>() method unblocks
+all signal handler connected to a specified <parameter>callable</parameter>
+thereby allowing it to be invoked when the associated signals are
+emitted.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--emit">
+      <title>gobject.GObject.emit</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>emit</methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+         <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>...</parameter>&nbsp;:</term>
+         <listitem><simpara>additional parameters</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a PyObject*</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+      <para>The <methodname>emit</methodname>() method causes the object to
+emit the signal specified by <parameter>detailed_signal</parameter>. The
+additional parameters must match the number and type of the required signal
+handler parameters. In most cases no additional parameters are needed. for
+example:</para>
+      <programlisting>
+  button.emit("clicked")
+</programlisting>
+      <para>is all that is required to emit the "clicked" signal for a
+button. The most common case requiring additional parameters occurs when
+emitting an event signal; for example:</para>
+      <programlisting>
+  button.emit("button_press_event", event)
+</programlisting>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--stop-emission">
+      <title>gobject.GObject.stop_emission</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>stop_emission</methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+         <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>stop_emission</methodname>() method stops the
+current emission of the signal specified by
+<parameter>detailed_signal</parameter>. Any signal handlers in the list
+still to be run will not be invoked.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--emit-stop-by-name">
+      <title>gobject.GObject.emit_stop_by_name</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>emit_stop_by_name</methodname>
+         <methodparam><parameter>detailed_signal</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>detailed_signal</parameter>&nbsp;:</term>
+         <listitem><simpara>a string containing the signal
+name</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The <methodname>emit_stop_by_name</methodname>() method stops
+the current emission of the signal specified by
+<parameter>detailed_signal</parameter>. Any signal handlers in the list
+still to be run will not be invoked.</para>
+
+    </refsect2>
+
+    <refsect2 id="method-gobject--chain">
+      <title>gobject.GObject.chain</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>chain</methodname>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis></programlisting>
+      <variablelist>
+       <varlistentry>
+         <term><parameter>...</parameter>&nbsp;:</term>
+         <listitem><simpara>additional parameters</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><emphasis>Returns</emphasis>&nbsp;:</term>
+         <listitem><simpara>a Python object</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The chain() method does something.</para>
+
+    </refsect2>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Signals</title>
+
+    <refsect2 id="signal-gobject--notify">
+      <title>The GObject "notify" Signal</title>
+
+      <programlisting><methodsynopsis language="python">
+         <methodname>callback</methodname>
+         <methodparam><parameter>gobject</parameter></methodparam>
+         <methodparam><parameter>property_spec</parameter></methodparam>
+         <methodparam><parameter>user_param1</parameter></methodparam>
+         <methodparam><parameter>...</parameter></methodparam>
+       </methodsynopsis></programlisting>
+
+      <variablelist>
+       <varlistentry>
+         <term><parameter>gobject</parameter>&nbsp;:</term>
+         <listitem><simpara>the gobject that received the
+signal</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>property_spec</parameter>&nbsp;:</term>
+          <listitem><simpara>the <link linkend="class-gobjectgparamspec"><classname>gobject.GParamSpec</classname></link> of the property that was
+changed</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>user_param1</parameter>&nbsp;:</term>
+          <listitem><simpara>the first user parameter (if any) specified
+with the <link
+linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
+method</simpara></listitem>
+       </varlistentry>
+       <varlistentry>
+         <term><parameter>...</parameter>&nbsp;:</term>
+         <listitem><simpara>additional user parameters (if
+any)</simpara></listitem>
+       </varlistentry>
+      </variablelist>
+
+      <para>The "notify" signal is emitted on a gobject when one of its
+properties has been changed. Note that getting this signal doesn't guarantee
+that the value of the property has actually changed, it may also be emitted
+when the setter for the property is called to reinstate the previous
+value. For example to be notified of the change of the title of a <link
+linkend="class-gtkwindow"><classname>gtk.Window</classname></link> you could
+connect to the "notify" signal similar to:</para>
+
+      <programlisting>
+  window.connect("notify::title", callback)
+</programlisting>
+
+    </refsect2>
+
+  </refsect1>
+
+</refentry>
diff --git a/docs/style.css b/docs/style.css
new file mode 100644 (file)
index 0000000..59abc74
--- /dev/null
@@ -0,0 +1,10 @@
+.programlisting {
+font: monospace;
+background-color: #E0E0E0;
+padding: 5;
+}
+
+pre.synopsis {
+background-color: #E0E0E0;
+padding: 5;
+}
diff --git a/docs/xsl/common.xsl b/docs/xsl/common.xsl
new file mode 100644 (file)
index 0000000..606313f
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<xsl:template match="parameter">
+       <xsl:choose>
+               <xsl:when test="@role = 'keyword'">
+                       <xsl:call-template name="inline.boldmonoseq"/>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:call-template name="inline.italicmonoseq"/>
+               </xsl:otherwise>
+       </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/docs/xsl/devhelp.xsl b/docs/xsl/devhelp.xsl
new file mode 100644 (file)
index 0000000..ce27739
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'
+                xmlns="http://www.devhelp.net/book"
+                exclude-result-prefixes="#default">
+
+  <xsl:template name="generate.devhelp">
+    <xsl:call-template name="write.chunk">
+      <xsl:with-param name="filename">
+        <xsl:choose>
+          <xsl:when test="$gtkdoc.bookname">
+            <xsl:value-of select="$gtkdoc.bookname"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:text>book</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+        <xsl:text>.devhelp</xsl:text>
+      </xsl:with-param>
+      <xsl:with-param name="method" select="'xml'"/>
+      <xsl:with-param name="indent" select="'yes'"/>
+      <xsl:with-param name="encoding" select="'utf-8'"/>
+      <xsl:with-param name="content">
+        <xsl:call-template name="devhelp"/>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template name="devhelp">
+    <xsl:variable name="title">
+      <xsl:apply-templates select="." mode="generate.devhelp.toc.title.mode"/>
+    </xsl:variable>
+    <xsl:variable name="link">
+      <xsl:call-template name="href.target"/>
+    </xsl:variable>
+    <xsl:variable name="author">
+      <xsl:if test="articleinfo|bookinfo">
+        <xsl:apply-templates mode="generate.devhelp.authors"
+                             select="articleinfo|bookinfo"/>
+      </xsl:if>
+    </xsl:variable>
+    <xsl:variable name="toc.nodes" select="part|reference|preface|chapter|
+                                           appendix|article|bibliography|
+                                           glossary|index|refentry|
+                                           bridgehead|sect1"/>
+
+    <book title="{$title}" link="{$link}" author="{$author}" name="{$gtkdoc.bookname}" language="python">
+      <xsl:if test="$toc.nodes">
+        <chapters>
+          <xsl:apply-templates select="$toc.nodes"
+                               mode="generate.devhelp.toc.mode"/>
+        </chapters>
+      </xsl:if>
+      <functions>
+        <xsl:apply-templates select="//refsect1"
+                             mode="generate.devhelp.constructor.index.mode"/>
+        <xsl:apply-templates select="//refsect2"
+                             mode="generate.devhelp.index.mode"/>
+      </functions>
+    </book>
+  </xsl:template>
+
+  <xsl:template match="*" mode="generate.devhelp.toc.mode">
+    <xsl:variable name="title">
+      <xsl:apply-templates select="." mode="generate.devhelp.toc.title.mode"/>
+    </xsl:variable>
+    <xsl:variable name="target">
+      <xsl:variable name="anchor" select="title/anchor"/>
+      <xsl:choose>
+        <xsl:when test="$anchor">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$anchor"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="href.target"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+
+    <sub name="{$title}" link="{$target}">
+      <xsl:apply-templates select="section|sect1|
+                                   refentry|refsect|
+                                   bridgehead|part|chapter"
+                           mode="generate.devhelp.toc.mode"/>
+    </sub>
+  </xsl:template>
+
+  <xsl:template match="*" mode="generate.devhelp.index.mode">
+    <xsl:variable name="title" select="title"/>
+    <xsl:variable name="anchor" select="title/anchor"/>
+    <xsl:variable name="target">
+      <xsl:choose>
+        <xsl:when test="$anchor">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$anchor"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="href.target"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <function name="{$title}" link="{$target}"/>
+  </xsl:template>
+
+  <xsl:template match="*" mode="generate.devhelp.constructor.index.mode">
+    <xsl:variable name="title" select="title"/>
+    <xsl:variable name="anchor" select="title/anchor"/>
+    <xsl:variable name="target">
+      <xsl:choose>
+        <xsl:when test="$anchor">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$anchor"/>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="href.target"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:if test="$title='Constructor'">
+      <xsl:variable name ="constructor" select="programlisting//methodname"/>
+      <function name="{$constructor}" link="{$target}"/>
+    </xsl:if>
+  </xsl:template>
+
+  <!-- get title -->
+  <xsl:template match="article" mode="generate.devhelp.toc.title.mode">
+    <xsl:value-of select="articleinfo/title"/>
+  </xsl:template>
+  <xsl:template match="book" mode="generate.devhelp.toc.title.mode">
+    <xsl:value-of select="bookinfo/title"/>
+  </xsl:template>
+  <xsl:template match="refentry" mode="generate.devhelp.toc.title.mode">
+    <xsl:value-of select="refnamediv/refname"/>
+  </xsl:template>
+  <xsl:template match="*" mode="generate.devhelp.toc.title.mode">
+    <xsl:value-of select="title"/>
+  </xsl:template>
+
+  <!-- generate list of authors ... -->
+  <xsl:template match="articleinfo|bookinfo" mode="generate.devhelp.authors">
+    <xsl:for-each select="authorgroup/author">
+      <xsl:value-of select="firstname"/>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="surname"/>
+      <xsl:if test="not(last())">
+        <xsl:text>, </xsl:text>
+      </xsl:if>
+    </xsl:for-each>
+  </xsl:template>
+
+</xsl:stylesheet>
diff --git a/docs/xsl/fixxref.py b/docs/xsl/fixxref.py
new file mode 100644 (file)
index 0000000..f3287b3
--- /dev/null
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+import getopt
+import os
+import re
+import sys
+
+anchors = {}
+anchor_pat = re.compile(r'''^\s*<ANCHOR\s+id\s*=\s*"([^"]*)"\s+
+                            href\s*=\s*"([^"]*)"\s*>''',
+                        re.MULTILINE | re.VERBOSE)
+link_pat = re.compile(r'''<PYGTKDOCLINK\s+HREF="([^"]*)"\s*>(.*?)
+                          </PYGTKDOCLINK\s*>''', re.DOTALL | re.VERBOSE)
+def scan_index_dir(idir):
+    for root, dirs, files in os.walk(idir):
+        if 'index.sgml' in files:
+            scan_index_file(os.path.join(root, 'index.sgml'))
+    return
+
+def scan_index_file(ifile):
+    buf = open(ifile).read()
+    for id, href in anchor_pat.findall(buf):
+        anchors[id] = href
+
+def fix_xrefs(hdir):
+    for f in os.listdir(hdir):
+        if os.path.splitext(f)[1] == '.html':
+            fix_html_file(os.path.join(hdir, f))
+
+def link_subst(m):
+    id, text = m.groups()
+    if anchors.has_key(id):
+        return '<a\nhref="../' + anchors[id] + '"\n>' + text + '</a>'
+    return text
+
+def fix_html_file(hfile):
+    buf = open(hfile).read()
+    buf = link_pat.sub(link_subst, buf)
+    open(hfile, 'w').write(buf)
+
+def usage(e=None):
+    if e:
+        sys.stderr.write('fixxref.py: %s\n' % e)
+    sys.stderr.write('usage: fixxref.py [-i index-dir] html-dir\n')
+    sys.exit(1)
+
+if __name__ == '__main__':
+    try:
+        opts, args = getopt.getopt(sys.argv[1:], "i:h:",
+                                   ["index-dir=", "html-dir="])
+    except getopt.error, e:
+        usage(e)
+
+    index_dirs = []
+    for opt, arg in opts:
+        if opt in ('-i', '--index-dir'):
+            index_dirs.append(arg)
+
+    if len(args) != 1:
+        usage()
+
+    for idir in index_dirs:
+        scan_index_dir(idir)
+
+    html_dir = args[0]
+    fix_xrefs(html_dir)
diff --git a/docs/xsl/fixxref.py.in b/docs/xsl/fixxref.py.in
new file mode 100644 (file)
index 0000000..f3287b3
--- /dev/null
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+# -*- Mode: Python; py-indent-offset: 4 -*-
+
+import getopt
+import os
+import re
+import sys
+
+anchors = {}
+anchor_pat = re.compile(r'''^\s*<ANCHOR\s+id\s*=\s*"([^"]*)"\s+
+                            href\s*=\s*"([^"]*)"\s*>''',
+                        re.MULTILINE | re.VERBOSE)
+link_pat = re.compile(r'''<PYGTKDOCLINK\s+HREF="([^"]*)"\s*>(.*?)
+                          </PYGTKDOCLINK\s*>''', re.DOTALL | re.VERBOSE)
+def scan_index_dir(idir):
+    for root, dirs, files in os.walk(idir):
+        if 'index.sgml' in files:
+            scan_index_file(os.path.join(root, 'index.sgml'))
+    return
+
+def scan_index_file(ifile):
+    buf = open(ifile).read()
+    for id, href in anchor_pat.findall(buf):
+        anchors[id] = href
+
+def fix_xrefs(hdir):
+    for f in os.listdir(hdir):
+        if os.path.splitext(f)[1] == '.html':
+            fix_html_file(os.path.join(hdir, f))
+
+def link_subst(m):
+    id, text = m.groups()
+    if anchors.has_key(id):
+        return '<a\nhref="../' + anchors[id] + '"\n>' + text + '</a>'
+    return text
+
+def fix_html_file(hfile):
+    buf = open(hfile).read()
+    buf = link_pat.sub(link_subst, buf)
+    open(hfile, 'w').write(buf)
+
+def usage(e=None):
+    if e:
+        sys.stderr.write('fixxref.py: %s\n' % e)
+    sys.stderr.write('usage: fixxref.py [-i index-dir] html-dir\n')
+    sys.exit(1)
+
+if __name__ == '__main__':
+    try:
+        opts, args = getopt.getopt(sys.argv[1:], "i:h:",
+                                   ["index-dir=", "html-dir="])
+    except getopt.error, e:
+        usage(e)
+
+    index_dirs = []
+    for opt, arg in opts:
+        if opt in ('-i', '--index-dir'):
+            index_dirs.append(arg)
+
+    if len(args) != 1:
+        usage()
+
+    for idir in index_dirs:
+        scan_index_dir(idir)
+
+    html_dir = args[0]
+    fix_xrefs(html_dir)
diff --git a/docs/xsl/html.xsl b/docs/xsl/html.xsl
new file mode 100644 (file)
index 0000000..d8fea78
--- /dev/null
@@ -0,0 +1,285 @@
+<?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY RE "&#10;">
+<!ENTITY nbsp "&#160;">
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version='1.0'>
+
+<xsl:param name="html.stylesheet">style.css</xsl:param>
+<xsl:param name="use.id.as.filename" select="1"/>
+<xsl:param name="chunk.fast" select="1"/>
+<xsl:param name="chunker.output.encoding" select="'utf-8'"/>
+
+<xsl:param name="linenumbering.extension" select="1"/>
+<xsl:param name="variablelist.as.table" select="1"/>
+
+<xsl:template match="blockquote">
+  <div class="{local-name(.)}">
+    <xsl:if test="@lang or @xml:lang">
+      <xsl:call-template name="language.attribute"/>
+    </xsl:if>
+    <xsl:call-template name="anchor"/>
+
+    <xsl:choose>
+      <xsl:when test="attribution">
+        <table border="0" width="100%"
+               cellspacing="0" cellpadding="0" class="blockquote"
+               summary="Block quote">
+          <tr>
+            <td width="10%" valign="top">&#160;</td>
+            <td width="80%" valign="top">
+              <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
+            </td>
+            <td width="10%" valign="top">&#160;</td>
+          </tr>
+          <tr>
+            <td colspan="2" align="right" valign="top">
+              <xsl:text>--</xsl:text>
+              <xsl:apply-templates select="attribution"/>
+            </td>
+            <td width="10%" valign="top">&#160;</td>
+          </tr>
+        </table>
+      </xsl:when>
+      <xsl:when test="@role = 'properties' or @role = 'prototypes'">
+        <table width="100%" border="0" bgcolor="#E0E0E0">
+          <tr>
+            <td valign="top">
+              <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
+            </td>
+          </tr>
+        </table>
+      </xsl:when>
+      <xsl:otherwise>
+        <blockquote class="{local-name(.)}">
+          <xsl:apply-templates/>
+        </blockquote>
+      </xsl:otherwise>
+    </xsl:choose>
+  </div>
+</xsl:template>
+
+  <!-- support for Python language for synopsises -->
+  <xsl:template match="classsynopsis
+                     |fieldsynopsis
+                     |methodsynopsis
+                     |constructorsynopsis
+                     |destructorsynopsis">
+    <xsl:param name="language">
+      <xsl:choose>
+        <xsl:when test="@language">
+          <xsl:value-of select="@language"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$default-classsynopsis-language"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:param>
+    <xsl:choose>
+      <xsl:when test="$language='python'">
+        <xsl:apply-templates select="." mode="python"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-imports/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="classsynopsis" mode="python">
+    <table bgcolor="#D0E0F0" width="100%">
+      <tr><td>
+    <pre class="{name(.)}">
+      <xsl:text>class </xsl:text>
+      <xsl:apply-templates select="ooclass[1]" mode="python"/>
+      <xsl:if test="ooclass[position() &gt; 1]">
+        <xsl:text>(</xsl:text>
+        <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="python"/>        <xsl:text>)</xsl:text>
+      </xsl:if>
+      <xsl:text>:&RE;</xsl:text>
+
+      <xsl:apply-templates select="constructorsynopsis
+                                   |destructorsynopsis
+                                   |fieldsynopsis
+                                   |methodsynopsis
+                                   |classsynopsisinfo" mode="python"/>
+    </pre></td></tr></table>
+  </xsl:template>
+
+  <xsl:template match="classsynopsisinfo" mode="python">
+    <xsl:apply-templates mode="python"/>
+  </xsl:template>
+
+  <xsl:template match="ooclass|oointerface|ooexception" mode="python">
+    <xsl:if test="position() &gt; 1">
+      <xsl:text>, </xsl:text>
+    </xsl:if>
+    <span class="{name(.)}">
+      <xsl:apply-templates mode="python"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="modifier" mode="python">
+    <span class="{name(.)}">
+      <xsl:apply-templates mode="python"/>
+      <xsl:text>&nbsp;</xsl:text>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="classname" mode="python">
+    <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+      <xsl:text>, </xsl:text>
+    </xsl:if>
+    <span class="{name(.)}">
+      <xsl:apply-templates mode="python"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="interfacename" mode="python">
+    <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+      <xsl:text>, </xsl:text>
+    </xsl:if>
+    <span class="{name(.)}">
+      <xsl:apply-templates mode="python"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="exceptionname" mode="python">
+    <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+      <xsl:text>, </xsl:text>
+    </xsl:if>
+    <span class="{name(.)}">
+      <xsl:apply-templates mode="python"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="fieldsynopsis" mode="python">
+    <code class="{name(.)}">
+      <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      <xsl:apply-templates mode="python"/>
+    </code>
+    <xsl:call-template name="synop-break"/>
+  </xsl:template>
+
+  <xsl:template match="type" mode="python">
+    <span class="{name(.)}">
+      <xsl:apply-templates mode="python"/>
+      <xsl:text>&nbsp;</xsl:text>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="varname" mode="python">
+    <span class="{name(.)}">
+      <xsl:apply-templates mode="python"/>
+      <xsl:text>&nbsp;</xsl:text>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="initializer" mode="python">
+    <span class="{name(.)}">
+      <xsl:text>=</xsl:text>
+      <xsl:apply-templates mode="python"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="void" mode="python">
+    <span class="{name(.)}">
+      <xsl:text>void&nbsp;</xsl:text>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="methodname" mode="python">
+    <span class="{name(.)}">
+      <xsl:apply-templates mode="python"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="methodparam" mode="python">
+    <xsl:if test="position() &gt; 1">
+      <xsl:text>, </xsl:text>
+    </xsl:if>
+    <span class="{name(.)}">
+      <xsl:apply-templates mode="python"/>
+    </span>
+  </xsl:template>
+
+ <xsl:template mode="python"
+    match="destructorsynopsis|methodsynopsis">
+
+    <code class="{name(.)}">
+      <xsl:text>    def </xsl:text>
+      <xsl:apply-templates select="methodname" mode="python"/>
+      <xsl:text>(</xsl:text>
+      <xsl:apply-templates select="methodparam" mode="python"/>
+      <xsl:text>)</xsl:text>
+    </code>
+    <xsl:call-template name="synop-break"/>
+  </xsl:template>
+
+ <xsl:template mode="python"
+    match="constructorsynopsis">
+
+    <code class="{name(.)}">
+      <xsl:text>    </xsl:text>
+      <xsl:apply-templates select="methodname" mode="python"/>
+      <xsl:text>(</xsl:text>
+      <xsl:apply-templates select="methodparam" mode="python"/>
+      <xsl:text>)</xsl:text>
+    </code>
+    <xsl:call-template name="synop-break"/>
+  </xsl:template>
+
+<!-- this was  the original parameter python mode styling
+  <xsl:template match="parameter" mode="python">
+    <span class="{name(.)}">
+      <xsl:apply-templates mode="python"/>
+    </span>
+  </xsl:template>
+-->
+
+  <!-- hack -->
+  <xsl:template match="link" mode="python">
+    <xsl:apply-templates select="."/>
+  </xsl:template>
+
+  <!-- ========================================================= -->
+  <!-- template to output gtkdoclink elements for the unknown targets -->
+
+  <xsl:template match="link">
+    <xsl:choose>
+      <xsl:when test="id(@linkend)">
+        <xsl:apply-imports/>
+      </xsl:when>
+      <xsl:otherwise>
+        <PYGTKDOCLINK HREF="{@linkend}">
+          <xsl:apply-templates/>
+        </PYGTKDOCLINK>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+ <xsl:template match="parameter" mode="python">
+    <span class="{name(.)}">
+       <xsl:choose>
+               <xsl:when test="@role = 'keyword'">
+                       <xsl:call-template name="inline.boldmonoseq"/>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:call-template name="inline.italicmonoseq"/>
+               </xsl:otherwise>
+       </xsl:choose>
+    </span>
+</xsl:template>
+
+<xsl:template match="variablelist">
+  <table border="0" width="100%" bgcolor="#FFECCE">
+    <col align="left" valign="top" width="0*">
+    </col>
+    <tbody>
+      <xsl:apply-templates select="varlistentry" mode="varlist-table"/>
+    </tbody>
+  </table>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/docs/xsl/pdf-style.xsl b/docs/xsl/pdf-style.xsl
new file mode 100644 (file)
index 0000000..d4a8e02
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version='1.0'?> <!--*- mode: xml -*-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               version='1.0'>
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
+<xsl:include href="common.xsl"/>
+<xsl:include href="pdf.xsl"/>
+
+<xsl:param name="section.autolabel" select="1"/>
+<xsl:param name="section.label.includes.component.label" select="1"/>
+
+</xsl:stylesheet>
diff --git a/docs/xsl/pdf.xsl b/docs/xsl/pdf.xsl
new file mode 100644 (file)
index 0000000..013bfd0
--- /dev/null
@@ -0,0 +1,259 @@
+<?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY RE "&#10;">
+<!ENTITY nbsp "&#160;">
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+<xsl:param name="body.margin.top">0.5in</xsl:param>
+
+<xsl:template name="is.graphic.extension">
+  <xsl:param name="ext"></xsl:param>
+  <xsl:if test="$ext = 'png'
+                or $ext = 'pdf'
+                or $ext = 'jpeg'
+                or $ext = 'gif'
+                or $ext = 'tif'
+                or $ext = 'tiff'
+                or $ext = 'bmp'">1</xsl:if>
+</xsl:template>
+
+  <!-- support for Python language for synopsises -->
+  <xsl:template match="classsynopsis
+                     |fieldsynopsis
+                     |methodsynopsis
+                     |constructorsynopsis
+                     |destructorsynopsis">
+    <xsl:param name="language">
+      <xsl:choose>
+        <xsl:when test="@language">
+          <xsl:value-of select="@language"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$default-classsynopsis-language"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:param>
+    <xsl:choose>
+      <xsl:when test="$language='python'">
+        <xsl:apply-templates select="." mode="python"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-imports/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="classsynopsis" mode="python">
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties"
+            background-color="#E0E0E0">
+    <xsl:text>class </xsl:text>
+    <xsl:apply-templates select="ooclass[1]" mode="python"/>
+    <xsl:if test="ooclass[position() &gt; 1]">
+      <xsl:text>(</xsl:text>
+      <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="python"/>
+      <xsl:text>)</xsl:text>
+    </xsl:if>
+    <xsl:text>&nbsp;:</xsl:text>
+
+      <xsl:apply-templates select="constructorsynopsis
+                                   |destructorsynopsis
+                                   |fieldsynopsis
+                                   |methodsynopsis
+                                   |classsynopsisinfo" mode="python"/>
+
+  </fo:block>
+  <xsl:text>&RE;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="classsynopsisinfo" mode="python">
+    <xsl:apply-templates mode="python"/>
+  </xsl:template>
+
+  <xsl:template match="ooclass|oointerface|ooexception" mode="python">
+    <xsl:if test="position() &gt; 1">
+      <xsl:text>, </xsl:text>
+   </xsl:if>
+  <xsl:apply-templates mode="python"/>
+  </xsl:template>
+
+  <xsl:template match="modifier" mode="python">
+      <xsl:apply-templates mode="python"/>
+      <xsl:text>&nbsp;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="classname" mode="python">
+    <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+      <xsl:text>, </xsl:text>
+    </xsl:if>
+      <xsl:apply-templates mode="python"/>
+  </xsl:template>
+
+  <xsl:template match="interfacename" mode="python">
+    <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+      <xsl:text>, </xsl:text>
+    </xsl:if>
+      <xsl:apply-templates mode="python"/>
+  </xsl:template>
+
+  <xsl:template match="exceptionname" mode="python">
+    <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+      <xsl:text>, </xsl:text>
+    </xsl:if>
+      <xsl:apply-templates mode="python"/>
+  </xsl:template>
+
+  <xsl:template match="fieldsynopsis" mode="python">
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+      <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+      <xsl:apply-templates mode="python"/>
+    <xsl:call-template name="synop-break"/>
+  </fo:block>
+  </xsl:template>
+
+  <xsl:template match="type" mode="python">
+      <xsl:apply-templates mode="python"/>
+      <xsl:text>&nbsp;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="varname" mode="python">
+      <xsl:apply-templates mode="python"/>
+      <xsl:text>&nbsp;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="initializer" mode="python">
+      <xsl:text>=</xsl:text>
+      <xsl:apply-templates mode="python"/>
+  </xsl:template>
+
+  <xsl:template match="void" mode="python">
+      <xsl:text>void&nbsp;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="methodname" mode="python">
+      <xsl:apply-templates mode="python"/>
+  </xsl:template>
+
+  <xsl:template match="methodparam" mode="python">
+    <xsl:if test="position() &gt; 1">
+      <xsl:text>, </xsl:text>
+    </xsl:if>
+      <xsl:apply-templates mode="python"/>
+  </xsl:template>
+
+ <xsl:template mode="python"
+    match="destructorsynopsis|methodsynopsis">
+
+  <fo:block wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+      <xsl:text>    def </xsl:text>
+      <xsl:apply-templates select="methodname" mode="python"/>
+      <xsl:text>(</xsl:text>
+      <xsl:apply-templates select="methodparam" mode="python"/>
+      <xsl:text>)</xsl:text>
+<!--    <xsl:call-template name="synop-break"/> -->
+   </fo:block>
+  </xsl:template>
+
+ <xsl:template mode="python"
+    match="constructorsynopsis">
+    <fo:block  wrap-option='no-wrap'
+            white-space-collapse='false'
+            linefeed-treatment="preserve"
+            xsl:use-attribute-sets="monospace.verbatim.properties">
+      <xsl:text>    </xsl:text>
+      <xsl:apply-templates select="methodname" mode="python"/>
+      <xsl:text>(</xsl:text>
+      <xsl:apply-templates select="methodparam" mode="python"/>
+      <xsl:text>)</xsl:text>
+  </fo:block>
+  </xsl:template>
+
+  <!-- hack -->
+  <xsl:template match="link" mode="python">
+    <xsl:apply-templates select="."/>
+  </xsl:template>
+
+<!--
+<xsl:template match="variablelist" mode="vl.as.blocks">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+
+  <xsl:if test="title">
+    <xsl:apply-templates select="title" mode="list.title.mode"/>
+  </xsl:if>
+
+  <fo:block id="{$id}" 
+            xsl:use-attribute-sets="list.block.spacing"
+            background-color="#FFECCE">
+    <xsl:apply-templates mode="vl.as.blocks"/>
+  </fo:block>
+</xsl:template>
+-->
+
+<!--
+<xsl:template match="variablelist">
+  <fo:table border="0"
+            width="100%" 
+            background-color="#FFECCE"
+            table-layout="fixed">
+    <fo:table-column
+            align="left" 
+            column-width="20%"
+            column-number="1">
+    </fo:table-column>
+    <fo:table-column
+            align="left" 
+            column-width="80%"
+            column-number="2">
+    </fo:table-column>
+    <fo:table-body>
+      <xsl:apply-templates select="varlistentry"/>
+    </fo:table-body>
+  </fo:table>
+</xsl:template>
+
+<xsl:template match="varlistentry">
+  <fo:table-row>
+       <fo:table-cell>
+          <fo:block
+            background-color="#FFECCE">
+          <xsl:apply-templates select="term"/>
+          </fo:block>
+       </fo:table-cell>
+       <fo:table-cell>
+          <fo:block
+            background-color="#FFECCE">
+          <xsl:apply-templates select="listitem"/>
+          </fo:block>
+       </fo:table-cell>
+  </fo:table-row>
+</xsl:template>
+
+<xsl:template match="varlistentry/term">
+    <xsl:apply-templates/>
+    <xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="varlistentry/term[position()=last()]" priority="2">
+    <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="varlistentry/listitem">
+      <xsl:apply-templates/>
+</xsl:template>
+-->
+
+</xsl:stylesheet>
diff --git a/docs/xsl/ref-html-style.xsl b/docs/xsl/ref-html-style.xsl
new file mode 100644 (file)
index 0000000..a152077
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               version='1.0'>
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
+<xsl:include href="common.xsl"/>
+<xsl:include href="html.xsl"/>
+<xsl:include href="devhelp.xsl"/>
+
+  <!-- ========================================================= -->
+  <!-- template to create the index.sgml anchor index -->
+
+  <xsl:template name="generate.index">
+    <xsl:call-template name="write.text.chunk">
+      <xsl:with-param name="filename" select="'index.sgml'"/>
+      <xsl:with-param name="content">
+        <!-- check all anchor and refentry elements -->
+        <xsl:apply-templates select="//anchor|//refentry|//refsect1|//refsect2|//book"
+                             mode="generate.index.mode"/>
+      </xsl:with-param>
+      <xsl:with-param name="encoding" select="'utf-8'"/>
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template match="*" mode="generate.index.mode">
+    <xsl:if test="not(@href)">
+      <xsl:if test="@id">
+        <xsl:text>&lt;ANCHOR id=&quot;</xsl:text>
+        <xsl:value-of select="@id"/>
+        <xsl:text>&quot; href=&quot;</xsl:text>
+        <xsl:if test="$gtkdoc.bookname">
+          <xsl:value-of select="$gtkdoc.bookname"/>
+          <xsl:text>/</xsl:text>
+        </xsl:if>
+        <xsl:call-template name="href.target"/>
+        <xsl:text>&quot;&gt;
+        </xsl:text>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
+  <xsl:param name="gtkdoc.version" select="''"/>
+  <xsl:param name="gtkdoc.bookname" select="''"/>
+
+  <xsl:param name="refentry.generate.name" select="0"/>
+  <xsl:param name="refentry.generate.title" select="1"/>
+  <xsl:param name="chapter.autolabel" select="0"/>
+
+  <xsl:template match="book|article">
+    <xsl:apply-imports/>
+    <xsl:call-template name="generate.devhelp"/>
+    <xsl:call-template name="generate.index"/>
+  </xsl:template>
+</xsl:stylesheet>
diff --git a/dsextras.py b/dsextras.py
new file mode 100644 (file)
index 0000000..b2c9e90
--- /dev/null
@@ -0,0 +1,509 @@
+# -*- coding: utf-8 -*-
+#
+# dsextras.py - Extra classes and utilities for distutils,
+#               adding pkg-config support
+
+
+import os
+import sys
+import fnmatch
+import re
+import string
+
+from distutils import dep_util
+from distutils.command.build_ext import build_ext
+from distutils.command.install_lib import install_lib
+from distutils.command.install_data import install_data
+from distutils.extension import Extension
+from distutils.spawn import find_executable
+
+try:
+    import codegen.createdefs
+    from codegen.override import Overrides
+    from codegen.defsparser import DefsParser
+    from codegen.codegen import register_types, SourceWriter, FileOutput
+except ImportError:
+    template_classes_enabled = False
+else:
+    template_classes_enabled = True
+
+
+GLOBAL_INC = []
+GLOBAL_MACROS = []
+
+codegen_error_message='''
+***************************************************************************
+Codegen could not be found on your system and is required by the
+dsextras.Template and dsextras.TemplateExtension classes.
+***************************************************************************
+'''
+
+
+def get_m4_define(varname):
+    '''Return the value of a m4_define variable as set in configure.in.'''
+    pattern = re.compile('m4_define\(' + varname + '\,\s*(.+)\)')
+
+    if os.path.exists('configure.ac'):
+        fname = 'configure.ac'
+    elif os.path.exists('configure.in'):
+        fname = 'configure.in'
+    else:
+        raise SystemExit('ERROR: Could not find configure file')
+
+    for line in open(fname).readlines():
+        match_obj = pattern.match(line)
+
+        if match_obj:
+            return match_obj.group(1)
+
+    return None
+
+def getoutput(cmd):
+    '''Return output (stdout or stderr) of executing cmd in a shell.'''
+    return getstatusoutput(cmd)[1]
+
+def getstatusoutput(cmd):
+    '''Return (status, output) of executing cmd in a shell.'''
+    if sys.platform == 'win32':
+        pipe = os.popen(cmd, 'r')
+        text = pipe.read()
+        sts = pipe.close() or 0
+
+        while text[-1:] in ['\n', '\r']:
+            text = text[:-1]
+
+        return sts, text
+    else:
+        from commands import getstatusoutput
+        return getstatusoutput(cmd)
+
+def have_gcc():
+    '''Checks for the existence of gcc'''
+    if find_executable('gcc'):
+        return True
+
+def have_pkgconfig():
+    '''Checks for the existence of pkg-config'''
+    if find_executable('pkg-config'):
+        return True
+
+def list_files(dir):
+    '''List all files in a dir, with filename match support:
+    for example: glade/*.glade will return all files in the glade directory
+    that matches *.glade. It also looks up the full path'''
+    if dir.find(os.sep) != -1:
+        parts = dir.split(os.sep)
+        dir = string.join(parts[:-1], os.sep)
+        pattern = parts[-1]
+    else:
+        pattern = dir
+        dir = '.'
+
+    dir = os.path.abspath(dir)
+    retval = []
+
+    for file in os.listdir(dir):
+        if fnmatch.fnmatch(file, pattern):
+            retval.append(os.path.join(dir, file))
+
+    return retval
+
+def pkgc_version_check(name, req_version):
+    '''Check the existence and version number of a package:
+    returns False if not installed or too old, True otherwise.'''
+    is_installed = not os.system('pkg-config --exists %s' % name)
+
+    if not is_installed:
+        return False
+
+    orig_version = pkgc_get_version(name)
+    version = map(int, orig_version.split('.'))
+    pkc_version = map(int, req_version.split('.'))
+
+    if version >= pkc_version:
+        return True
+
+    return False
+
+def pkgc_get_version(name):
+    '''return the version as return by pkg-config --modversion'''
+    return getoutput('pkg-config --modversion %s' % name)
+
+def pkgc_get_libraries(name):
+    '''returns a list of libraries as returned by pkg-config --libs-only-l'''
+    output = getoutput('pkg-config --libs-only-l %s' % name)
+    return output.replace('-l', '').split()
+
+def pkgc_get_library_dirs(name):
+    '''returns a list of library dirs as returned by pkg-config --libs-only-L'''
+    output = getoutput('pkg-config --libs-only-L %s' % name)
+    return output.replace('-L', '').split()
+
+def pkgc_get_include_dirs(name):
+    '''returns a list of include dirs as returned by pkg-config --cflags-only-I'''
+    output = getoutput('pkg-config --cflags-only-I %s' % name)
+    return output.replace('-I', '').split()
+
+def pkgc_get_defs_dir(name):
+    '''returns the defs dir as returned by pkg-config --variable=defsdir'''
+    output = getoutput('pkg-config --variable=defsdir %s' % name)
+    return output
+
+
+class BuildExt(build_ext):
+    def init_extra_compile_args(self):
+        self.extra_compile_args = []
+
+        if sys.platform == 'win32' and self.compiler.compiler_type == 'mingw32':
+            if not have_gcc():
+                raise SystemExit('ERROR: Could not find gcc.')
+
+            # MSVC compatible struct packing is required.
+            # Note gcc2 uses -fnative-struct while gcc3
+            # and gcc4 use -mms-bitfields. Based on the
+            # version the proper flag is used below.
+            msnative_struct = {'2': '-fnative-struct',
+                               '3': '-mms-bitfields',
+                               '4': '-mms-bitfields'}
+            gcc_version = getoutput('gcc -dumpversion')
+
+            print ('using MinGW GCC version %s with %s option' % \
+                  (gcc_version, msnative_struct[gcc_version[0]]))
+
+            self.extra_compile_args.append(msnative_struct[gcc_version[0]])
+
+    def modify_compiler(self):
+        if sys.platform == 'win32' and self.compiler.compiler_type == 'mingw32':
+            if not have_gcc():
+                raise SystemExit('ERROR: Could not find gcc.')
+
+            # Remove '-static' linker option to prevent MinGW ld
+            # from trying to link with MSVC import libraries.
+            if self.compiler.linker_so.count('-static'):
+                self.compiler.linker_so.remove('-static')
+
+    def build_extensions(self):
+        # Init self.extra_compile_args
+        self.init_extra_compile_args()
+        # Modify default compiler settings
+        self.modify_compiler()
+        # Invoke base build_extensions()
+        build_ext.build_extensions(self)
+
+    def build_extension(self, ext):
+        # Add self.extra_compile_args to ext.extra_compile_args
+        ext.extra_compile_args += self.extra_compile_args
+
+        # Generate eventual templates before building
+        if hasattr(ext, 'generate'):
+            ext.generate()
+
+        # Filter out 'c' and 'm' libs when compilic w/ msvc
+        if sys.platform == 'win32' and self.compiler.compiler_type == 'msvc':
+            save_libs = ext.libraries
+            ext.libraries = [lib for lib in ext.libraries
+                             if lib not in ['c', 'm']]
+        else:
+            save_libs = ext.libraries
+
+        # Invoke base build_extension()
+        build_ext.build_extension(self, ext)
+
+        if save_libs is not None and save_libs != ext.libraries:
+            ext.libraries = save_libs
+
+
+class InstallLib(install_lib):
+    local_outputs = []
+    local_inputs = []
+
+    def set_install_dir(self, install_dir):
+        self.install_dir = install_dir
+
+    def get_outputs(self):
+        return install_lib.get_outputs(self) + self.local_outputs
+
+    def get_inputs(self):
+        return install_lib.get_inputs(self) + self.local_inputs
+
+
+class InstallData(install_data):
+    local_outputs = []
+    local_inputs = []
+    template_options = {}
+
+    def prepare(self):
+        if os.name == 'nt':
+            self.prefix = os.sep.join(self.install_dir.split(os.sep)[:-3])
+        else:
+            # default: os.name == 'posix'
+            self.prefix = os.sep.join(self.install_dir.split(os.sep)[:-4])
+
+        self.exec_prefix = '${prefix}/bin'
+        self.includedir = '${prefix}/include'
+        self.libdir = '${prefix}/lib'
+        self.datarootdir = '${prefix}/share'
+        self.datadir = '${prefix}/share'
+
+        self.add_template_option('prefix', self.prefix)
+        self.add_template_option('exec_prefix', self.exec_prefix)
+        self.add_template_option('includedir', self.includedir)
+        self.add_template_option('libdir', self.libdir)
+        self.add_template_option('datarootdir', self.datarootdir)
+        self.add_template_option('datadir', self.datadir)
+        self.add_template_option('PYTHON', sys.executable)
+        self.add_template_option('THREADING_CFLAGS', '')
+
+    def set_install_dir(self, install_dir):
+        self.install_dir = install_dir
+
+    def add_template_option(self, name, value):
+        self.template_options['@%s@' % name] = value
+
+    def install_template(self, filename, install_dir):
+        '''Install template filename into target directory install_dir.'''
+        output_file = os.path.split(filename)[-1][:-3]
+
+        template = open(filename).read()
+
+        for key, value in self.template_options.items():
+            template = template.replace(key, value)
+
+        output = os.path.join(install_dir, output_file)
+        self.mkpath(install_dir)
+        open(output, 'wb').write(template)
+        self.local_inputs.append(filename)
+        self.local_outputs.append(output)
+        return output
+
+    def get_outputs(self):
+        return install_data.get_outputs(self) + self.local_outputs
+
+    def get_inputs(self):
+        return install_data.get_inputs(self) + self.local_inputs
+
+
+class PkgConfigExtension(Extension):
+    # Name of pygobject package extension depends on, can be None
+    pygobject_pkc = 'pygobject-2.0'
+    can_build_ok = None
+
+    def __init__(self, **kwargs):
+        name = kwargs['pkc_name']
+
+        if 'include_dirs' in kwargs:
+            kwargs['include_dirs'] += self.get_include_dirs(name) + GLOBAL_INC
+        else:
+            kwargs['include_dirs'] = self.get_include_dirs(name) + GLOBAL_INC
+
+        kwargs['define_macros'] = GLOBAL_MACROS
+
+        if 'libraries' in kwargs:
+            kwargs['libraries'] += self.get_libraries(name)
+        else:
+            kwargs['libraries'] = self.get_libraries(name)
+
+        if 'library_dirs' in kwargs:
+            kwargs['library_dirs'] += self.get_library_dirs(name)
+        else:
+            kwargs['library_dirs'] = self.get_library_dirs(name)
+
+        if 'pygobject_pkc' in kwargs:
+            self.pygobject_pkc = kwargs.pop('pygobject_pkc')
+
+        if self.pygobject_pkc:
+            kwargs['include_dirs'] += self.get_include_dirs(self.pygobject_pkc)
+            kwargs['libraries'] += self.get_libraries(self.pygobject_pkc)
+            kwargs['library_dirs'] += self.get_library_dirs(self.pygobject_pkc)
+
+        self.name = kwargs['name']
+        self.pkc_name = kwargs['pkc_name']
+        self.pkc_version = kwargs['pkc_version']
+        del kwargs['pkc_name'], kwargs['pkc_version']
+        Extension.__init__(self, **kwargs)
+
+    def get_include_dirs(self, names):
+        if type(names) != tuple:
+            names = (names,)
+
+        retval = []
+
+        for name in names:
+            retval.extend(pkgc_get_include_dirs(name))
+
+        return retval
+
+    def get_libraries(self, names):
+        if type(names) != tuple:
+            names = (names,)
+
+        retval = []
+
+        for name in names:
+            retval.extend(pkgc_get_libraries(name))
+
+        return retval
+
+    def get_library_dirs(self, names):
+        if type(names) != tuple:
+            names = (names,)
+
+        retval = []
+
+        for name in names:
+            retval.extend(pkgc_get_library_dirs(name))
+
+        return retval
+
+    def can_build(self):
+        '''If the pkg-config version found is good enough'''
+        if self.can_build_ok is not None:
+            return self.can_build_ok
+
+        if type(self.pkc_name) != tuple:
+            reqs = [(self.pkc_name, self.pkc_version)]
+        else:
+            reqs = zip(self.pkc_name, self.pkc_version)
+
+        for package, version in reqs:
+            retval = os.system('pkg-config --exists %s' % package)
+
+            if retval:
+                print ('* %s.pc could not be found, bindings for %s'
+                       ' will not be built.' % (package, self.name))
+                self.can_build_ok = False
+                return False
+
+            orig_version = pkgc_get_version(package)
+
+            if (map(int, orig_version.split('.')) >=
+                map(int, version.split('.'))):
+
+                self.can_build_ok = True
+                return True
+            else:
+                print ('Warning: Too old version of %s' % package)
+                print ('         Need %s, but %s is installed' % (version, orig_version))
+                self.can_build_ok = False
+                return False
+
+    def generate(self):
+        pass
+
+
+class Template(object):
+    def __new__(cls, *args, **kwds):
+        # The Template and TemplateExtension classes require codegen
+        if not template_classes_enabled:
+            raise NameError('\'%s\' is not defined\n%s' % (cls.__name__,
+                                                           codegen_error_message))
+
+        return object.__new__(cls)
+
+    def __init__(self, override, output, defs, prefix,
+                 register=[], load_types=None, py_ssize_t_clean=False):
+
+        self.override = override
+        self.output = output
+        self.prefix = prefix
+        self.load_types = load_types
+        self.py_ssize_t_clean = py_ssize_t_clean
+
+        self.built_defs=[]
+
+        if isinstance(defs, tuple):
+            self.defs=defs[0]
+            self.built_defs.append(defs)
+        else:
+            self.defs=defs
+
+        self.register=[]
+
+        for r in register:
+            if isinstance(r, tuple):
+                self.register.append(r[0])
+                self.built_defs.append(r)
+            else:
+                self.register.append(r)
+
+    def check_dates(self):
+        # Return True if files are up-to-date
+        files=self.register[:]
+        files.append(self.override)
+        files.append(self.defs)
+
+        return not dep_util.newer_group(files, self.output)
+
+    def generate_defs(self):
+        for (target, sources) in self.built_defs:
+            if dep_util.newer_group(sources, target):
+                # createdefs is mostly called from the CLI !
+                args=['dummy', target] + sources
+                codegen.createdefs.main(args)
+
+    def generate(self):
+        # Generate defs files if necessary
+        self.generate_defs()
+
+        # ... then check the file timestamps
+        if self.check_dates():
+            return
+
+        for item in self.register:
+            dp = DefsParser(item, dict(GLOBAL_MACROS))
+            dp.startParsing()
+            register_types(dp)
+
+        if self.load_types:
+            globals = {}
+            execfile(self.load_types, globals)
+
+        dp = DefsParser(self.defs, dict(GLOBAL_MACROS))
+        dp.startParsing()
+        register_types(dp)
+
+        fd = open(self.output, 'w')
+        sw = SourceWriter(dp, Overrides(self.override), self.prefix,
+                          FileOutput(fd, self.output))
+        sw.write(self.py_ssize_t_clean)
+        fd.close()
+
+
+class TemplateExtension(PkgConfigExtension):
+    def __new__(cls,*args, **kwds):
+        if not template_classes_enabled:
+            raise NameError('\'%s\' is not defined\n%s' % (cls.__name__,
+                                                           codegen_error_message))
+
+        return PkgConfigExtension.__new__(cls,*args, **kwds)
+
+    def __init__(self, **kwargs):
+        name = kwargs['name']
+        defs = kwargs['defs']
+
+        if isinstance(defs, tuple):
+            output = defs[0][:-5] + '.c'
+        else:
+            output = defs[:-5] + '.c'
+
+        override = kwargs['override']
+        load_types = kwargs.get('load_types')
+        py_ssize_t_clean = kwargs.pop('py_ssize_t_clean', False)
+        self.templates = []
+        self.templates.append(Template(override, output, defs, 'py' + name,
+                                       kwargs['register'], load_types,
+                                       py_ssize_t_clean))
+
+        del kwargs['register'], kwargs['override'], kwargs['defs']
+
+        if load_types:
+            del kwargs['load_types']
+
+        if kwargs.has_key('output'):
+            kwargs['name'] = kwargs['output']
+            del kwargs['output']
+
+        PkgConfigExtension.__init__(self, **kwargs)
+
+    def generate(self):
+        map(lambda x: x.generate(), self.templates)
diff --git a/examples/Makefile.am b/examples/Makefile.am
new file mode 100644 (file)
index 0000000..b680b90
--- /dev/null
@@ -0,0 +1,4 @@
+EXTRA_DIST = properties.py signal.py option.py cairo-demo.py
+
+
+-include $(top_srcdir)/git.mk
diff --git a/examples/Makefile.in b/examples/Makefile.in
new file mode 100644 (file)
index 0000000..b0ab293
--- /dev/null
@@ -0,0 +1,407 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = examples
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+       $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
+GI_LIBS = @GI_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PLATFORM = @PLATFORM@
+PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
+PYCAIRO_LIBS = @PYCAIRO_LIBS@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = properties.py signal.py option.py cairo-demo.py
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign examples/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$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
+installdirs:
+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:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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:
+
+.MAKE: install-am install-strip
+
+.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-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am 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
+
+
+-include $(top_srcdir)/git.mk
+
+# 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:
diff --git a/examples/cairo-demo.py b/examples/cairo-demo.py
new file mode 100755 (executable)
index 0000000..72a0533
--- /dev/null
@@ -0,0 +1,123 @@
+#!/usr/bin/env python
+"""Based on cairo-demo/X11/cairo-demo.c
+"""
+import pygtk
+pygtk.require('2.0')
+import cairo
+from gi.repository import Gdk, Gtk
+
+SIZE = 30
+
+def triangle(ctx):
+    ctx.move_to(SIZE, 0)
+    ctx.rel_line_to(SIZE, 2*SIZE)
+    ctx.rel_line_to(-2*SIZE, 0)
+    ctx.close_path()
+
+def square(ctx):
+    ctx.move_to(0, 0)
+    ctx.rel_line_to(2*SIZE, 0)
+    ctx.rel_line_to(0, 2*SIZE)
+    ctx.rel_line_to(-2*SIZE, 0)
+    ctx.close_path()
+
+def bowtie(ctx):
+    ctx.move_to(0, 0)
+    ctx.rel_line_to(2*SIZE, 2*SIZE)
+    ctx.rel_line_to(-2*SIZE, 0)
+    ctx.rel_line_to(2*SIZE, -2*SIZE)
+    ctx.close_path()
+
+def inf(ctx):
+    ctx.move_to(0, SIZE)
+    ctx.rel_curve_to(0,SIZE, SIZE,SIZE, 2*SIZE,0)
+    ctx.rel_curve_to(SIZE,-SIZE, 2*SIZE,-SIZE, 2*SIZE,0)
+    ctx.rel_curve_to(0,SIZE, -SIZE,SIZE, -2*SIZE,0)
+    ctx.rel_curve_to(-SIZE,-SIZE, -2*SIZE,-SIZE, -2*SIZE,0)
+    ctx.close_path()
+
+def draw_shapes(ctx, x, y, fill):
+    ctx.save()
+
+    ctx.new_path()
+    ctx.translate(x+SIZE, y+SIZE)
+    bowtie(ctx)
+    if fill:
+        ctx.fill()
+    else:
+        ctx.stroke()
+
+    ctx.new_path()
+    ctx.translate(3*SIZE, 0)
+    square(ctx)
+    if fill:
+        ctx.fill()
+    else:
+        ctx.stroke()
+
+    ctx.new_path()
+    ctx.translate(3*SIZE, 0)
+    triangle(ctx)
+    if fill:
+        ctx.fill()
+    else:
+        ctx.stroke()
+
+    ctx.new_path()
+    ctx.translate(3*SIZE, 0)
+    inf(ctx)
+    if fill:
+        ctx.fill()
+    else:
+        ctx.stroke()
+
+    ctx.restore()
+
+def fill_shapes(ctx, x, y):
+    draw_shapes(ctx, x, y, True)
+
+def stroke_shapes(ctx, x, y):
+    draw_shapes(ctx, x, y, False)
+
+def expose (da, event):
+    ctx = Gdk.cairo_create(da.window)
+
+    ctx.set_source_rgb(0, 0, 0)
+
+    ctx.set_line_width(SIZE / 4)
+    ctx.set_tolerance(0.1)
+
+    ctx.set_line_join(cairo.LINE_JOIN_ROUND)
+    ctx.set_dash([SIZE/4.0, SIZE/4.0], 0)
+    stroke_shapes(ctx, 0, 0)
+
+    ctx.set_dash([], 0)
+    stroke_shapes(ctx, 0, 3*SIZE)
+
+    ctx.set_line_join(cairo.LINE_JOIN_BEVEL)
+    stroke_shapes(ctx, 0, 6*SIZE)
+
+    ctx.set_line_join(cairo.LINE_JOIN_MITER)
+    stroke_shapes(ctx, 0, 9*SIZE)
+
+    fill_shapes(ctx, 0, 12*SIZE)
+
+    ctx.set_line_join(cairo.LINE_JOIN_BEVEL)
+    fill_shapes(ctx, 0, 15*SIZE)
+    ctx.set_source_rgb(1,0,0)
+    stroke_shapes(ctx, 0, 15*SIZE)
+
+def main():
+    win = Gtk.Window()
+    win.connect('destroy', lambda w: Gtk.main_quit())
+    win.set_default_size(450, 550)
+
+    drawingarea = Gtk.DrawingArea()
+    win.add(drawingarea)
+    drawingarea.connect('expose_event', expose)
+
+    win.show_all()
+    Gtk.main()
+
+if __name__ == '__main__':
+    main()
diff --git a/examples/option.py b/examples/option.py
new file mode 100644 (file)
index 0000000..345517e
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+# gnome-python/pygobject/examples/option.py
+
+from gobject.option import OptionGroup, OptionParser, make_option
+
+group = OptionGroup("example", "OptionGroup Example", "Shows all example options",
+    option_list = [
+        make_option("--example",
+                    action="store_true",
+                    dest="example",
+                    help="An example option."),
+    ])
+
+parser = OptionParser("NAMES ...",
+    description="A simple gobject.option example.",
+    option_list = [
+        make_option("--file", "-f",
+                    type="filename",
+                    action="store",
+                    dest="file",
+                    help="A filename option"),
+        # ...
+    ])
+
+parser.add_option_group(group)
+
+parser.parse_args()
+
+print "group: example ", group.values.example
+print "parser: file", parser.values.file
diff --git a/examples/properties.py b/examples/properties.py
new file mode 100644 (file)
index 0000000..cc05920
--- /dev/null
@@ -0,0 +1,31 @@
+import gobject
+
+class MyObject(gobject.GObject):
+
+    foo = gobject.property(type=str, default='bar')
+    boolprop = gobject.property(type=bool, default=False)
+
+    def __init__(self):
+        gobject.GObject.__init__(self)
+
+    @gobject.property
+    def readonly(self):
+        return 'readonly'
+
+gobject.type_register(MyObject)
+
+print "MyObject properties: ", list(MyObject.props)
+
+obj = MyObject()
+
+print "obj.foo ==", obj.foo
+
+obj.foo = 'spam'
+print "obj.foo = spam"
+
+print "obj.foo == ", obj.foo
+
+print "obj.boolprop == ", obj.boolprop
+
+print obj.readonly
+obj.readonly = 'does-not-work'
diff --git a/examples/signal.py b/examples/signal.py
new file mode 100644 (file)
index 0000000..26ddae9
--- /dev/null
@@ -0,0 +1,28 @@
+import pygtk; pygtk.require("2.0")
+import gobject
+
+class C(gobject.GObject):
+    __gsignals__ = {
+        'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+                      (gobject.TYPE_INT,))
+    }
+    def __init__(self):
+        self.__gobject_init__() # default constructor using our new GType
+    def do_my_signal(self, arg):
+        print "C: class closure for `my_signal' called with argument", arg
+
+class D(C):
+    def do_my_signal(self, arg):
+        print "D: class closure for `my_signal' called.  Chaining up to C"
+        C.do_my_signal(self, arg)
+
+def my_signal_handler(object, arg, *extra):
+    print "handler for `my_signal' called with argument", arg, \
+          "and extra args", extra
+
+inst = C()
+inst2 = D()
+
+inst.connect("my_signal", my_signal_handler, 1, 2, 3)
+inst.emit("my_signal", 42)
+inst2.emit("my_signal", 42)
diff --git a/gi/Makefile.am b/gi/Makefile.am
new file mode 100644 (file)
index 0000000..31f6c79
--- /dev/null
@@ -0,0 +1,94 @@
+PLATFORM_VERSION = 2.0
+
+pkgincludedir = $(includedir)/pygtk-$(PLATFORM_VERSION)
+pkgpyexecdir = $(pyexecdir)
+
+SUBDIRS = \
+       repository \
+       overrides
+
+INCLUDES = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib
+
+pygidir = $(pkgpyexecdir)/gi
+pygi_PYTHON = \
+       types.py \
+       module.py \
+       importer.py \
+       __init__.py
+
+_gi_la_CFLAGS = \
+       $(PYTHON_INCLUDES) \
+       $(GI_CFLAGS)
+_gi_la_LDFLAGS = \
+       -module \
+       -avoid-version \
+       -export-symbols-regex "init_gi|PyInit__gi"
+_gi_la_LIBADD = \
+       $(GI_LIBS) \
+       $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+_gi_la_SOURCES = \
+       pygi-repository.c \
+       pygi-repository.h \
+       pygi-info.c \
+       pygi-info.h \
+       pygi-invoke.c \
+       pygi-invoke.h \
+       pygi-foreign.c \
+       pygi-foreign.h \
+       pygi-foreign-gvariant.c \
+       pygi-foreign-gvariant.h \
+       pygi-struct.c \
+       pygi-struct.h \
+       pygi-argument.c \
+       pygi-argument.h \
+       pygi-type.c \
+       pygi-type.h \
+       pygi-boxed.c \
+       pygi-boxed.h \
+       pygi-closure.c \
+       pygi-closure.h \
+       pygi-callbacks.c \
+       pygi-callbacks.h \
+       pygi.h \
+       pygi-private.h \
+       pygi-property.c \
+       pygi-property.h \
+       pygi-signal-closure.c \
+       pygi-signal-closure.h \
+       pygobject-external.h \
+       gimodule.c
+
+_gi_cairo_la_CFLAGS = \
+       $(PYTHON_INCLUDES) \
+       $(GI_CFLAGS) \
+       $(PYCAIRO_CFLAGS)
+_gi_cairo_la_LDFLAGS = \
+       -module \
+       -avoid-version \
+       -export-symbols-regex "init_gi_cairo|PyInit__gi_cairo"
+_gi_cairo_la_LIBADD = \
+       $(GI_LIBS) \
+       $(PYCAIRO_LIBS)
+_gi_cairo_la_SOURCES = pygi-foreign-cairo.c
+
+
+pygi_LTLIBRARIES = _gi.la
+
+if ENABLE_CAIRO
+pygi_LTLIBRARIES += _gi_cairo.la
+endif
+
+
+# This is to ensure we have a symlink to the .so in the
+# build directory, which the Python interpreter can load
+# directly without having to know how to parse .la files.
+.la.so:
+       test -L $@ || $(LN_S) .libs/$@ $@
+
+all-local: $(LTLIBRARIES:.la=.so)
+check-local: $(LTLIBRARIES:.la=.so)
+clean-local:
+       rm -f $(LTLIBRARIES:.la=.so)
+
+
+-include $(top_srcdir)/git.mk
diff --git a/gi/Makefile.in b/gi/Makefile.in
new file mode 100644 (file)
index 0000000..3015b22
--- /dev/null
@@ -0,0 +1,1017 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_CAIRO_TRUE@am__append_1 = _gi_cairo.la
+subdir = gi
+DIST_COMMON = $(pygi_PYTHON) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+       $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pygidir)" "$(DESTDIR)$(pygidir)"
+LTLIBRARIES = $(pygi_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+_gi_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+       $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+am__gi_la_OBJECTS = _gi_la-pygi-repository.lo _gi_la-pygi-info.lo \
+       _gi_la-pygi-invoke.lo _gi_la-pygi-foreign.lo \
+       _gi_la-pygi-foreign-gvariant.lo _gi_la-pygi-struct.lo \
+       _gi_la-pygi-argument.lo _gi_la-pygi-type.lo \
+       _gi_la-pygi-boxed.lo _gi_la-pygi-closure.lo \
+       _gi_la-pygi-callbacks.lo _gi_la-pygi-property.lo \
+       _gi_la-pygi-signal-closure.lo _gi_la-gimodule.lo
+_gi_la_OBJECTS = $(am__gi_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+_gi_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(_gi_la_CFLAGS) $(CFLAGS) \
+       $(_gi_la_LDFLAGS) $(LDFLAGS) -o $@
+_gi_cairo_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1)
+am__gi_cairo_la_OBJECTS = _gi_cairo_la-pygi-foreign-cairo.lo
+_gi_cairo_la_OBJECTS = $(am__gi_cairo_la_OBJECTS)
+_gi_cairo_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(_gi_cairo_la_CFLAGS) \
+       $(CFLAGS) $(_gi_cairo_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_CAIRO_TRUE@am__gi_cairo_la_rpath = -rpath $(pygidir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(_gi_la_SOURCES) $(_gi_cairo_la_SOURCES)
+DIST_SOURCES = $(_gi_la_SOURCES) $(_gi_cairo_la_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+py_compile = $(top_srcdir)/py-compile
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+pkgincludedir = $(includedir)/pygtk-$(PLATFORM_VERSION)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
+GI_LIBS = @GI_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PLATFORM = @PLATFORM@
+PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
+PYCAIRO_LIBS = @PYCAIRO_LIBS@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = $(pyexecdir)
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+PLATFORM_VERSION = 2.0
+SUBDIRS = \
+       repository \
+       overrides
+
+INCLUDES = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib
+pygidir = $(pkgpyexecdir)/gi
+pygi_PYTHON = \
+       types.py \
+       module.py \
+       importer.py \
+       __init__.py
+
+_gi_la_CFLAGS = \
+       $(PYTHON_INCLUDES) \
+       $(GI_CFLAGS)
+
+_gi_la_LDFLAGS = \
+       -module \
+       -avoid-version \
+       -export-symbols-regex "init_gi|PyInit__gi"
+
+_gi_la_LIBADD = \
+       $(GI_LIBS) \
+       $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+
+_gi_la_SOURCES = \
+       pygi-repository.c \
+       pygi-repository.h \
+       pygi-info.c \
+       pygi-info.h \
+       pygi-invoke.c \
+       pygi-invoke.h \
+       pygi-foreign.c \
+       pygi-foreign.h \
+       pygi-foreign-gvariant.c \
+       pygi-foreign-gvariant.h \
+       pygi-struct.c \
+       pygi-struct.h \
+       pygi-argument.c \
+       pygi-argument.h \
+       pygi-type.c \
+       pygi-type.h \
+       pygi-boxed.c \
+       pygi-boxed.h \
+       pygi-closure.c \
+       pygi-closure.h \
+       pygi-callbacks.c \
+       pygi-callbacks.h \
+       pygi.h \
+       pygi-private.h \
+       pygi-property.c \
+       pygi-property.h \
+       pygi-signal-closure.c \
+       pygi-signal-closure.h \
+       pygobject-external.h \
+       gimodule.c
+
+_gi_cairo_la_CFLAGS = \
+       $(PYTHON_INCLUDES) \
+       $(GI_CFLAGS) \
+       $(PYCAIRO_CFLAGS)
+
+_gi_cairo_la_LDFLAGS = \
+       -module \
+       -avoid-version \
+       -export-symbols-regex "init_gi_cairo|PyInit__gi_cairo"
+
+_gi_cairo_la_LIBADD = \
+       $(GI_LIBS) \
+       $(PYCAIRO_LIBS)
+
+_gi_cairo_la_SOURCES = pygi-foreign-cairo.c
+pygi_LTLIBRARIES = _gi.la $(am__append_1)
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .la .lo .o .obj .so
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gi/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign gi/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-pygiLTLIBRARIES: $(pygi_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(pygidir)" || $(MKDIR_P) "$(DESTDIR)$(pygidir)"
+       @list='$(pygi_LTLIBRARIES)'; test -n "$(pygidir)" || list=; \
+       list2=; for p in $$list; do \
+         if test -f $$p; then \
+           list2="$$list2 $$p"; \
+         else :; fi; \
+       done; \
+       test -z "$$list2" || { \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pygidir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pygidir)"; \
+       }
+
+uninstall-pygiLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pygi_LTLIBRARIES)'; test -n "$(pygidir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pygidir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pygidir)/$$f"; \
+       done
+
+clean-pygiLTLIBRARIES:
+       -test -z "$(pygi_LTLIBRARIES)" || rm -f $(pygi_LTLIBRARIES)
+       @list='$(pygi_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+_gi.la: $(_gi_la_OBJECTS) $(_gi_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(_gi_la_LINK) -rpath $(pygidir) $(_gi_la_OBJECTS) $(_gi_la_LIBADD) $(LIBS)
+_gi_cairo.la: $(_gi_cairo_la_OBJECTS) $(_gi_cairo_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(_gi_cairo_la_LINK) $(am__gi_cairo_la_rpath) $(_gi_cairo_la_OBJECTS) $(_gi_cairo_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_cairo_la-pygi-foreign-cairo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-gimodule.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-argument.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-boxed.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-callbacks.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-closure.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-foreign-gvariant.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-foreign.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-info.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-invoke.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-property.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-repository.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-signal-closure.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-struct.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gi_la-pygi-type.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+
+_gi_la-pygi-repository.lo: pygi-repository.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-repository.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-repository.Tpo -c -o _gi_la-pygi-repository.lo `test -f 'pygi-repository.c' || echo '$(srcdir)/'`pygi-repository.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-repository.Tpo $(DEPDIR)/_gi_la-pygi-repository.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-repository.c' object='_gi_la-pygi-repository.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-repository.lo `test -f 'pygi-repository.c' || echo '$(srcdir)/'`pygi-repository.c
+
+_gi_la-pygi-info.lo: pygi-info.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-info.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-info.Tpo -c -o _gi_la-pygi-info.lo `test -f 'pygi-info.c' || echo '$(srcdir)/'`pygi-info.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-info.Tpo $(DEPDIR)/_gi_la-pygi-info.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-info.c' object='_gi_la-pygi-info.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-info.lo `test -f 'pygi-info.c' || echo '$(srcdir)/'`pygi-info.c
+
+_gi_la-pygi-invoke.lo: pygi-invoke.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-invoke.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-invoke.Tpo -c -o _gi_la-pygi-invoke.lo `test -f 'pygi-invoke.c' || echo '$(srcdir)/'`pygi-invoke.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-invoke.Tpo $(DEPDIR)/_gi_la-pygi-invoke.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-invoke.c' object='_gi_la-pygi-invoke.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-invoke.lo `test -f 'pygi-invoke.c' || echo '$(srcdir)/'`pygi-invoke.c
+
+_gi_la-pygi-foreign.lo: pygi-foreign.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-foreign.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-foreign.Tpo -c -o _gi_la-pygi-foreign.lo `test -f 'pygi-foreign.c' || echo '$(srcdir)/'`pygi-foreign.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-foreign.Tpo $(DEPDIR)/_gi_la-pygi-foreign.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-foreign.c' object='_gi_la-pygi-foreign.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-foreign.lo `test -f 'pygi-foreign.c' || echo '$(srcdir)/'`pygi-foreign.c
+
+_gi_la-pygi-foreign-gvariant.lo: pygi-foreign-gvariant.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-foreign-gvariant.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-foreign-gvariant.Tpo -c -o _gi_la-pygi-foreign-gvariant.lo `test -f 'pygi-foreign-gvariant.c' || echo '$(srcdir)/'`pygi-foreign-gvariant.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-foreign-gvariant.Tpo $(DEPDIR)/_gi_la-pygi-foreign-gvariant.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-foreign-gvariant.c' object='_gi_la-pygi-foreign-gvariant.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-foreign-gvariant.lo `test -f 'pygi-foreign-gvariant.c' || echo '$(srcdir)/'`pygi-foreign-gvariant.c
+
+_gi_la-pygi-struct.lo: pygi-struct.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-struct.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-struct.Tpo -c -o _gi_la-pygi-struct.lo `test -f 'pygi-struct.c' || echo '$(srcdir)/'`pygi-struct.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-struct.Tpo $(DEPDIR)/_gi_la-pygi-struct.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-struct.c' object='_gi_la-pygi-struct.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-struct.lo `test -f 'pygi-struct.c' || echo '$(srcdir)/'`pygi-struct.c
+
+_gi_la-pygi-argument.lo: pygi-argument.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-argument.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-argument.Tpo -c -o _gi_la-pygi-argument.lo `test -f 'pygi-argument.c' || echo '$(srcdir)/'`pygi-argument.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-argument.Tpo $(DEPDIR)/_gi_la-pygi-argument.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-argument.c' object='_gi_la-pygi-argument.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-argument.lo `test -f 'pygi-argument.c' || echo '$(srcdir)/'`pygi-argument.c
+
+_gi_la-pygi-type.lo: pygi-type.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-type.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-type.Tpo -c -o _gi_la-pygi-type.lo `test -f 'pygi-type.c' || echo '$(srcdir)/'`pygi-type.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-type.Tpo $(DEPDIR)/_gi_la-pygi-type.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-type.c' object='_gi_la-pygi-type.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-type.lo `test -f 'pygi-type.c' || echo '$(srcdir)/'`pygi-type.c
+
+_gi_la-pygi-boxed.lo: pygi-boxed.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-boxed.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-boxed.Tpo -c -o _gi_la-pygi-boxed.lo `test -f 'pygi-boxed.c' || echo '$(srcdir)/'`pygi-boxed.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-boxed.Tpo $(DEPDIR)/_gi_la-pygi-boxed.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-boxed.c' object='_gi_la-pygi-boxed.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-boxed.lo `test -f 'pygi-boxed.c' || echo '$(srcdir)/'`pygi-boxed.c
+
+_gi_la-pygi-closure.lo: pygi-closure.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-closure.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-closure.Tpo -c -o _gi_la-pygi-closure.lo `test -f 'pygi-closure.c' || echo '$(srcdir)/'`pygi-closure.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-closure.Tpo $(DEPDIR)/_gi_la-pygi-closure.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-closure.c' object='_gi_la-pygi-closure.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-closure.lo `test -f 'pygi-closure.c' || echo '$(srcdir)/'`pygi-closure.c
+
+_gi_la-pygi-callbacks.lo: pygi-callbacks.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-callbacks.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-callbacks.Tpo -c -o _gi_la-pygi-callbacks.lo `test -f 'pygi-callbacks.c' || echo '$(srcdir)/'`pygi-callbacks.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-callbacks.Tpo $(DEPDIR)/_gi_la-pygi-callbacks.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-callbacks.c' object='_gi_la-pygi-callbacks.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-callbacks.lo `test -f 'pygi-callbacks.c' || echo '$(srcdir)/'`pygi-callbacks.c
+
+_gi_la-pygi-property.lo: pygi-property.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-property.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-property.Tpo -c -o _gi_la-pygi-property.lo `test -f 'pygi-property.c' || echo '$(srcdir)/'`pygi-property.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-property.Tpo $(DEPDIR)/_gi_la-pygi-property.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-property.c' object='_gi_la-pygi-property.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-property.lo `test -f 'pygi-property.c' || echo '$(srcdir)/'`pygi-property.c
+
+_gi_la-pygi-signal-closure.lo: pygi-signal-closure.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-pygi-signal-closure.lo -MD -MP -MF $(DEPDIR)/_gi_la-pygi-signal-closure.Tpo -c -o _gi_la-pygi-signal-closure.lo `test -f 'pygi-signal-closure.c' || echo '$(srcdir)/'`pygi-signal-closure.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-pygi-signal-closure.Tpo $(DEPDIR)/_gi_la-pygi-signal-closure.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-signal-closure.c' object='_gi_la-pygi-signal-closure.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-pygi-signal-closure.lo `test -f 'pygi-signal-closure.c' || echo '$(srcdir)/'`pygi-signal-closure.c
+
+_gi_la-gimodule.lo: gimodule.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -MT _gi_la-gimodule.lo -MD -MP -MF $(DEPDIR)/_gi_la-gimodule.Tpo -c -o _gi_la-gimodule.lo `test -f 'gimodule.c' || echo '$(srcdir)/'`gimodule.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_la-gimodule.Tpo $(DEPDIR)/_gi_la-gimodule.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='gimodule.c' object='_gi_la-gimodule.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_la_CFLAGS) $(CFLAGS) -c -o _gi_la-gimodule.lo `test -f 'gimodule.c' || echo '$(srcdir)/'`gimodule.c
+
+_gi_cairo_la-pygi-foreign-cairo.lo: pygi-foreign-cairo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_cairo_la_CFLAGS) $(CFLAGS) -MT _gi_cairo_la-pygi-foreign-cairo.lo -MD -MP -MF $(DEPDIR)/_gi_cairo_la-pygi-foreign-cairo.Tpo -c -o _gi_cairo_la-pygi-foreign-cairo.lo `test -f 'pygi-foreign-cairo.c' || echo '$(srcdir)/'`pygi-foreign-cairo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gi_cairo_la-pygi-foreign-cairo.Tpo $(DEPDIR)/_gi_cairo_la-pygi-foreign-cairo.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygi-foreign-cairo.c' object='_gi_cairo_la-pygi-foreign-cairo.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gi_cairo_la_CFLAGS) $(CFLAGS) -c -o _gi_cairo_la-pygi-foreign-cairo.lo `test -f 'pygi-foreign-cairo.c' || echo '$(srcdir)/'`pygi-foreign-cairo.c
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-pygiPYTHON: $(pygi_PYTHON)
+       @$(NORMAL_INSTALL)
+       test -z "$(pygidir)" || $(MKDIR_P) "$(DESTDIR)$(pygidir)"
+       @list='$(pygi_PYTHON)'; dlist=; list2=; test -n "$(pygidir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+         if test -f $$b$$p; then \
+           $(am__strip_dir) \
+           dlist="$$dlist $$f"; \
+           list2="$$list2 $$b$$p"; \
+         else :; fi; \
+       done; \
+       for file in $$list2; do echo $$file; done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pygidir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pygidir)" || exit $$?; \
+       done || exit $$?; \
+       if test -n "$$dlist"; then \
+         if test -z "$(DESTDIR)"; then \
+           PYTHON=$(PYTHON) $(py_compile) --basedir "$(pygidir)" $$dlist; \
+         else \
+           PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pygidir)" $$dlist; \
+         fi; \
+       else :; fi
+
+uninstall-pygiPYTHON:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pygi_PYTHON)'; test -n "$(pygidir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       filesc=`echo "$$files" | sed 's|$$|c|'`; \
+       fileso=`echo "$$files" | sed 's|$$|o|'`; \
+       echo " ( cd '$(DESTDIR)$(pygidir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pygidir)" && rm -f $$files || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pygidir)' && rm -f" $$filesc ")"; \
+       cd "$(DESTDIR)$(pygidir)" && rm -f $$filesc || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pygidir)' && rm -f" $$fileso ")"; \
+       cd "$(DESTDIR)$(pygidir)" && rm -f $$fileso
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES) all-local
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(pygidir)" "$(DESTDIR)$(pygidir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive
+
+clean-am: clean-generic clean-libtool clean-local \
+       clean-pygiLTLIBRARIES mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-pygiLTLIBRARIES install-pygiPYTHON
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-pygiLTLIBRARIES uninstall-pygiPYTHON
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \
+       ctags-recursive install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am all-local check check-am check-local clean \
+       clean-generic clean-libtool clean-local clean-pygiLTLIBRARIES \
+       ctags ctags-recursive distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am \
+       install-pygiLTLIBRARIES install-pygiPYTHON install-strip \
+       installcheck installcheck-am installdirs installdirs-am \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+       uninstall-pygiLTLIBRARIES uninstall-pygiPYTHON
+
+
+# This is to ensure we have a symlink to the .so in the
+# build directory, which the Python interpreter can load
+# directly without having to know how to parse .la files.
+.la.so:
+       test -L $@ || $(LN_S) .libs/$@ $@
+
+all-local: $(LTLIBRARIES:.la=.so)
+check-local: $(LTLIBRARIES:.la=.so)
+clean-local:
+       rm -f $(LTLIBRARIES:.la=.so)
+
+-include $(top_srcdir)/git.mk
+
+# 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:
diff --git a/gi/__init__.py b/gi/__init__.py
new file mode 100644 (file)
index 0000000..314d579
--- /dev/null
@@ -0,0 +1,55 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+#
+# Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+#
+# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+from __future__ import absolute_import
+
+from ._gi import _API, Repository
+
+# Force loading the GObject typelib so we have available the wrappers for
+# base classes such as GInitiallyUnowned
+from gi.repository import GObject
+
+_versions = {}
+
+def require_version(namespace, version):
+    repository = Repository.get_default()
+
+    if namespace in repository.get_loaded_namespaces():
+        loaded_version = repository.get_version(namespace)
+        if loaded_version != version:
+            raise ValueError('Namespace %s is already loaded with version %s' % \
+                             (namespace, loaded_version))
+
+    if namespace in _versions and _versions[namespace] != version:
+        raise ValueError('Namespace %s already requires version %s' % \
+                         (namespace, _versions[namespace]))
+
+    available_versions = repository.enumerate_versions(namespace)
+    if not available_versions:
+        raise ValueError('Namespace %s not available' % namespace)
+
+    if version not in available_versions:
+        raise ValueError('Namespace %s not available for version %s' % \
+                         (namespace, version))
+
+    _versions[namespace] = version
+
+def get_required_version(namespace):
+    return _versions.get(namespace, None)
diff --git a/gi/gimodule.c b/gi/gimodule.c
new file mode 100644 (file)
index 0000000..5ef166f
--- /dev/null
@@ -0,0 +1,531 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+ *
+ *   gimodule.c: wrapper for the gobject-introspection 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+ * USA
+ */
+
+#include "pygi-private.h"
+#include "pygi.h"
+
+#include <pygobject.h>
+#include <pyglib-python-compat.h>
+
+static PyObject *
+_wrap_pyg_enum_add (PyObject *self,
+                    PyObject *args,
+                    PyObject *kwargs)
+{
+    static char *kwlist[] = { "g_type", NULL };
+    PyObject *py_g_type;
+    GType g_type;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+                                      "O!:enum_add",
+                                      kwlist, &PyGTypeWrapper_Type, &py_g_type)) {
+        return NULL;
+    }
+
+    g_type = pyg_type_from_object (py_g_type);
+    if (g_type == G_TYPE_INVALID) {
+        return NULL;
+    }
+
+    return pyg_enum_add (NULL, g_type_name (g_type), NULL, g_type);
+}
+
+static PyObject *
+_wrap_pyg_enum_register_new_gtype_and_add (PyObject *self,
+                                           PyObject *args,
+                                           PyObject *kwargs)
+{
+    static char *kwlist[] = { "info", NULL };
+    PyGIBaseInfo *py_info;
+    GIEnumInfo *info;
+    gint n_values;
+    GEnumValue *g_enum_values;
+    GType g_type;
+    const gchar *type_name;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+                                      "O:enum_add_make_new_gtype",
+                                      kwlist, (PyObject *)&py_info)) {
+        return NULL;
+    }
+
+    if (!GI_IS_ENUM_INFO (py_info->info) ||
+            g_base_info_get_type ((GIBaseInfo *) py_info->info) != GI_INFO_TYPE_ENUM) {
+        PyErr_SetString (PyExc_TypeError, "info must be an EnumInfo with info type GI_INFO_TYPE_ENUM");
+        return NULL;
+    }
+
+    info = (GIEnumInfo *)py_info->info;
+    n_values = g_enum_info_get_n_values (info);
+    g_enum_values = g_new0 (GEnumValue, n_values + 1);
+
+    for (int i=0; i < n_values; i++) {
+        GIValueInfo *value_info;
+        GEnumValue *enum_value;
+        const gchar *name;
+        const gchar *c_identifier;
+
+        value_info = g_enum_info_get_value (info, i);
+        name = g_base_info_get_name ((GIBaseInfo *) value_info);
+        c_identifier = g_base_info_get_attribute ((GIBaseInfo *) value_info,
+                                                  "c:identifier");
+
+        enum_value = &g_enum_values[i];
+        enum_value->value_nick = g_strdup (name);
+        enum_value->value = g_value_info_get_value (value_info);
+
+        if (c_identifier == NULL) {
+            enum_value->value_name = enum_value->value_nick;
+        } else {
+            enum_value->value_name = g_strdup (c_identifier);
+        }
+
+        g_base_info_unref ((GIBaseInfo *) value_info);
+    }
+
+    g_enum_values[n_values].value = 0;
+    g_enum_values[n_values].value_nick = NULL;
+    g_enum_values[n_values].value_name = NULL;
+
+    type_name = g_base_info_get_name ((GIBaseInfo *) info);
+    type_name = g_strdup (type_name);
+    g_type = g_enum_register_static (type_name, g_enum_values);
+
+    return pyg_enum_add (NULL, g_type_name (g_type), NULL, g_type);
+}
+
+static PyObject *
+_wrap_pyg_flags_add (PyObject *self,
+                     PyObject *args,
+                     PyObject *kwargs)
+{
+    static char *kwlist[] = { "g_type", NULL };
+    PyObject *py_g_type;
+    GType g_type;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+                                      "O!:flags_add",
+                                      kwlist, &PyGTypeWrapper_Type, &py_g_type)) {
+        return NULL;
+    }
+
+    g_type = pyg_type_from_object (py_g_type);
+    if (g_type == G_TYPE_INVALID) {
+        return NULL;
+    }
+
+    return pyg_flags_add (NULL, g_type_name (g_type), NULL, g_type);
+}
+
+static PyObject *
+_wrap_pyg_flags_register_new_gtype_and_add (PyObject *self,
+                                            PyObject *args,
+                                            PyObject *kwargs)
+{
+    static char *kwlist[] = { "info", NULL };
+    PyGIBaseInfo *py_info;
+    GIEnumInfo *info;
+    gint n_values;
+    GFlagsValue *g_flags_values;
+    GType g_type;
+    const gchar *type_name;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+                                      "O:flags_add_make_new_gtype",
+                                      kwlist, (PyObject *)&py_info)) {
+        return NULL;
+    }
+
+    if (!GI_IS_ENUM_INFO (py_info->info) ||
+            g_base_info_get_type ((GIBaseInfo *) py_info->info) != GI_INFO_TYPE_FLAGS) {
+        PyErr_SetString (PyExc_TypeError, "info must be an EnumInfo with info type GI_INFO_TYPE_FLAGS");
+        return NULL;
+    }
+
+    info = (GIEnumInfo *)py_info->info;
+    n_values = g_enum_info_get_n_values (info);
+    g_flags_values = g_new0 (GFlagsValue, n_values + 1);
+
+    for (int i=0; i < n_values; i++) {
+        GIValueInfo *value_info;
+        GFlagsValue *flags_value;
+        const gchar *name;
+        const gchar *c_identifier;
+
+        value_info = g_enum_info_get_value (info, i);
+        name = g_base_info_get_name ((GIBaseInfo *) value_info);
+        c_identifier = g_base_info_get_attribute ((GIBaseInfo *) value_info,
+                                                  "c:identifier");
+
+        flags_value = &g_flags_values[i];
+        flags_value->value_nick = g_strdup (name);
+        flags_value->value = g_value_info_get_value (value_info);
+
+        if (c_identifier == NULL) {
+            flags_value->value_name = flags_value->value_nick;
+        } else {
+            flags_value->value_name = g_strdup (c_identifier);
+        }
+
+        g_base_info_unref ((GIBaseInfo *) value_info);
+    }
+
+    g_flags_values[n_values].value = 0;
+    g_flags_values[n_values].value_nick = NULL;
+    g_flags_values[n_values].value_name = NULL;
+
+    type_name = g_base_info_get_name ((GIBaseInfo *) info);
+    type_name = g_strdup (type_name);
+    g_type = g_flags_register_static (type_name, g_flags_values);
+
+    return pyg_flags_add (NULL, g_type_name (g_type), NULL, g_type);
+}
+
+
+static PyObject *
+_wrap_pyg_set_object_has_new_constructor (PyObject *self,
+                                          PyObject *args,
+                                          PyObject *kwargs)
+{
+    static char *kwlist[] = { "g_type", NULL };
+    PyObject *py_g_type;
+    GType g_type;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+                                      "O!:set_object_has_new_constructor",
+                                      kwlist, &PyGTypeWrapper_Type, &py_g_type)) {
+        return NULL;
+    }
+
+    g_type = pyg_type_from_object (py_g_type);
+    if (!g_type_is_a (g_type, G_TYPE_OBJECT)) {
+        PyErr_SetString (PyExc_TypeError, "must be a subtype of GObject");
+        return NULL;
+    }
+
+    pyg_set_object_has_new_constructor (g_type);
+
+    Py_RETURN_NONE;
+}
+
+static void
+initialize_interface (GTypeInterface *iface, PyTypeObject *pytype)
+{
+    // pygobject prints a warning if interface_init is NULL
+}
+
+static PyObject *
+_wrap_pyg_register_interface_info (PyObject *self, PyObject *args)
+{
+    PyObject *py_g_type;
+    GType g_type;
+    GInterfaceInfo *info;
+
+    if (!PyArg_ParseTuple (args, "O!:register_interface_info",
+                           &PyGTypeWrapper_Type, &py_g_type)) {
+        return NULL;
+    }
+
+    g_type = pyg_type_from_object (py_g_type);
+    if (!g_type_is_a (g_type, G_TYPE_INTERFACE)) {
+        PyErr_SetString (PyExc_TypeError, "must be an interface");
+        return NULL;
+    }
+
+    info = g_new0 (GInterfaceInfo, 1);
+    info->interface_init = (GInterfaceInitFunc) initialize_interface;
+
+    pyg_register_interface_info (g_type, info);
+
+    Py_RETURN_NONE;
+}
+
+static void
+find_vfunc_info (GIBaseInfo *vfunc_info,
+                 GType implementor_gtype,
+                 gpointer *implementor_class_ret,
+                 gpointer *implementor_vtable_ret,
+                 GIFieldInfo **field_info_ret)
+{
+    GType ancestor_g_type = 0;
+    int length, i;
+    GIBaseInfo *ancestor_info;
+    GIStructInfo *struct_info;
+    gpointer implementor_class = NULL;
+    gboolean is_interface = FALSE;
+
+    ancestor_info = g_base_info_get_container (vfunc_info);
+    is_interface = g_base_info_get_type (ancestor_info) == GI_INFO_TYPE_INTERFACE;
+
+    ancestor_g_type = g_registered_type_info_get_g_type (
+                          (GIRegisteredTypeInfo *) ancestor_info);
+    implementor_class = g_type_class_ref (implementor_gtype);
+    if (is_interface) {
+        GTypeInstance *implementor_iface_class;
+        implementor_iface_class = g_type_interface_peek (implementor_class,
+                                                         ancestor_g_type);
+        if (implementor_iface_class == NULL) {
+            g_type_class_unref (implementor_class);
+            PyErr_Format (PyExc_RuntimeError,
+                          "Couldn't find GType of implementor of interface %s. "
+                          "Forgot to set __gtype_name__?",
+                          g_type_name (ancestor_g_type));
+            return;
+        }
+
+        *implementor_vtable_ret = implementor_iface_class;
+
+        struct_info = g_interface_info_get_iface_struct ( (GIInterfaceInfo*) ancestor_info);
+    } else {
+        struct_info = g_object_info_get_class_struct ( (GIObjectInfo*) ancestor_info);
+        *implementor_vtable_ret = implementor_class;
+    }
+
+    *implementor_class_ret = implementor_class;
+
+    length = g_struct_info_get_n_fields (struct_info);
+    for (i = 0; i < length; i++) {
+        GIFieldInfo *field_info;
+        GITypeInfo *type_info;
+
+        field_info = g_struct_info_get_field (struct_info, i);
+
+        if (strcmp (g_base_info_get_name ( (GIBaseInfo*) field_info),
+                    g_base_info_get_name ( (GIBaseInfo*) vfunc_info)) != 0) {
+            g_base_info_unref (field_info);
+            continue;
+        }
+
+        type_info = g_field_info_get_type (field_info);
+        if (g_type_info_get_tag (type_info) == GI_TYPE_TAG_INTERFACE) {
+            g_base_info_unref (type_info);
+            *field_info_ret = field_info;
+            break;
+        }
+
+        g_base_info_unref (type_info);
+        g_base_info_unref (field_info);
+    }
+
+    g_base_info_unref (struct_info);
+}
+
+static PyObject *
+_wrap_pyg_hook_up_vfunc_implementation (PyObject *self, PyObject *args)
+{
+    PyGIBaseInfo *py_info;
+    PyObject *py_type;
+    PyObject *py_function;
+    GType implementor_gtype = 0;
+    gpointer implementor_class = NULL;
+    gpointer implementor_vtable = NULL;
+    GIFieldInfo *field_info = NULL;
+    gpointer *method_ptr = NULL;
+    PyGICClosure *closure = NULL;
+
+    if (!PyArg_ParseTuple (args, "O!O!O:hook_up_vfunc_implementation",
+                           &PyGIBaseInfo_Type, &py_info,
+                           &PyGTypeWrapper_Type, &py_type,
+                           &py_function))
+        return NULL;
+
+    implementor_gtype = pyg_type_from_object (py_type);
+    g_assert (G_TYPE_IS_CLASSED (implementor_gtype));
+
+    find_vfunc_info (py_info->info, implementor_gtype, &implementor_class, &implementor_vtable, &field_info);
+    if (field_info != NULL) {
+        GITypeInfo *type_info;
+        GIBaseInfo *interface_info;
+        GICallbackInfo *callback_info;
+        gint offset;
+
+        type_info = g_field_info_get_type (field_info);
+
+        interface_info = g_type_info_get_interface (type_info);
+        g_assert (g_base_info_get_type (interface_info) == GI_INFO_TYPE_CALLBACK);
+
+        callback_info = (GICallbackInfo*) interface_info;
+        offset = g_field_info_get_offset (field_info);
+        method_ptr = G_STRUCT_MEMBER_P (implementor_vtable, offset);
+
+        closure = _pygi_make_native_closure ( (GICallableInfo*) callback_info,
+                                              GI_SCOPE_TYPE_NOTIFIED, py_function, NULL);
+
+        *method_ptr = closure->closure;
+
+        g_base_info_unref (interface_info);
+        g_base_info_unref (type_info);
+        g_base_info_unref (field_info);
+    }
+    g_type_class_unref (implementor_class);
+
+    Py_RETURN_NONE;
+}
+
+#if 0
+/* Not used, left around for future reference */
+static PyObject *
+_wrap_pyg_has_vfunc_implementation (PyObject *self, PyObject *args)
+{
+    PyGIBaseInfo *py_info;
+    PyObject *py_type;
+    PyObject *py_ret;
+    gpointer implementor_class = NULL;
+    gpointer implementor_vtable = NULL;
+    GType implementor_gtype = 0;
+    GIFieldInfo *field_info = NULL;
+
+    if (!PyArg_ParseTuple (args, "O!O!:has_vfunc_implementation",
+                           &PyGIBaseInfo_Type, &py_info,
+                           &PyGTypeWrapper_Type, &py_type))
+        return NULL;
+
+    implementor_gtype = pyg_type_from_object (py_type);
+    g_assert (G_TYPE_IS_CLASSED (implementor_gtype));
+
+    py_ret = Py_False;
+    find_vfunc_info (py_info->info, implementor_gtype, &implementor_class, &implementor_vtable, &field_info);
+    if (field_info != NULL) {
+        gpointer *method_ptr;
+        gint offset;
+
+        offset = g_field_info_get_offset (field_info);
+        method_ptr = G_STRUCT_MEMBER_P (implementor_vtable, offset);
+        if (*method_ptr != NULL) {
+            py_ret = Py_True;
+        }
+
+        g_base_info_unref (field_info);
+    }
+    g_type_class_unref (implementor_class);
+
+    Py_INCREF(py_ret);
+    return py_ret;
+}
+#endif
+
+static PyObject *
+_wrap_pyg_variant_new_tuple (PyObject *self, PyObject *args)
+{
+    PyObject *py_values;
+    GVariant **values = NULL;
+    GVariant *variant = NULL;
+    PyObject *py_variant = NULL;
+    PyObject *py_type;
+    gssize i;
+
+    if (!PyArg_ParseTuple (args, "O!:variant_new_tuple",
+                           &PyTuple_Type, &py_values)) {
+        return NULL;
+    }
+
+    py_type = _pygi_type_import_by_name ("GLib", "Variant");
+
+    values = g_newa (GVariant*, PyTuple_Size (py_values));
+
+    for (i = 0; i < PyTuple_Size (py_values); i++) {
+        PyObject *value = PyTuple_GET_ITEM (py_values, i);
+
+        if (!PyObject_IsInstance (value, py_type)) {
+            PyErr_Format (PyExc_TypeError, "argument %" G_GSSIZE_FORMAT " is not a GLib.Variant", i);
+            return NULL;
+        }
+
+        values[i] = (GVariant *) ( (PyGPointer *) value)->pointer;
+    }
+
+    variant = g_variant_new_tuple (values, PyTuple_Size (py_values));
+
+    py_variant = _pygi_struct_new ( (PyTypeObject *) py_type, variant, FALSE);
+
+    return py_variant;
+}
+
+static PyObject *
+_wrap_pyg_variant_type_from_string (PyObject *self, PyObject *args)
+{
+    char *type_string;
+    PyObject *py_type;
+    PyObject *py_variant = NULL;
+
+    if (!PyArg_ParseTuple (args, "s:variant_type_from_string",
+                           &type_string)) {
+        return NULL;
+    }
+
+    py_type = _pygi_type_import_by_name ("GLib", "VariantType");
+
+    if (PyType_IsSubtype (py_type, &PyGIBoxed_Type))
+        py_variant = _pygi_boxed_new ( (PyTypeObject *) py_type, type_string, FALSE);
+    else
+        py_variant = _pygi_struct_new ( (PyTypeObject *) py_type, type_string, FALSE);
+    return py_variant;
+}
+
+static PyMethodDef _gi_functions[] = {
+    { "enum_add", (PyCFunction) _wrap_pyg_enum_add, METH_VARARGS | METH_KEYWORDS },
+    { "enum_register_new_gtype_and_add", (PyCFunction) _wrap_pyg_enum_register_new_gtype_and_add, METH_VARARGS | METH_KEYWORDS },
+    { "flags_add", (PyCFunction) _wrap_pyg_flags_add, METH_VARARGS | METH_KEYWORDS },
+    { "flags_register_new_gtype_and_add", (PyCFunction) _wrap_pyg_flags_register_new_gtype_and_add, METH_VARARGS | METH_KEYWORDS },
+
+    { "set_object_has_new_constructor", (PyCFunction) _wrap_pyg_set_object_has_new_constructor, METH_VARARGS | METH_KEYWORDS },
+    { "register_interface_info", (PyCFunction) _wrap_pyg_register_interface_info, METH_VARARGS },
+    { "hook_up_vfunc_implementation", (PyCFunction) _wrap_pyg_hook_up_vfunc_implementation, METH_VARARGS },
+    { "variant_new_tuple", (PyCFunction) _wrap_pyg_variant_new_tuple, METH_VARARGS },
+    { "variant_type_from_string", (PyCFunction) _wrap_pyg_variant_type_from_string, METH_VARARGS },
+    { NULL, NULL, 0 }
+};
+
+static struct PyGI_API CAPI = {
+  pygi_type_import_by_g_type_real,
+  pygi_get_property_value_real,
+  pygi_set_property_value_real,
+  pygi_signal_closure_new_real,
+  pygi_register_foreign_struct_real,
+};
+
+PYGLIB_MODULE_START(_gi, "_gi")
+{
+    PyObject *api;
+
+    if (pygobject_init (-1, -1, -1) == NULL) {
+        return PYGLIB_MODULE_ERROR_RETURN;
+    }
+
+    if (_pygobject_import() < 0) {
+        return PYGLIB_MODULE_ERROR_RETURN;
+    }
+
+    _pygi_repository_register_types (module);
+    _pygi_info_register_types (module);
+    _pygi_struct_register_types (module);
+    _pygi_boxed_register_types (module);
+    _pygi_argument_init();
+
+    api = PYGLIB_CPointer_WrapPointer ( (void *) &CAPI, "gi._API");
+    if (api == NULL) {
+        return PYGLIB_MODULE_ERROR_RETURN;
+    }
+    PyModule_AddObject (module, "_API", api);
+}
+PYGLIB_MODULE_END
diff --git a/gi/importer.py b/gi/importer.py
new file mode 100644 (file)
index 0000000..df08274
--- /dev/null
@@ -0,0 +1,79 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+#
+# Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+#
+#   importer.py: dynamic importer for introspected libraries.
+#
+# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+from __future__ import absolute_import
+import logging
+import sys
+
+import gobject
+
+from ._gi import Repository, RepositoryError
+from .module import DynamicModule, DynamicGObjectModule
+
+
+repository = Repository.get_default()
+modules = {}
+
+
+class DynamicImporter(object):
+
+    # Note: see PEP302 for the Importer Protocol implemented below.
+
+    def __init__(self, path):
+        self.path = path
+
+    def find_module(self, fullname, path=None):
+        if not fullname.startswith(self.path):
+            return
+
+        path, namespace = fullname.rsplit('.', 1)
+        if path != self.path:
+            return
+
+        if not repository.enumerate_versions(namespace):
+            logging.error('Could not find any typelib for %s', namespace)
+            return None
+        else:
+            return self
+
+    def load_module(self, fullname):
+        if fullname in sys.modules:
+            return sys.modules[fullname]
+
+        path, namespace = fullname.rsplit('.', 1)
+
+        # Workaround for GObject
+        if namespace == 'GObject':
+            sys.modules[fullname] = DynamicGObjectModule()
+            return sys.modules[fullname]
+
+        dynamic_module = DynamicModule(namespace)
+        modules[namespace] = dynamic_module
+
+        dynamic_module.__file__ = '<%s>' % fullname
+        dynamic_module.__loader__ = self
+
+        sys.modules[fullname] = dynamic_module
+        dynamic_module._load()
+
+        return dynamic_module
+
diff --git a/gi/module.py b/gi/module.py
new file mode 100644 (file)
index 0000000..70df76c
--- /dev/null
@@ -0,0 +1,287 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+#
+# Copyright (C) 2007-2009 Johan Dahlin <johan@gnome.org>
+#
+#   module.py: dynamic module for introspected libraries.
+#
+# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+from __future__ import absolute_import
+
+import os
+import gobject
+import string
+
+import gi
+from .overrides import registry
+
+from ._gi import \
+    Repository, \
+    FunctionInfo, \
+    RegisteredTypeInfo, \
+    EnumInfo, \
+    ObjectInfo, \
+    InterfaceInfo, \
+    ConstantInfo, \
+    StructInfo, \
+    UnionInfo, \
+    Struct, \
+    Boxed, \
+    enum_add, \
+    enum_register_new_gtype_and_add, \
+    flags_add, \
+    flags_register_new_gtype_and_add
+from .types import \
+    GObjectMeta, \
+    StructMeta, \
+    Function
+
+repository = Repository.get_default()
+
+def get_parent_for_object(object_info):
+    parent_object_info = object_info.get_parent()
+
+    if not parent_object_info:
+        return object
+
+    namespace = parent_object_info.get_namespace()
+    name = parent_object_info.get_name()
+
+    # Workaround for GObject.Object and GObject.InitiallyUnowned.
+    if namespace == 'GObject' and name == 'Object' or name == 'InitiallyUnowned':
+        return gobject.GObject
+
+    module = __import__('gi.repository.%s' % namespace, fromlist=[name])
+    return getattr(module, name)
+
+
+def get_interfaces_for_object(object_info):
+    interfaces = []
+    for interface_info in object_info.get_interfaces():
+        namespace = interface_info.get_namespace()
+        name = interface_info.get_name()
+
+        module = __import__('gi.repository.%s' % namespace, fromlist=[name])
+        interfaces.append(getattr(module, name))
+    return interfaces
+
+
+class IntrospectionModule(object):
+
+    def __init__(self, namespace, version=None):
+        repository.require(namespace, version)
+        self._namespace = namespace
+        self._version = version
+        self.__name__ = 'gi.repository.' + namespace
+
+        repository.require(self._namespace, self._version)
+        self.__path__ = repository.get_typelib_path(self._namespace)
+
+        if self._version is None:
+            self._version = repository.get_version(self._namespace)
+
+    def __getattr__(self, name):
+        info = repository.find_by_name(self._namespace, name)
+        if not info:
+            raise AttributeError("%r object has no attribute %r" % (
+                    self.__name__, name))
+
+        if isinstance(info, EnumInfo):
+            g_type = info.get_g_type()
+            wrapper = g_type.pytype
+
+            if wrapper is None:
+                if info.is_flags():
+                    if g_type.is_a(gobject.TYPE_FLAGS):
+                        wrapper = flags_add(g_type)
+                    else:
+                        assert g_type == gobject.TYPE_NONE
+                        wrapper = flags_register_new_gtype_and_add(info)
+                else:
+                    if g_type.is_a(gobject.TYPE_ENUM):
+                        wrapper = enum_add(g_type)
+                    else:
+                        assert g_type == gobject.TYPE_NONE
+                        wrapper = enum_register_new_gtype_and_add(info)
+
+                wrapper.__info__ = info
+                wrapper.__module__ = 'gi.repository.' + info.get_namespace()
+
+                # Don't use upper() here to avoid locale specific
+                # identifier conversion (e. g. in Turkish 'i'.upper() == 'i')
+                # see https://bugzilla.gnome.org/show_bug.cgi?id=649165
+                ascii_upper_trans = string.maketrans(
+                        'abcdefgjhijklmnopqrstuvwxyz', 
+                        'ABCDEFGJHIJKLMNOPQRSTUVWXYZ')
+                for value_info in info.get_values():
+                    value_name = value_info.get_name().translate(ascii_upper_trans)
+                    setattr(wrapper, value_name, wrapper(value_info.get_value()))
+
+            if g_type != gobject.TYPE_NONE:
+                g_type.pytype = wrapper
+
+        elif isinstance(info, RegisteredTypeInfo):
+            g_type = info.get_g_type()
+
+            # Check if there is already a Python wrapper.
+            if g_type != gobject.TYPE_NONE:
+                type_ = g_type.pytype
+                if type_ is not None:
+                    self.__dict__[name] = type_
+                    return type_
+
+            # Create a wrapper.
+            if isinstance(info, ObjectInfo):
+                parent = get_parent_for_object(info)
+                interfaces = tuple(interface for interface in get_interfaces_for_object(info)
+                        if not issubclass(parent, interface))
+                bases = (parent,) + interfaces
+                metaclass = GObjectMeta
+            elif isinstance(info, InterfaceInfo):
+                bases = (gobject.GInterface,)
+                metaclass = GObjectMeta
+            elif isinstance(info, (StructInfo, UnionInfo)):
+                if g_type.is_a(gobject.TYPE_BOXED):
+                    bases = (Boxed,)
+                elif g_type.is_a(gobject.TYPE_POINTER) or \
+                     g_type == gobject.TYPE_NONE or \
+                     g_type.fundamental == g_type:
+                    bases = (Struct,)
+                else:
+                    raise TypeError("unable to create a wrapper for %s.%s" % (info.get_namespace(), info.get_name()))
+                metaclass = StructMeta
+            else:
+                raise NotImplementedError(info)
+
+            name = info.get_name()
+            dict_ = {
+                '__info__': info,
+                '__module__': 'gi.repository.' + self._namespace,
+                '__gtype__': g_type
+            }
+            wrapper = metaclass(name, bases, dict_)
+
+            # Register the new Python wrapper.
+            if g_type != gobject.TYPE_NONE:
+                g_type.pytype = wrapper
+
+        elif isinstance(info, FunctionInfo):
+            wrapper = Function(info)
+        elif isinstance(info, ConstantInfo):
+            wrapper = info.get_value()
+        else:
+            raise NotImplementedError(info)
+
+        self.__dict__[name] = wrapper
+        return wrapper
+
+    def __repr__(self):
+        path = repository.get_typelib_path(self._namespace)
+        return "<IntrospectionModule %r from %r>" % (self._namespace, path)
+
+    def __dir__ (self):
+        # Python's default dir() is just dir(self.__class__) + self.__dict__.keys()
+        result = set(dir(self.__class__))
+        result.update(self.__dict__.keys())
+
+        # update *set* because some repository attributes have already been
+        # wrapped by __getattr__() and included in self.__dict__
+        namespace_infos = repository.get_infos(self._namespace)
+        result.update(info.get_name() for info in namespace_infos)
+
+        return list(result)
+
+
+class DynamicGObjectModule(IntrospectionModule):
+    """Wrapper for the GObject module
+
+    This class allows us to access both the static PyGObject module and the GI GObject module
+    through the same interface.  It is returned when by importing GObject from the gi repository:
+
+    from gi.repository import GObject
+
+    We use this because some PyGI interfaces generated from the GIR require GObject types not wrapped
+    by the static bindings.  This also allows access to module attributes in a way that is more
+    familiar to GI application developers.  Take signal flags as an example.  The G_SIGNAL_RUN_FIRST
+    flag would be accessed as GObject.SIGNAL_RUN_FIRST in the static bindings but in the dynamic bindings
+    can be accessed as GObject.SignalFlags.RUN_FIRST.  The latter follows a GI naming convention which
+    would be familiar to GI application developers in a number of languages.
+    """
+
+    def __init__(self):
+        IntrospectionModule.__init__(self, namespace='GObject')
+
+    def __getattr__(self, name):
+        # first see if this attr is in the gobject module
+        attr = getattr(gobject, name, None)
+
+        # if not in module assume request for an attr exported through GI
+        if attr is None:
+            attr = super(DynamicGObjectModule, self).__getattr__(name)
+
+        return attr
+
+
+class DynamicModule(object):
+    def __init__(self, namespace):
+        self._namespace = namespace
+        self._introspection_module = None
+        self._overrides_module = None
+        self.__path__ = None
+
+    def _load(self):
+        version = gi.get_required_version(self._namespace)
+        self._introspection_module = IntrospectionModule(self._namespace,
+                                                         version)
+
+        overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
+        self._overrides_module = getattr(overrides_modules, self._namespace, None)
+        self.__path__ = repository.get_typelib_path(self._namespace)
+
+    def __getattr__(self, name):
+        if self._overrides_module is not None:
+            override_exports = getattr(self._overrides_module, '__all__', ())
+            if name in override_exports:
+                return getattr(self._overrides_module, name, None)
+        else:
+            # check the registry just in case the module hasn't loaded yet
+            # TODO: Only gtypes are registered in the registry right now 
+            #       but it would be nice to register all overrides and 
+            #       get rid of the module imports. We might actually see a 
+            #       speedup.
+            key = '%s.%s' % (self._namespace, name)
+            if key in registry:
+                return registry[key]
+
+        return getattr(self._introspection_module, name)
+
+    def __dir__ (self):
+        # Python's default dir() is just dir(self.__class__) + self.__dict__.keys()
+        result = set(dir(self.__class__))
+        result.update(self.__dict__.keys())
+        
+        result.update(dir(self._introspection_module))
+        override_exports = getattr(self._overrides_module, '__all__', ())
+        result.update(override_exports)
+        return list(result)
+
+    def __repr__(self):
+        path = repository.get_typelib_path(self._namespace)
+        return "<%s.%s %r from %r>" % (self.__class__.__module__,
+                                      self.__class__.__name__,
+                                      self._namespace,
+                                      path)
diff --git a/gi/overrides/GIMarshallingTests.py b/gi/overrides/GIMarshallingTests.py
new file mode 100644 (file)
index 0000000..aac8883
--- /dev/null
@@ -0,0 +1,67 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+#
+# Copyright (C) 2010 Simon van der Linden <svdlinden@src.gnome.org>
+#
+# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+from ..overrides import override
+from ..importer import modules
+
+GIMarshallingTests = modules['GIMarshallingTests']._introspection_module
+
+__all__ = []
+
+OVERRIDES_CONSTANT = 7
+__all__.append('OVERRIDES_CONSTANT')
+
+class OverridesStruct(GIMarshallingTests.OverridesStruct):
+
+    def __new__(cls, long_):
+        return GIMarshallingTests.OverridesStruct.__new__(cls)
+
+    def __init__(self, long_):
+        GIMarshallingTests.OverridesStruct.__init__(self)
+        self.long_ = long_
+
+    def method(self):
+        return GIMarshallingTests.OverridesStruct.method(self) / 7
+
+OverridesStruct = override(OverridesStruct)
+__all__.append('OverridesStruct')
+
+class OverridesObject(GIMarshallingTests.OverridesObject):
+
+    def __new__(cls, long_):
+        return GIMarshallingTests.OverridesObject.__new__(cls)
+
+    def __init__(self, long_):
+        GIMarshallingTests.OverridesObject.__init__(self)
+        # FIXME: doesn't work yet
+        #self.long_ = long_
+
+    @classmethod
+    def new(cls, long_):
+        self = GIMarshallingTests.OverridesObject.new()
+        # FIXME: doesn't work yet
+        #self.long_ = long_
+        return self
+
+    def method(self):
+        return GIMarshallingTests.OverridesObject.method(self) / 7
+
+OverridesObject = override(OverridesObject)
+__all__.append('OverridesObject')
diff --git a/gi/overrides/GLib.py b/gi/overrides/GLib.py
new file mode 100644 (file)
index 0000000..2caf205
--- /dev/null
@@ -0,0 +1,303 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+#
+# Copyright (C) 2010 Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
+#
+# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+from ..importer import modules
+from .._gi import variant_new_tuple, variant_type_from_string
+
+GLib = modules['GLib']._introspection_module
+
+__all__ = []
+
+def _create_variant(value):
+    '''Create a variant containing the variant "value".
+    
+    This is usually done with the GLib.Variant.new_variant() leaf
+    constructor, but this is currently broken, see GNOME#639952.
+    '''
+    builder = GLib.VariantBuilder()
+    builder.init(variant_type_from_string('v'))
+    builder.add_value(value)
+    return builder.end()
+
+class _VariantCreator(object):
+
+    _LEAF_CONSTRUCTORS = {
+        'b': GLib.Variant.new_boolean,
+        'y': GLib.Variant.new_byte,
+        'n': GLib.Variant.new_int16,
+        'q': GLib.Variant.new_uint16,
+        'i': GLib.Variant.new_int32,
+        'u': GLib.Variant.new_uint32,
+        'x': GLib.Variant.new_int64,
+        't': GLib.Variant.new_uint64,
+        'h': GLib.Variant.new_handle,
+        'd': GLib.Variant.new_double,
+        's': GLib.Variant.new_string,
+        'o': GLib.Variant.new_object_path,
+        'g': GLib.Variant.new_signature,
+        #'v': GLib.Variant.new_variant,
+        'v': _create_variant,
+    }
+
+    def _create(self, format, args):
+        '''Create a GVariant object from given format and argument list.
+
+        This method recursively calls itself for complex structures (arrays,
+        dictionaries, boxed).
+
+        Return a tuple (variant, rest_format, rest_args) with the generated
+        GVariant, the remainder of the format string, and the remainder of the
+        arguments.
+
+        If args is None, then this won't actually consume any arguments, and
+        just parse the format string and generate empty GVariant structures.
+        This is required for creating empty dictionaries or arrays.
+        '''
+        # leaves (simple types)
+        constructor = self._LEAF_CONSTRUCTORS.get(format[0])
+        if constructor:
+            if args is not None:
+                if not args:
+                    raise TypeError('not enough arguments for GVariant format string')
+                v = constructor(args[0])
+                return (v, format[1:], args[1:])
+            else:
+                return (None, format[1:], None)
+
+        if format[0] == '(':
+            return self._create_tuple(format, args)
+
+        if format.startswith('a{'):
+            return self._create_dict(format, args)
+
+        if format[0] == 'a':
+            return self._create_array(format, args)
+
+        raise NotImplementedError('cannot handle GVariant type ' + format)
+
+    def _create_tuple(self, format, args):
+        '''Handle the case where the outermost type of format is a tuple.'''
+
+        format = format[1:] # eat the '('
+        builder = GLib.VariantBuilder()
+        builder.init(variant_type_from_string('r'))
+        if args is not None:
+            if not args or type(args[0]) != type(()):
+                raise (TypeError, 'expected tuple argument')
+
+            for i in range(len(args[0])):
+                if format.startswith(')'):
+                    raise (TypeError, 'too many arguments for tuple signature')
+
+                (v, format, _) = self._create(format, args[0][i:])
+                builder.add_value(v)
+            args = args[1:]
+        return (builder.end(), format[1:], args)
+
+    def _create_dict(self, format, args):
+        '''Handle the case where the outermost type of format is a dict.'''
+
+        builder = GLib.VariantBuilder()
+        if args is None or not args[0]:
+            # empty value: we need to call _create() to parse the subtype,
+            # and specify the element type precisely
+            rest_format = self._create(format[2:], None)[1]
+            rest_format = self._create(rest_format, None)[1]
+            if not rest_format.startswith('}'):
+                raise ValueError('dictionary type string not closed with }')
+            rest_format = rest_format[1:] # eat the }
+            element_type = format[:len(format) - len(rest_format)]
+            builder.init(variant_type_from_string(element_type))
+        else:
+            builder.init(variant_type_from_string('a{?*}'))
+            for k, v in args[0].items():
+                (key_v, rest_format, _) = self._create(format[2:], [k])
+                (val_v, rest_format, _) = self._create(rest_format, [v])
+
+                if not rest_format.startswith('}'):
+                    raise ValueError('dictionary type string not closed with }')
+                rest_format = rest_format[1:] # eat the }
+
+                entry = GLib.VariantBuilder()
+                entry.init(variant_type_from_string('{?*}'))
+                entry.add_value(key_v)
+                entry.add_value(val_v)
+                builder.add_value(entry.end())
+
+        if args is not None:
+            args = args[1:]
+        return (builder.end(), rest_format, args)
+
+    def _create_array(self, format, args):
+        '''Handle the case where the outermost type of format is an array.'''
+
+        builder = GLib.VariantBuilder()
+        if args is None or not args[0]:
+            # empty value: we need to call _create() to parse the subtype,
+            # and specify the element type precisely
+            rest_format = self._create(format[1:], None)[1]
+            element_type = format[:len(format) - len(rest_format)]
+            builder.init(variant_type_from_string(element_type))
+        else:
+            builder.init(variant_type_from_string('a*'))
+            for i in range(len(args[0])):
+                (v, rest_format, _) = self._create(format[1:], args[0][i:])
+                builder.add_value(v)
+        if args is not None:
+            args = args[1:]
+        return (builder.end(), rest_format, args)
+
+class Variant(GLib.Variant):
+    def __new__(cls, format_string, value):
+        '''Create a GVariant from a native Python object.
+
+        format_string is a standard GVariant type signature, value is a Python
+        object whose structure has to match the signature.
+        
+        Examples:
+          GLib.Variant('i', 1)
+          GLib.Variant('(is)', (1, 'hello'))
+          GLib.Variant('(asa{sv})', ([], {'foo': GLib.Variant('b', True), 
+                                          'bar': GLib.Variant('i', 2)}))
+        '''
+        creator = _VariantCreator()
+        (v, rest_format, _) = creator._create(format_string, [value])
+        if rest_format:
+            raise TypeError('invalid remaining format string: "%s"' % rest_format)
+        return v
+
+    def __repr__(self):
+        return '<GLib.Variant(%s)>' % getattr(self, 'print')(True)
+
+    def unpack(self):
+        '''Decompose a GVariant into a native Python object.'''
+
+        LEAF_ACCESSORS = {
+            'b': self.get_boolean,
+            'y': self.get_byte,
+            'n': self.get_int16,
+            'q': self.get_uint16,
+            'i': self.get_int32,
+            'u': self.get_uint32,
+            'x': self.get_int64,
+            't': self.get_uint64,
+            'h': self.get_handle,
+            'd': self.get_double,
+            's': self.get_string,
+            'o': self.get_string, # object path
+            'g': self.get_string, # signature
+        }
+
+        # simple values
+        la = LEAF_ACCESSORS.get(self.get_type_string())
+        if la:
+            return la()
+
+        # tuple
+        if self.get_type_string().startswith('('):
+            res = [self.get_child_value(i).unpack() 
+                    for i in range(self.n_children())]
+            return tuple(res)
+
+        # dictionary
+        if self.get_type_string().startswith('a{'):
+            res = {}
+            for i in range(self.n_children()):
+                v = self.get_child_value(i)
+                res[v.get_child_value(0).unpack()] = v.get_child_value(1).unpack()
+            return res
+
+        # array
+        if self.get_type_string().startswith('a'):
+            return [self.get_child_value(i).unpack() 
+                    for i in range(self.n_children())]
+
+        # variant (just unbox transparently)
+        if self.get_type_string().startswith('v'):
+            return self.get_variant().unpack()
+
+        raise NotImplementedError('unsupported GVariant type ' + self.get_type_string())
+
+    #
+    # Pythonic iterators
+    #
+    def __len__(self):
+        if self.get_type_string() in ['s', 'o', 'g']:
+            return len(self.get_string())
+        if self.get_type_string().startswith('a') or self.get_type_string().startswith('('):
+            return self.n_children()
+        raise TypeError('GVariant type %s does not have a length' % self.get_type_string())
+
+    def __getitem__(self, key):
+        # dict
+        if self.get_type_string().startswith('a{'):
+            try:
+                val = self.lookup_value(key, variant_type_from_string('*'))
+                if val is None:
+                    raise KeyError(key)
+                return val.unpack()
+            except TypeError:
+                # lookup_value() only works for string keys, which is certainly
+                # the common case; we have to do painful iteration for other
+                # key types
+                for i in range(self.n_children()):
+                    v = self.get_child_value(i)
+                    if v.get_child_value(0).unpack() == key:
+                        return v.get_child_value(1).unpack()
+                raise KeyError(key)
+
+        # array/tuple
+        if self.get_type_string().startswith('a') or self.get_type_string().startswith('('):
+            key = int(key)
+            if key < 0:
+                key = self.n_children() + key
+            if key < 0 or key >= self.n_children():
+                raise IndexError('list index out of range')
+            return self.get_child_value(key).unpack()
+
+        # string
+        if self.get_type_string() in ['s', 'o', 'g']:
+            return self.get_string().__getitem__(key)
+
+        raise TypeError('GVariant type %s is not a container' % self.get_type_string())
+
+    def keys(self):
+        if not self.get_type_string().startswith('a{'):
+            return TypeError, 'GVariant type %s is not a dictionary' % self.get_type_string()
+
+        res = []
+        for i in range(self.n_children()):
+            v = self.get_child_value(i)
+            res.append(v.get_child_value(0).unpack())
+        return res
+
+@classmethod
+def new_tuple(cls, *elements):
+    return variant_new_tuple(elements)
+
+def get_string(self):
+    value, length = GLib.Variant.get_string(self)
+    return value
+
+setattr(Variant, 'new_tuple', new_tuple)
+setattr(Variant, 'get_string', get_string)
+
+__all__.append('Variant')
+
diff --git a/gi/overrides/Gdk.py b/gi/overrides/Gdk.py
new file mode 100644 (file)
index 0000000..7b86e1f
--- /dev/null
@@ -0,0 +1,291 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+#
+# Copyright (C) 2009 Johan Dahlin <johan@gnome.org>
+#               2010 Simon van der Linden <svdlinden@src.gnome.org>
+#
+# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+from ..overrides import override
+from ..importer import modules
+
+import sys
+
+Gdk = modules['Gdk']._introspection_module
+
+__all__ = []
+
+class Color(Gdk.Color):
+
+    def __init__(self, red, green, blue):
+        Gdk.Color.__init__(self)
+        self.red = red
+        self.green = green
+        self.blue = blue
+
+    def __new__(cls, *args, **kwargs):
+        return Gdk.Color.__new__(cls)
+
+    def __eq__(self, other):
+        return self.equal(other)
+
+    def __repr__(self):
+        return '<Gdk.Color(red=%d, green=%d, blue=%d)>' % (self.red, self.green, self.blue)
+
+Color = override(Color)
+__all__.append('Color')
+
+if Gdk._version == '3.0':
+    class RGBA(Gdk.RGBA):
+        def __init__(self, red=1.0, green=1.0, blue=1.0, alpha=1.0):
+            Gdk.RGBA.__init__(self)
+            self.red = red
+            self.green = green
+            self.blue = blue
+            self.alpha = alpha
+
+        def __new__(cls, *args, **kwargs):
+            return Gdk.RGBA.__new__(cls)
+
+        def __eq__(self, other):
+            return self.equal(other)
+
+        def __repr__(self):
+            return '<Gdk.Color(red=%f, green=%f, blue=%f, alpha=%f)>' % (self.red, self.green, self.blue, self.alpha)
+
+    RGBA = override(RGBA)
+    __all__.append('RGBA')
+
+if Gdk._version == '2.0':
+    class Rectangle(Gdk.Rectangle):
+
+        def __init__(self, x, y, width, height):
+            Gdk.Rectangle.__init__(self)
+            self.x = x
+            self.y = y
+            self.width = width
+            self.height = height
+
+        def __new__(cls, *args, **kwargs):
+            return Gdk.Rectangle.__new__(cls)
+
+        def __repr__(self):
+            return '<Gdk.Rectangle(x=%d, y=%d, width=%d, height=%d)>' % (self.x, self.y, self.height, self.width)
+
+    Rectangle = override(Rectangle)
+    __all__.append('Rectangle')
+else:
+    from gi.repository import cairo as _cairo
+    Rectangle = _cairo.RectangleInt
+
+    __all__.append('Rectangle')
+
+if Gdk._version == '2.0':
+    class Drawable(Gdk.Drawable):
+        def cairo_create(self):
+            return Gdk.cairo_create(self)
+
+    Drawable = override(Drawable)
+    __all__.append('Drawable')
+else:
+    class Window(Gdk.Window):
+        def __new__(cls, parent, attributes, attributes_mask):
+            # Gdk.Window had to be made abstract,
+            # this override allows using the standard constructor
+            return Gdk.Window.new(parent, attributes, attributes_mask)
+        def __init__(self, parent, attributes, attributes_mask):
+            pass
+        def cairo_create(self):
+            return Gdk.cairo_create(self)
+
+    Window = override(Window)
+    __all__.append('Window')
+
+Gdk.EventType._2BUTTON_PRESS = getattr(Gdk.EventType, "2BUTTON_PRESS")
+Gdk.EventType._3BUTTON_PRESS = getattr(Gdk.EventType, "3BUTTON_PRESS")
+
+class Event(Gdk.Event):
+    _UNION_MEMBERS = {
+        Gdk.EventType.DELETE: 'any',
+        Gdk.EventType.DESTROY: 'any',
+        Gdk.EventType.EXPOSE: 'expose',
+        Gdk.EventType.MOTION_NOTIFY: 'motion',
+        Gdk.EventType.BUTTON_PRESS: 'button',
+        Gdk.EventType._2BUTTON_PRESS: 'button',
+        Gdk.EventType._3BUTTON_PRESS: 'button',
+        Gdk.EventType.BUTTON_RELEASE: 'button',
+        Gdk.EventType.KEY_PRESS: 'key',
+        Gdk.EventType.KEY_RELEASE: 'key',
+        Gdk.EventType.ENTER_NOTIFY: 'crossing',
+        Gdk.EventType.LEAVE_NOTIFY: 'crossing',
+        Gdk.EventType.FOCUS_CHANGE: 'focus_change',
+        Gdk.EventType.CONFIGURE: 'configure',
+        Gdk.EventType.MAP: 'any',
+        Gdk.EventType.UNMAP: 'any',
+        Gdk.EventType.PROPERTY_NOTIFY: 'property',
+        Gdk.EventType.SELECTION_CLEAR: 'selection',
+        Gdk.EventType.SELECTION_REQUEST: 'selection',
+        Gdk.EventType.SELECTION_NOTIFY: 'selection',
+        Gdk.EventType.PROXIMITY_IN: 'proximity',
+        Gdk.EventType.PROXIMITY_OUT: 'proximity',
+        Gdk.EventType.DRAG_ENTER: 'dnd',
+        Gdk.EventType.DRAG_LEAVE: 'dnd',
+        Gdk.EventType.DRAG_MOTION: 'dnd',
+        Gdk.EventType.DRAG_STATUS: 'dnd',
+        Gdk.EventType.DROP_START: 'dnd',
+        Gdk.EventType.DROP_FINISHED: 'dnd',
+        Gdk.EventType.CLIENT_EVENT: 'client',
+        Gdk.EventType.VISIBILITY_NOTIFY: 'visibility',
+    }
+
+    if Gdk._version == '2.0':
+        _UNION_MEMBERS[Gdk.EventType.NO_EXPOSE] = 'no_expose'
+
+    def __new__(cls, *args, **kwargs):
+        return Gdk.Event.__new__(cls)
+
+    def __getattr__(self, name):
+        real_event = getattr(self, '_UNION_MEMBERS').get(self.type)
+        if real_event:
+            return getattr(getattr(self, real_event), name)
+        else:
+            raise AttributeError("'%s' object has no attribute '%s'" % (self.__class__.__name__, name))
+
+Event = override(Event)
+__all__.append('Event')
+
+# manually bind GdkEvent members to GdkEvent
+
+modname = globals()['__name__']
+module = sys.modules[modname]
+
+# right now we can't get the type_info from the
+# field info so manually list the class names
+event_member_classes = ['EventAny',
+                        'EventExpose',
+                        'EventVisibility',
+                        'EventMotion',
+                        'EventButton',
+                        'EventScroll',
+                        'EventKey',
+                        'EventCrossing',
+                        'EventFocus',
+                        'EventConfigure',
+                        'EventProperty',
+                        'EventSelection',
+                        'EventOwnerChange',
+                        'EventProximity',
+                        'EventDND',
+                        'EventWindowState',
+                        'EventSetting',
+                        'EventGrabBroken']
+
+if Gdk._version == '2.0':
+    event_member_classes.append('EventNoExpose')
+
+# whitelist all methods that have a success return we want to mask
+gsuccess_mask_funcs = ['get_state',
+                       'get_axis',
+                       'get_coords',
+                       'get_root_coords']
+
+def _gsuccess_mask(func):
+    def cull_success(*args):
+        result = func(*args)
+        success = result[0]
+        if success == False:
+            return None
+        else:
+            if len(result) == 2:
+                return result[1]
+            else:
+                return result[1:]
+    return cull_success
+
+for event_class in event_member_classes:
+    override_class = type(event_class, (getattr(Gdk, event_class),), {})
+    # add the event methods
+    for method_info in Gdk.Event.__info__.get_methods():
+        name = method_info.get_name()
+        event_method = getattr(Gdk.Event, name)
+        # python2 we need to use the __func__ attr to avoid internal
+        # instance checks
+        event_method = getattr(event_method, '__func__', event_method)
+
+        # use the _gsuccess_mask decorator if this method is whitelisted
+        if name in gsuccess_mask_funcs:
+            event_method = _gsuccess_mask(event_method)
+        setattr(override_class, name, event_method)
+
+    setattr(module, event_class, override_class)
+    __all__.append(event_class)
+
+# end GdkEvent overrides
+
+class DragContext(Gdk.DragContext):
+    def finish(self, success, del_, time):
+        Gtk = modules['Gtk']._introspection_module
+        Gtk.drag_finish(self, success, del_, time)
+
+DragContext = override(DragContext)
+__all__.append('DragContext')
+
+class Cursor(Gdk.Cursor):
+    def __new__(cls, *args, **kwds):
+        arg_len = len(args)
+        kwd_len = len(kwds)
+        total_len = arg_len + kwd_len
+
+        def _new(cursor_type):
+            return cls.new(cursor_type)
+
+        def _new_for_display(display, cursor_type):
+            return cls.new_for_display(display, cursor_type)
+
+        def _new_from_pixbuf(display, pixbuf, x, y):
+            return cls.new_from_pixbuf(display, pixbuf, x, y)
+
+        def _new_from_pixmap(source, mask, fg, bg, x, y):
+            return cls.new_from_pixmap(source, mask, fg, bg, x, y)
+
+        _constructor = None
+        if total_len == 1:
+            _constructor = _new
+        elif total_len == 2:
+            _constructor = _new_for_display
+        elif total_len == 4:
+            _constructor = _new_from_pixbuf
+        elif total_len == 6:
+            if Gdk._version != '2.0':
+                # pixmaps don't exist in Gdk 3.0
+                raise ValueError("Wrong number of parameters")
+            _constructor = _new_from_pixmap
+        else:
+            raise ValueError("Wrong number of parameters")
+
+        return _constructor(*args, **kwds)
+
+    def __init__(self, *args, **kwargs):
+        Gdk.Cursor.__init__(self)
+
+Cursor = override(Cursor)
+__all__.append('Cursor')
+
+import sys
+
+initialized, argv = Gdk.init_check(sys.argv)
+if not initialized:
+    raise RuntimeError("Gdk couldn't be initialized")
diff --git a/gi/overrides/Gio.py b/gi/overrides/Gio.py
new file mode 100644 (file)
index 0000000..20adf0c
--- /dev/null
@@ -0,0 +1,215 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+#
+# Copyright (C) 2010 Ignacio Casal Quinteiro <icq@gnome.org>
+#
+# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+from ..overrides import override
+from ..importer import modules
+
+from gi.repository import GLib
+
+import sys
+
+Gio = modules['Gio']._introspection_module
+
+__all__ = []
+
+class FileEnumerator(Gio.FileEnumerator):
+    def __iter__(self):
+        return self
+
+    def __next__(self):
+        file_info = self.next_file(None)
+
+        if file_info is not None:
+            return file_info
+        else:
+            raise StopIteration
+
+    # python 2 compat for the iter protocol
+    next = __next__
+
+
+FileEnumerator = override(FileEnumerator)
+__all__.append('FileEnumerator')
+
+class Settings(Gio.Settings):
+    '''Provide dictionary-like access to GLib.Settings.'''
+
+    def __init__(self, schema, path=None, backend=None):
+        Gio.Settings.__init__(self, schema=schema, backend=backend, path=path)
+
+    def __contains__(self, key):
+        return key in self.list_keys()
+
+    def __len__(self):
+        return len(self.list_keys())
+
+    def __bool__(self):
+        # for "if mysettings" we don't want a dictionary-like test here, just
+        # if the object isn't None
+        return True
+
+    # alias for Python 2.x object protocol
+    __nonzero__ = __bool__
+
+    def __getitem__(self, key):
+        # get_value() aborts the program on an unknown key
+        if not key in self:
+            raise KeyError('unknown key: %r' % (key,))
+
+        return self.get_value(key).unpack()
+
+    def __setitem__(self, key, value):
+        # set_value() aborts the program on an unknown key
+        if not key in self:
+            raise KeyError('unknown key: %r' % (key,))
+
+        # determine type string of this key
+        range = self.get_range(key)
+        type_ = range.get_child_value(0).get_string()
+        v = range.get_child_value(1)
+        if type_ == 'type':
+            # v is boxed empty array, type of its elements is the allowed value type
+            type_str = v.get_child_value(0).get_type_string()
+            assert type_str.startswith('a')
+            type_str = type_str[1:]
+        else:
+            raise NotImplementedError('Cannot handle allowed type range class' + str(type_))
+
+        self.set_value(key, GLib.Variant(type_str, value))
+
+    def keys(self):
+        return self.list_keys()
+
+Settings = override(Settings)
+__all__.append('Settings')
+
+class _DBusProxyMethodCall:
+    '''Helper class to implement DBusProxy method calls.'''
+
+    def __init__(self, dbus_proxy, method_name):
+        self.dbus_proxy = dbus_proxy
+        self.method_name = method_name
+
+    def __async_result_handler(self, obj, result, user_data):
+        (result_callback, error_callback, real_user_data) = user_data
+        try:
+            ret = obj.call_finish(result)
+        except Exception:
+            etype, e = sys.exc_info()[:2]
+            # return exception as value
+            if error_callback:
+                error_callback(obj, e, real_user_data)
+            else:
+                result_callback(obj, e, real_user_data)
+            return
+
+        result_callback(obj, self._unpack_result(ret), real_user_data)
+
+    def __call__(self, *args, **kwargs):
+        # the first positional argument is the signature, unless we are calling
+        # a method without arguments; then signature is implied to be '()'.
+        if args:
+            signature = args[0]
+            args = args[1:]
+            if not isinstance(signature, str):
+                raise TypeError('first argument must be the method signature string: %r' % signature)
+        else:
+            signature = '()'
+
+        arg_variant = GLib.Variant(signature, tuple(args))
+
+        if 'result_handler' in kwargs:
+            # asynchronous call
+            user_data = (kwargs['result_handler'],
+                    kwargs.get('error_handler'), kwargs.get('user_data'))
+            self.dbus_proxy.call(self.method_name, arg_variant,
+                    kwargs.get('flags', 0), kwargs.get('timeout', -1), None,
+                    self.__async_result_handler, user_data)
+        else:
+            # synchronous call
+            result = self.dbus_proxy.call_sync(self.method_name, arg_variant,
+                    kwargs.get('flags', 0), kwargs.get('timeout', -1), None)
+            return self._unpack_result(result)
+
+    @classmethod
+    def _unpack_result(klass, result):
+        '''Convert a D-BUS return variant into an appropriate return value'''
+
+        result = result.unpack()
+
+        # to be compatible with standard Python behaviour, unbox
+        # single-element tuples and return None for empty result tuples
+        if len(result) == 1:
+            result = result[0]
+        elif len(result) == 0:
+            result = None
+
+        return result
+
+class DBusProxy(Gio.DBusProxy):
+    '''Provide comfortable and pythonic method calls.
+    
+    This marshalls the method arguments into a GVariant, invokes the
+    call_sync() method on the DBusProxy object, and unmarshalls the result
+    GVariant back into a Python tuple.
+
+    The first argument always needs to be the D-Bus signature tuple of the
+    method call. Example:
+
+      proxy = Gio.DBusProxy.new_sync(...)
+      result = proxy.MyMethod('(is)', 42, 'hello')
+
+    The exception are methods which take no arguments, like
+    proxy.MyMethod('()'). For these you can omit the signature and just write
+    proxy.MyMethod().
+
+    Optional keyword arguments:
+
+    - timeout: timeout for the call in milliseconds (default to D-Bus timeout)
+
+    - flags: Combination of Gio.DBusCallFlags.*
+
+    - result_handler: Do an asynchronous method call and invoke
+         result_handler(proxy_object, result, user_data) when it finishes.
+
+    - error_handler: If the asynchronous call raises an exception,
+      error_handler(proxy_object, exception, user_data) is called when it
+      finishes. If error_handler is not given, result_handler is called with
+      the exception object as result instead.
+    
+    - user_data: Optional user data to pass to result_handler for
+      asynchronous calls.
+
+    Example for asynchronous calls:
+
+      def mymethod_done(proxy, result, user_data):
+          if isinstance(result, Exception):
+              # handle error
+          else:
+              # do something with result
+
+      proxy.MyMethod('(is)', 42, 'hello',
+          result_handler=mymethod_done, user_data='data')
+    '''
+    def __getattr__(self, name):
+        return _DBusProxyMethodCall(self, name)
+
+DBusProxy = override(DBusProxy)
+__all__.append('DBusProxy')
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
new file mode 100644 (file)
index 0000000..30e883c
--- /dev/null
@@ -0,0 +1,1251 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+#
+# Copyright (C) 2009 Johan Dahlin <johan@gnome.org>
+#               2010 Simon van der Linden <svdlinden@src.gnome.org>
+#
+# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+import sys
+import gobject
+from gi.repository import GObject
+from ..overrides import override
+from ..importer import modules
+
+if sys.version_info >= (3, 0):
+    _basestring = str
+    _callable = lambda c: hasattr(c, '__call__')
+else:
+    _basestring = basestring
+    _callable = callable
+
+Gtk = modules['Gtk']._introspection_module
+__all__ = []
+
+class Widget(Gtk.Widget):
+
+    def translate_coordinates(self, dest_widget, src_x, src_y):
+        success, dest_x, dest_y = super(Widget, self).translate_coordinates(
+            dest_widget, src_x, src_y)
+        if success:
+            return (dest_x, dest_y,)
+
+Widget = override(Widget)
+__all__.append('Widget')
+
+class Container(Gtk.Container, Widget):
+
+    def __len__(self):
+        return len(self.get_children())
+
+    def __contains__(self, child):
+        return child in self.get_children()
+
+    def __iter__(self):
+        return iter(self.get_children())
+
+    def __bool__(self):
+        return True
+
+    # alias for Python 2.x object protocol
+    __nonzero__ = __bool__
+
+    def get_focus_chain(self):
+        success, widgets = super(Container, self).get_focus_chain()
+        if success:
+            return widgets
+
+Container = override(Container)
+__all__.append('Container')
+
+class Editable(Gtk.Editable):
+
+    def insert_text(self, text, position):
+        pos = super(Editable, self).insert_text(text, -1, position)
+
+        return pos
+
+    def get_selection_bounds(self):
+        success, start_pos, end_pos = super(Editable, self).get_selection_bounds()
+        if success:
+            return (start_pos, end_pos,)
+        else:
+            return tuple()
+
+Editable = override(Editable)
+__all__.append("Editable")
+
+class Action(Gtk.Action):
+    def __init__(self, name, label, tooltip, stock_id, **kwds):
+        Gtk.Action.__init__(self, name=name, label=label, tooltip=tooltip, stock_id=stock_id, **kwds)
+
+Action = override(Action)
+__all__.append("Action")
+
+class RadioAction(Gtk.RadioAction):
+    def __init__(self, name, label, tooltip, stock_id, value, **kwds):
+        Gtk.RadioAction.__init__(self, name=name, label=label, tooltip=tooltip, stock_id=stock_id, value=value, **kwds)
+
+RadioAction = override(RadioAction)
+__all__.append("RadioAction")
+
+class ActionGroup(Gtk.ActionGroup):
+    def __init__(self, name, **kwds):
+        super(ActionGroup, self).__init__(name = name, **kwds)
+
+    def add_actions(self, entries, user_data=None):
+        """
+        The add_actions() method is a convenience method that creates a number
+        of gtk.Action  objects based on the information in the list of action
+        entry tuples contained in entries and adds them to the action group.
+        The entry tuples can vary in size from one to six items with the
+        following information:
+
+            * The name of the action. Must be specified.
+            * The stock id for the action. Optional with a default value of None
+              if a label is specified.
+            * The label for the action. This field should typically be marked
+              for translation, see the set_translation_domain() method. Optional
+              with a default value of None if a stock id is specified.
+            * The accelerator for the action, in the format understood by the
+              gtk.accelerator_parse() function. Optional with a default value of
+              None.
+            * The tooltip for the action. This field should typically be marked
+              for translation, see the set_translation_domain() method. Optional
+              with a default value of None.
+            * The callback function invoked when the action is activated.
+              Optional with a default value of None.
+
+        The "activate" signals of the actions are connected to the callbacks and
+        their accel paths are set to <Actions>/group-name/action-name.
+        """
+        try:
+            iter(entries)
+        except (TypeError):
+            raise TypeError('entries must be iterable')
+
+        def _process_action(name, stock_id=None, label=None, accelerator=None, tooltip=None, callback=None):
+            action = Action(name, label, tooltip, stock_id)
+            if callback is not None:
+                action.connect('activate', callback, user_data)
+
+            self.add_action_with_accel(action, accelerator)
+
+        for e in entries:
+            # using inner function above since entries can leave out optional arguments
+            _process_action(*e)
+
+    def add_toggle_actions(self, entries, user_data=None):
+        """
+        The add_toggle_actions() method is a convenience method that creates a
+        number of gtk.ToggleAction objects based on the information in the list
+        of action entry tuples contained in entries and adds them to the action
+        group. The toggle action entry tuples can vary in size from one to seven
+        items with the following information:
+
+            * The name of the action. Must be specified.
+            * The stock id for the action. Optional with a default value of None
+              if a label is specified.
+            * The label for the action. This field should typically be marked
+              for translation, see the set_translation_domain() method. Optional
+              with a default value of None if a stock id is specified.
+            * The accelerator for the action, in the format understood by the
+              gtk.accelerator_parse() function. Optional with a default value of
+              None.
+            * The tooltip for the action. This field should typically be marked
+              for translation, see the set_translation_domain() method. Optional
+              with a default value of None.
+            * The callback function invoked when the action is activated.
+              Optional with a default value of None.
+            * A flag indicating whether the toggle action is active. Optional
+              with a default value of False.
+
+        The "activate" signals of the actions are connected to the callbacks and
+        their accel paths are set to <Actions>/group-name/action-name.
+        """
+
+        try:
+            iter(entries)
+        except (TypeError):
+            raise TypeError('entries must be iterable')
+
+        def _process_action(name, stock_id=None, label=None, accelerator=None, tooltip=None, callback=None, is_active=False):
+            action = Gtk.ToggleAction(name, label, tooltip, stock_id)
+            action.set_active(is_active)
+            if callback is not None:
+                action.connect('activate', callback, user_data)
+
+            self.add_action_with_accel(action, accelerator)
+
+        for e in entries:
+            # using inner function above since entries can leave out optional arguments
+            _process_action(*e)
+
+
+    def add_radio_actions(self, entries, value=None, on_change=None, user_data=None):
+        """
+        The add_radio_actions() method is a convenience method that creates a
+        number of gtk.RadioAction objects based on the information in the list
+        of action entry tuples contained in entries and adds them to the action
+        group. The entry tuples can vary in size from one to six items with the
+        following information:
+
+            * The name of the action. Must be specified.
+            * The stock id for the action. Optional with a default value of None
+              if a label is specified.
+            * The label for the action. This field should typically be marked
+              for translation, see the set_translation_domain() method. Optional
+              with a default value of None if a stock id is specified.
+            * The accelerator for the action, in the format understood by the
+              gtk.accelerator_parse() function. Optional with a default value of
+              None.
+            * The tooltip for the action. This field should typically be marked
+              for translation, see the set_translation_domain() method. Optional
+              with a default value of None.
+            * The value to set on the radio action. Optional with a default
+              value of 0. Should be specified in applications.
+
+        The value parameter specifies the radio action that should be set
+        active. The "changed" signal of the first radio action is connected to
+        the on_change callback (if specified and not None) and the accel paths
+        of the actions are set to <Actions>/group-name/action-name.
+        """
+        try:
+            iter(entries)
+        except (TypeError):
+            raise TypeError('entries must be iterable')
+
+        first_action = None
+
+        def _process_action(group_source, name, stock_id=None, label=None, accelerator=None, tooltip=None, entry_value=0):
+            action = RadioAction(name, label, tooltip, stock_id, entry_value)
+
+            # FIXME: join_group is a patch to Gtk+ 3.0
+            #        otherwise we can't effectively add radio actions to a
+            #        group.  Should we depend on 3.0 and error out here
+            #        or should we offer the functionality via a compat
+            #        C module?
+            if hasattr(action, 'join_group'):
+                action.join_group(group_source)
+
+            if value == entry_value:
+                action.set_active(True)
+
+            self.add_action_with_accel(action, accelerator)
+            return action
+
+        for e in entries:
+            # using inner function above since entries can leave out optional arguments
+            action = _process_action(first_action, *e)
+            if first_action is None:
+                first_action = action
+
+        if first_action is not None and on_change is not None:
+            first_action.connect('changed', on_change, user_data)
+
+ActionGroup = override(ActionGroup)
+__all__.append('ActionGroup')
+
+class UIManager(Gtk.UIManager):
+    def add_ui_from_string(self, buffer):
+        if not isinstance(buffer, _basestring):
+            raise TypeError('buffer must be a string')
+
+        length = len(buffer)
+
+        return Gtk.UIManager.add_ui_from_string(self, buffer, length)
+
+    def insert_action_group(self, buffer, length=-1):
+        return Gtk.UIManager.insert_action_group(self, buffer, length)
+
+UIManager = override(UIManager)
+__all__.append('UIManager')
+
+class ComboBox(Gtk.ComboBox, Container):
+
+    def get_active_iter(self):
+        success, aiter = super(ComboBox, self).get_active_iter()
+        if success:
+            return aiter
+
+ComboBox = override(ComboBox)
+__all__.append('ComboBox')
+
+class Builder(Gtk.Builder):
+
+    def connect_signals(self, obj_or_map):
+        def _full_callback(builder, gobj, signal_name, handler_name, connect_obj, flags, obj_or_map):
+            handler = None
+            if isinstance(obj_or_map, dict):
+                handler = obj_or_map.get(handler_name, None)
+            else:
+                handler = getattr(obj_or_map, handler_name, None)
+
+            if handler is None:
+                raise AttributeError('Handler %s not found' % handler_name)
+
+            if not _callable(handler):
+                raise TypeError('Handler %s is not a method or function' % handler_name)
+
+            after = flags or GObject.ConnectFlags.AFTER
+            if connect_obj is not None:
+                if after:
+                    gobj.connect_object_after(signal_name, handler, connect_obj)
+                else:
+                    gobj.connect_object(signal_name, handler, connect_obj)
+            else:
+                if after:
+                    gobj.connect_after(signal_name, handler)
+                else:
+                    gobj.connect(signal_name, handler)
+
+        self.connect_signals_full(_full_callback, obj_or_map)
+
+    def add_from_string(self, buffer):
+        if not isinstance(buffer, _basestring):
+            raise TypeError('buffer must be a string')
+
+        length = len(buffer)
+
+        return Gtk.Builder.add_from_string(self, buffer, length)
+
+    def add_objects_from_string(self, buffer, object_ids):
+        if not isinstance(buffer, _basestring):
+            raise TypeError('buffer must be a string')
+
+        length = len(buffer)
+
+        return Gtk.Builder.add_objects_from_string(self, buffer, length, object_ids)
+
+Builder = override(Builder)
+__all__.append('Builder')
+
+
+class Dialog(Gtk.Dialog, Container):
+
+    def __init__(self,
+                 title=None,
+                 parent=None,
+                 flags=0,
+                 buttons=None,
+                 _buttons_property=None,
+                 **kwds):
+
+        # buttons is overloaded by PyGtk so we have to do the same here
+        # this breaks some subclasses of Dialog so add a _buttons_property
+        # keyword to work around this
+        if _buttons_property is not None:
+            kwds['buttons'] = _buttons_property
+
+        Gtk.Dialog.__init__(self, **kwds)
+        if title:
+            self.set_title(title)
+        if parent:
+            self.set_transient_for(parent)
+        if flags & Gtk.DialogFlags.MODAL:
+            self.set_modal(True)
+        if flags & Gtk.DialogFlags.DESTROY_WITH_PARENT:
+            self.set_destroy_with_parent(True)
+
+        # NO_SEPARATOR has been removed from Gtk 3
+        try:
+            if flags & Gtk.DialogFlags.NO_SEPARATOR:
+                self.set_has_separator(False)
+        except AttributeError:
+            pass
+
+        if buttons is not None:
+            self.add_buttons(*buttons)
+
+    def add_buttons(self, *args):
+        """
+        The add_buttons() method adds several buttons to the Gtk.Dialog using
+        the button data passed as arguments to the method. This method is the
+        same as calling the Gtk.Dialog.add_button() repeatedly. The button data
+        pairs - button text (or stock ID) and a response ID integer are passed
+        individually. For example:
+
+        >>> dialog.add_buttons(Gtk.STOCK_OPEN, 42, "Close", Gtk.ResponseType.CLOSE)
+
+        will add "Open" and "Close" buttons to dialog.
+        """
+        def _button(b):
+            while b:
+                t, r = b[0:2]
+                b = b[2:]
+                yield t, r
+
+        try:
+            for text, response in _button(args):
+                self.add_button(text, response)
+        except (IndexError):
+            raise TypeError('Must pass an even number of arguments')
+
+Dialog = override(Dialog)
+__all__.append('Dialog')
+
+class MessageDialog(Gtk.MessageDialog, Dialog):
+    def __init__(self,
+                 parent=None,
+                 flags=0,
+                 type=Gtk.MessageType.INFO,
+                 buttons=Gtk.ButtonsType.NONE,
+                 message_format=None,
+                 **kwds):
+
+        if message_format != None:
+            kwds['text'] = message_format
+        Gtk.MessageDialog.__init__(self,
+                                   _buttons_property=buttons,
+                                   message_type=type,
+                                   **kwds)
+        Dialog.__init__(self, parent=parent, flags=flags)
+
+    def format_secondary_text(self, message_format):
+        self.set_property('secondary-use-markup', False)
+        self.set_property('secondary-text', message_format)
+
+    def format_secondary_markup(self, message_format):
+        self.set_property('secondary-use-markup', True)
+        self.set_property('secondary-text', message_format)
+
+MessageDialog = override(MessageDialog)
+__all__.append('MessageDialog')
+
+class AboutDialog(Gtk.AboutDialog, Dialog):
+    def __init__(self, **kwds):
+        Gtk.AboutDialog.__init__(self, **kwds)
+        Dialog.__init__(self)
+
+AboutDialog = override(AboutDialog)
+__all__.append('AboutDialog')
+
+class ColorSelectionDialog(Gtk.ColorSelectionDialog, Dialog):
+    def __init__(self, title=None, **kwds):
+        Gtk.ColorSelectionDialog.__init__(self, **kwds)
+        Dialog.__init__(self, title=title)
+
+ColorSelectionDialog = override(ColorSelectionDialog)
+__all__.append('ColorSelectionDialog')
+
+class FileChooserDialog(Gtk.FileChooserDialog, Dialog):
+    def __init__(self,
+                 title=None,
+                 parent=None,
+                 action=Gtk.FileChooserAction.OPEN,
+                 buttons=None,
+                 **kwds):
+        Gtk.FileChooserDialog.__init__(self,
+                                       action=action,
+                                       **kwds)
+        Dialog.__init__(self,
+                        title=title,
+                        parent=parent,
+                        buttons=buttons)
+
+FileChooserDialog = override(FileChooserDialog)
+__all__.append('FileChooserDialog')
+
+class FontSelectionDialog(Gtk.FontSelectionDialog, Dialog):
+    def __init__(self, title=None, **kwds):
+        Gtk.FontSelectionDialog.__init__(self, **kwds)
+        Dialog.__init__(self, title=title)
+
+FontSelectionDialog = override(FontSelectionDialog)
+__all__.append('FontSelectionDialog')
+
+class RecentChooserDialog(Gtk.RecentChooserDialog, Dialog):
+    def __init__(self,
+                 title=None,
+                 parent=None,
+                 manager=None,
+                 buttons=None,
+                 **kwds):
+
+        Gtk.RecentChooserDialog.__init__(self, recent_manager=manager, **kwds)
+        Dialog.__init__(self,
+                        title=title,
+                        parent=parent,
+                        buttons=buttons)
+
+RecentChooserDialog = override(RecentChooserDialog)
+__all__.append('RecentChooserDialog')
+
+class IconView(Gtk.IconView):
+
+    def get_item_at_pos(self, x, y):
+        success, path, cell = super(IconView, self).get_item_at_pos(x, y)
+        if success:
+            return (path, cell,)
+
+    def get_visible_range(self):
+        success, start_path, end_path = super(IconView, self).get_visible_range()
+        if success:
+            return (start_path, end_path,)
+
+    def get_dest_item_at_pos(self, drag_x, drag_y):
+        success, path, pos = super(IconView, self).get_dest_item_at_pos(drag_x, drag_y)
+        if success:
+            return path, pos
+
+IconView = override(IconView)
+__all__.append('IconView')
+
+class IMContext(Gtk.IMContext):
+
+    def get_surrounding(self):
+        success, text, cursor_index = super(IMContext, self).get_surrounding()
+        if success:
+            return (text, cursor_index,)
+
+IMContext = override(IMContext)
+__all__.append('IMContext')
+
+class RecentInfo(Gtk.RecentInfo):
+
+    def get_application_info(self, app_name):
+        success, app_exec, count, time = super(RecentInfo, self).get_application_info(app_name)
+        if success:
+            return (app_exec, count, time,)
+
+RecentInfo = override(RecentInfo)
+__all__.append('RecentInfo')
+
+class TextBuffer(Gtk.TextBuffer):
+    def _get_or_create_tag_table(self):
+        table = self.get_tag_table()
+        if table is None:
+            table = Gtk.TextTagTable()
+            self.set_tag_table(table)
+
+        return table
+
+    def create_tag(self, tag_name=None, **properties):
+        """
+        @tag_name: name of the new tag, or None
+        @properties: keyword list of properties and their values
+
+        Creates a tag and adds it to the tag table of the TextBuffer.
+        Equivalent to creating a Gtk.TextTag and then adding the
+        tag to the buffer's tag table. The returned tag is owned by
+        the buffer's tag table.
+
+        If @tag_name is None, the tag is anonymous.
+
+        If @tag_name is not None, a tag called @tag_name must not already
+        exist in the tag table for this buffer.
+
+        Properties are passed as a keyword list of names and values (e.g.
+        foreground = 'DodgerBlue', weight = Pango.Weight.BOLD)
+
+        Return value: a new tag
+        """
+
+        tag = Gtk.TextTag(name=tag_name, **properties)
+        self._get_or_create_tag_table().add(tag)
+        return tag
+
+    def create_mark(self, mark_name, where, left_gravity=False):
+        return Gtk.TextBuffer.create_mark(self, mark_name, where, left_gravity)
+
+    def set_text(self, text, length=-1):
+        Gtk.TextBuffer.set_text(self, text, length)
+
+    def insert(self, iter, text):
+        if not isinstance(text , _basestring):
+            raise TypeError('text must be a string, not %s' % type(text))
+
+        length = len(text)
+        Gtk.TextBuffer.insert(self, iter, text, length)
+
+    def insert_with_tags(self, iter, text, *tags):
+        start_offset = iter.get_offset()
+        self.insert(iter, text)
+
+        if not tags:
+            return
+
+        start = self.get_iter_at_offset(start_offset)
+
+        for tag in tags:
+            self.apply_tag(tag, start, iter)
+
+    def insert_with_tags_by_name(self, iter, text, *tags):
+        if not tags:
+            return
+
+        tag_objs = []
+
+        for tag in tags:
+            tag_obj = self.get_tag_table().lookup(tag)
+            if not tag_obj:
+                raise ValueError('unknown text tag: %s' % tag)
+            tag_objs.append(tag_obj)
+
+        self.insert_with_tags(iter, text, *tag_objs)
+
+    def insert_at_cursor(self, text):
+        if not isinstance(text , _basestring):
+            raise TypeError('text must be a string, not %s' % type(text))
+
+        length = len(text)
+        Gtk.TextBuffer.insert_at_cursor(self, text, length)
+
+    def get_selection_bounds(self):
+        success, start, end = super(TextBuffer, self).get_selection_bounds()
+        if success:
+            return (start, end)
+        else:
+            return ()
+
+TextBuffer = override(TextBuffer)
+__all__.append('TextBuffer')
+
+class TextIter(Gtk.TextIter):
+
+    def forward_search(self, string, flags, limit):
+        success, match_start, match_end = super(TextIter, self).forward_search(string,
+            flags, limit)
+        return (match_start, match_end,)
+
+    def backward_search(self, string, flags, limit):
+        success, match_start, match_end = super(TextIter, self).backward_search(string,
+            flags, limit)
+        return (match_start, match_end,)
+
+    def begins_tag(self, tag=None):
+        return super(TextIter, self).begins_tag(tag)
+
+    def ends_tag(self, tag=None):
+        return super(TextIter, self).ends_tag(tag)
+
+    def toggles_tag(self, tag=None):
+        return super(TextIter, self).toggles_tag(tag)
+
+TextIter = override(TextIter)
+__all__.append('TextIter')
+
+class TreeModel(Gtk.TreeModel):
+    def __len__(self):
+        return self.iter_n_children(None)
+
+    def __bool__(self):
+        return True
+
+    # alias for Python 2.x object protocol
+    __nonzero__ = __bool__
+
+    def __getitem__(self, key):
+        if isinstance(key, Gtk.TreeIter):
+            return TreeModelRow(self, key)
+        elif isinstance(key, int) and key < 0:
+            index = len(self) + key
+            if index < 0:
+                raise IndexError("row index is out of bounds: %d" % key)
+            try:
+                aiter = self.get_iter(index)
+            except ValueError:
+                raise IndexError("could not find tree path '%s'" % key)
+            return TreeModelRow(self, aiter)
+        else:
+            try:
+                aiter = self.get_iter(key)
+            except ValueError:
+                raise IndexError("could not find tree path '%s'" % key)
+            return TreeModelRow(self, aiter)
+
+    def __iter__(self):
+        return TreeModelRowIter(self, self.get_iter_first())
+
+    def get_iter(self, path):
+        if not isinstance(path, Gtk.TreePath):
+            path = TreePath(path)
+
+        success, aiter = super(TreeModel, self).get_iter(path)
+        if not success:
+            raise ValueError("invalid tree path '%s'" % path)
+        return aiter
+
+    def get_iter_first(self):
+        success, aiter = super(TreeModel, self).get_iter_first()
+        if success:
+            return aiter
+
+    def get_iter_from_string(self, path_string):
+        success, aiter = super(TreeModel, self).get_iter_from_string(path_string)
+        if not success:
+            raise ValueError("invalid tree path '%s'" % path_string)
+        return aiter
+
+    def iter_next(self, aiter):
+        next_iter = aiter.copy()
+        success = super(TreeModel, self).iter_next(next_iter)
+        if success:
+            return next_iter
+
+    def iter_children(self, aiter):
+        success, child_iter = super(TreeModel, self).iter_children(aiter)
+        if success:
+            return child_iter
+
+    def iter_nth_child(self, parent, n):
+        success, child_iter = super(TreeModel, self).iter_nth_child(parent, n)
+        if success:
+            return child_iter
+
+    def iter_parent(self, aiter):
+        success, parent_iter = super(TreeModel, self).iter_parent(aiter)
+        if success:
+            return parent_iter
+
+    def set_row(self, treeiter, row):
+        # TODO: Accept a dictionary for row
+        # model.append(None,{COLUMN_ICON: icon, COLUMN_NAME: name})
+
+        n_columns = self.get_n_columns()
+        if len(row) != n_columns:
+            raise ValueError('row sequence has the incorrect number of elements')
+
+        for i in range(n_columns):
+            value = row[i]
+            if value is None:
+               continue  # None means skip this row
+
+            self.set_value(treeiter, i, value)
+
+    def _convert_value(self, treeiter, column, value):
+            if value is None:
+                return
+
+            # we may need to convert to a basic type
+            type_ = self.get_column_type(column)
+            if type_ == GObject.TYPE_STRING:
+                if isinstance(value, str):
+                    value = str(value)
+                elif sys.version_info < (3, 0):
+                    if isinstance(value, unicode):
+                        value = value.encode('UTF-8')
+                    else:
+                        raise ValueError('Expected string or unicode for column %i but got %s%s' % (column, value, type(value)))
+                else:
+                    raise ValueError('Expected a string for column %i but got %s' % (column, type(value)))
+            elif type_ == GObject.TYPE_FLOAT or type_ == GObject.TYPE_DOUBLE:
+                if isinstance(value, float):
+                    value = float(value)
+                else:
+                    raise ValueError('Expected a float for column %i but got %s' % (column, type(value)))
+            elif type_ == GObject.TYPE_LONG or type_ == GObject.TYPE_INT:
+                if isinstance(value, int):
+                    value = int(value)
+                elif sys.version_info < (3, 0):
+                    if isinstance(value, long):
+                        value = long(value)
+                    else:
+                        raise ValueError('Expected an long for column %i but got %s' % (column, type(value)))
+                else:
+                    raise ValueError('Expected an integer for column %i but got %s' % (column, type(value)))
+            elif type_ == GObject.TYPE_BOOLEAN:
+                cmp_classes = [int]
+                if sys.version_info < (3, 0):
+                    cmp_classes.append(long)
+
+                if isinstance(value, tuple(cmp_classes)):
+                    value = bool(value)
+                else:
+                    raise ValueError('Expected a bool for column %i but got %s' % (column, type(value)))
+            else:
+                # use GValues directly to marshal to the correct type
+                # standard object checks should take care of validation
+                # so we don't have to do it here
+                value_container = GObject.Value()
+                value_container.init(type_)
+                if type_ == GObject.TYPE_PYOBJECT:
+                    value_container.set_boxed(value)
+                    value = value_container
+                elif type_ == GObject.TYPE_CHAR:
+                    value_container.set_char(value)
+                    value = value_container
+                elif type_ == GObject.TYPE_UCHAR:
+                    value_container.set_uchar(value)
+                    value = value_container
+                elif type_ == GObject.TYPE_UNICHAR:
+                    cmp_classes = [str]
+                    if sys.version_info < (3, 0):
+                        cmp_classes.append(unicode)
+
+                    if isinstance(value, tuple(cmp_classes)):
+                        value = ord(value[0])
+
+                    value_container.set_uint(value)
+                    value = value_container
+                elif type_ == GObject.TYPE_UINT:
+                    value_container.set_uint(value)
+                    value = value_container
+                elif type_ == GObject.TYPE_ULONG:
+                    value_container.set_ulong(value)
+                    value = value_container
+                elif type_ == GObject.TYPE_INT64:
+                    value_container.set_int64(value)
+                    value = value_container
+                elif type_ == GObject.TYPE_UINT64:
+                    value_container.set_uint64(value)
+                    value = value_container
+
+            return value
+
+    def get(self, treeiter, *columns):
+        n_columns = self.get_n_columns()
+
+        values = []
+        for col in columns:
+            if not isinstance(col, int):
+                raise TypeError("column numbers must be ints")
+
+            if col < 0 or col >= n_columns:
+                raise ValueError("column number is out of range")
+
+            values.append(self.get_value(treeiter, col))
+
+        return tuple(values)
+
+TreeModel = override(TreeModel)
+__all__.append('TreeModel')
+
+class TreeSortable(Gtk.TreeSortable, ):
+
+    def get_sort_column_id(self):
+        success, sort_column_id, order = super(TreeSortable, self).get_sort_column_id()
+        if success:
+            return (sort_column_id, order,)
+        else:
+            return (None, None,)
+
+    def set_sort_func(self, sort_column_id, sort_func, user_data=None):
+        super(TreeSortable, self).set_sort_func(sort_column_id, sort_func, user_data)
+
+    def set_default_sort_func(self, sort_func, user_data=None):
+        super(TreeSortable, self).set_default_sort_func(sort_func, user_data)
+
+TreeSortable = override(TreeSortable)
+__all__.append('TreeSortable')
+
+class ListStore(Gtk.ListStore, TreeModel, TreeSortable):
+    def __init__(self, *column_types):
+        Gtk.ListStore.__init__(self)
+        self.set_column_types(column_types)
+
+    def append(self, row=None):
+        treeiter = Gtk.ListStore.append(self)
+
+        if row is not None:
+            self.set_row(treeiter, row)
+
+        return treeiter
+
+    def insert(self, position, row=None):
+        treeiter = Gtk.ListStore.insert(self, position)
+
+        if row is not None:
+            self.set_row(treeiter, row)
+
+        return treeiter
+
+    def insert_before(self, sibling, row=None):
+        treeiter = Gtk.ListStore.insert_before(self, sibling)
+
+        if row is not None:
+            self.set_row(treeiter, row)
+
+        return treeiter
+
+    def insert_after(self, sibling, row=None):
+        treeiter = Gtk.ListStore.insert_after(self, sibling)
+
+        if row is not None:
+            self.set_row(treeiter, row)
+
+        return treeiter
+
+    def set_value(self, treeiter, column, value):
+        value = self._convert_value(treeiter, column, value)
+        Gtk.ListStore.set_value(self, treeiter, column, value)
+
+
+ListStore = override(ListStore)
+__all__.append('ListStore')
+
+class TreeModelRow(object):
+
+    def __init__(self, model, iter_or_path):
+        if not isinstance(model, Gtk.TreeModel):
+            raise TypeError("expected Gtk.TreeModel, %s found" % type(model).__name__)
+        self.model = model
+        if isinstance(iter_or_path, Gtk.TreePath):
+            self.iter = model.get_iter(iter_or_path)
+        elif isinstance(iter_or_path, Gtk.TreeIter):
+            self.iter = iter_or_path
+        else:
+            raise TypeError("expected Gtk.TreeIter or Gtk.TreePath, \
+                %s found" % type(iter_or_path).__name__)
+
+    @property
+    def path(self):
+        return self.model.get_path(self.iter)
+
+    @property
+    def next(self):
+        return self.get_next()
+
+    @property
+    def parent(self):
+        return self.get_parent()
+
+    def get_next(self):
+        next_iter = self.model.iter_next(self.iter)
+        if next_iter:
+            return TreeModelRow(self.model, next_iter)
+
+    def get_parent(self):
+        parent_iter = self.model.iter_parent(self.iter)
+        if parent_iter:
+            return TreeModelRow(self.model, parent_iter)
+
+    def __getitem__(self, key):
+        if isinstance(key, int):
+            if key >= self.model.get_n_columns():
+                raise IndexError("column index is out of bounds: %d" % key)
+            elif key < 0:
+                key = self._convert_negative_index(key)
+            return self.model.get_value(self.iter, key)
+        else:
+            raise TypeError("indices must be integers, not %s" % type(key).__name__)
+
+    def __setitem__(self, key, value):
+        if isinstance(key, int):
+            if key >= self.model.get_n_columns():
+                raise IndexError("column index is out of bounds: %d" % key)
+            elif key < 0:
+                key = self._convert_negative_index(key)
+            return self.model.set_value(self.iter, key, value)
+        else:
+            raise TypeError("indices must be integers, not %s" % type(key).__name__)
+
+    def _convert_negative_index(self, index):
+        new_index = self.model.get_n_columns() + index
+        if new_index < 0:
+            raise IndexError("column index is out of bounds: %d" % index)
+        return new_index
+
+    def iterchildren(self):
+        child_iter = self.model.iter_children(self.iter)
+        return TreeModelRowIter(self.model, child_iter)
+
+__all__.append('TreeModelRow')
+
+class TreeModelRowIter(object):
+
+    def __init__(self, model, aiter):
+        self.model = model
+        self.iter = aiter
+
+    def __next__(self):
+        if not self.iter:
+            raise StopIteration
+        row = TreeModelRow(self.model, self.iter)
+        self.iter = self.model.iter_next(self.iter)
+        return row
+
+    # alias for Python 2.x object protocol
+    next = __next__
+
+    def __iter__(self):
+        return self
+
+__all__.append('TreeModelRowIter')
+
+class TreePath(Gtk.TreePath):
+
+    def __new__(cls, path=0):
+        if isinstance(path, int):
+            path = str(path)
+        elif isinstance(path, tuple):
+            path = ":".join(str(val) for val in path)
+
+        if len(path) == 0:
+            raise TypeError("could not parse subscript '%s' as a tree path" % path)
+        try:
+            return TreePath.new_from_string(path)
+        except TypeError:
+            raise TypeError("could not parse subscript '%s' as a tree path" % path)
+
+    def __str__(self):
+        return self.to_string()
+
+    def __lt__(self, other):
+        return not other is None and self.compare(other) < 0
+
+    def __le__(self, other):
+        return not other is None and self.compare(other) <= 0
+
+    def __eq__(self, other):
+        return not other is None and self.compare(other) == 0
+
+    def __ne__(self, other):
+        return other is None or self.compare(other) != 0
+
+    def __gt__(self, other):
+        return other is None or self.compare(other) > 0
+
+    def __ge__(self, other):
+        return other is None or self.compare(other) >= 0
+
+TreePath = override(TreePath)
+__all__.append('TreePath')
+
+class TreeStore(Gtk.TreeStore, TreeModel, TreeSortable):
+
+    def __init__(self, *column_types):
+        Gtk.TreeStore.__init__(self)
+        self.set_column_types(column_types)
+
+    def append(self, parent, row=None):
+        treeiter = Gtk.TreeStore.append(self, parent)
+
+        if row is not None:
+            self.set_row(treeiter, row)
+
+        return treeiter
+
+    def insert(self, parent, position, row=None):
+        treeiter = Gtk.TreeStore.insert(self, parent, position)
+
+        if row is not None:
+            self.set_row(treeiter, row)
+
+        return treeiter
+
+    def insert_before(self, parent, sibling, row=None):
+        treeiter = Gtk.TreeStore.insert_before(self, parent, sibling)
+
+        if row is not None:
+            self.set_row(treeiter, row)
+
+        return treeiter
+
+    def insert_after(self, parent, sibling, row=None):
+        treeiter = Gtk.TreeStore.insert_after(self, parent, sibling)
+
+        if row is not None:
+            self.set_row(treeiter, row)
+
+        return treeiter
+
+    def set_value(self, treeiter, column, value):
+        value = self._convert_value(treeiter, column, value)
+        Gtk.TreeStore.set_value(self, treeiter, column, value)
+
+
+TreeStore = override(TreeStore)
+__all__.append('TreeStore')
+
+class TreeView(Gtk.TreeView, Container):
+
+    def get_path_at_pos(self, x, y):
+        success, path, column, cell_x, cell_y = super(TreeView, self).get_path_at_pos(x, y)
+        if success:
+            return (path, column, cell_x, cell_y,)
+
+    def get_dest_row_at_pos(self, drag_x, drag_y):
+        success, path, pos = super(TreeView, self).get_dest_row_at_pos(drag_x, drag_y)
+        if success:
+            return (path, pos,)
+
+    def _construct_target_list(self, targets):
+        # FIXME: this should most likely be part of Widget or a global helper
+        #        function
+        target_entries = []
+        for t in targets:
+            entry = Gtk.TargetEntry.new(*t)
+            target_entries.append(entry)
+        return target_entries
+
+    def enable_model_drag_source(self, start_button_mask, targets, actions):
+        target_entries = self._construct_target_list(targets)
+        super(TreeView, self).enable_model_drag_source(start_button_mask,
+                                                       target_entries,
+                                                       actions)
+
+    def enable_model_drag_dest(self, targets, actions):
+        target_entries = self._construct_target_list(targets)
+        super(TreeView, self).enable_model_drag_dest(target_entries,
+                                                     actions)
+
+    def scroll_to_cell(self, path, column=None, use_align=False, row_align=0.0, col_align=0.0):
+        if not isinstance(path, Gtk.TreePath):
+            path = TreePath(path)
+        super(TreeView, self).scroll_to_cell(path, column, use_align, row_align, col_align)
+
+
+TreeView = override(TreeView)
+__all__.append('TreeView')
+
+class TreeViewColumn(Gtk.TreeViewColumn):
+    def __init__(self, title='',
+                 cell_renderer=None,
+                 **attributes):
+        Gtk.TreeViewColumn.__init__(self, title=title)
+        if cell_renderer:
+            self.pack_start(cell_renderer, True)
+
+        for (name, value) in attributes.items():
+            self.add_attribute(cell_renderer, name, value)
+
+    def cell_get_position(self, cell_renderer):
+        success, start_pos, width = super(TreeViewColumn, self).cell_get_position(cell_renderer)
+        if success:
+            return (start_pos, width,)
+
+    def set_cell_data_func(self, cell_renderer, func, func_data=None):
+        super(TreeViewColumn, self).set_cell_data_func(cell_renderer, func, func_data)
+
+TreeViewColumn = override(TreeViewColumn)
+__all__.append('TreeViewColumn')
+
+class TreeSelection(Gtk.TreeSelection):
+
+    def select_path(self, path):
+        if not isinstance(path, Gtk.TreePath):
+            path = TreePath(path)
+        super(TreeSelection, self).select_path(path)
+
+    def get_selected(self):
+        success, model, aiter = super(TreeSelection, self).get_selected()
+        if success:
+            return (model, aiter)
+        else:
+            return (model, None)
+
+    # for compatibility with PyGtk
+    def get_selected_rows(self):
+        rows, model = super(TreeSelection, self).get_selected_rows()
+        return (model, rows)
+
+
+TreeSelection = override(TreeSelection)
+__all__.append('TreeSelection')
+
+class Button(Gtk.Button, Container):
+    def __init__(self, label=None, stock=None, use_underline=False, **kwds):
+        if stock:
+            label = stock
+            use_stock = True
+            use_underline = True
+        else:
+            use_stock = False
+        Gtk.Button.__init__(self, label=label, use_stock=use_stock,
+                            use_underline=use_underline, **kwds)
+Button = override(Button)
+__all__.append('Button')
+
+class LinkButton(Gtk.LinkButton):
+    def __init__(self, uri, label=None, **kwds):
+        Gtk.LinkButton.__init__(self, uri=uri, label=label, **kwds)
+
+LinkButton = override(LinkButton)
+__all__.append('LinkButton')
+
+class Label(Gtk.Label):
+    def __init__(self, label=None, **kwds):
+        Gtk.Label.__init__(self, label=label, **kwds)
+
+Label = override(Label)
+__all__.append('Label')
+
+class Adjustment(Gtk.Adjustment):
+    def __init__(self, *args, **kwds):
+        arg_names = ('value', 'lower', 'upper',
+                        'step_increment', 'page_increment', 'page_size')
+        new_args = dict(zip(arg_names, args))
+        new_args.update(kwds)
+        Gtk.Adjustment.__init__(self, **new_args)
+
+        # The value property is set between lower and (upper - page_size).
+        # Just in case lower, upper or page_size was still 0 when value
+        # was set, we set it again here.
+        if 'value' in new_args:
+            self.set_value(new_args['value'])
+
+Adjustment = override(Adjustment)
+__all__.append('Adjustment')
+
+class Table(Gtk.Table, Container):
+    def __init__(self, rows=1, columns=1, homogeneous=False, **kwds):
+        if 'n_rows' in kwds:
+            rows = kwds.pop('n_rows')
+
+        if 'n_columns' in kwds:
+            columns = kwds.pop('n_columns')
+            
+        Gtk.Table.__init__(self, n_rows=rows, n_columns=columns, homogeneous=homogeneous, **kwds)
+
+    def attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions=Gtk.AttachOptions.EXPAND|Gtk.AttachOptions.FILL, yoptions=Gtk.AttachOptions.EXPAND|Gtk.AttachOptions.FILL, xpadding=0, ypadding=0):
+        Gtk.Table.attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions, yoptions, xpadding, ypadding)
+
+Table = override(Table)
+__all__.append('Table')
+
+class ScrolledWindow(Gtk.ScrolledWindow):
+    def __init__(self, hadjustment=None, vadjustment=None, **kwds):
+        Gtk.ScrolledWindow.__init__(self, hadjustment=hadjustment, vadjustment=vadjustment, **kwds)
+
+ScrolledWindow = override(ScrolledWindow)
+__all__.append('ScrolledWindow')
+
+class Paned(Gtk.Paned):
+    def pack1(self, child, resize=False, shrink=True):
+        super(Paned, self).pack1(child, resize, shrink)
+
+    def pack2(self, child, resize=True, shrink=True):
+        super(Paned, self).pack2(child, resize, shrink)
+
+Paned = override(Paned)
+__all__.append('Paned')
+
+if Gtk._version != '2.0':
+    class Menu(Gtk.Menu):
+        def popup(self, parent_menu_shell, parent_menu_item, func, data, button, activate_time):
+            self.popup_for_device(None, parent_menu_shell, parent_menu_item, func, data, button, activate_time)
+    Menu = override(Menu)
+    __all__.append('Menu')
+
+_Gtk_main_quit = Gtk.main_quit
+@override(Gtk.main_quit)
+def main_quit(*args):
+    _Gtk_main_quit()
+
+_Gtk_stock_lookup = Gtk.stock_lookup
+@override(Gtk.stock_lookup)
+def stock_lookup(*args):
+    success, item = _Gtk_stock_lookup(*args)
+    if not success:
+        return None
+
+    return item
+
+initialized, argv = Gtk.init_check(sys.argv)
+sys.argv = list(argv)
+if not initialized:
+    raise RuntimeError("Gtk couldn't be initialized")
diff --git a/gi/overrides/Makefile.am b/gi/overrides/Makefile.am
new file mode 100644 (file)
index 0000000..7a15b46
--- /dev/null
@@ -0,0 +1,17 @@
+PLATFORM_VERSION = 2.0
+
+pkgpyexecdir = $(pyexecdir)/gi
+
+pygioverridesdir = $(pkgpyexecdir)/overrides
+pygioverrides_PYTHON = \
+       GLib.py \
+       Gtk.py \
+       Gdk.py \
+       Gio.py \
+       GIMarshallingTests.py \
+       Pango.py \
+       keysyms.py \
+       __init__.py
+
+
+-include $(top_srcdir)/git.mk
diff --git a/gi/overrides/Makefile.in b/gi/overrides/Makefile.in
new file mode 100644 (file)
index 0000000..96ce126
--- /dev/null
@@ -0,0 +1,485 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = gi/overrides
+DIST_COMMON = $(pygioverrides_PYTHON) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+       $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pygioverridesdir)"
+py_compile = $(top_srcdir)/py-compile
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
+GI_LIBS = @GI_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PLATFORM = @PLATFORM@
+PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
+PYCAIRO_LIBS = @PYCAIRO_LIBS@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = $(pyexecdir)/gi
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+PLATFORM_VERSION = 2.0
+pygioverridesdir = $(pkgpyexecdir)/overrides
+pygioverrides_PYTHON = \
+       GLib.py \
+       Gtk.py \
+       Gdk.py \
+       Gio.py \
+       GIMarshallingTests.py \
+       Pango.py \
+       keysyms.py \
+       __init__.py
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gi/overrides/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign gi/overrides/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-pygioverridesPYTHON: $(pygioverrides_PYTHON)
+       @$(NORMAL_INSTALL)
+       test -z "$(pygioverridesdir)" || $(MKDIR_P) "$(DESTDIR)$(pygioverridesdir)"
+       @list='$(pygioverrides_PYTHON)'; dlist=; list2=; test -n "$(pygioverridesdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+         if test -f $$b$$p; then \
+           $(am__strip_dir) \
+           dlist="$$dlist $$f"; \
+           list2="$$list2 $$b$$p"; \
+         else :; fi; \
+       done; \
+       for file in $$list2; do echo $$file; done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pygioverridesdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pygioverridesdir)" || exit $$?; \
+       done || exit $$?; \
+       if test -n "$$dlist"; then \
+         if test -z "$(DESTDIR)"; then \
+           PYTHON=$(PYTHON) $(py_compile) --basedir "$(pygioverridesdir)" $$dlist; \
+         else \
+           PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pygioverridesdir)" $$dlist; \
+         fi; \
+       else :; fi
+
+uninstall-pygioverridesPYTHON:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pygioverrides_PYTHON)'; test -n "$(pygioverridesdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       filesc=`echo "$$files" | sed 's|$$|c|'`; \
+       fileso=`echo "$$files" | sed 's|$$|o|'`; \
+       echo " ( cd '$(DESTDIR)$(pygioverridesdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pygioverridesdir)" && rm -f $$files || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pygioverridesdir)' && rm -f" $$filesc ")"; \
+       cd "$(DESTDIR)$(pygioverridesdir)" && rm -f $$filesc || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pygioverridesdir)' && rm -f" $$fileso ")"; \
+       cd "$(DESTDIR)$(pygioverridesdir)" && rm -f $$fileso
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$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
+installdirs:
+       for dir in "$(DESTDIR)$(pygioverridesdir)"; 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:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pygioverridesPYTHON
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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-pygioverridesPYTHON
+
+.MAKE: install-am install-strip
+
+.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-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am \
+       install-pygioverridesPYTHON 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-pygioverridesPYTHON
+
+
+-include $(top_srcdir)/git.mk
+
+# 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:
diff --git a/gi/overrides/Pango.py b/gi/overrides/Pango.py
new file mode 100644 (file)
index 0000000..3269806
--- /dev/null
@@ -0,0 +1,51 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+#
+# Copyright (C) 2010 Paolo Borelli <pborelli@gnome.org>
+#
+# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+from ..overrides import override
+from ..importer import modules
+
+Pango = modules['Pango']._introspection_module
+
+__all__ = []
+
+class FontDescription(Pango.FontDescription):
+
+    def __new__(cls, string=None):
+        if string is not None:
+            return Pango.font_description_from_string (string)
+        else:
+            return Pango.FontDescription.__new__(cls)
+
+FontDescription = override(FontDescription)
+__all__.append('FontDescription')
+
+class Layout(Pango.Layout):
+
+    def __new__(cls, context):
+        return Pango.Layout.new(context)
+
+    def __init__(self, context, **kwds):
+        # simply discard 'context', since it was set by
+        # __new__ and it is not a PangoLayout property
+        super(Layout, self).__init__(**kwds)
+
+Layout = override(Layout)
+__all__.append('Layout')
+
diff --git a/gi/overrides/__init__.py b/gi/overrides/__init__.py
new file mode 100644 (file)
index 0000000..a98974f
--- /dev/null
@@ -0,0 +1,66 @@
+import sys
+import types
+
+import gobject
+
+registry = None
+class _Registry(dict):
+    def __setitem__(self, key, value):
+        '''We do checks here to make sure only submodules of the override 
+        module are added.  Key and value should be the same object and come
+        from the gi.override module.  
+
+        We add the override to the dict as "override_module.name".  For instance
+        if we were overriding Gtk.Button you would retrive it as such:
+        registry['Gtk.Button']
+        ''' 
+        if not key == value:
+            raise KeyError('You have tried to modify the registry.  This should only be done by the override decorator')
+
+        info = getattr(value, '__info__')
+        if info == None:
+            raise KeyError('Can not override a type %s, which is not in a gobject introspection typelib' % value.__name__)
+
+        if not value.__module__.startswith('gi.overrides'):
+            raise KeyError('You have tried to modify the registry outside of the overrides module.  This is not allowed')
+
+        g_type = info.get_g_type()
+        assert g_type != gobject.TYPE_NONE
+        if g_type != gobject.TYPE_INVALID:
+            g_type.pytype = value 
+
+            # strip gi.overrides from module name
+            module =  value.__module__[13:]
+            key = "%s.%s" % (module, value.__name__)
+            super(_Registry, self).__setitem__(key, value)
+
+    def register(self, override_class):
+        self[override_class] = override_class
+
+
+class overridefunc(object):
+    '''decorator for overriding a function'''
+    def __init__(self, func):
+        if not hasattr(func, '__info__'):
+            raise TypeError("func must be an gi function")
+        from ..importer import modules
+        self.module = modules[func.__module__]._introspection_module
+
+    def __call__(self, func):
+        def wrapper(*args, **kwargs):
+            return func(*args, **kwargs)
+        wrapper.__name__ = func.__name__
+        setattr(self.module, func.__name__, wrapper)
+        return wrapper
+
+registry = _Registry()
+
+def override(type_):
+    '''Decorator for registering an override'''
+    if type(type_) == types.FunctionType:
+        return overridefunc(type_)
+    else:
+        registry.register(type_)
+        return type_
+
+
diff --git a/gi/overrides/keysyms.py b/gi/overrides/keysyms.py
new file mode 100644 (file)
index 0000000..35ee8eb
--- /dev/null
@@ -0,0 +1,1499 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# pygtk - Python bindings for the GTK toolkit.
+# Copyright (C) 1998-2003  James Henstridge
+#
+#   gtk/keysyms.py: list of keysyms.
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+VoidSymbol = 0xFFFFFF
+BackSpace = 0xFF08
+Tab = 0xFF09
+Linefeed = 0xFF0A
+Clear = 0xFF0B
+Return = 0xFF0D
+Pause = 0xFF13
+Scroll_Lock = 0xFF14
+Sys_Req = 0xFF15
+Escape = 0xFF1B
+Delete = 0xFFFF
+Multi_key = 0xFF20
+Codeinput = 0xFF37
+SingleCandidate = 0xFF3C
+MultipleCandidate = 0xFF3D
+PreviousCandidate = 0xFF3E
+Kanji = 0xFF21
+Muhenkan = 0xFF22
+Henkan_Mode = 0xFF23
+Henkan = 0xFF23
+Romaji = 0xFF24
+Hiragana = 0xFF25
+Katakana = 0xFF26
+Hiragana_Katakana = 0xFF27
+Zenkaku = 0xFF28
+Hankaku = 0xFF29
+Zenkaku_Hankaku = 0xFF2A
+Touroku = 0xFF2B
+Massyo = 0xFF2C
+Kana_Lock = 0xFF2D
+Kana_Shift = 0xFF2E
+Eisu_Shift = 0xFF2F
+Eisu_toggle = 0xFF30
+Kanji_Bangou = 0xFF37
+Zen_Koho = 0xFF3D
+Mae_Koho = 0xFF3E
+Home = 0xFF50
+Left = 0xFF51
+Up = 0xFF52
+Right = 0xFF53
+Down = 0xFF54
+Prior = 0xFF55
+Page_Up = 0xFF55
+Next = 0xFF56
+Page_Down = 0xFF56
+End = 0xFF57
+Begin = 0xFF58
+Select = 0xFF60
+Print = 0xFF61
+Execute = 0xFF62
+Insert = 0xFF63
+Undo = 0xFF65
+Redo = 0xFF66
+Menu = 0xFF67
+Find = 0xFF68
+Cancel = 0xFF69
+Help = 0xFF6A
+Break = 0xFF6B
+Mode_switch = 0xFF7E
+script_switch = 0xFF7E
+Num_Lock = 0xFF7F
+KP_Space = 0xFF80
+KP_Tab = 0xFF89
+KP_Enter = 0xFF8D
+KP_F1 = 0xFF91
+KP_F2 = 0xFF92
+KP_F3 = 0xFF93
+KP_F4 = 0xFF94
+KP_Home = 0xFF95
+KP_Left = 0xFF96
+KP_Up = 0xFF97
+KP_Right = 0xFF98
+KP_Down = 0xFF99
+KP_Prior = 0xFF9A
+KP_Page_Up = 0xFF9A
+KP_Next = 0xFF9B
+KP_Page_Down = 0xFF9B
+KP_End = 0xFF9C
+KP_Begin = 0xFF9D
+KP_Insert = 0xFF9E
+KP_Delete = 0xFF9F
+KP_Equal = 0xFFBD
+KP_Multiply = 0xFFAA
+KP_Add = 0xFFAB
+KP_Separator = 0xFFAC
+KP_Subtract = 0xFFAD
+KP_Decimal = 0xFFAE
+KP_Divide = 0xFFAF
+KP_0 = 0xFFB0
+KP_1 = 0xFFB1
+KP_2 = 0xFFB2
+KP_3 = 0xFFB3
+KP_4 = 0xFFB4
+KP_5 = 0xFFB5
+KP_6 = 0xFFB6
+KP_7 = 0xFFB7
+KP_8 = 0xFFB8
+KP_9 = 0xFFB9
+F1 = 0xFFBE
+F2 = 0xFFBF
+F3 = 0xFFC0
+F4 = 0xFFC1
+F5 = 0xFFC2
+F6 = 0xFFC3
+F7 = 0xFFC4
+F8 = 0xFFC5
+F9 = 0xFFC6
+F10 = 0xFFC7
+F11 = 0xFFC8
+L1 = 0xFFC8
+F12 = 0xFFC9
+L2 = 0xFFC9
+F13 = 0xFFCA
+L3 = 0xFFCA
+F14 = 0xFFCB
+L4 = 0xFFCB
+F15 = 0xFFCC
+L5 = 0xFFCC
+F16 = 0xFFCD
+L6 = 0xFFCD
+F17 = 0xFFCE
+L7 = 0xFFCE
+F18 = 0xFFCF
+L8 = 0xFFCF
+F19 = 0xFFD0
+L9 = 0xFFD0
+F20 = 0xFFD1
+L10 = 0xFFD1
+F21 = 0xFFD2
+R1 = 0xFFD2
+F22 = 0xFFD3
+R2 = 0xFFD3
+F23 = 0xFFD4
+R3 = 0xFFD4
+F24 = 0xFFD5
+R4 = 0xFFD5
+F25 = 0xFFD6
+R5 = 0xFFD6
+F26 = 0xFFD7
+R6 = 0xFFD7
+F27 = 0xFFD8
+R7 = 0xFFD8
+F28 = 0xFFD9
+R8 = 0xFFD9
+F29 = 0xFFDA
+R9 = 0xFFDA
+F30 = 0xFFDB
+R10 = 0xFFDB
+F31 = 0xFFDC
+R11 = 0xFFDC
+F32 = 0xFFDD
+R12 = 0xFFDD
+F33 = 0xFFDE
+R13 = 0xFFDE
+F34 = 0xFFDF
+R14 = 0xFFDF
+F35 = 0xFFE0
+R15 = 0xFFE0
+Shift_L = 0xFFE1
+Shift_R = 0xFFE2
+Control_L = 0xFFE3
+Control_R = 0xFFE4
+Caps_Lock = 0xFFE5
+Shift_Lock = 0xFFE6
+Meta_L = 0xFFE7
+Meta_R = 0xFFE8
+Alt_L = 0xFFE9
+Alt_R = 0xFFEA
+Super_L = 0xFFEB
+Super_R = 0xFFEC
+Hyper_L = 0xFFED
+Hyper_R = 0xFFEE
+ISO_Lock = 0xFE01
+ISO_Level2_Latch = 0xFE02
+ISO_Level3_Shift = 0xFE03
+ISO_Level3_Latch = 0xFE04
+ISO_Level3_Lock = 0xFE05
+ISO_Group_Shift = 0xFF7E
+ISO_Group_Latch = 0xFE06
+ISO_Group_Lock = 0xFE07
+ISO_Next_Group = 0xFE08
+ISO_Next_Group_Lock = 0xFE09
+ISO_Prev_Group = 0xFE0A
+ISO_Prev_Group_Lock = 0xFE0B
+ISO_First_Group = 0xFE0C
+ISO_First_Group_Lock = 0xFE0D
+ISO_Last_Group = 0xFE0E
+ISO_Last_Group_Lock = 0xFE0F
+ISO_Left_Tab = 0xFE20
+ISO_Move_Line_Up = 0xFE21
+ISO_Move_Line_Down = 0xFE22
+ISO_Partial_Line_Up = 0xFE23
+ISO_Partial_Line_Down = 0xFE24
+ISO_Partial_Space_Left = 0xFE25
+ISO_Partial_Space_Right = 0xFE26
+ISO_Set_Margin_Left = 0xFE27
+ISO_Set_Margin_Right = 0xFE28
+ISO_Release_Margin_Left = 0xFE29
+ISO_Release_Margin_Right = 0xFE2A
+ISO_Release_Both_Margins = 0xFE2B
+ISO_Fast_Cursor_Left = 0xFE2C
+ISO_Fast_Cursor_Right = 0xFE2D
+ISO_Fast_Cursor_Up = 0xFE2E
+ISO_Fast_Cursor_Down = 0xFE2F
+ISO_Continuous_Underline = 0xFE30
+ISO_Discontinuous_Underline = 0xFE31
+ISO_Emphasize = 0xFE32
+ISO_Center_Object = 0xFE33
+ISO_Enter = 0xFE34
+dead_grave = 0xFE50
+dead_acute = 0xFE51
+dead_circumflex = 0xFE52
+dead_tilde = 0xFE53
+dead_macron = 0xFE54
+dead_breve = 0xFE55
+dead_abovedot = 0xFE56
+dead_diaeresis = 0xFE57
+dead_abovering = 0xFE58
+dead_doubleacute = 0xFE59
+dead_caron = 0xFE5A
+dead_cedilla = 0xFE5B
+dead_ogonek = 0xFE5C
+dead_iota = 0xFE5D
+dead_voiced_sound = 0xFE5E
+dead_semivoiced_sound = 0xFE5F
+dead_belowdot = 0xFE60
+First_Virtual_Screen = 0xFED0
+Prev_Virtual_Screen = 0xFED1
+Next_Virtual_Screen = 0xFED2
+Last_Virtual_Screen = 0xFED4
+Terminate_Server = 0xFED5
+AccessX_Enable = 0xFE70
+AccessX_Feedback_Enable = 0xFE71
+RepeatKeys_Enable = 0xFE72
+SlowKeys_Enable = 0xFE73
+BounceKeys_Enable = 0xFE74
+StickyKeys_Enable = 0xFE75
+MouseKeys_Enable = 0xFE76
+MouseKeys_Accel_Enable = 0xFE77
+Overlay1_Enable = 0xFE78
+Overlay2_Enable = 0xFE79
+AudibleBell_Enable = 0xFE7A
+Pointer_Left = 0xFEE0
+Pointer_Right = 0xFEE1
+Pointer_Up = 0xFEE2
+Pointer_Down = 0xFEE3
+Pointer_UpLeft = 0xFEE4
+Pointer_UpRight = 0xFEE5
+Pointer_DownLeft = 0xFEE6
+Pointer_DownRight = 0xFEE7
+Pointer_Button_Dflt = 0xFEE8
+Pointer_Button1 = 0xFEE9
+Pointer_Button2 = 0xFEEA
+Pointer_Button3 = 0xFEEB
+Pointer_Button4 = 0xFEEC
+Pointer_Button5 = 0xFEED
+Pointer_DblClick_Dflt = 0xFEEE
+Pointer_DblClick1 = 0xFEEF
+Pointer_DblClick2 = 0xFEF0
+Pointer_DblClick3 = 0xFEF1
+Pointer_DblClick4 = 0xFEF2
+Pointer_DblClick5 = 0xFEF3
+Pointer_Drag_Dflt = 0xFEF4
+Pointer_Drag1 = 0xFEF5
+Pointer_Drag2 = 0xFEF6
+Pointer_Drag3 = 0xFEF7
+Pointer_Drag4 = 0xFEF8
+Pointer_Drag5 = 0xFEFD
+Pointer_EnableKeys = 0xFEF9
+Pointer_Accelerate = 0xFEFA
+Pointer_DfltBtnNext = 0xFEFB
+Pointer_DfltBtnPrev = 0xFEFC
+_3270_Duplicate = 0xFD01
+_3270_FieldMark = 0xFD02
+_3270_Right2 = 0xFD03
+_3270_Left2 = 0xFD04
+_3270_BackTab = 0xFD05
+_3270_EraseEOF = 0xFD06
+_3270_EraseInput = 0xFD07
+_3270_Reset = 0xFD08
+_3270_Quit = 0xFD09
+_3270_PA1 = 0xFD0A
+_3270_PA2 = 0xFD0B
+_3270_PA3 = 0xFD0C
+_3270_Test = 0xFD0D
+_3270_Attn = 0xFD0E
+_3270_CursorBlink = 0xFD0F
+_3270_AltCursor = 0xFD10
+_3270_KeyClick = 0xFD11
+_3270_Jump = 0xFD12
+_3270_Ident = 0xFD13
+_3270_Rule = 0xFD14
+_3270_Copy = 0xFD15
+_3270_Play = 0xFD16
+_3270_Setup = 0xFD17
+_3270_Record = 0xFD18
+_3270_ChangeScreen = 0xFD19
+_3270_DeleteWord = 0xFD1A
+_3270_ExSelect = 0xFD1B
+_3270_CursorSelect = 0xFD1C
+_3270_PrintScreen = 0xFD1D
+_3270_Enter = 0xFD1E
+space = 0x020
+exclam = 0x021
+quotedbl = 0x022
+numbersign = 0x023
+dollar = 0x024
+percent = 0x025
+ampersand = 0x026
+apostrophe = 0x027
+quoteright = 0x027
+parenleft = 0x028
+parenright = 0x029
+asterisk = 0x02a
+plus = 0x02b
+comma = 0x02c
+minus = 0x02d
+period = 0x02e
+slash = 0x02f
+_0 = 0x030
+_1 = 0x031
+_2 = 0x032
+_3 = 0x033
+_4 = 0x034
+_5 = 0x035
+_6 = 0x036
+_7 = 0x037
+_8 = 0x038
+_9 = 0x039
+colon = 0x03a
+semicolon = 0x03b
+less = 0x03c
+equal = 0x03d
+greater = 0x03e
+question = 0x03f
+at = 0x040
+A = 0x041
+B = 0x042
+C = 0x043
+D = 0x044
+E = 0x045
+F = 0x046
+G = 0x047
+H = 0x048
+I = 0x049
+J = 0x04a
+K = 0x04b
+L = 0x04c
+M = 0x04d
+N = 0x04e
+O = 0x04f
+P = 0x050
+Q = 0x051
+R = 0x052
+S = 0x053
+T = 0x054
+U = 0x055
+V = 0x056
+W = 0x057
+X = 0x058
+Y = 0x059
+Z = 0x05a
+bracketleft = 0x05b
+backslash = 0x05c
+bracketright = 0x05d
+asciicircum = 0x05e
+underscore = 0x05f
+grave = 0x060
+quoteleft = 0x060
+a = 0x061
+b = 0x062
+c = 0x063
+d = 0x064
+e = 0x065
+f = 0x066
+g = 0x067
+h = 0x068
+i = 0x069
+j = 0x06a
+k = 0x06b
+l = 0x06c
+m = 0x06d
+n = 0x06e
+o = 0x06f
+p = 0x070
+q = 0x071
+r = 0x072
+s = 0x073
+t = 0x074
+u = 0x075
+v = 0x076
+w = 0x077
+x = 0x078
+y = 0x079
+z = 0x07a
+braceleft = 0x07b
+bar = 0x07c
+braceright = 0x07d
+asciitilde = 0x07e
+nobreakspace = 0x0a0
+exclamdown = 0x0a1
+cent = 0x0a2
+sterling = 0x0a3
+currency = 0x0a4
+yen = 0x0a5
+brokenbar = 0x0a6
+section = 0x0a7
+diaeresis = 0x0a8
+copyright = 0x0a9
+ordfeminine = 0x0aa
+guillemotleft = 0x0ab
+notsign = 0x0ac
+hyphen = 0x0ad
+registered = 0x0ae
+macron = 0x0af
+degree = 0x0b0
+plusminus = 0x0b1
+twosuperior = 0x0b2
+threesuperior = 0x0b3
+acute = 0x0b4
+mu = 0x0b5
+paragraph = 0x0b6
+periodcentered = 0x0b7
+cedilla = 0x0b8
+onesuperior = 0x0b9
+masculine = 0x0ba
+guillemotright = 0x0bb
+onequarter = 0x0bc
+onehalf = 0x0bd
+threequarters = 0x0be
+questiondown = 0x0bf
+Agrave = 0x0c0
+Aacute = 0x0c1
+Acircumflex = 0x0c2
+Atilde = 0x0c3
+Adiaeresis = 0x0c4
+Aring = 0x0c5
+AE = 0x0c6
+Ccedilla = 0x0c7
+Egrave = 0x0c8
+Eacute = 0x0c9
+Ecircumflex = 0x0ca
+Ediaeresis = 0x0cb
+Igrave = 0x0cc
+Iacute = 0x0cd
+Icircumflex = 0x0ce
+Idiaeresis = 0x0cf
+ETH = 0x0d0
+Eth = 0x0d0
+Ntilde = 0x0d1
+Ograve = 0x0d2
+Oacute = 0x0d3
+Ocircumflex = 0x0d4
+Otilde = 0x0d5
+Odiaeresis = 0x0d6
+multiply = 0x0d7
+Ooblique = 0x0d8
+Ugrave = 0x0d9
+Uacute = 0x0da
+Ucircumflex = 0x0db
+Udiaeresis = 0x0dc
+Yacute = 0x0dd
+THORN = 0x0de
+Thorn = 0x0de
+ssharp = 0x0df
+agrave = 0x0e0
+aacute = 0x0e1
+acircumflex = 0x0e2
+atilde = 0x0e3
+adiaeresis = 0x0e4
+aring = 0x0e5
+ae = 0x0e6
+ccedilla = 0x0e7
+egrave = 0x0e8
+eacute = 0x0e9
+ecircumflex = 0x0ea
+ediaeresis = 0x0eb
+igrave = 0x0ec
+iacute = 0x0ed
+icircumflex = 0x0ee
+idiaeresis = 0x0ef
+eth = 0x0f0
+ntilde = 0x0f1
+ograve = 0x0f2
+oacute = 0x0f3
+ocircumflex = 0x0f4
+otilde = 0x0f5
+odiaeresis = 0x0f6
+division = 0x0f7
+oslash = 0x0f8
+ugrave = 0x0f9
+uacute = 0x0fa
+ucircumflex = 0x0fb
+udiaeresis = 0x0fc
+yacute = 0x0fd
+thorn = 0x0fe
+ydiaeresis = 0x0ff
+Aogonek = 0x1a1
+breve = 0x1a2
+Lstroke = 0x1a3
+Lcaron = 0x1a5
+Sacute = 0x1a6
+Scaron = 0x1a9
+Scedilla = 0x1aa
+Tcaron = 0x1ab
+Zacute = 0x1ac
+Zcaron = 0x1ae
+Zabovedot = 0x1af
+aogonek = 0x1b1
+ogonek = 0x1b2
+lstroke = 0x1b3
+lcaron = 0x1b5
+sacute = 0x1b6
+caron = 0x1b7
+scaron = 0x1b9
+scedilla = 0x1ba
+tcaron = 0x1bb
+zacute = 0x1bc
+doubleacute = 0x1bd
+zcaron = 0x1be
+zabovedot = 0x1bf
+Racute = 0x1c0
+Abreve = 0x1c3
+Lacute = 0x1c5
+Cacute = 0x1c6
+Ccaron = 0x1c8
+Eogonek = 0x1ca
+Ecaron = 0x1cc
+Dcaron = 0x1cf
+Dstroke = 0x1d0
+Nacute = 0x1d1
+Ncaron = 0x1d2
+Odoubleacute = 0x1d5
+Rcaron = 0x1d8
+Uring = 0x1d9
+Udoubleacute = 0x1db
+Tcedilla = 0x1de
+racute = 0x1e0
+abreve = 0x1e3
+lacute = 0x1e5
+cacute = 0x1e6
+ccaron = 0x1e8
+eogonek = 0x1ea
+ecaron = 0x1ec
+dcaron = 0x1ef
+dstroke = 0x1f0
+nacute = 0x1f1
+ncaron = 0x1f2
+odoubleacute = 0x1f5
+udoubleacute = 0x1fb
+rcaron = 0x1f8
+uring = 0x1f9
+tcedilla = 0x1fe
+abovedot = 0x1ff
+Hstroke = 0x2a1
+Hcircumflex = 0x2a6
+Iabovedot = 0x2a9
+Gbreve = 0x2ab
+Jcircumflex = 0x2ac
+hstroke = 0x2b1
+hcircumflex = 0x2b6
+idotless = 0x2b9
+gbreve = 0x2bb
+jcircumflex = 0x2bc
+Cabovedot = 0x2c5
+Ccircumflex = 0x2c6
+Gabovedot = 0x2d5
+Gcircumflex = 0x2d8
+Ubreve = 0x2dd
+Scircumflex = 0x2de
+cabovedot = 0x2e5
+ccircumflex = 0x2e6
+gabovedot = 0x2f5
+gcircumflex = 0x2f8
+ubreve = 0x2fd
+scircumflex = 0x2fe
+kra = 0x3a2
+kappa = 0x3a2
+Rcedilla = 0x3a3
+Itilde = 0x3a5
+Lcedilla = 0x3a6
+Emacron = 0x3aa
+Gcedilla = 0x3ab
+Tslash = 0x3ac
+rcedilla = 0x3b3
+itilde = 0x3b5
+lcedilla = 0x3b6
+emacron = 0x3ba
+gcedilla = 0x3bb
+tslash = 0x3bc
+ENG = 0x3bd
+eng = 0x3bf
+Amacron = 0x3c0
+Iogonek = 0x3c7
+Eabovedot = 0x3cc
+Imacron = 0x3cf
+Ncedilla = 0x3d1
+Omacron = 0x3d2
+Kcedilla = 0x3d3
+Uogonek = 0x3d9
+Utilde = 0x3dd
+Umacron = 0x3de
+amacron = 0x3e0
+iogonek = 0x3e7
+eabovedot = 0x3ec
+imacron = 0x3ef
+ncedilla = 0x3f1
+omacron = 0x3f2
+kcedilla = 0x3f3
+uogonek = 0x3f9
+utilde = 0x3fd
+umacron = 0x3fe
+OE = 0x13bc
+oe = 0x13bd
+Ydiaeresis = 0x13be
+overline = 0x47e
+kana_fullstop = 0x4a1
+kana_openingbracket = 0x4a2
+kana_closingbracket = 0x4a3
+kana_comma = 0x4a4
+kana_conjunctive = 0x4a5
+kana_middledot = 0x4a5
+kana_WO = 0x4a6
+kana_a = 0x4a7
+kana_i = 0x4a8
+kana_u = 0x4a9
+kana_e = 0x4aa
+kana_o = 0x4ab
+kana_ya = 0x4ac
+kana_yu = 0x4ad
+kana_yo = 0x4ae
+kana_tsu = 0x4af
+kana_tu = 0x4af
+prolongedsound = 0x4b0
+kana_A = 0x4b1
+kana_I = 0x4b2
+kana_U = 0x4b3
+kana_E = 0x4b4
+kana_O = 0x4b5
+kana_KA = 0x4b6
+kana_KI = 0x4b7
+kana_KU = 0x4b8
+kana_KE = 0x4b9
+kana_KO = 0x4ba
+kana_SA = 0x4bb
+kana_SHI = 0x4bc
+kana_SU = 0x4bd
+kana_SE = 0x4be
+kana_SO = 0x4bf
+kana_TA = 0x4c0
+kana_CHI = 0x4c1
+kana_TI = 0x4c1
+kana_TSU = 0x4c2
+kana_TU = 0x4c2
+kana_TE = 0x4c3
+kana_TO = 0x4c4
+kana_NA = 0x4c5
+kana_NI = 0x4c6
+kana_NU = 0x4c7
+kana_NE = 0x4c8
+kana_NO = 0x4c9
+kana_HA = 0x4ca
+kana_HI = 0x4cb
+kana_FU = 0x4cc
+kana_HU = 0x4cc
+kana_HE = 0x4cd
+kana_HO = 0x4ce
+kana_MA = 0x4cf
+kana_MI = 0x4d0
+kana_MU = 0x4d1
+kana_ME = 0x4d2
+kana_MO = 0x4d3
+kana_YA = 0x4d4
+kana_YU = 0x4d5
+kana_YO = 0x4d6
+kana_RA = 0x4d7
+kana_RI = 0x4d8
+kana_RU = 0x4d9
+kana_RE = 0x4da
+kana_RO = 0x4db
+kana_WA = 0x4dc
+kana_N = 0x4dd
+voicedsound = 0x4de
+semivoicedsound = 0x4df
+kana_switch = 0xFF7E
+Arabic_comma = 0x5ac
+Arabic_semicolon = 0x5bb
+Arabic_question_mark = 0x5bf
+Arabic_hamza = 0x5c1
+Arabic_maddaonalef = 0x5c2
+Arabic_hamzaonalef = 0x5c3
+Arabic_hamzaonwaw = 0x5c4
+Arabic_hamzaunderalef = 0x5c5
+Arabic_hamzaonyeh = 0x5c6
+Arabic_alef = 0x5c7
+Arabic_beh = 0x5c8
+Arabic_tehmarbuta = 0x5c9
+Arabic_teh = 0x5ca
+Arabic_theh = 0x5cb
+Arabic_jeem = 0x5cc
+Arabic_hah = 0x5cd
+Arabic_khah = 0x5ce
+Arabic_dal = 0x5cf
+Arabic_thal = 0x5d0
+Arabic_ra = 0x5d1
+Arabic_zain = 0x5d2
+Arabic_seen = 0x5d3
+Arabic_sheen = 0x5d4
+Arabic_sad = 0x5d5
+Arabic_dad = 0x5d6
+Arabic_tah = 0x5d7
+Arabic_zah = 0x5d8
+Arabic_ain = 0x5d9
+Arabic_ghain = 0x5da
+Arabic_tatweel = 0x5e0
+Arabic_feh = 0x5e1
+Arabic_qaf = 0x5e2
+Arabic_kaf = 0x5e3
+Arabic_lam = 0x5e4
+Arabic_meem = 0x5e5
+Arabic_noon = 0x5e6
+Arabic_ha = 0x5e7
+Arabic_heh = 0x5e7
+Arabic_waw = 0x5e8
+Arabic_alefmaksura = 0x5e9
+Arabic_yeh = 0x5ea
+Arabic_fathatan = 0x5eb
+Arabic_dammatan = 0x5ec
+Arabic_kasratan = 0x5ed
+Arabic_fatha = 0x5ee
+Arabic_damma = 0x5ef
+Arabic_kasra = 0x5f0
+Arabic_shadda = 0x5f1
+Arabic_sukun = 0x5f2
+Arabic_switch = 0xFF7E
+Serbian_dje = 0x6a1
+Macedonia_gje = 0x6a2
+Cyrillic_io = 0x6a3
+Ukrainian_ie = 0x6a4
+Ukranian_je = 0x6a4
+Macedonia_dse = 0x6a5
+Ukrainian_i = 0x6a6
+Ukranian_i = 0x6a6
+Ukrainian_yi = 0x6a7
+Ukranian_yi = 0x6a7
+Cyrillic_je = 0x6a8
+Serbian_je = 0x6a8
+Cyrillic_lje = 0x6a9
+Serbian_lje = 0x6a9
+Cyrillic_nje = 0x6aa
+Serbian_nje = 0x6aa
+Serbian_tshe = 0x6ab
+Macedonia_kje = 0x6ac
+Ukrainian_ghe_with_upturn = 0x6ad
+Byelorussian_shortu = 0x6ae
+Cyrillic_dzhe = 0x6af
+Serbian_dze = 0x6af
+numerosign = 0x6b0
+Serbian_DJE = 0x6b1
+Macedonia_GJE = 0x6b2
+Cyrillic_IO = 0x6b3
+Ukrainian_IE = 0x6b4
+Ukranian_JE = 0x6b4
+Macedonia_DSE = 0x6b5
+Ukrainian_I = 0x6b6
+Ukranian_I = 0x6b6
+Ukrainian_YI = 0x6b7
+Ukranian_YI = 0x6b7
+Cyrillic_JE = 0x6b8
+Serbian_JE = 0x6b8
+Cyrillic_LJE = 0x6b9
+Serbian_LJE = 0x6b9
+Cyrillic_NJE = 0x6ba
+Serbian_NJE = 0x6ba
+Serbian_TSHE = 0x6bb
+Macedonia_KJE = 0x6bc
+Ukrainian_GHE_WITH_UPTURN = 0x6bd
+Byelorussian_SHORTU = 0x6be
+Cyrillic_DZHE = 0x6bf
+Serbian_DZE = 0x6bf
+Cyrillic_yu = 0x6c0
+Cyrillic_a = 0x6c1
+Cyrillic_be = 0x6c2
+Cyrillic_tse = 0x6c3
+Cyrillic_de = 0x6c4
+Cyrillic_ie = 0x6c5
+Cyrillic_ef = 0x6c6
+Cyrillic_ghe = 0x6c7
+Cyrillic_ha = 0x6c8
+Cyrillic_i = 0x6c9
+Cyrillic_shorti = 0x6ca
+Cyrillic_ka = 0x6cb
+Cyrillic_el = 0x6cc
+Cyrillic_em = 0x6cd
+Cyrillic_en = 0x6ce
+Cyrillic_o = 0x6cf
+Cyrillic_pe = 0x6d0
+Cyrillic_ya = 0x6d1
+Cyrillic_er = 0x6d2
+Cyrillic_es = 0x6d3
+Cyrillic_te = 0x6d4
+Cyrillic_u = 0x6d5
+Cyrillic_zhe = 0x6d6
+Cyrillic_ve = 0x6d7
+Cyrillic_softsign = 0x6d8
+Cyrillic_yeru = 0x6d9
+Cyrillic_ze = 0x6da
+Cyrillic_sha = 0x6db
+Cyrillic_e = 0x6dc
+Cyrillic_shcha = 0x6dd
+Cyrillic_che = 0x6de
+Cyrillic_hardsign = 0x6df
+Cyrillic_YU = 0x6e0
+Cyrillic_A = 0x6e1
+Cyrillic_BE = 0x6e2
+Cyrillic_TSE = 0x6e3
+Cyrillic_DE = 0x6e4
+Cyrillic_IE = 0x6e5
+Cyrillic_EF = 0x6e6
+Cyrillic_GHE = 0x6e7
+Cyrillic_HA = 0x6e8
+Cyrillic_I = 0x6e9
+Cyrillic_SHORTI = 0x6ea
+Cyrillic_KA = 0x6eb
+Cyrillic_EL = 0x6ec
+Cyrillic_EM = 0x6ed
+Cyrillic_EN = 0x6ee
+Cyrillic_O = 0x6ef
+Cyrillic_PE = 0x6f0
+Cyrillic_YA = 0x6f1
+Cyrillic_ER = 0x6f2
+Cyrillic_ES = 0x6f3
+Cyrillic_TE = 0x6f4
+Cyrillic_U = 0x6f5
+Cyrillic_ZHE = 0x6f6
+Cyrillic_VE = 0x6f7
+Cyrillic_SOFTSIGN = 0x6f8
+Cyrillic_YERU = 0x6f9
+Cyrillic_ZE = 0x6fa
+Cyrillic_SHA = 0x6fb
+Cyrillic_E = 0x6fc
+Cyrillic_SHCHA = 0x6fd
+Cyrillic_CHE = 0x6fe
+Cyrillic_HARDSIGN = 0x6ff
+Greek_ALPHAaccent = 0x7a1
+Greek_EPSILONaccent = 0x7a2
+Greek_ETAaccent = 0x7a3
+Greek_IOTAaccent = 0x7a4
+Greek_IOTAdiaeresis = 0x7a5
+Greek_OMICRONaccent = 0x7a7
+Greek_UPSILONaccent = 0x7a8
+Greek_UPSILONdieresis = 0x7a9
+Greek_OMEGAaccent = 0x7ab
+Greek_accentdieresis = 0x7ae
+Greek_horizbar = 0x7af
+Greek_alphaaccent = 0x7b1
+Greek_epsilonaccent = 0x7b2
+Greek_etaaccent = 0x7b3
+Greek_iotaaccent = 0x7b4
+Greek_iotadieresis = 0x7b5
+Greek_iotaaccentdieresis = 0x7b6
+Greek_omicronaccent = 0x7b7
+Greek_upsilonaccent = 0x7b8
+Greek_upsilondieresis = 0x7b9
+Greek_upsilonaccentdieresis = 0x7ba
+Greek_omegaaccent = 0x7bb
+Greek_ALPHA = 0x7c1
+Greek_BETA = 0x7c2
+Greek_GAMMA = 0x7c3
+Greek_DELTA = 0x7c4
+Greek_EPSILON = 0x7c5
+Greek_ZETA = 0x7c6
+Greek_ETA = 0x7c7
+Greek_THETA = 0x7c8
+Greek_IOTA = 0x7c9
+Greek_KAPPA = 0x7ca
+Greek_LAMDA = 0x7cb
+Greek_LAMBDA = 0x7cb
+Greek_MU = 0x7cc
+Greek_NU = 0x7cd
+Greek_XI = 0x7ce
+Greek_OMICRON = 0x7cf
+Greek_PI = 0x7d0
+Greek_RHO = 0x7d1
+Greek_SIGMA = 0x7d2
+Greek_TAU = 0x7d4
+Greek_UPSILON = 0x7d5
+Greek_PHI = 0x7d6
+Greek_CHI = 0x7d7
+Greek_PSI = 0x7d8
+Greek_OMEGA = 0x7d9
+Greek_alpha = 0x7e1
+Greek_beta = 0x7e2
+Greek_gamma = 0x7e3
+Greek_delta = 0x7e4
+Greek_epsilon = 0x7e5
+Greek_zeta = 0x7e6
+Greek_eta = 0x7e7
+Greek_theta = 0x7e8
+Greek_iota = 0x7e9
+Greek_kappa = 0x7ea
+Greek_lamda = 0x7eb
+Greek_lambda = 0x7eb
+Greek_mu = 0x7ec
+Greek_nu = 0x7ed
+Greek_xi = 0x7ee
+Greek_omicron = 0x7ef
+Greek_pi = 0x7f0
+Greek_rho = 0x7f1
+Greek_sigma = 0x7f2
+Greek_finalsmallsigma = 0x7f3
+Greek_tau = 0x7f4
+Greek_upsilon = 0x7f5
+Greek_phi = 0x7f6
+Greek_chi = 0x7f7
+Greek_psi = 0x7f8
+Greek_omega = 0x7f9
+Greek_switch = 0xFF7E
+leftradical = 0x8a1
+topleftradical = 0x8a2
+horizconnector = 0x8a3
+topintegral = 0x8a4
+botintegral = 0x8a5
+vertconnector = 0x8a6
+topleftsqbracket = 0x8a7
+botleftsqbracket = 0x8a8
+toprightsqbracket = 0x8a9
+botrightsqbracket = 0x8aa
+topleftparens = 0x8ab
+botleftparens = 0x8ac
+toprightparens = 0x8ad
+botrightparens = 0x8ae
+leftmiddlecurlybrace = 0x8af
+rightmiddlecurlybrace = 0x8b0
+topleftsummation = 0x8b1
+botleftsummation = 0x8b2
+topvertsummationconnector = 0x8b3
+botvertsummationconnector = 0x8b4
+toprightsummation = 0x8b5
+botrightsummation = 0x8b6
+rightmiddlesummation = 0x8b7
+lessthanequal = 0x8bc
+notequal = 0x8bd
+greaterthanequal = 0x8be
+integral = 0x8bf
+therefore = 0x8c0
+variation = 0x8c1
+infinity = 0x8c2
+nabla = 0x8c5
+approximate = 0x8c8
+similarequal = 0x8c9
+ifonlyif = 0x8cd
+implies = 0x8ce
+identical = 0x8cf
+radical = 0x8d6
+includedin = 0x8da
+includes = 0x8db
+intersection = 0x8dc
+union = 0x8dd
+logicaland = 0x8de
+logicalor = 0x8df
+partialderivative = 0x8ef
+function = 0x8f6
+leftarrow = 0x8fb
+uparrow = 0x8fc
+rightarrow = 0x8fd
+downarrow = 0x8fe
+blank = 0x9df
+soliddiamond = 0x9e0
+checkerboard = 0x9e1
+ht = 0x9e2
+ff = 0x9e3
+cr = 0x9e4
+lf = 0x9e5
+nl = 0x9e8
+vt = 0x9e9
+lowrightcorner = 0x9ea
+uprightcorner = 0x9eb
+upleftcorner = 0x9ec
+lowleftcorner = 0x9ed
+crossinglines = 0x9ee
+horizlinescan1 = 0x9ef
+horizlinescan3 = 0x9f0
+horizlinescan5 = 0x9f1
+horizlinescan7 = 0x9f2
+horizlinescan9 = 0x9f3
+leftt = 0x9f4
+rightt = 0x9f5
+bott = 0x9f6
+topt = 0x9f7
+vertbar = 0x9f8
+emspace = 0xaa1
+enspace = 0xaa2
+em3space = 0xaa3
+em4space = 0xaa4
+digitspace = 0xaa5
+punctspace = 0xaa6
+thinspace = 0xaa7
+hairspace = 0xaa8
+emdash = 0xaa9
+endash = 0xaaa
+signifblank = 0xaac
+ellipsis = 0xaae
+doubbaselinedot = 0xaaf
+onethird = 0xab0
+twothirds = 0xab1
+onefifth = 0xab2
+twofifths = 0xab3
+threefifths = 0xab4
+fourfifths = 0xab5
+onesixth = 0xab6
+fivesixths = 0xab7
+careof = 0xab8
+figdash = 0xabb
+leftanglebracket = 0xabc
+decimalpoint = 0xabd
+rightanglebracket = 0xabe
+marker = 0xabf
+oneeighth = 0xac3
+threeeighths = 0xac4
+fiveeighths = 0xac5
+seveneighths = 0xac6
+trademark = 0xac9
+signaturemark = 0xaca
+trademarkincircle = 0xacb
+leftopentriangle = 0xacc
+rightopentriangle = 0xacd
+emopencircle = 0xace
+emopenrectangle = 0xacf
+leftsinglequotemark = 0xad0
+rightsinglequotemark = 0xad1
+leftdoublequotemark = 0xad2
+rightdoublequotemark = 0xad3
+prescription = 0xad4
+minutes = 0xad6
+seconds = 0xad7
+latincross = 0xad9
+hexagram = 0xada
+filledrectbullet = 0xadb
+filledlefttribullet = 0xadc
+filledrighttribullet = 0xadd
+emfilledcircle = 0xade
+emfilledrect = 0xadf
+enopencircbullet = 0xae0
+enopensquarebullet = 0xae1
+openrectbullet = 0xae2
+opentribulletup = 0xae3
+opentribulletdown = 0xae4
+openstar = 0xae5
+enfilledcircbullet = 0xae6
+enfilledsqbullet = 0xae7
+filledtribulletup = 0xae8
+filledtribulletdown = 0xae9
+leftpointer = 0xaea
+rightpointer = 0xaeb
+club = 0xaec
+diamond = 0xaed
+heart = 0xaee
+maltesecross = 0xaf0
+dagger = 0xaf1
+doubledagger = 0xaf2
+checkmark = 0xaf3
+ballotcross = 0xaf4
+musicalsharp = 0xaf5
+musicalflat = 0xaf6
+malesymbol = 0xaf7
+femalesymbol = 0xaf8
+telephone = 0xaf9
+telephonerecorder = 0xafa
+phonographcopyright = 0xafb
+caret = 0xafc
+singlelowquotemark = 0xafd
+doublelowquotemark = 0xafe
+cursor = 0xaff
+leftcaret = 0xba3
+rightcaret = 0xba6
+downcaret = 0xba8
+upcaret = 0xba9
+overbar = 0xbc0
+downtack = 0xbc2
+upshoe = 0xbc3
+downstile = 0xbc4
+underbar = 0xbc6
+jot = 0xbca
+quad = 0xbcc
+uptack = 0xbce
+circle = 0xbcf
+upstile = 0xbd3
+downshoe = 0xbd6
+rightshoe = 0xbd8
+leftshoe = 0xbda
+lefttack = 0xbdc
+righttack = 0xbfc
+hebrew_doublelowline = 0xcdf
+hebrew_aleph = 0xce0
+hebrew_bet = 0xce1
+hebrew_beth = 0xce1
+hebrew_gimel = 0xce2
+hebrew_gimmel = 0xce2
+hebrew_dalet = 0xce3
+hebrew_daleth = 0xce3
+hebrew_he = 0xce4
+hebrew_waw = 0xce5
+hebrew_zain = 0xce6
+hebrew_zayin = 0xce6
+hebrew_chet = 0xce7
+hebrew_het = 0xce7
+hebrew_tet = 0xce8
+hebrew_teth = 0xce8
+hebrew_yod = 0xce9
+hebrew_finalkaph = 0xcea
+hebrew_kaph = 0xceb
+hebrew_lamed = 0xcec
+hebrew_finalmem = 0xced
+hebrew_mem = 0xcee
+hebrew_finalnun = 0xcef
+hebrew_nun = 0xcf0
+hebrew_samech = 0xcf1
+hebrew_samekh = 0xcf1
+hebrew_ayin = 0xcf2
+hebrew_finalpe = 0xcf3
+hebrew_pe = 0xcf4
+hebrew_finalzade = 0xcf5
+hebrew_finalzadi = 0xcf5
+hebrew_zade = 0xcf6
+hebrew_zadi = 0xcf6
+hebrew_qoph = 0xcf7
+hebrew_kuf = 0xcf7
+hebrew_resh = 0xcf8
+hebrew_shin = 0xcf9
+hebrew_taw = 0xcfa
+hebrew_taf = 0xcfa
+Hebrew_switch = 0xFF7E
+Thai_kokai = 0xda1
+Thai_khokhai = 0xda2
+Thai_khokhuat = 0xda3
+Thai_khokhwai = 0xda4
+Thai_khokhon = 0xda5
+Thai_khorakhang = 0xda6
+Thai_ngongu = 0xda7
+Thai_chochan = 0xda8
+Thai_choching = 0xda9
+Thai_chochang = 0xdaa
+Thai_soso = 0xdab
+Thai_chochoe = 0xdac
+Thai_yoying = 0xdad
+Thai_dochada = 0xdae
+Thai_topatak = 0xdaf
+Thai_thothan = 0xdb0
+Thai_thonangmontho = 0xdb1
+Thai_thophuthao = 0xdb2
+Thai_nonen = 0xdb3
+Thai_dodek = 0xdb4
+Thai_totao = 0xdb5
+Thai_thothung = 0xdb6
+Thai_thothahan = 0xdb7
+Thai_thothong = 0xdb8
+Thai_nonu = 0xdb9
+Thai_bobaimai = 0xdba
+Thai_popla = 0xdbb
+Thai_phophung = 0xdbc
+Thai_fofa = 0xdbd
+Thai_phophan = 0xdbe
+Thai_fofan = 0xdbf
+Thai_phosamphao = 0xdc0
+Thai_moma = 0xdc1
+Thai_yoyak = 0xdc2
+Thai_rorua = 0xdc3
+Thai_ru = 0xdc4
+Thai_loling = 0xdc5
+Thai_lu = 0xdc6
+Thai_wowaen = 0xdc7
+Thai_sosala = 0xdc8
+Thai_sorusi = 0xdc9
+Thai_sosua = 0xdca
+Thai_hohip = 0xdcb
+Thai_lochula = 0xdcc
+Thai_oang = 0xdcd
+Thai_honokhuk = 0xdce
+Thai_paiyannoi = 0xdcf
+Thai_saraa = 0xdd0
+Thai_maihanakat = 0xdd1
+Thai_saraaa = 0xdd2
+Thai_saraam = 0xdd3
+Thai_sarai = 0xdd4
+Thai_saraii = 0xdd5
+Thai_saraue = 0xdd6
+Thai_sarauee = 0xdd7
+Thai_sarau = 0xdd8
+Thai_sarauu = 0xdd9
+Thai_phinthu = 0xdda
+Thai_maihanakat_maitho = 0xdde
+Thai_baht = 0xddf
+Thai_sarae = 0xde0
+Thai_saraae = 0xde1
+Thai_sarao = 0xde2
+Thai_saraaimaimuan = 0xde3
+Thai_saraaimaimalai = 0xde4
+Thai_lakkhangyao = 0xde5
+Thai_maiyamok = 0xde6
+Thai_maitaikhu = 0xde7
+Thai_maiek = 0xde8
+Thai_maitho = 0xde9
+Thai_maitri = 0xdea
+Thai_maichattawa = 0xdeb
+Thai_thanthakhat = 0xdec
+Thai_nikhahit = 0xded
+Thai_leksun = 0xdf0
+Thai_leknung = 0xdf1
+Thai_leksong = 0xdf2
+Thai_leksam = 0xdf3
+Thai_leksi = 0xdf4
+Thai_lekha = 0xdf5
+Thai_lekhok = 0xdf6
+Thai_lekchet = 0xdf7
+Thai_lekpaet = 0xdf8
+Thai_lekkao = 0xdf9
+Hangul = 0xff31
+Hangul_Start = 0xff32
+Hangul_End = 0xff33
+Hangul_Hanja = 0xff34
+Hangul_Jamo = 0xff35
+Hangul_Romaja = 0xff36
+Hangul_Codeinput = 0xff37
+Hangul_Jeonja = 0xff38
+Hangul_Banja = 0xff39
+Hangul_PreHanja = 0xff3a
+Hangul_PostHanja = 0xff3b
+Hangul_SingleCandidate = 0xff3c
+Hangul_MultipleCandidate = 0xff3d
+Hangul_PreviousCandidate = 0xff3e
+Hangul_Special = 0xff3f
+Hangul_switch = 0xFF7E
+Hangul_Kiyeog = 0xea1
+Hangul_SsangKiyeog = 0xea2
+Hangul_KiyeogSios = 0xea3
+Hangul_Nieun = 0xea4
+Hangul_NieunJieuj = 0xea5
+Hangul_NieunHieuh = 0xea6
+Hangul_Dikeud = 0xea7
+Hangul_SsangDikeud = 0xea8
+Hangul_Rieul = 0xea9
+Hangul_RieulKiyeog = 0xeaa
+Hangul_RieulMieum = 0xeab
+Hangul_RieulPieub = 0xeac
+Hangul_RieulSios = 0xead
+Hangul_RieulTieut = 0xeae
+Hangul_RieulPhieuf = 0xeaf
+Hangul_RieulHieuh = 0xeb0
+Hangul_Mieum = 0xeb1
+Hangul_Pieub = 0xeb2
+Hangul_SsangPieub = 0xeb3
+Hangul_PieubSios = 0xeb4
+Hangul_Sios = 0xeb5
+Hangul_SsangSios = 0xeb6
+Hangul_Ieung = 0xeb7
+Hangul_Jieuj = 0xeb8
+Hangul_SsangJieuj = 0xeb9
+Hangul_Cieuc = 0xeba
+Hangul_Khieuq = 0xebb
+Hangul_Tieut = 0xebc
+Hangul_Phieuf = 0xebd
+Hangul_Hieuh = 0xebe
+Hangul_A = 0xebf
+Hangul_AE = 0xec0
+Hangul_YA = 0xec1
+Hangul_YAE = 0xec2
+Hangul_EO = 0xec3
+Hangul_E = 0xec4
+Hangul_YEO = 0xec5
+Hangul_YE = 0xec6
+Hangul_O = 0xec7
+Hangul_WA = 0xec8
+Hangul_WAE = 0xec9
+Hangul_OE = 0xeca
+Hangul_YO = 0xecb
+Hangul_U = 0xecc
+Hangul_WEO = 0xecd
+Hangul_WE = 0xece
+Hangul_WI = 0xecf
+Hangul_YU = 0xed0
+Hangul_EU = 0xed1
+Hangul_YI = 0xed2
+Hangul_I = 0xed3
+Hangul_J_Kiyeog = 0xed4
+Hangul_J_SsangKiyeog = 0xed5
+Hangul_J_KiyeogSios = 0xed6
+Hangul_J_Nieun = 0xed7
+Hangul_J_NieunJieuj = 0xed8
+Hangul_J_NieunHieuh = 0xed9
+Hangul_J_Dikeud = 0xeda
+Hangul_J_Rieul = 0xedb
+Hangul_J_RieulKiyeog = 0xedc
+Hangul_J_RieulMieum = 0xedd
+Hangul_J_RieulPieub = 0xede
+Hangul_J_RieulSios = 0xedf
+Hangul_J_RieulTieut = 0xee0
+Hangul_J_RieulPhieuf = 0xee1
+Hangul_J_RieulHieuh = 0xee2
+Hangul_J_Mieum = 0xee3
+Hangul_J_Pieub = 0xee4
+Hangul_J_PieubSios = 0xee5
+Hangul_J_Sios = 0xee6
+Hangul_J_SsangSios = 0xee7
+Hangul_J_Ieung = 0xee8
+Hangul_J_Jieuj = 0xee9
+Hangul_J_Cieuc = 0xeea
+Hangul_J_Khieuq = 0xeeb
+Hangul_J_Tieut = 0xeec
+Hangul_J_Phieuf = 0xeed
+Hangul_J_Hieuh = 0xeee
+Hangul_RieulYeorinHieuh = 0xeef
+Hangul_SunkyeongeumMieum = 0xef0
+Hangul_SunkyeongeumPieub = 0xef1
+Hangul_PanSios = 0xef2
+Hangul_KkogjiDalrinIeung = 0xef3
+Hangul_SunkyeongeumPhieuf = 0xef4
+Hangul_YeorinHieuh = 0xef5
+Hangul_AraeA = 0xef6
+Hangul_AraeAE = 0xef7
+Hangul_J_PanSios = 0xef8
+Hangul_J_KkogjiDalrinIeung = 0xef9
+Hangul_J_YeorinHieuh = 0xefa
+Korean_Won = 0xeff
+Armenian_eternity = 0x14a1
+Armenian_section_sign = 0x14a2
+Armenian_full_stop = 0x14a3
+Armenian_verjaket = 0x14a3
+Armenian_parenright = 0x14a4
+Armenian_parenleft = 0x14a5
+Armenian_guillemotright = 0x14a6
+Armenian_guillemotleft = 0x14a7
+Armenian_em_dash = 0x14a8
+Armenian_dot = 0x14a9
+Armenian_mijaket = 0x14a9
+Armenian_separation_mark = 0x14aa
+Armenian_but = 0x14aa
+Armenian_comma = 0x14ab
+Armenian_en_dash = 0x14ac
+Armenian_hyphen = 0x14ad
+Armenian_yentamna = 0x14ad
+Armenian_ellipsis = 0x14ae
+Armenian_exclam = 0x14af
+Armenian_amanak = 0x14af
+Armenian_accent = 0x14b0
+Armenian_shesht = 0x14b0
+Armenian_question = 0x14b1
+Armenian_paruyk = 0x14b1
+Armenian_AYB = 0x14b2
+Armenian_ayb = 0x14b3
+Armenian_BEN = 0x14b4
+Armenian_ben = 0x14b5
+Armenian_GIM = 0x14b6
+Armenian_gim = 0x14b7
+Armenian_DA = 0x14b8
+Armenian_da = 0x14b9
+Armenian_YECH = 0x14ba
+Armenian_yech = 0x14bb
+Armenian_ZA = 0x14bc
+Armenian_za = 0x14bd
+Armenian_E = 0x14be
+Armenian_e = 0x14bf
+Armenian_AT = 0x14c0
+Armenian_at = 0x14c1
+Armenian_TO = 0x14c2
+Armenian_to = 0x14c3
+Armenian_ZHE = 0x14c4
+Armenian_zhe = 0x14c5
+Armenian_INI = 0x14c6
+Armenian_ini = 0x14c7
+Armenian_LYUN = 0x14c8
+Armenian_lyun = 0x14c9
+Armenian_KHE = 0x14ca
+Armenian_khe = 0x14cb
+Armenian_TSA = 0x14cc
+Armenian_tsa = 0x14cd
+Armenian_KEN = 0x14ce
+Armenian_ken = 0x14cf
+Armenian_HO = 0x14d0
+Armenian_ho = 0x14d1
+Armenian_DZA = 0x14d2
+Armenian_dza = 0x14d3
+Armenian_GHAT = 0x14d4
+Armenian_ghat = 0x14d5
+Armenian_TCHE = 0x14d6
+Armenian_tche = 0x14d7
+Armenian_MEN = 0x14d8
+Armenian_men = 0x14d9
+Armenian_HI = 0x14da
+Armenian_hi = 0x14db
+Armenian_NU = 0x14dc
+Armenian_nu = 0x14dd
+Armenian_SHA = 0x14de
+Armenian_sha = 0x14df
+Armenian_VO = 0x14e0
+Armenian_vo = 0x14e1
+Armenian_CHA = 0x14e2
+Armenian_cha = 0x14e3
+Armenian_PE = 0x14e4
+Armenian_pe = 0x14e5
+Armenian_JE = 0x14e6
+Armenian_je = 0x14e7
+Armenian_RA = 0x14e8
+Armenian_ra = 0x14e9
+Armenian_SE = 0x14ea
+Armenian_se = 0x14eb
+Armenian_VEV = 0x14ec
+Armenian_vev = 0x14ed
+Armenian_TYUN = 0x14ee
+Armenian_tyun = 0x14ef
+Armenian_RE = 0x14f0
+Armenian_re = 0x14f1
+Armenian_TSO = 0x14f2
+Armenian_tso = 0x14f3
+Armenian_VYUN = 0x14f4
+Armenian_vyun = 0x14f5
+Armenian_PYUR = 0x14f6
+Armenian_pyur = 0x14f7
+Armenian_KE = 0x14f8
+Armenian_ke = 0x14f9
+Armenian_O = 0x14fa
+Armenian_o = 0x14fb
+Armenian_FE = 0x14fc
+Armenian_fe = 0x14fd
+Armenian_apostrophe = 0x14fe
+Armenian_ligature_ew = 0x14ff
+Georgian_an = 0x15d0
+Georgian_ban = 0x15d1
+Georgian_gan = 0x15d2
+Georgian_don = 0x15d3
+Georgian_en = 0x15d4
+Georgian_vin = 0x15d5
+Georgian_zen = 0x15d6
+Georgian_tan = 0x15d7
+Georgian_in = 0x15d8
+Georgian_kan = 0x15d9
+Georgian_las = 0x15da
+Georgian_man = 0x15db
+Georgian_nar = 0x15dc
+Georgian_on = 0x15dd
+Georgian_par = 0x15de
+Georgian_zhar = 0x15df
+Georgian_rae = 0x15e0
+Georgian_san = 0x15e1
+Georgian_tar = 0x15e2
+Georgian_un = 0x15e3
+Georgian_phar = 0x15e4
+Georgian_khar = 0x15e5
+Georgian_ghan = 0x15e6
+Georgian_qar = 0x15e7
+Georgian_shin = 0x15e8
+Georgian_chin = 0x15e9
+Georgian_can = 0x15ea
+Georgian_jil = 0x15eb
+Georgian_cil = 0x15ec
+Georgian_char = 0x15ed
+Georgian_xan = 0x15ee
+Georgian_jhan = 0x15ef
+Georgian_hae = 0x15f0
+Georgian_he = 0x15f1
+Georgian_hie = 0x15f2
+Georgian_we = 0x15f3
+Georgian_har = 0x15f4
+Georgian_hoe = 0x15f5
+Georgian_fi = 0x15f6
+EcuSign = 0x20a0
+ColonSign = 0x20a1
+CruzeiroSign = 0x20a2
+FFrancSign = 0x20a3
+LiraSign = 0x20a4
+MillSign = 0x20a5
+NairaSign = 0x20a6
+PesetaSign = 0x20a7
+RupeeSign = 0x20a8
+WonSign = 0x20a9
+NewSheqelSign = 0x20aa
+DongSign = 0x20ab
+EuroSign = 0x20ac
diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c
new file mode 100644 (file)
index 0000000..a9b5b60
--- /dev/null
@@ -0,0 +1,2154 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+ *
+ *   pygi-argument.c: GIArgument - PyObject conversion functions.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygi-private.h"
+
+#include <string.h>
+#include <time.h>
+
+#include <datetime.h>
+#include <pygobject.h>
+#include <pyglib-python-compat.h>
+
+static void
+_pygi_g_type_tag_py_bounds (GITypeTag   type_tag,
+                            PyObject  **lower,
+                            PyObject  **upper)
+{
+    switch (type_tag) {
+        case GI_TYPE_TAG_INT8:
+            *lower = PYGLIB_PyLong_FromLong (-128);
+            *upper = PYGLIB_PyLong_FromLong (127);
+            break;
+        case GI_TYPE_TAG_UINT8:
+            *upper = PYGLIB_PyLong_FromLong (255);
+            *lower = PYGLIB_PyLong_FromLong (0);
+            break;
+        case GI_TYPE_TAG_INT16:
+            *lower = PYGLIB_PyLong_FromLong (-32768);
+            *upper = PYGLIB_PyLong_FromLong (32767);
+            break;
+        case GI_TYPE_TAG_UINT16:
+            *upper = PYGLIB_PyLong_FromLong (65535);
+            *lower = PYGLIB_PyLong_FromLong (0);
+            break;
+        case GI_TYPE_TAG_INT32:
+            *lower = PYGLIB_PyLong_FromLong (G_MININT32);
+            *upper = PYGLIB_PyLong_FromLong (G_MAXINT32);
+            break;
+        case GI_TYPE_TAG_UINT32:
+            /* Note: On 32-bit archs, this number doesn't fit in a long. */
+            *upper = PyLong_FromLongLong (G_MAXUINT32);
+            *lower = PYGLIB_PyLong_FromLong (0);
+            break;
+        case GI_TYPE_TAG_INT64:
+            /* Note: On 32-bit archs, these numbers don't fit in a long. */
+            *lower = PyLong_FromLongLong (G_MININT64);
+            *upper = PyLong_FromLongLong (G_MAXINT64);
+            break;
+        case GI_TYPE_TAG_UINT64:
+            *upper = PyLong_FromUnsignedLongLong (G_MAXUINT64);
+            *lower = PYGLIB_PyLong_FromLong (0);
+            break;
+        case GI_TYPE_TAG_FLOAT:
+            *upper = PyFloat_FromDouble (G_MAXFLOAT);
+            *lower = PyFloat_FromDouble (-G_MAXFLOAT);
+            break;
+        case GI_TYPE_TAG_DOUBLE:
+            *upper = PyFloat_FromDouble (G_MAXDOUBLE);
+            *lower = PyFloat_FromDouble (-G_MAXDOUBLE);
+            break;
+        default:
+            PyErr_SetString (PyExc_TypeError, "Non-numeric type tag");
+            *lower = *upper = NULL;
+            return;
+    }
+}
+
+gint
+_pygi_g_registered_type_info_check_object (GIRegisteredTypeInfo *info,
+                                           gboolean              is_instance,
+                                           PyObject             *object)
+{
+    gint retval;
+
+    GType g_type;
+    PyObject *py_type;
+    gchar *type_name_expected = NULL;
+    GIInfoType interface_type;
+
+    interface_type = g_base_info_get_type (info);
+    if ( (interface_type == GI_INFO_TYPE_STRUCT) &&
+            (g_struct_info_is_foreign ( (GIStructInfo*) info))) {
+        /* TODO: Could we check is the correct foreign type? */
+        return 1;
+    }
+
+    g_type = g_registered_type_info_get_g_type (info);
+    if (g_type != G_TYPE_NONE) {
+        py_type = _pygi_type_get_from_g_type (g_type);
+    } else {
+        py_type = _pygi_type_import_by_gi_info ( (GIBaseInfo *) info);
+    }
+
+    if (py_type == NULL) {
+        return 0;
+    }
+
+    g_assert (PyType_Check (py_type));
+
+    if (is_instance) {
+        retval = PyObject_IsInstance (object, py_type);
+        if (!retval) {
+            type_name_expected = _pygi_g_base_info_get_fullname (
+                                     (GIBaseInfo *) info);
+        }
+    } else {
+        if (!PyObject_Type (py_type)) {
+            type_name_expected = "type";
+            retval = 0;
+        } else if (!PyType_IsSubtype ( (PyTypeObject *) object,
+                                       (PyTypeObject *) py_type)) {
+            type_name_expected = _pygi_g_base_info_get_fullname (
+                                     (GIBaseInfo *) info);
+            retval = 0;
+        } else {
+            retval = 1;
+        }
+    }
+
+    Py_DECREF (py_type);
+
+    if (!retval) {
+        PyTypeObject *object_type;
+
+        if (type_name_expected == NULL) {
+            return -1;
+        }
+
+        object_type = (PyTypeObject *) PyObject_Type (object);
+        if (object_type == NULL) {
+            return -1;
+        }
+
+        PyErr_Format (PyExc_TypeError, "Must be %s, not %s",
+                      type_name_expected, object_type->tp_name);
+
+        g_free (type_name_expected);
+    }
+
+    return retval;
+}
+
+gint
+_pygi_g_type_interface_check_object (GIBaseInfo *info,
+                                     PyObject   *object)
+{
+    gint retval = 1;
+    GIInfoType info_type;
+
+    info_type = g_base_info_get_type (info);
+    switch (info_type) {
+        case GI_INFO_TYPE_CALLBACK:
+            if (!PyCallable_Check (object)) {
+                PyErr_Format (PyExc_TypeError, "Must be callable, not %s",
+                              object->ob_type->tp_name);
+                retval = 0;
+            }
+            break;
+        case GI_INFO_TYPE_ENUM:
+            retval = 0;
+            if (PyNumber_Check (object)) {
+                PyObject *number = PYGLIB_PyNumber_Long (object);
+                if (number == NULL)
+                    PyErr_Clear();
+                else {
+                    glong value = PYGLIB_PyLong_AsLong (number);
+                    int i;
+                    for (i = 0; i < g_enum_info_get_n_values (info); i++) {
+                        GIValueInfo *value_info = g_enum_info_get_value (info, i);
+                        glong enum_value = g_value_info_get_value (value_info);
+                        g_base_info_unref (value_info);
+                        if (value == enum_value) {
+                            retval = 1;
+                            break;
+                        }
+                    }
+                }
+            }
+            if (retval < 1)
+                retval = _pygi_g_registered_type_info_check_object (
+                             (GIRegisteredTypeInfo *) info, TRUE, object);
+            break;
+        case GI_INFO_TYPE_FLAGS:
+            if (PyNumber_Check (object)) {
+                /* Accept 0 as a valid flag value */
+                PyObject *number = PYGLIB_PyNumber_Long (object);
+                if (number == NULL)
+                    PyErr_Clear();
+                else {
+                    long value = PYGLIB_PyLong_AsLong (number);
+                    if (value == 0)
+                        break;
+                    else if (value == -1)
+                        PyErr_Clear();
+                }
+            }
+            retval = _pygi_g_registered_type_info_check_object (
+                         (GIRegisteredTypeInfo *) info, TRUE, object);
+            break;
+        case GI_INFO_TYPE_STRUCT:
+        {
+            GType type;
+
+            /* Handle special cases. */
+            type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
+            if (g_type_is_a (type, G_TYPE_CLOSURE)) {
+                if (!(PyCallable_Check (object) ||
+                      pyg_type_from_object_strict (object, FALSE) == G_TYPE_CLOSURE)) {
+                    PyErr_Format (PyExc_TypeError, "Must be callable, not %s",
+                                  object->ob_type->tp_name);
+                    retval = 0;
+                }
+                break;
+            } else if (g_type_is_a (type, G_TYPE_VALUE)) {
+                /* we can't check g_values because we don't have 
+                 * enough context so just pass them through */
+                break;
+            }
+
+            /* Fallback. */
+        }
+        case GI_INFO_TYPE_BOXED:
+        case GI_INFO_TYPE_INTERFACE:
+        case GI_INFO_TYPE_OBJECT:
+            retval = _pygi_g_registered_type_info_check_object ( (GIRegisteredTypeInfo *) info, TRUE, object);
+            break;
+        case GI_INFO_TYPE_UNION:
+
+
+            retval = _pygi_g_registered_type_info_check_object ( (GIRegisteredTypeInfo *) info, TRUE, object);
+
+            /* If not the same type then check to see if the object's type
+             * is the same as one of the union's members
+             */
+            if (retval == 0) {
+                gint i;
+                gint n_fields;
+
+                n_fields = g_union_info_get_n_fields ( (GIUnionInfo *) info);
+
+                for (i = 0; i < n_fields; i++) {
+                    gint member_retval;
+                    GIFieldInfo *field_info;
+                    GITypeInfo *field_type_info;
+
+                    field_info =
+                        g_union_info_get_field ( (GIUnionInfo *) info, i);
+                    field_type_info = g_field_info_get_type (field_info);
+
+                    member_retval = _pygi_g_type_info_check_object(
+                        field_type_info,
+                        object,
+                        TRUE);
+
+                    g_base_info_unref ( ( GIBaseInfo *) field_type_info);
+                    g_base_info_unref ( ( GIBaseInfo *) field_info);
+
+                    if (member_retval == 1) {
+                        retval = member_retval;
+                        break;
+                    }
+                }
+            }
+
+            break;
+        default:
+            g_assert_not_reached();
+    }
+
+    return retval;
+}
+
+gint
+_pygi_g_type_info_check_object (GITypeInfo *type_info,
+                                PyObject   *object,
+                                gboolean   allow_none)
+{
+    GITypeTag type_tag;
+    gint retval = 1;
+
+    if (allow_none && object == Py_None) {
+        return retval;
+    }
+
+    type_tag = g_type_info_get_tag (type_info);
+
+    switch (type_tag) {
+        case GI_TYPE_TAG_VOID:
+            /* No check; VOID means undefined type */
+            break;
+        case GI_TYPE_TAG_BOOLEAN:
+            /* No check; every Python object has a truth value. */
+            break;
+        case GI_TYPE_TAG_UINT8:
+            /* UINT8 types can be characters */
+            if (PYGLIB_PyBytes_Check(object)) {
+                if (PYGLIB_PyBytes_Size(object) != 1) {
+                    PyErr_Format (PyExc_TypeError, "Must be a single character");
+                    retval = 0;
+                    break;
+                }
+
+                break;
+            }
+        case GI_TYPE_TAG_INT8:
+        case GI_TYPE_TAG_INT16:
+        case GI_TYPE_TAG_UINT16:
+        case GI_TYPE_TAG_INT32:
+        case GI_TYPE_TAG_UINT32:
+        case GI_TYPE_TAG_INT64:
+        case GI_TYPE_TAG_UINT64:
+        case GI_TYPE_TAG_FLOAT:
+        case GI_TYPE_TAG_DOUBLE:
+        {
+            PyObject *number, *lower, *upper;
+
+            if (!PyNumber_Check (object)) {
+                PyErr_Format (PyExc_TypeError, "Must be number, not %s",
+                              object->ob_type->tp_name);
+                retval = 0;
+                break;
+            }
+
+            if (type_tag == GI_TYPE_TAG_FLOAT || type_tag == GI_TYPE_TAG_DOUBLE) {
+                number = PyNumber_Float (object);
+            } else {
+                number = PYGLIB_PyNumber_Long (object);
+            }
+
+            _pygi_g_type_tag_py_bounds (type_tag, &lower, &upper);
+
+            if (lower == NULL || upper == NULL || number == NULL) {
+                retval = -1;
+                goto check_number_release;
+            }
+
+            /* Check bounds */
+            if (PyObject_RichCompareBool (lower, number, Py_GT)
+                    || PyObject_RichCompareBool (upper, number, Py_LT)) {
+                PyObject *lower_str;
+                PyObject *upper_str;
+
+                if (PyErr_Occurred()) {
+                    retval = -1;
+                    goto check_number_release;
+                }
+
+                lower_str = PyObject_Str (lower);
+                upper_str = PyObject_Str (upper);
+                if (lower_str == NULL || upper_str == NULL) {
+                    retval = -1;
+                    goto check_number_error_release;
+                }
+
+#if PY_VERSION_HEX < 0x03000000
+                PyErr_Format (PyExc_ValueError, "Must range from %s to %s",
+                              PyString_AS_STRING (lower_str),
+                              PyString_AS_STRING (upper_str));
+#else
+                {
+                    PyObject *lower_pybytes_obj = PyUnicode_AsUTF8String (lower_str);
+                    if (!lower_pybytes_obj)
+                        goto utf8_fail;
+
+                    PyObject *upper_pybytes_obj = PyUnicode_AsUTF8String (upper_str);                    
+                    if (!upper_pybytes_obj) {
+                        Py_DECREF(lower_pybytes_obj);
+                        goto utf8_fail;
+                    }
+
+                    PyErr_Format (PyExc_ValueError, "Must range from %s to %s",
+                                  PyBytes_AsString (lower_pybytes_obj),
+                                  PyBytes_AsString (upper_pybytes_obj));
+                    Py_DECREF (lower_pybytes_obj);
+                    Py_DECREF (upper_pybytes_obj);
+                }
+utf8_fail:
+#endif
+                retval = 0;
+
+check_number_error_release:
+                Py_XDECREF (lower_str);
+                Py_XDECREF (upper_str);
+            }
+
+check_number_release:
+            Py_XDECREF (number);
+            Py_XDECREF (lower);
+            Py_XDECREF (upper);
+            break;
+        }
+        case GI_TYPE_TAG_GTYPE:
+        {
+            if (pyg_type_from_object (object) == 0) {
+                PyErr_Format (PyExc_TypeError, "Must be gobject.GType, not %s",
+                              object->ob_type->tp_name);
+                retval = 0;
+            }
+            break;
+        }
+        case GI_TYPE_TAG_UNICHAR:
+        {
+            Py_ssize_t size;
+            if (PyUnicode_Check (object)) {
+                size = PyUnicode_GET_SIZE (object);
+#if PY_VERSION_HEX < 0x03000000
+            } else if (PyString_Check (object)) {
+                PyObject *pyuni = PyUnicode_FromEncodedObject (object, "UTF-8", "strict");
+                size = PyUnicode_GET_SIZE (pyuni);
+                Py_DECREF(pyuni);
+#endif
+            } else {
+                PyErr_Format (PyExc_TypeError, "Must be string, not %s",
+                              object->ob_type->tp_name);
+                retval = 0;
+                break;
+            }
+
+            if (size != 1) {
+                PyErr_Format (PyExc_TypeError, "Must be a one character string, not %ld characters",
+                              size);
+                retval = 0;
+                break;
+            }
+
+            break;
+        }
+        case GI_TYPE_TAG_UTF8:
+        case GI_TYPE_TAG_FILENAME:
+            if (!PYGLIB_PyBaseString_Check (object) ) {
+                PyErr_Format (PyExc_TypeError, "Must be string, not %s",
+                              object->ob_type->tp_name);
+                retval = 0;
+            }
+            break;
+        case GI_TYPE_TAG_ARRAY:
+        {
+            gssize fixed_size;
+            Py_ssize_t length;
+            GITypeInfo *item_type_info;
+            Py_ssize_t i;
+
+            if (!PySequence_Check (object)) {
+                PyErr_Format (PyExc_TypeError, "Must be sequence, not %s",
+                              object->ob_type->tp_name);
+                retval = 0;
+                break;
+            }
+
+            length = PySequence_Length (object);
+            if (length < 0) {
+                retval = -1;
+                break;
+            }
+
+            fixed_size = g_type_info_get_array_fixed_size (type_info);
+            if (fixed_size >= 0 && length != fixed_size) {
+                PyErr_Format (PyExc_ValueError, "Must contain %zd items, not %zd",
+                              fixed_size, length);
+                retval = 0;
+                break;
+            }
+
+            item_type_info = g_type_info_get_param_type (type_info, 0);
+            g_assert (item_type_info != NULL);
+
+            /* FIXME: This is insain.  We really should only check the first
+             *        object and perhaps have a debugging mode.  Large arrays
+             *        will cause apps to slow to a crawl.
+             */
+            for (i = 0; i < length; i++) {
+                PyObject *item;
+
+                item = PySequence_GetItem (object, i);
+                if (item == NULL) {
+                    retval = -1;
+                    break;
+                }
+
+                retval = _pygi_g_type_info_check_object (item_type_info, item, TRUE);
+
+                Py_DECREF (item);
+
+                if (retval < 0) {
+                    break;
+                }
+                if (!retval) {
+                    _PyGI_ERROR_PREFIX ("Item %zd: ", i);
+                    break;
+                }
+            }
+
+            g_base_info_unref ( (GIBaseInfo *) item_type_info);
+
+            break;
+        }
+        case GI_TYPE_TAG_INTERFACE:
+        {
+            GIBaseInfo *info;
+
+            info = g_type_info_get_interface (type_info);
+            g_assert (info != NULL);
+
+            retval = _pygi_g_type_interface_check_object(info, object);
+
+            g_base_info_unref (info);
+            break;
+        }
+        case GI_TYPE_TAG_GLIST:
+        case GI_TYPE_TAG_GSLIST:
+        {
+            Py_ssize_t length;
+            GITypeInfo *item_type_info;
+            Py_ssize_t i;
+
+            if (!PySequence_Check (object)) {
+                PyErr_Format (PyExc_TypeError, "Must be sequence, not %s",
+                              object->ob_type->tp_name);
+                retval = 0;
+                break;
+            }
+
+            length = PySequence_Length (object);
+            if (length < 0) {
+                retval = -1;
+                break;
+            }
+
+            item_type_info = g_type_info_get_param_type (type_info, 0);
+            g_assert (item_type_info != NULL);
+
+            for (i = 0; i < length; i++) {
+                PyObject *item;
+
+                item = PySequence_GetItem (object, i);
+                if (item == NULL) {
+                    retval = -1;
+                    break;
+                }
+
+                retval = _pygi_g_type_info_check_object (item_type_info, item, TRUE);
+
+                Py_DECREF (item);
+
+                if (retval < 0) {
+                    break;
+                }
+                if (!retval) {
+                    _PyGI_ERROR_PREFIX ("Item %zd: ", i);
+                    break;
+                }
+            }
+
+            g_base_info_unref ( (GIBaseInfo *) item_type_info);
+            break;
+        }
+        case GI_TYPE_TAG_GHASH:
+        {
+            Py_ssize_t length;
+            PyObject *keys;
+            PyObject *values;
+            GITypeInfo *key_type_info;
+            GITypeInfo *value_type_info;
+            Py_ssize_t i;
+
+            keys = PyMapping_Keys (object);
+            if (keys == NULL) {
+                PyErr_Format (PyExc_TypeError, "Must be mapping, not %s",
+                              object->ob_type->tp_name);
+                retval = 0;
+                break;
+            }
+
+            length = PyMapping_Length (object);
+            if (length < 0) {
+                Py_DECREF (keys);
+                retval = -1;
+                break;
+            }
+
+            values = PyMapping_Values (object);
+            if (values == NULL) {
+                retval = -1;
+                Py_DECREF (keys);
+                break;
+            }
+
+            key_type_info = g_type_info_get_param_type (type_info, 0);
+            g_assert (key_type_info != NULL);
+
+            value_type_info = g_type_info_get_param_type (type_info, 1);
+            g_assert (value_type_info != NULL);
+
+            for (i = 0; i < length; i++) {
+                PyObject *key;
+                PyObject *value;
+
+                key = PyList_GET_ITEM (keys, i);
+                value = PyList_GET_ITEM (values, i);
+
+                retval = _pygi_g_type_info_check_object (key_type_info, key, TRUE);
+                if (retval < 0) {
+                    break;
+                }
+                if (!retval) {
+                    _PyGI_ERROR_PREFIX ("Key %zd :", i);
+                    break;
+                }
+
+                retval = _pygi_g_type_info_check_object (value_type_info, value, TRUE);
+                if (retval < 0) {
+                    break;
+                }
+                if (!retval) {
+                    _PyGI_ERROR_PREFIX ("Value %zd :", i);
+                    break;
+                }
+            }
+
+            g_base_info_unref ( (GIBaseInfo *) key_type_info);
+            g_base_info_unref ( (GIBaseInfo *) value_type_info);
+            Py_DECREF (values);
+            Py_DECREF (keys);
+            break;
+        }
+        case GI_TYPE_TAG_ERROR:
+            PyErr_SetString (PyExc_NotImplementedError, "Error marshalling is not supported yet");
+            /* TODO */
+            break;
+    }
+
+    return retval;
+}
+
+GArray *
+_pygi_argument_to_array (GIArgument  *arg,
+                         GIArgument  *args[],
+                         GITypeInfo *type_info,
+                         gboolean is_method)
+{
+    GITypeInfo *item_type_info;
+    gboolean is_zero_terminated;
+    gsize item_size;
+    gssize length;
+    GArray *g_array;
+
+    if (arg->v_pointer == NULL) {
+        return NULL;
+    }
+
+    is_zero_terminated = g_type_info_is_zero_terminated (type_info);
+    item_type_info = g_type_info_get_param_type (type_info, 0);
+
+    item_size = _pygi_g_type_info_size (item_type_info);
+
+    g_base_info_unref ( (GIBaseInfo *) item_type_info);
+
+    if (is_zero_terminated) {
+        length = g_strv_length (arg->v_pointer);
+    } else {
+        length = g_type_info_get_array_fixed_size (type_info);
+        if (length < 0) {
+            gint length_arg_pos;
+
+            length_arg_pos = g_type_info_get_array_length (type_info);
+            g_assert (length_arg_pos >= 0);
+
+            /* FIXME: Take into account the type of the argument. */
+            length = args[length_arg_pos]->v_int;
+        }
+    }
+
+    g_assert (length >= 0);
+
+    g_array = g_array_new (is_zero_terminated, FALSE, item_size);
+
+    g_array->data = arg->v_pointer;
+    g_array->len = length;
+
+    return g_array;
+}
+
+GIArgument
+_pygi_argument_from_object (PyObject   *object,
+                            GITypeInfo *type_info,
+                            GITransfer  transfer)
+{
+    GIArgument arg;
+    GITypeTag type_tag;
+
+    memset(&arg, 0, sizeof(GIArgument));
+    type_tag = g_type_info_get_tag (type_info);
+
+    switch (type_tag) {
+        case GI_TYPE_TAG_VOID:
+            g_warn_if_fail (transfer == GI_TRANSFER_NOTHING);
+            arg.v_pointer = object;
+            break;
+        case GI_TYPE_TAG_BOOLEAN:
+        {
+            arg.v_boolean = PyObject_IsTrue (object);
+            break;
+        }
+        case GI_TYPE_TAG_UINT8:
+            if (PYGLIB_PyBytes_Check(object)) {
+                arg.v_long = (long)(PYGLIB_PyBytes_AsString(object)[0]);
+                break;
+            }
+
+        case GI_TYPE_TAG_INT8:
+        case GI_TYPE_TAG_INT16:
+        case GI_TYPE_TAG_UINT16:
+        case GI_TYPE_TAG_INT32:
+        {
+            PyObject *int_;
+
+            int_ = PYGLIB_PyNumber_Long (object);
+            if (int_ == NULL) {
+                break;
+            }
+
+            arg.v_long = PYGLIB_PyLong_AsLong (int_);
+
+            Py_DECREF (int_);
+
+            break;
+        }
+        case GI_TYPE_TAG_UINT32:
+        case GI_TYPE_TAG_UINT64:
+        {
+            PyObject *number;
+            guint64 value;
+
+            number = PYGLIB_PyNumber_Long (object);
+            if (number == NULL) {
+                break;
+            }
+
+#if PY_VERSION_HEX < 0x03000000
+            if (PyInt_Check (number)) {
+                value = PyInt_AS_LONG (number);
+            } else
+#endif
+            value = PyLong_AsUnsignedLongLong (number);
+
+            arg.v_uint64 = value;
+
+            Py_DECREF (number);
+
+            break;
+        }
+        case GI_TYPE_TAG_INT64:
+        {
+            PyObject *number;
+            gint64 value;
+
+            number = PYGLIB_PyNumber_Long (object);
+            if (number == NULL) {
+                break;
+            }
+
+#if PY_VERSION_HEX < 0x03000000
+            if (PyInt_Check (number)) {
+                value = PyInt_AS_LONG (number);
+            } else
+#endif
+            value = PyLong_AsLongLong (number);
+
+            arg.v_int64 = value;
+
+            Py_DECREF (number);
+
+            break;
+        }
+        case GI_TYPE_TAG_FLOAT:
+        {
+            PyObject *float_;
+
+            float_ = PyNumber_Float (object);
+            if (float_ == NULL) {
+                break;
+            }
+
+            arg.v_float = (float) PyFloat_AsDouble (float_);
+            Py_DECREF (float_);
+
+            break;
+        }
+        case GI_TYPE_TAG_DOUBLE:
+        {
+            PyObject *float_;
+
+            float_ = PyNumber_Float (object);
+            if (float_ == NULL) {
+                break;
+            }
+
+            arg.v_double = PyFloat_AsDouble (float_);
+            Py_DECREF (float_);
+
+            break;
+        }
+        case GI_TYPE_TAG_GTYPE:
+        {
+            arg.v_long = pyg_type_from_object (object);
+
+            break;
+        }
+        case GI_TYPE_TAG_UNICHAR:
+        {
+            gchar *string;
+
+            if (object == Py_None) {
+                arg.v_uint32 = 0;
+                break;
+            }
+
+#if PY_VERSION_HEX < 0x03000000
+            if (PyUnicode_Check(object)) {
+                 PyObject *pystr_obj = PyUnicode_AsUTF8String (object);
+
+                 if (!pystr_obj)
+                     break;
+
+                 string = g_strdup(PyString_AsString (pystr_obj));
+                 Py_DECREF(pystr_obj);
+            } else {
+                 string = g_strdup(PyString_AsString (object));
+            }
+#else
+            {
+                PyObject *pybytes_obj = PyUnicode_AsUTF8String (object);
+                if (!pybytes_obj)
+                    break;
+
+                string = g_strdup(PyBytes_AsString (pybytes_obj));
+                Py_DECREF (pybytes_obj);
+            }
+#endif
+
+            arg.v_uint32 = g_utf8_get_char (string);
+
+            break;
+        }
+        case GI_TYPE_TAG_UTF8:
+        {
+            gchar *string;
+
+            if (object == Py_None) {
+                arg.v_string = NULL;
+                break;
+            }
+#if PY_VERSION_HEX < 0x03000000
+            if (PyUnicode_Check(object)) {
+                 PyObject *pystr_obj = PyUnicode_AsUTF8String (object);
+                 
+                 if (!pystr_obj)
+                     break;
+
+                 string = g_strdup(PyString_AsString (pystr_obj));
+                 Py_DECREF(pystr_obj);
+            } else {
+                 string = g_strdup(PyString_AsString (object));
+            }
+#else
+            {
+                PyObject *pybytes_obj = PyUnicode_AsUTF8String (object);
+                if (!pybytes_obj)
+                    break;
+
+                string = g_strdup(PyBytes_AsString (pybytes_obj));
+                Py_DECREF (pybytes_obj);
+            }
+#endif
+            arg.v_string = string;
+
+            break;
+        }
+        case GI_TYPE_TAG_FILENAME:
+        {
+            GError *error = NULL;
+            gchar *string;
+
+#if PY_VERSION_HEX < 0x03000000
+            string = g_strdup(PyString_AsString (object));
+#else
+            {
+                PyObject *pybytes_obj = PyUnicode_AsUTF8String (object);
+                if (!pybytes_obj)
+                    break;
+
+                string = g_strdup(PyBytes_AsString (pybytes_obj));
+                Py_DECREF (pybytes_obj);
+            }
+#endif
+
+            if (string == NULL) {
+                break;
+            }
+
+            arg.v_string = g_filename_from_utf8 (string, -1, NULL, NULL, &error);
+            g_free(string);
+
+            if (arg.v_string == NULL) {
+                PyErr_SetString (PyExc_Exception, error->message);
+                /* TODO: Convert the error to an exception. */
+            }
+
+            break;
+        }
+        case GI_TYPE_TAG_ARRAY:
+        {
+            Py_ssize_t length;
+            gboolean is_zero_terminated;
+            GITypeInfo *item_type_info;
+            gsize item_size;
+            GArray *array;
+            GITransfer item_transfer;
+            Py_ssize_t i;
+
+            if (object == Py_None) {
+                arg.v_pointer = NULL;
+                break;
+            }
+
+            length = PySequence_Length (object);
+            if (length < 0) {
+                break;
+            }
+
+            is_zero_terminated = g_type_info_is_zero_terminated (type_info);
+            item_type_info = g_type_info_get_param_type (type_info, 0);
+
+            item_size = _pygi_g_type_info_size (item_type_info);
+
+            array = g_array_sized_new (is_zero_terminated, FALSE, item_size, length);
+            if (array == NULL) {
+                g_base_info_unref ( (GIBaseInfo *) item_type_info);
+                PyErr_NoMemory();
+                break;
+            }
+
+            if (g_type_info_get_tag (item_type_info) == GI_TYPE_TAG_UINT8 &&
+                PYGLIB_PyBytes_Check(object)) {
+
+                memcpy(array->data, PYGLIB_PyBytes_AsString(object), length);
+                array->len = length;
+                goto array_success;
+            }
+
+
+            item_transfer = transfer == GI_TRANSFER_CONTAINER ? GI_TRANSFER_NOTHING : transfer;
+
+            for (i = 0; i < length; i++) {
+                PyObject *py_item;
+                GIArgument item;
+
+                py_item = PySequence_GetItem (object, i);
+                if (py_item == NULL) {
+                    goto array_item_error;
+                }
+
+                item = _pygi_argument_from_object (py_item, item_type_info, item_transfer);
+
+                Py_DECREF (py_item);
+
+                if (PyErr_Occurred()) {
+                    goto array_item_error;
+                }
+
+                g_array_insert_val (array, i, item);
+                continue;
+
+array_item_error:
+                /* Free everything we have converted so far. */
+                _pygi_argument_release ( (GIArgument *) &array, type_info,
+                                         GI_TRANSFER_NOTHING, GI_DIRECTION_IN);
+                array = NULL;
+
+                _PyGI_ERROR_PREFIX ("Item %zd: ", i);
+                break;
+            }
+
+array_success:
+            arg.v_pointer = array;
+
+            g_base_info_unref ( (GIBaseInfo *) item_type_info);
+            break;
+        }
+        case GI_TYPE_TAG_INTERFACE:
+        {
+            GIBaseInfo *info;
+            GIInfoType info_type;
+
+            info = g_type_info_get_interface (type_info);
+            info_type = g_base_info_get_type (info);
+
+            switch (info_type) {
+                case GI_INFO_TYPE_CALLBACK:
+                    /* This should be handled in invoke() */
+                    g_assert_not_reached();
+                    break;
+                case GI_INFO_TYPE_BOXED:
+                case GI_INFO_TYPE_STRUCT:
+                case GI_INFO_TYPE_UNION:
+                {
+                    GType type;
+
+                    if (object == Py_None) {
+                        arg.v_pointer = NULL;
+                        break;
+                    }
+
+                    type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
+
+                    /* Handle special cases first. */
+                    if (g_type_is_a (type, G_TYPE_VALUE)) {
+                        GValue *value;
+                        GType object_type;
+                        gint retval;
+
+                        object_type = pyg_type_from_object_strict ( (PyObject *) object->ob_type, FALSE);
+                        if (object_type == G_TYPE_INVALID) {
+                            PyErr_SetString (PyExc_RuntimeError, "unable to retrieve object's GType");
+                            break;
+                        }
+
+                        g_warn_if_fail (transfer == GI_TRANSFER_NOTHING);
+
+                        value = g_slice_new0 (GValue);
+
+                        /* if already a gvalue, copy, else marshal into gvalue */
+                        if (object_type == G_TYPE_VALUE) {
+                            /* src GValue's lifecycle is handled by Python
+                             * so we have to copy it into the destination's
+                             * GValue which is freed during the cleanup of
+                             * invoke.
+                             */
+                            GValue *src = (GValue *)((PyGObject *) object)->obj;
+                            g_value_init (value, G_VALUE_TYPE (src));
+                            g_value_copy(src, value);
+                        } else {
+                            g_value_init (value, object_type);
+                            retval = pyg_value_from_pyobject (value, object);
+                            if (retval < 0) {
+                                g_slice_free (GValue, value);
+                                PyErr_SetString (PyExc_RuntimeError, "PyObject conversion to GValue failed");
+                                break;
+                            }
+                        }
+
+                        arg.v_pointer = value;
+                    } else if (g_type_is_a (type, G_TYPE_CLOSURE)) {
+                        GClosure *closure;
+
+                        if (pyg_type_from_object_strict (object, FALSE) == G_TYPE_CLOSURE) {
+                            closure = (GClosure *)pyg_boxed_get (object, void);
+                        } else {
+                            closure = pyg_closure_new (object, NULL, NULL);
+                            if (closure == NULL) {
+                                PyErr_SetString (PyExc_RuntimeError, "PyObject conversion to GClosure failed");
+                                break;
+                            }
+                        }
+
+                        arg.v_pointer = closure;
+                    } else if (g_struct_info_is_foreign (info)) {
+                        PyObject *result;
+                        result = pygi_struct_foreign_convert_to_g_argument (
+                                     object, info, transfer, &arg);
+                    } else if (g_type_is_a (type, G_TYPE_BOXED)) {
+                        arg.v_pointer = pyg_boxed_get (object, void);
+                        if (transfer == GI_TRANSFER_EVERYTHING) {
+                            arg.v_pointer = g_boxed_copy (type, arg.v_pointer);
+                        }
+                    } else if (g_type_is_a (type, G_TYPE_POINTER) || type == G_TYPE_NONE) {
+                        g_warn_if_fail (!g_type_info_is_pointer (type_info) || transfer == GI_TRANSFER_NOTHING);
+                        arg.v_pointer = pyg_pointer_get (object, void);
+                    } else {
+                        PyErr_Format (PyExc_NotImplementedError, "structure type '%s' is not supported yet", g_type_name (type));
+                    }
+
+                    break;
+                }
+                case GI_INFO_TYPE_ENUM:
+                case GI_INFO_TYPE_FLAGS:
+                {
+                    PyObject *int_;
+
+                    int_ = PYGLIB_PyNumber_Long (object);
+                    if (int_ == NULL) {
+                        break;
+                    }
+
+                    arg.v_long = PYGLIB_PyLong_AsLong (int_);
+
+                    Py_DECREF (int_);
+
+                    break;
+                }
+                case GI_INFO_TYPE_INTERFACE:
+                case GI_INFO_TYPE_OBJECT:
+                    if (object == Py_None) {
+                        arg.v_pointer = NULL;
+                        break;
+                    }
+
+                    arg.v_pointer = pygobject_get (object);
+                    if (transfer == GI_TRANSFER_EVERYTHING) {
+                        g_object_ref (arg.v_pointer);
+                    }
+
+                    break;
+                default:
+                    g_assert_not_reached();
+            }
+            g_base_info_unref (info);
+            break;
+        }
+        case GI_TYPE_TAG_GLIST:
+        case GI_TYPE_TAG_GSLIST:
+        {
+            Py_ssize_t length;
+            GITypeInfo *item_type_info;
+            GSList *list = NULL;
+            GITransfer item_transfer;
+            Py_ssize_t i;
+
+            if (object == Py_None) {
+                arg.v_pointer = NULL;
+                break;
+            }
+
+            length = PySequence_Length (object);
+            if (length < 0) {
+                break;
+            }
+
+            item_type_info = g_type_info_get_param_type (type_info, 0);
+            g_assert (item_type_info != NULL);
+
+            item_transfer = transfer == GI_TRANSFER_CONTAINER ? GI_TRANSFER_NOTHING : transfer;
+
+            for (i = length - 1; i >= 0; i--) {
+                PyObject *py_item;
+                GIArgument item;
+
+                py_item = PySequence_GetItem (object, i);
+                if (py_item == NULL) {
+                    goto list_item_error;
+                }
+
+                item = _pygi_argument_from_object (py_item, item_type_info, item_transfer);
+
+                Py_DECREF (py_item);
+
+                if (PyErr_Occurred()) {
+                    goto list_item_error;
+                }
+
+                if (type_tag == GI_TYPE_TAG_GLIST) {
+                    list = (GSList *) g_list_prepend ( (GList *) list, item.v_pointer);
+                } else {
+                    list = g_slist_prepend (list, item.v_pointer);
+                }
+
+                continue;
+
+list_item_error:
+                /* Free everything we have converted so far. */
+                _pygi_argument_release ( (GIArgument *) &list, type_info,
+                                         GI_TRANSFER_NOTHING, GI_DIRECTION_IN);
+                list = NULL;
+
+                _PyGI_ERROR_PREFIX ("Item %zd: ", i);
+                break;
+            }
+
+            arg.v_pointer = list;
+
+            g_base_info_unref ( (GIBaseInfo *) item_type_info);
+
+            break;
+        }
+        case GI_TYPE_TAG_GHASH:
+        {
+            Py_ssize_t length;
+            PyObject *keys;
+            PyObject *values;
+            GITypeInfo *key_type_info;
+            GITypeInfo *value_type_info;
+            GITypeTag key_type_tag;
+            GHashFunc hash_func;
+            GEqualFunc equal_func;
+            GHashTable *hash_table;
+            GITransfer item_transfer;
+            Py_ssize_t i;
+
+
+            if (object == Py_None) {
+                arg.v_pointer = NULL;
+                break;
+            }
+
+            length = PyMapping_Length (object);
+            if (length < 0) {
+                break;
+            }
+
+            keys = PyMapping_Keys (object);
+            if (keys == NULL) {
+                break;
+            }
+
+            values = PyMapping_Values (object);
+            if (values == NULL) {
+                Py_DECREF (keys);
+                break;
+            }
+
+            key_type_info = g_type_info_get_param_type (type_info, 0);
+            g_assert (key_type_info != NULL);
+
+            value_type_info = g_type_info_get_param_type (type_info, 1);
+            g_assert (value_type_info != NULL);
+
+            key_type_tag = g_type_info_get_tag (key_type_info);
+
+            switch (key_type_tag) {
+                case GI_TYPE_TAG_UTF8:
+                case GI_TYPE_TAG_FILENAME:
+                    hash_func = g_str_hash;
+                    equal_func = g_str_equal;
+                    break;
+                default:
+                    hash_func = NULL;
+                    equal_func = NULL;
+            }
+
+            hash_table = g_hash_table_new (hash_func, equal_func);
+            if (hash_table == NULL) {
+                PyErr_NoMemory();
+                goto hash_table_release;
+            }
+
+            item_transfer = transfer == GI_TRANSFER_CONTAINER ? GI_TRANSFER_NOTHING : transfer;
+
+            for (i = 0; i < length; i++) {
+                PyObject *py_key;
+                PyObject *py_value;
+                GIArgument key;
+                GIArgument value;
+
+                py_key = PyList_GET_ITEM (keys, i);
+                py_value = PyList_GET_ITEM (values, i);
+
+                key = _pygi_argument_from_object (py_key, key_type_info, item_transfer);
+                if (PyErr_Occurred()) {
+                    goto hash_table_item_error;
+                }
+
+                value = _pygi_argument_from_object (py_value, value_type_info, item_transfer);
+                if (PyErr_Occurred()) {
+                    _pygi_argument_release (&key, type_info, GI_TRANSFER_NOTHING, GI_DIRECTION_IN);
+                    goto hash_table_item_error;
+                }
+
+                g_hash_table_insert (hash_table, key.v_pointer, value.v_pointer);
+                continue;
+
+hash_table_item_error:
+                /* Free everything we have converted so far. */
+                _pygi_argument_release ( (GIArgument *) &hash_table, type_info,
+                                         GI_TRANSFER_NOTHING, GI_DIRECTION_IN);
+                hash_table = NULL;
+
+                _PyGI_ERROR_PREFIX ("Item %zd: ", i);
+                break;
+            }
+
+            arg.v_pointer = hash_table;
+
+hash_table_release:
+            g_base_info_unref ( (GIBaseInfo *) key_type_info);
+            g_base_info_unref ( (GIBaseInfo *) value_type_info);
+            Py_DECREF (keys);
+            Py_DECREF (values);
+            break;
+        }
+        case GI_TYPE_TAG_ERROR:
+            PyErr_SetString (PyExc_NotImplementedError, "error marshalling is not supported yet");
+            /* TODO */
+            break;
+    }
+
+    return arg;
+}
+
+static glong
+_pygi_glong_from_argument (GIArgument  *arg,
+                    GITypeInfo *type_info)
+{
+    gsize item_size = _pygi_g_type_info_size (type_info);
+
+    if (item_size == sizeof (glong))
+        return arg->v_long;
+    else if (item_size == sizeof (gint))
+        return arg->v_int;
+    else
+        {
+            g_warning ("pygi: unsupported item size %ld", item_size);
+            return arg->v_long;
+        }
+}
+
+PyObject *
+_pygi_argument_to_object (GIArgument  *arg,
+                          GITypeInfo *type_info,
+                          GITransfer transfer)
+{
+    GITypeTag type_tag;
+    PyObject *object = NULL;
+
+    type_tag = g_type_info_get_tag (type_info);
+    switch (type_tag) {
+        case GI_TYPE_TAG_VOID:
+            if (g_type_info_is_pointer (type_info)) {
+                /* Raw Python objects are passed to void* args */
+                g_warn_if_fail (transfer == GI_TRANSFER_NOTHING);
+                object = arg->v_pointer;
+            } else
+                object = Py_None;
+            Py_XINCREF (object);
+            break;
+        case GI_TYPE_TAG_BOOLEAN:
+        {
+            object = PyBool_FromLong (arg->v_boolean);
+            break;
+        }
+        case GI_TYPE_TAG_INT8:
+        {
+            object = PYGLIB_PyLong_FromLong (arg->v_int8);
+            break;
+        }
+        case GI_TYPE_TAG_UINT8:
+        {
+            object = PYGLIB_PyLong_FromLong (arg->v_uint8);
+            break;
+        }
+        case GI_TYPE_TAG_INT16:
+        {
+            object = PYGLIB_PyLong_FromLong (arg->v_int16);
+            break;
+        }
+        case GI_TYPE_TAG_UINT16:
+        {
+            object = PYGLIB_PyLong_FromLong (arg->v_uint16);
+            break;
+        }
+        case GI_TYPE_TAG_INT32:
+        {
+            object = PYGLIB_PyLong_FromLong (arg->v_int32);
+            break;
+        }
+        case GI_TYPE_TAG_UINT32:
+        {
+            object = PyLong_FromLongLong (arg->v_uint32);
+            break;
+        }
+        case GI_TYPE_TAG_INT64:
+        {
+            object = PyLong_FromLongLong (arg->v_int64);
+            break;
+        }
+        case GI_TYPE_TAG_UINT64:
+        {
+            object = PyLong_FromUnsignedLongLong (arg->v_uint64);
+            break;
+        }
+        case GI_TYPE_TAG_FLOAT:
+        {
+            object = PyFloat_FromDouble (arg->v_float);
+            break;
+        }
+        case GI_TYPE_TAG_DOUBLE:
+        {
+            object = PyFloat_FromDouble (arg->v_double);
+            break;
+        }
+        case GI_TYPE_TAG_GTYPE:
+        {
+            object = pyg_type_wrapper_new ( (GType) arg->v_long);
+            break;
+        }
+        case GI_TYPE_TAG_UNICHAR:
+        {
+            /* Preserve the bidirectional mapping between 0 and "" */
+            if (arg->v_uint32 == 0) {
+                object = PYGLIB_PyUnicode_FromString ("");
+            } else if (g_unichar_validate (arg->v_uint32)) {
+                gchar utf8[6];
+                gint bytes;
+
+                bytes = g_unichar_to_utf8 (arg->v_uint32, utf8);
+                object = PYGLIB_PyUnicode_FromStringAndSize ((char*)utf8, bytes);
+            } else {
+                /* TODO: Convert the error to an exception. */
+                PyErr_Format (PyExc_TypeError,
+                              "Invalid unicode codepoint %" G_GUINT32_FORMAT,
+                              arg->v_uint32);
+                object = Py_None;
+                Py_INCREF (object);
+            }
+            break;
+        }
+        case GI_TYPE_TAG_UTF8:
+            if (arg->v_string == NULL) {
+                object = Py_None;
+                Py_INCREF (object);
+                break;
+            }
+
+            object = PYGLIB_PyUnicode_FromString (arg->v_string);
+            break;
+        case GI_TYPE_TAG_FILENAME:
+        {
+            GError *error = NULL;
+            gchar *string;
+
+            if (arg->v_string == NULL) {
+                object = Py_None;
+                Py_INCREF (object);
+                break;
+            }
+
+            string = g_filename_to_utf8 (arg->v_string, -1, NULL, NULL, &error);
+            if (string == NULL) {
+                PyErr_SetString (PyExc_Exception, error->message);
+                /* TODO: Convert the error to an exception. */
+                break;
+            }
+
+            object = PYGLIB_PyUnicode_FromString (string);
+
+            g_free (string);
+
+            break;
+        }
+        case GI_TYPE_TAG_ARRAY:
+        {
+            GArray *array;
+            GITypeInfo *item_type_info;
+            GITypeTag item_type_tag;
+            GITransfer item_transfer;
+            gsize i, item_size;
+
+            array = arg->v_pointer;
+
+            item_type_info = g_type_info_get_param_type (type_info, 0);
+            g_assert (item_type_info != NULL);
+
+            item_type_tag = g_type_info_get_tag (item_type_info);
+            item_transfer = transfer == GI_TRANSFER_CONTAINER ? GI_TRANSFER_NOTHING : transfer;
+
+            if (item_type_tag == GI_TYPE_TAG_UINT8) {
+                /* Return as a byte array */
+                if (arg->v_pointer == NULL) {
+                    object = PYGLIB_PyBytes_FromString ("");
+                    break;
+                }
+
+                object = PYGLIB_PyBytes_FromStringAndSize(array->data, array->len);
+                break;
+
+            } else {
+                if (arg->v_pointer == NULL) {
+                    object = PyList_New (0);
+                    break;
+                }
+
+                object = PyList_New (array->len);
+                if (object == NULL) {
+                    break;
+                }
+
+            }
+            item_size = g_array_get_element_size (array);
+
+            for (i = 0; i < array->len; i++) {
+                GIArgument item;
+                PyObject *py_item;
+                gboolean is_struct = FALSE;
+
+                if (item_type_tag == GI_TYPE_TAG_INTERFACE) {
+                    GIBaseInfo *iface_info = g_type_info_get_interface (item_type_info);
+                    switch (g_base_info_get_type (iface_info)) {
+                        case GI_INFO_TYPE_STRUCT:
+                        case GI_INFO_TYPE_BOXED:
+                            is_struct = TRUE;
+                        default:
+                            break;
+                    }
+                    g_base_info_unref ( (GIBaseInfo *) iface_info);
+                }
+
+                if (is_struct) {
+                    item.v_pointer = &_g_array_index (array, GIArgument, i);
+                } else {
+                    memcpy (&item, &_g_array_index (array, GIArgument, i), item_size);
+                }
+
+                py_item = _pygi_argument_to_object (&item, item_type_info, item_transfer);
+                if (py_item == NULL) {
+                    Py_CLEAR (object);
+                    _PyGI_ERROR_PREFIX ("Item %zu: ", i);
+                    break;
+                }
+
+                PyList_SET_ITEM (object, i, py_item);
+            }
+
+            g_base_info_unref ( (GIBaseInfo *) item_type_info);
+            break;
+        }
+        case GI_TYPE_TAG_INTERFACE:
+        {
+            GIBaseInfo *info;
+            GIInfoType info_type;
+
+            info = g_type_info_get_interface (type_info);
+            info_type = g_base_info_get_type (info);
+
+            switch (info_type) {
+                case GI_INFO_TYPE_CALLBACK:
+                {
+                    /* There is no way we can support a callback return
+                     * as we are never sure if the callback was set from C
+                     * or Python.  API that return callbacks are broken
+                     * so we print a warning and send back a None
+                     */
+
+                    g_warning ("You are trying to use an API which returns a callback."
+                               "Callback returns can not be supported. Returning None instead.");
+                    object = Py_None;
+                    Py_INCREF (object);
+                    break;
+                }
+                case GI_INFO_TYPE_BOXED:
+                case GI_INFO_TYPE_STRUCT:
+                case GI_INFO_TYPE_UNION:
+                {
+                    GType type;
+
+                    if (arg->v_pointer == NULL) {
+                        object = Py_None;
+                        Py_INCREF (object);
+                        break;
+                    }
+
+                    type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
+                    if (g_type_is_a (type, G_TYPE_VALUE)) {
+                        object = pyg_value_as_pyobject (arg->v_pointer, FALSE);
+                    } else if (g_struct_info_is_foreign (info)) {
+                        object = pygi_struct_foreign_convert_from_g_argument (info, arg->v_pointer);
+                    } else if (g_type_is_a (type, G_TYPE_BOXED)) {
+                        PyObject *py_type;
+
+                        py_type = _pygi_type_get_from_g_type (type);
+                        if (py_type == NULL)
+                            break;
+
+                        object = _pygi_boxed_new ( (PyTypeObject *) py_type, arg->v_pointer, transfer == GI_TRANSFER_EVERYTHING);
+
+                        Py_DECREF (py_type);
+                    } else if (g_type_is_a (type, G_TYPE_POINTER)) {
+                        PyObject *py_type;
+
+                        py_type = _pygi_type_get_from_g_type (type);
+
+                        if (py_type == NULL || !PyType_IsSubtype ( (PyTypeObject *) type, &PyGIStruct_Type)) {
+                            g_warn_if_fail (transfer == GI_TRANSFER_NOTHING);
+                            object = pyg_pointer_new (type, arg->v_pointer);
+                        } else {
+                            object = _pygi_struct_new ( (PyTypeObject *) py_type, arg->v_pointer, transfer == GI_TRANSFER_EVERYTHING);
+                        }
+
+                        Py_XDECREF (py_type);
+                    } else if (type == G_TYPE_NONE) {
+                        PyObject *py_type;
+
+                        py_type = _pygi_type_import_by_gi_info (info);
+                        if (py_type == NULL) {
+                            break;
+                        }
+
+                        /* Only structs created in invoke can be safely marked
+                         * GI_TRANSFER_EVERYTHING. Trust that invoke has
+                         * filtered correctly
+                         */
+                        object = _pygi_struct_new ( (PyTypeObject *) py_type, arg->v_pointer,
+                                                    transfer == GI_TRANSFER_EVERYTHING);
+
+                        Py_DECREF (py_type);
+                    } else {
+                        PyErr_Format (PyExc_NotImplementedError, "structure type '%s' is not supported yet", g_type_name (type));
+                    }
+
+                    break;
+                }
+                case GI_INFO_TYPE_ENUM:
+                case GI_INFO_TYPE_FLAGS:
+                {
+                    GType type;
+
+                    type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
+
+                    if (type == G_TYPE_NONE) {
+                        /* An enum with a GType of None is an enum without GType */
+                        PyObject *py_type = _pygi_type_import_by_gi_info (info);
+                        PyObject *py_args = NULL;
+                        glong val = _pygi_glong_from_argument (arg, type_info);
+
+                        if (!py_type)
+                            return NULL;
+
+                        py_args = PyTuple_New (1);
+                        if (PyTuple_SetItem (py_args, 0, PyLong_FromLong (val)) != 0) {
+                            Py_DECREF (py_args);
+                            Py_DECREF (py_type);
+                            return NULL;
+                        }
+
+                        object = PyObject_CallFunction (py_type, "l", val);
+
+                        Py_DECREF (py_args);
+                        Py_DECREF (py_type);
+
+                    } else if (info_type == GI_INFO_TYPE_ENUM) {
+                        glong val = _pygi_glong_from_argument (arg, type_info);
+                        object = pyg_enum_from_gtype (type, val);
+                    } else {
+                        object = pyg_flags_from_gtype (type, arg->v_long);
+                    }
+
+                    break;
+                }
+                case GI_INFO_TYPE_INTERFACE:
+                case GI_INFO_TYPE_OBJECT:
+                    if (arg->v_pointer == NULL) {
+                        object = Py_None;
+                        Py_INCREF (object);
+                        break;
+                    }
+                    object = pygobject_new (arg->v_pointer);
+                    break;
+                default:
+                    g_assert_not_reached();
+            }
+
+            g_base_info_unref (info);
+            break;
+        }
+        case GI_TYPE_TAG_GLIST:
+        case GI_TYPE_TAG_GSLIST:
+        {
+            GSList *list;
+            gsize length;
+            GITypeInfo *item_type_info;
+            GITransfer item_transfer;
+            gsize i;
+
+            list = arg->v_pointer;
+            length = g_slist_length (list);
+
+            object = PyList_New (length);
+            if (object == NULL) {
+                break;
+            }
+
+            item_type_info = g_type_info_get_param_type (type_info, 0);
+            g_assert (item_type_info != NULL);
+
+            item_transfer = transfer == GI_TRANSFER_CONTAINER ? GI_TRANSFER_NOTHING : transfer;
+
+            for (i = 0; list != NULL; list = g_slist_next (list), i++) {
+                GIArgument item;
+                PyObject *py_item;
+
+                item.v_pointer = list->data;
+
+                py_item = _pygi_argument_to_object (&item, item_type_info, item_transfer);
+                if (py_item == NULL) {
+                    Py_CLEAR (object);
+                    _PyGI_ERROR_PREFIX ("Item %zu: ", i);
+                    break;
+                }
+
+                PyList_SET_ITEM (object, i, py_item);
+            }
+
+            g_base_info_unref ( (GIBaseInfo *) item_type_info);
+            break;
+        }
+        case GI_TYPE_TAG_GHASH:
+        {
+            GITypeInfo *key_type_info;
+            GITypeInfo *value_type_info;
+            GITransfer item_transfer;
+            GHashTableIter hash_table_iter;
+            GIArgument key;
+            GIArgument value;
+
+            if (arg->v_pointer == NULL) {
+                object = Py_None;
+                Py_INCREF (object);
+                break;
+            }
+
+            object = PyDict_New();
+            if (object == NULL) {
+                break;
+            }
+
+            key_type_info = g_type_info_get_param_type (type_info, 0);
+            g_assert (key_type_info != NULL);
+            g_assert (g_type_info_get_tag (key_type_info) != GI_TYPE_TAG_VOID);
+
+            value_type_info = g_type_info_get_param_type (type_info, 1);
+            g_assert (value_type_info != NULL);
+            g_assert (g_type_info_get_tag (value_type_info) != GI_TYPE_TAG_VOID);
+
+            item_transfer = transfer == GI_TRANSFER_CONTAINER ? GI_TRANSFER_NOTHING : transfer;
+
+            g_hash_table_iter_init (&hash_table_iter, (GHashTable *) arg->v_pointer);
+            while (g_hash_table_iter_next (&hash_table_iter, &key.v_pointer, &value.v_pointer)) {
+                PyObject *py_key;
+                PyObject *py_value;
+                int retval;
+
+                py_key = _pygi_argument_to_object (&key, key_type_info, item_transfer);
+                if (py_key == NULL) {
+                    break;
+                }
+
+                py_value = _pygi_argument_to_object (&value, value_type_info, item_transfer);
+                if (py_value == NULL) {
+                    Py_DECREF (py_key);
+                    break;
+                }
+
+                retval = PyDict_SetItem (object, py_key, py_value);
+
+                Py_DECREF (py_key);
+                Py_DECREF (py_value);
+
+                if (retval < 0) {
+                    Py_CLEAR (object);
+                    break;
+                }
+            }
+
+            g_base_info_unref ( (GIBaseInfo *) key_type_info);
+            g_base_info_unref ( (GIBaseInfo *) value_type_info);
+            break;
+        }
+        case GI_TYPE_TAG_ERROR:
+            /* Errors should be handled in the invoke wrapper. */
+            g_assert_not_reached();
+    }
+
+    return object;
+}
+
+
+GIArgument
+_pygi_argument_from_g_value(const GValue *value,
+                            GITypeInfo *type_info)
+{
+    GIArgument arg = { 0, };
+
+    GITypeTag type_tag = g_type_info_get_tag (type_info);
+    switch (type_tag) {
+        case GI_TYPE_TAG_BOOLEAN:
+            arg.v_boolean = g_value_get_boolean (value);
+            break;
+        case GI_TYPE_TAG_INT8:
+        case GI_TYPE_TAG_INT16:
+        case GI_TYPE_TAG_INT32:
+        case GI_TYPE_TAG_INT64:
+            arg.v_int = g_value_get_int (value);
+            break;
+        case GI_TYPE_TAG_UINT8:
+        case GI_TYPE_TAG_UINT16:
+        case GI_TYPE_TAG_UINT32:
+        case GI_TYPE_TAG_UINT64:
+            arg.v_uint = g_value_get_uint (value);
+            break;
+        case GI_TYPE_TAG_UNICHAR:
+            arg.v_uint32 = g_value_get_char (value);
+            break;
+        case GI_TYPE_TAG_FLOAT:
+            arg.v_float = g_value_get_float (value);
+            break;
+        case GI_TYPE_TAG_DOUBLE:
+            arg.v_double = g_value_get_double (value);
+            break;
+        case GI_TYPE_TAG_GTYPE:
+            arg.v_long = g_value_get_gtype (value);
+            break;
+        case GI_TYPE_TAG_UTF8:
+        case GI_TYPE_TAG_FILENAME:
+            arg.v_string = g_value_dup_string (value);
+            break;
+        case GI_TYPE_TAG_GLIST:
+        case GI_TYPE_TAG_GSLIST:
+            arg.v_pointer = g_value_get_pointer (value);
+            break;
+        case GI_TYPE_TAG_ARRAY:
+        case GI_TYPE_TAG_GHASH:
+            arg.v_pointer = g_value_get_boxed (value);
+            break;
+        case GI_TYPE_TAG_INTERFACE:
+        {
+            GIBaseInfo *info;
+            GIInfoType info_type;
+
+            info = g_type_info_get_interface (type_info);
+            info_type = g_base_info_get_type (info);
+
+            g_base_info_unref (info);
+
+            switch (info_type) {
+                case GI_INFO_TYPE_FLAGS:
+                case GI_INFO_TYPE_ENUM:
+                    arg.v_long = g_value_get_enum (value);
+                    break;
+                case GI_INFO_TYPE_INTERFACE:
+                case GI_INFO_TYPE_OBJECT:
+                    arg.v_pointer = g_value_get_object (value);
+                    break;
+                case GI_INFO_TYPE_BOXED:
+                case GI_INFO_TYPE_STRUCT:
+                case GI_INFO_TYPE_UNION:
+                    if (G_VALUE_HOLDS(value, G_TYPE_BOXED)) {
+                        arg.v_pointer = g_value_get_boxed (value);
+                    } else if (G_VALUE_HOLDS(value, G_TYPE_VARIANT)) {
+                        arg.v_pointer = g_value_get_variant (value);
+                    } else {
+                        arg.v_pointer = g_value_get_pointer (value);
+                    }
+                    break;
+                default:
+                    g_warning("Converting of type '%s' is not implemented", g_info_type_to_string(info_type));
+                    g_assert_not_reached();
+            }
+            break;
+        }
+        case GI_TYPE_TAG_ERROR:
+        case GI_TYPE_TAG_VOID:
+            g_critical("Converting of type '%s' is not implemented", g_type_tag_to_string(type_tag));
+            g_assert_not_reached();
+    }
+
+    return arg;
+}
+
+void
+_pygi_argument_release (GIArgument   *arg,
+                        GITypeInfo  *type_info,
+                        GITransfer   transfer,
+                        GIDirection  direction)
+{
+    GITypeTag type_tag;
+    gboolean is_out = (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT);
+
+    type_tag = g_type_info_get_tag (type_info);
+
+    switch (type_tag) {
+        case GI_TYPE_TAG_VOID:
+            /* Don't do anything, it's transparent to the C side */
+            break;
+        case GI_TYPE_TAG_BOOLEAN:
+        case GI_TYPE_TAG_INT8:
+        case GI_TYPE_TAG_UINT8:
+        case GI_TYPE_TAG_INT16:
+        case GI_TYPE_TAG_UINT16:
+        case GI_TYPE_TAG_INT32:
+        case GI_TYPE_TAG_UINT32:
+        case GI_TYPE_TAG_INT64:
+        case GI_TYPE_TAG_UINT64:
+        case GI_TYPE_TAG_FLOAT:
+        case GI_TYPE_TAG_DOUBLE:
+        case GI_TYPE_TAG_GTYPE:
+        case GI_TYPE_TAG_UNICHAR:
+            break;
+        case GI_TYPE_TAG_FILENAME:
+        case GI_TYPE_TAG_UTF8:
+            /* With allow-none support the string could be NULL */
+            if ((arg->v_string != NULL &&
+                    (direction == GI_DIRECTION_IN && transfer == GI_TRANSFER_NOTHING))
+                    || (direction == GI_DIRECTION_OUT && transfer == GI_TRANSFER_EVERYTHING)) {
+                g_free (arg->v_string);
+            }
+            break;
+        case GI_TYPE_TAG_ARRAY:
+        {
+            GArray *array;
+            gsize i;
+
+            if (arg->v_pointer == NULL) {
+                return;
+            }
+
+            array = arg->v_pointer;
+
+            if ( (direction == GI_DIRECTION_IN && transfer != GI_TRANSFER_EVERYTHING)
+                    || (direction == GI_DIRECTION_OUT && transfer == GI_TRANSFER_EVERYTHING)) {
+                GITypeInfo *item_type_info;
+                GITransfer item_transfer;
+
+                item_type_info = g_type_info_get_param_type (type_info, 0);
+
+                item_transfer = direction == GI_DIRECTION_IN ? GI_TRANSFER_NOTHING : GI_TRANSFER_EVERYTHING;
+
+                /* Free the items */
+                for (i = 0; i < array->len; i++) {
+                    GIArgument *item;
+                    item = &_g_array_index (array, GIArgument, i);
+                    _pygi_argument_release (item, item_type_info, item_transfer, direction);
+                }
+
+                g_base_info_unref ( (GIBaseInfo *) item_type_info);
+            }
+
+            if ( (direction == GI_DIRECTION_IN && transfer == GI_TRANSFER_NOTHING)
+                    || (direction == GI_DIRECTION_OUT && transfer != GI_TRANSFER_NOTHING)) {
+                g_array_free (array, TRUE);
+            }
+
+            break;
+        }
+        case GI_TYPE_TAG_INTERFACE:
+        {
+            GIBaseInfo *info;
+            GIInfoType info_type;
+
+            info = g_type_info_get_interface (type_info);
+            info_type = g_base_info_get_type (info);
+
+            switch (info_type) {
+                case GI_INFO_TYPE_CALLBACK:
+                    /* TODO */
+                    break;
+                case GI_INFO_TYPE_BOXED:
+                case GI_INFO_TYPE_STRUCT:
+                case GI_INFO_TYPE_UNION:
+                {
+                    GType type;
+
+                    if (arg->v_pointer == NULL) {
+                        return;
+                    }
+
+                    type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
+
+                    if (g_type_is_a (type, G_TYPE_VALUE)) {
+                        GValue *value;
+
+                        value = arg->v_pointer;
+
+                        if ( (direction == GI_DIRECTION_IN && transfer != GI_TRANSFER_EVERYTHING)
+                                || (direction == GI_DIRECTION_OUT && transfer == GI_TRANSFER_EVERYTHING)) {
+                            g_value_unset (value);
+                        }
+
+                        if ( (direction == GI_DIRECTION_IN && transfer == GI_TRANSFER_NOTHING)
+                                || (direction == GI_DIRECTION_OUT && transfer != GI_TRANSFER_NOTHING)) {
+                            g_slice_free (GValue, value);
+                        }
+                    } else if (g_struct_info_is_foreign ( (GIStructInfo*) info)) {
+                        if (direction == GI_DIRECTION_OUT && transfer == GI_TRANSFER_EVERYTHING) {
+                            pygi_struct_foreign_release (info, arg->v_pointer);
+                        }
+                    } else if (g_type_is_a (type, G_TYPE_BOXED)) {
+                    } else if (g_type_is_a (type, G_TYPE_POINTER) || type == G_TYPE_NONE) {
+                        g_warn_if_fail (!g_type_info_is_pointer (type_info) || transfer == GI_TRANSFER_NOTHING);
+                    }
+
+                    break;
+                }
+                case GI_INFO_TYPE_ENUM:
+                case GI_INFO_TYPE_FLAGS:
+                    break;
+                case GI_INFO_TYPE_INTERFACE:
+                case GI_INFO_TYPE_OBJECT:
+                    if (arg->v_pointer == NULL) {
+                        return;
+                    }
+                    if (is_out && transfer == GI_TRANSFER_EVERYTHING) {
+                        g_object_unref (arg->v_pointer);
+                    }
+                    break;
+                default:
+                    g_assert_not_reached();
+            }
+
+            g_base_info_unref (info);
+            break;
+        }
+        case GI_TYPE_TAG_GLIST:
+        case GI_TYPE_TAG_GSLIST:
+        {
+            GSList *list;
+
+            if (arg->v_pointer == NULL) {
+                return;
+            }
+
+            list = arg->v_pointer;
+
+            if ( (direction == GI_DIRECTION_IN && transfer != GI_TRANSFER_EVERYTHING)
+                    || (direction == GI_DIRECTION_OUT && transfer == GI_TRANSFER_EVERYTHING)) {
+                GITypeInfo *item_type_info;
+                GITransfer item_transfer;
+                GSList *item;
+
+                item_type_info = g_type_info_get_param_type (type_info, 0);
+                g_assert (item_type_info != NULL);
+
+                item_transfer = direction == GI_DIRECTION_IN ? GI_TRANSFER_NOTHING : GI_TRANSFER_EVERYTHING;
+
+                /* Free the items */
+                for (item = list; item != NULL; item = g_slist_next (item)) {
+                    _pygi_argument_release ( (GIArgument *) &item->data, item_type_info,
+                                             item_transfer, direction);
+                }
+
+                g_base_info_unref ( (GIBaseInfo *) item_type_info);
+            }
+
+            if ( (direction == GI_DIRECTION_IN && transfer == GI_TRANSFER_NOTHING)
+                    || (direction == GI_DIRECTION_OUT && transfer != GI_TRANSFER_NOTHING)) {
+                if (type_tag == GI_TYPE_TAG_GLIST) {
+                    g_list_free ( (GList *) list);
+                } else {
+                    /* type_tag == GI_TYPE_TAG_GSLIST */
+                    g_slist_free (list);
+                }
+            }
+
+            break;
+        }
+        case GI_TYPE_TAG_GHASH:
+        {
+            GHashTable *hash_table;
+
+            if (arg->v_pointer == NULL) {
+                return;
+            }
+
+            hash_table = arg->v_pointer;
+
+            if (direction == GI_DIRECTION_IN && transfer != GI_TRANSFER_EVERYTHING) {
+                /* We created the table without a destroy function, so keys and
+                 * values need to be released. */
+                GITypeInfo *key_type_info;
+                GITypeInfo *value_type_info;
+                GITransfer item_transfer;
+                GHashTableIter hash_table_iter;
+                gpointer key;
+                gpointer value;
+
+                key_type_info = g_type_info_get_param_type (type_info, 0);
+                g_assert (key_type_info != NULL);
+
+                value_type_info = g_type_info_get_param_type (type_info, 1);
+                g_assert (value_type_info != NULL);
+
+                if (direction == GI_DIRECTION_IN) {
+                    item_transfer = GI_TRANSFER_NOTHING;
+                } else {
+                    item_transfer = GI_TRANSFER_EVERYTHING;
+                }
+
+                g_hash_table_iter_init (&hash_table_iter, hash_table);
+                while (g_hash_table_iter_next (&hash_table_iter, &key, &value)) {
+                    _pygi_argument_release ( (GIArgument *) &key, key_type_info,
+                                             item_transfer, direction);
+                    _pygi_argument_release ( (GIArgument *) &value, value_type_info,
+                                             item_transfer, direction);
+                }
+
+                g_base_info_unref ( (GIBaseInfo *) key_type_info);
+                g_base_info_unref ( (GIBaseInfo *) value_type_info);
+            } else if (direction == GI_DIRECTION_OUT && transfer == GI_TRANSFER_CONTAINER) {
+                /* Be careful to avoid keys and values being freed if the
+                 * callee gave a destroy function. */
+                g_hash_table_steal_all (hash_table);
+            }
+
+            if ( (direction == GI_DIRECTION_IN && transfer == GI_TRANSFER_NOTHING)
+                    || (direction == GI_DIRECTION_OUT && transfer != GI_TRANSFER_NOTHING)) {
+                g_hash_table_unref (hash_table);
+            }
+
+            break;
+        }
+        case GI_TYPE_TAG_ERROR:
+        {
+            GError *error;
+
+            if (arg->v_pointer == NULL) {
+                return;
+            }
+
+            error = * (GError **) arg->v_pointer;
+
+            if (error != NULL) {
+                g_error_free (error);
+            }
+
+            g_slice_free (GError *, arg->v_pointer);
+            break;
+        }
+    }
+}
+
+void
+_pygi_argument_init (void)
+{
+    PyDateTime_IMPORT;
+    _pygobject_import();
+}
+
diff --git a/gi/pygi-argument.h b/gi/pygi-argument.h
new file mode 100644 (file)
index 0000000..7224c75
--- /dev/null
@@ -0,0 +1,70 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_ARGUMENT_H__
+#define __PYGI_ARGUMENT_H__
+
+#include <Python.h>
+
+#include <girepository.h>
+
+G_BEGIN_DECLS
+
+
+/* Private */
+gint _pygi_g_type_interface_check_object (GIBaseInfo *info,
+                                          PyObject   *object);
+
+gint _pygi_g_type_info_check_object (GITypeInfo *type_info,
+                                     PyObject   *object,
+                                     gboolean   allow_none);
+
+gint _pygi_g_registered_type_info_check_object (GIRegisteredTypeInfo *info,
+                                                gboolean              is_instance,
+                                                PyObject             *object);
+
+
+GArray* _pygi_argument_to_array (GIArgument  *arg,
+                                 GIArgument  *args[],
+                                 GITypeInfo *type_info,
+                                 gboolean    is_method);
+
+GIArgument _pygi_argument_from_object (PyObject   *object,
+                                      GITypeInfo *type_info,
+                                      GITransfer  transfer);
+
+PyObject* _pygi_argument_to_object (GIArgument  *arg,
+                                    GITypeInfo *type_info,
+                                    GITransfer  transfer);
+
+GIArgument _pygi_argument_from_g_value(const GValue *value,
+                                       GITypeInfo *type_info);
+
+void _pygi_argument_release (GIArgument   *arg,
+                             GITypeInfo  *type_info,
+                             GITransfer   transfer,
+                             GIDirection  direction);
+
+void _pygi_argument_init (void);
+
+G_END_DECLS
+
+#endif /* __PYGI_ARGUMENT_H__ */
diff --git a/gi/pygi-boxed.c b/gi/pygi-boxed.c
new file mode 100644 (file)
index 0000000..2fd446c
--- /dev/null
@@ -0,0 +1,182 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2009 Simon van der Linden <svdlinden@src.gnome.org>
+ *
+ *   pygi-boxed.c: wrapper to handle registered structures.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygi-private.h"
+
+#include <pygobject.h>
+#include <girepository.h>
+#include <pyglib-python-compat.h>
+
+static void
+_boxed_dealloc (PyGIBoxed *self)
+{
+    GType g_type;
+
+    PyObject_GC_UnTrack ( (PyObject *) self);
+
+    PyObject_ClearWeakRefs ( (PyObject *) self);
+
+    if ( ( (PyGBoxed *) self)->free_on_dealloc) {
+        if (self->slice_allocated) {
+            g_slice_free1 (self->size, ( (PyGBoxed *) self)->boxed);
+        } else {
+            g_type = pyg_type_from_object ( (PyObject *) self);
+            g_boxed_free (g_type, ( (PyGBoxed *) self)->boxed);
+        }
+    }
+
+    Py_TYPE( (PyGObject *) self)->tp_free ( (PyObject *) self);
+}
+
+void *
+_pygi_boxed_alloc (GIBaseInfo *info, gsize *size_out)
+{
+    gsize size;
+
+    /* FIXME: Remove when bgo#622711 is fixed */
+    if (g_registered_type_info_get_g_type (info) == G_TYPE_VALUE) {
+        size = sizeof (GValue);
+    } else {
+        switch (g_base_info_get_type (info)) {
+            case GI_INFO_TYPE_UNION:
+                size = g_union_info_get_size ( (GIUnionInfo *) info);
+                break;
+            case GI_INFO_TYPE_BOXED:
+            case GI_INFO_TYPE_STRUCT:
+                size = g_struct_info_get_size ( (GIStructInfo *) info);
+                break;
+            default:
+                PyErr_Format (PyExc_TypeError,
+                              "info should be Boxed or Union, not '%d'",
+                              g_base_info_get_type (info));
+                return NULL;
+        }
+    }
+
+    if( size_out != NULL)
+        *size_out = size;
+
+    return g_slice_alloc0 (size);
+}
+
+static PyObject *
+_boxed_new (PyTypeObject *type,
+            PyObject     *args,
+            PyObject     *kwargs)
+{
+    static char *kwlist[] = { NULL };
+
+    GIBaseInfo *info;
+    gsize size = 0;
+    gpointer boxed;
+    PyGIBoxed *self = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs, "", kwlist)) {
+        return NULL;
+    }
+
+    info = _pygi_object_get_gi_info ( (PyObject *) type, &PyGIBaseInfo_Type);
+    if (info == NULL) {
+        if (PyErr_ExceptionMatches (PyExc_AttributeError)) {
+            PyErr_Format (PyExc_TypeError, "missing introspection information");
+        }
+        return NULL;
+    }
+
+    boxed = _pygi_boxed_alloc (info, &size);
+    if (boxed == NULL) {
+        PyErr_NoMemory();
+        goto out;
+    }
+
+    self = (PyGIBoxed *) _pygi_boxed_new (type, boxed, TRUE);
+    if (self == NULL) {
+        g_slice_free1 (size, boxed);
+        goto out;
+    }
+
+    self->size = size;
+    self->slice_allocated = TRUE;
+
+out:
+    g_base_info_unref (info);
+
+    return (PyObject *) self;
+}
+
+static int
+_boxed_init (PyObject *self,
+             PyObject *args,
+             PyObject *kwargs)
+{
+    /* Don't call PyGBoxed's init, which raises an exception. */
+    return 0;
+}
+
+PYGLIB_DEFINE_TYPE("gi.Boxed", PyGIBoxed_Type, PyGIBoxed);
+
+PyObject *
+_pygi_boxed_new (PyTypeObject *type,
+                 gpointer      boxed,
+                 gboolean      free_on_dealloc)
+{
+    PyGIBoxed *self;
+
+    if (!boxed) {
+        Py_RETURN_NONE;
+    }
+
+    if (!PyType_IsSubtype (type, &PyGIBoxed_Type)) {
+        PyErr_SetString (PyExc_TypeError, "must be a subtype of gi.Boxed");
+        return NULL;
+    }
+
+    self = (PyGIBoxed *) type->tp_alloc (type, 0);
+    if (self == NULL) {
+        return NULL;
+    }
+
+    ( (PyGBoxed *) self)->gtype = pyg_type_from_object ( (PyObject *) type);
+    ( (PyGBoxed *) self)->boxed = boxed;
+    ( (PyGBoxed *) self)->free_on_dealloc = free_on_dealloc;
+    self->size = 0;
+    self->slice_allocated = FALSE;
+
+    return (PyObject *) self;
+}
+
+void
+_pygi_boxed_register_types (PyObject *m)
+{
+    Py_TYPE(&PyGIBoxed_Type) = &PyType_Type;
+    PyGIBoxed_Type.tp_base = &PyGBoxed_Type;
+    PyGIBoxed_Type.tp_new = (newfunc) _boxed_new;
+    PyGIBoxed_Type.tp_init = (initproc) _boxed_init;
+    PyGIBoxed_Type.tp_dealloc = (destructor) _boxed_dealloc;
+    PyGIBoxed_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);
+
+    if (PyType_Ready (&PyGIBoxed_Type))
+        return;
+    if (PyModule_AddObject (m, "Boxed", (PyObject *) &PyGIBoxed_Type))
+        return;
+}
diff --git a/gi/pygi-boxed.h b/gi/pygi-boxed.h
new file mode 100644 (file)
index 0000000..a84ec4e
--- /dev/null
@@ -0,0 +1,42 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2009 Simon van der Linden <svdlinden@src.gnome.org>
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_BOXED_H__
+#define __PYGI_BOXED_H__
+
+#include <Python.h>
+
+G_BEGIN_DECLS
+
+extern PyTypeObject PyGIBoxed_Type;
+
+PyObject * _pygi_boxed_new (PyTypeObject *type,
+                            gpointer      boxed,
+                            gboolean      free_on_dealloc);
+
+void * _pygi_boxed_alloc (GIBaseInfo *info,
+                          gsize *size);
+
+void _pygi_boxed_register_types (PyObject *m);
+
+G_END_DECLS
+
+#endif /* __PYGI_BOXED_H__ */
diff --git a/gi/pygi-callbacks.c b/gi/pygi-callbacks.c
new file mode 100644 (file)
index 0000000..bae4001
--- /dev/null
@@ -0,0 +1,221 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ *   pygi-callbacks.c: PyGI C Callback Functions and Helpers
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygi-private.h"
+
+static PyGICClosure *global_destroy_notify;
+
+static void
+_pygi_destroy_notify_callback_closure (ffi_cif *cif,
+                                       void *result,
+                                       void **args,
+                                       void *data)
+{
+    PyGICClosure *info = * (void**) (args[0]);
+
+    g_assert (info);
+
+    _pygi_invoke_closure_free (info);
+}
+
+
+PyGICClosure*
+_pygi_destroy_notify_create (void)
+{
+    if (!global_destroy_notify) {
+
+        PyGICClosure *destroy_notify = g_slice_new0 (PyGICClosure);
+
+        g_assert (destroy_notify);
+
+        GIBaseInfo* glib_destroy_notify = g_irepository_find_by_name (NULL, "GLib", "DestroyNotify");
+        g_assert (glib_destroy_notify != NULL);
+        g_assert (g_base_info_get_type (glib_destroy_notify) == GI_INFO_TYPE_CALLBACK);
+
+        destroy_notify->closure = g_callable_info_prepare_closure ( (GICallableInfo*) glib_destroy_notify,
+                                                                    &destroy_notify->cif,
+                                                                    _pygi_destroy_notify_callback_closure,
+                                                                    NULL);
+
+        global_destroy_notify = destroy_notify;
+    }
+
+    return global_destroy_notify;
+}
+
+
+gboolean
+_pygi_scan_for_callbacks (GIFunctionInfo *function_info,
+                          gboolean       is_method,
+                          guint8        *callback_index,
+                          guint8        *user_data_index,
+                          guint8        *destroy_notify_index)
+{
+    guint i, n_args;
+
+    *callback_index = G_MAXUINT8;
+    *user_data_index = G_MAXUINT8;
+    *destroy_notify_index = G_MAXUINT8;
+
+    n_args = g_callable_info_get_n_args ( (GICallableInfo *) function_info);
+    for (i = 0; i < n_args; i++) {
+        GIDirection direction;
+        GIArgInfo *arg_info;
+        GITypeInfo *type_info;
+        guint8 destroy, closure;
+        GITypeTag type_tag;
+
+        arg_info = g_callable_info_get_arg ( (GICallableInfo*) function_info, i);
+        type_info = g_arg_info_get_type (arg_info);
+        type_tag = g_type_info_get_tag (type_info);
+
+        if (type_tag == GI_TYPE_TAG_INTERFACE) {
+            GIBaseInfo* interface_info;
+            GIInfoType interface_type;
+
+            interface_info = g_type_info_get_interface (type_info);
+            interface_type = g_base_info_get_type (interface_info);
+            if (interface_type == GI_INFO_TYPE_CALLBACK &&
+                    ! (strcmp (g_base_info_get_namespace ( (GIBaseInfo*) interface_info), "GLib") == 0 &&
+                       (strcmp (g_base_info_get_name ( (GIBaseInfo*) interface_info), "DestroyNotify") == 0 ||
+                       (strcmp (g_base_info_get_name ( (GIBaseInfo*) interface_info), "FreeFunc") == 0)))) {
+                if (*callback_index != G_MAXUINT8) {
+                    PyErr_Format (PyExc_TypeError, "Function %s.%s has multiple callbacks, not supported",
+                                  g_base_info_get_namespace ( (GIBaseInfo*) function_info),
+                                  g_base_info_get_name ( (GIBaseInfo*) function_info));
+                    g_base_info_unref (interface_info);
+                    return FALSE;
+                }
+                *callback_index = i;
+            }
+            g_base_info_unref (interface_info);
+        }
+        destroy = g_arg_info_get_destroy (arg_info);
+        
+        closure = g_arg_info_get_closure (arg_info);
+        direction = g_arg_info_get_direction (arg_info);
+
+        if (destroy > 0 && destroy < n_args) {
+            if (*destroy_notify_index != G_MAXUINT8) {
+                PyErr_Format (PyExc_TypeError, "Function %s has multiple GDestroyNotify, not supported",
+                              g_base_info_get_name ( (GIBaseInfo*) function_info));
+                return FALSE;
+            }
+            *destroy_notify_index = destroy;
+        }
+
+        if (closure > 0 && closure < n_args) {
+            if (*user_data_index != G_MAXUINT8) {
+                PyErr_Format (PyExc_TypeError, "Function %s has multiple user_data arguments, not supported",
+                              g_base_info_get_name ( (GIBaseInfo*) function_info));
+                return FALSE;
+            }
+            *user_data_index = closure;
+        }
+
+        g_base_info_unref ( (GIBaseInfo*) arg_info);
+        g_base_info_unref ( (GIBaseInfo*) type_info);
+    }
+
+    return TRUE;
+}
+
+gboolean
+_pygi_create_callback (GIBaseInfo  *function_info,
+                       gboolean       is_method,
+                       gboolean       is_constructor,
+                       int            n_args,
+                       Py_ssize_t     py_argc,
+                       PyObject      *py_argv,
+                       guint8         callback_index,
+                       guint8         user_data_index,
+                       guint8         destroy_notify_index,
+                       PyGICClosure **closure_out)
+{
+    GIArgInfo *callback_arg;
+    GITypeInfo *callback_type;
+    GICallbackInfo *callback_info;
+    GIScopeType scope;
+    gboolean found_py_function;
+    PyObject *py_function;
+    guint8 i, py_argv_pos;
+    PyObject *py_user_data;
+    gboolean allow_none;
+
+    callback_arg = g_callable_info_get_arg ( (GICallableInfo*) function_info, callback_index);
+    scope = g_arg_info_get_scope (callback_arg);
+    allow_none = g_arg_info_may_be_null (callback_arg);
+
+    callback_type = g_arg_info_get_type (callback_arg);
+    g_assert (g_type_info_get_tag (callback_type) == GI_TYPE_TAG_INTERFACE);
+
+    callback_info = (GICallbackInfo*) g_type_info_get_interface (callback_type);
+    g_assert (g_base_info_get_type ( (GIBaseInfo*) callback_info) == GI_INFO_TYPE_CALLBACK);
+
+    /* Find the Python function passed for the callback */
+    found_py_function = FALSE;
+    py_function = Py_None;
+    py_user_data = NULL;
+
+    /* if its a method then we need to skip over 'self' */
+    if (is_method || is_constructor)
+        py_argv_pos = 1;
+    else
+        py_argv_pos = 0;
+
+    for (i = 0; i < n_args && i < py_argc; i++) {
+        if (i == callback_index) {
+            py_function = PyTuple_GetItem (py_argv, py_argv_pos);
+            /* if we allow none then set the closure to NULL and return */
+            if (allow_none && py_function == Py_None) {
+                *closure_out = NULL;
+                goto out;
+            }
+            found_py_function = TRUE;
+        } else if (i == user_data_index) {
+            py_user_data = PyTuple_GetItem (py_argv, py_argv_pos);
+        }
+        py_argv_pos++;
+    }
+
+    if (!found_py_function
+            || (py_function == Py_None || !PyCallable_Check (py_function))) {
+        PyErr_Format (PyExc_TypeError, "Error invoking %s.%s: Unexpected value "
+                      "for argument '%s'",
+                      g_base_info_get_namespace ( (GIBaseInfo*) function_info),
+                      g_base_info_get_name ( (GIBaseInfo*) function_info),
+                      g_base_info_get_name ( (GIBaseInfo*) callback_arg));
+        g_base_info_unref ( (GIBaseInfo*) callback_info);
+        g_base_info_unref ( (GIBaseInfo*) callback_type);
+        return FALSE;
+    }
+
+    /** Now actually build the closure **/
+    *closure_out = _pygi_make_native_closure ( (GICallableInfo *) callback_info,
+                                               g_arg_info_get_scope (callback_arg),
+                                               py_function,
+                                               py_user_data);
+out:
+    g_base_info_unref ( (GIBaseInfo*) callback_info);
+    g_base_info_unref ( (GIBaseInfo*) callback_type);
+
+    return TRUE;
+}
diff --git a/gi/pygi-callbacks.h b/gi/pygi-callbacks.h
new file mode 100644 (file)
index 0000000..7535bba
--- /dev/null
@@ -0,0 +1,48 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_CALLBACKS_H__
+#define __PYGI_CALLBACKS_H__
+
+G_BEGIN_DECLS
+
+void _pygi_callback_notify_info_free (gpointer user_data);
+
+PyGICClosure*_pygi_destroy_notify_create (void);
+
+gboolean _pygi_scan_for_callbacks (GIFunctionInfo *self,
+                                   gboolean       is_method,
+                                   guint8        *callback_index,
+                                   guint8        *user_data_index,
+                                   guint8        *destroy_notify_index);
+
+gboolean _pygi_create_callback (GIFunctionInfo *self,
+                                gboolean       is_method,
+                                gboolean       is_constructor,
+                                int            n_args,
+                                Py_ssize_t     py_argc,
+                                PyObject      *py_argv,
+                                guint8         callback_index,
+                                guint8         user_data_index,
+                                guint8         destroy_notify_index,
+                                PyGICClosure **closure_out);
+
+G_END_DECLS
+
+#endif
diff --git a/gi/pygi-closure.c b/gi/pygi-closure.c
new file mode 100644 (file)
index 0000000..35281a2
--- /dev/null
@@ -0,0 +1,445 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ *   pygi-closure.c: PyGI C Closure functions
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygi-private.h"
+
+/* This maintains a list of closures which can be free'd whenever
+   as they have been called.  We will free them on the next
+   library function call.
+ */
+static GSList* async_free_list;
+
+static void
+_pygi_closure_assign_pyobj_to_out_argument (gpointer out_arg, PyObject *object,
+                                            GITypeInfo *type_info,
+                                            GITransfer transfer)
+{
+    GIArgument arg = _pygi_argument_from_object (object, type_info, transfer);
+    GITypeTag type_tag = g_type_info_get_tag (type_info);
+
+    if (out_arg == NULL)
+        return;
+
+    switch (type_tag) {
+        case GI_TYPE_TAG_BOOLEAN:
+           *((gboolean *) out_arg) = arg.v_boolean;
+           break;
+        case GI_TYPE_TAG_INT8:
+           *((gint8 *) out_arg) = arg.v_int8;
+           break;
+        case GI_TYPE_TAG_UINT8:
+           *((guint8 *) out_arg) = arg.v_uint8;
+           break;
+        case GI_TYPE_TAG_INT16:
+           *((gint16 *) out_arg) = arg.v_int16;
+           break;
+        case GI_TYPE_TAG_UINT16:
+           *((guint16 *) out_arg) = arg.v_uint16;
+           break;
+        case GI_TYPE_TAG_INT32:
+           *((gint32 *) out_arg) = arg.v_int32;
+           break;
+        case GI_TYPE_TAG_UINT32:
+           *((guint32 *) out_arg) = arg.v_uint32;
+           break;
+        case GI_TYPE_TAG_INT64:
+           *((gint64 *) out_arg) = arg.v_int64;
+           break;
+        case GI_TYPE_TAG_UINT64:
+           *((glong *) out_arg) = arg.v_uint64;
+           break;
+        case GI_TYPE_TAG_FLOAT:
+           *((gfloat *) out_arg) = arg.v_float;
+           break;
+        case GI_TYPE_TAG_DOUBLE:
+           *((gdouble *) out_arg) = arg.v_double;
+           break;
+        default:
+           *((GIArgument *) out_arg) = arg;
+           break;
+      }
+}
+
+static GIArgument *
+_pygi_closure_convert_ffi_arguments (GICallableInfo *callable_info, void **args)
+{
+    gint num_args, i;
+    GIArgInfo *arg_info;
+    GITypeInfo *arg_type;
+    GITypeTag tag;
+    GIDirection direction;
+    GIArgument *g_args;
+
+    num_args = g_callable_info_get_n_args (callable_info);
+    g_args = g_new0 (GIArgument, num_args);
+
+    for (i = 0; i < num_args; i++) {
+        arg_info = g_callable_info_get_arg (callable_info, i);
+        arg_type = g_arg_info_get_type (arg_info);
+        tag = g_type_info_get_tag (arg_type);
+        direction = g_arg_info_get_direction (arg_info);
+
+        if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
+            g_args[i].v_pointer = * (gpointer *) args[i];
+        } else {
+            switch (tag) {
+                case GI_TYPE_TAG_BOOLEAN:
+                    g_args[i].v_boolean = * (gboolean *) args[i];
+                    break;
+                case GI_TYPE_TAG_INT8:
+                    g_args[i].v_int8 = * (gint8 *) args[i];
+                    break;
+                case GI_TYPE_TAG_UINT8:
+                    g_args[i].v_uint8 = * (guint8 *) args[i];
+                    break;
+                case GI_TYPE_TAG_INT16:
+                    g_args[i].v_int16 = * (gint16 *) args[i];
+                    break;
+                case GI_TYPE_TAG_UINT16:
+                    g_args[i].v_uint16 = * (guint16 *) args[i];
+                    break;
+                case GI_TYPE_TAG_INT32:
+                    g_args[i].v_int32 = * (gint32 *) args[i];
+                    break;
+                case GI_TYPE_TAG_UINT32:
+                    g_args[i].v_uint32 = * (guint32 *) args[i];
+                    break;
+                case GI_TYPE_TAG_INT64:
+                    g_args[i].v_int64 = * (glong *) args[i];
+                    break;
+                case GI_TYPE_TAG_UINT64:
+                    g_args[i].v_uint64 = * (glong *) args[i];
+                    break;
+                case GI_TYPE_TAG_FLOAT:
+                    g_args[i].v_float = * (gfloat *) args[i];
+                    break;
+                case GI_TYPE_TAG_DOUBLE:
+                    g_args[i].v_double = * (gdouble *) args[i];
+                    break;
+                case GI_TYPE_TAG_UTF8:
+                    g_args[i].v_string = * (gchar **) args[i];
+                    break;
+                case GI_TYPE_TAG_INTERFACE:
+                {
+                    GIBaseInfo *interface;
+                    GIInfoType interface_type;
+
+                    interface = g_type_info_get_interface (arg_type);
+                    interface_type = g_base_info_get_type (interface);
+
+                    if (interface_type == GI_INFO_TYPE_OBJECT ||
+                            interface_type == GI_INFO_TYPE_INTERFACE) {
+                        g_args[i].v_pointer = * (gpointer *) args[i];
+                        g_base_info_unref (interface);
+                        break;
+                    } else if (interface_type == GI_INFO_TYPE_ENUM ||
+                               interface_type == GI_INFO_TYPE_FLAGS) {
+                        g_args[i].v_double = * (double *) args[i];
+                        g_base_info_unref (interface);
+                        break;
+                    } else if (interface_type == GI_INFO_TYPE_STRUCT) {
+                        g_args[i].v_pointer = * (gpointer *) args[i];
+                        g_base_info_unref (interface);
+                        break;
+                    }
+
+                    g_base_info_unref (interface);
+                }
+                case GI_TYPE_TAG_GLIST:
+                case GI_TYPE_TAG_GSLIST:
+                    g_args[i].v_pointer = * (gpointer *) args[i];
+                    break;
+                default:
+                    g_args[i].v_pointer = 0;
+            }
+        }
+        g_base_info_unref ( (GIBaseInfo *) arg_info);
+        g_base_info_unref ( (GIBaseInfo *) arg_type);
+    }
+    return g_args;
+}
+
+static gboolean
+_pygi_closure_convert_arguments (GICallableInfo *callable_info, void **args,
+                                 void *user_data, PyObject **py_args,
+                                 GIArgument **out_args)
+{
+    int n_args = g_callable_info_get_n_args (callable_info);
+    int n_in_args = 0;
+    int n_out_args = 0;
+    int i;
+    GIArgument *g_args = NULL;
+
+    *py_args = NULL;
+    *py_args = PyTuple_New (n_args);
+    if (*py_args == NULL)
+        goto error;
+
+    *out_args = NULL;
+    *out_args = g_new0 (GIArgument, n_args);
+    g_args = _pygi_closure_convert_ffi_arguments (callable_info, args);
+
+    for (i = 0; i < n_args; i++) {
+        GIArgInfo *arg_info = g_callable_info_get_arg (callable_info, i);
+        GIDirection direction = g_arg_info_get_direction (arg_info);
+
+        if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT) {
+            GITypeInfo *arg_type = g_arg_info_get_type (arg_info);
+            GITypeTag arg_tag = g_type_info_get_tag (arg_type);
+            GITransfer transfer = g_arg_info_get_ownership_transfer (arg_info);
+            PyObject *value;
+            GIArgument *arg;
+
+            if (direction == GI_DIRECTION_IN && arg_tag == GI_TYPE_TAG_VOID &&
+                    g_type_info_is_pointer (arg_type)) {
+
+                if (user_data == NULL) {
+                    Py_INCREF (Py_None);
+                    value = Py_None;
+                } else {
+                    value = user_data;
+                    Py_INCREF (value);
+                }
+            } else {
+                if (direction == GI_DIRECTION_IN)
+                    arg = (GIArgument*) &g_args[i];
+                else
+                    arg = (GIArgument*) g_args[i].v_pointer;
+
+                value = _pygi_argument_to_object (arg, arg_type, transfer);
+                if (value == NULL) {
+                    g_base_info_unref (arg_type);
+                    g_base_info_unref (arg_info);
+                    goto error;
+                }
+            }
+            PyTuple_SET_ITEM (*py_args, n_in_args, value);
+            n_in_args++;
+
+            g_base_info_unref (arg_type);
+        }
+
+        if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
+            (*out_args) [n_out_args] = g_args[i];
+            n_out_args++;
+        }
+
+        g_base_info_unref (arg_info);
+    }
+
+    if (_PyTuple_Resize (py_args, n_in_args) == -1)
+        goto error;
+
+    g_free (g_args);
+    return TRUE;
+
+error:
+    Py_CLEAR (*py_args);
+    g_free (*out_args);
+    *out_args = NULL;
+    g_free (g_args);
+
+    return FALSE;
+}
+
+static void
+_pygi_closure_set_out_arguments (GICallableInfo *callable_info,
+                                 PyObject *py_retval, GIArgument *out_args,
+                                 void *resp)
+{
+    int n_args, i, i_py_retval, i_out_args;
+    GITypeInfo *return_type_info;
+    GITypeTag return_type_tag;
+
+    i_py_retval = 0;
+    return_type_info = g_callable_info_get_return_type (callable_info);
+    return_type_tag = g_type_info_get_tag (return_type_info);
+    if (return_type_tag != GI_TYPE_TAG_VOID) {
+        GITransfer transfer = g_callable_info_get_caller_owns (callable_info);
+        if (PyTuple_Check (py_retval)) {
+            PyObject *item = PyTuple_GET_ITEM (py_retval, 0);
+            _pygi_closure_assign_pyobj_to_out_argument (resp, item,
+                return_type_info, transfer);
+        } else {
+            _pygi_closure_assign_pyobj_to_out_argument (resp, py_retval,
+                return_type_info, transfer);
+        }
+        i_py_retval++;
+    }
+    g_base_info_unref (return_type_info);
+
+    i_out_args = 0;
+    n_args = g_callable_info_get_n_args (callable_info);
+    for (i = 1; i < n_args; i++) {
+        GIArgInfo *arg_info = g_callable_info_get_arg (callable_info, i);
+        GITypeInfo *type_info = g_arg_info_get_type (arg_info);
+        GIDirection direction = g_arg_info_get_direction (arg_info);
+
+        if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
+            GITransfer transfer = g_arg_info_get_ownership_transfer (arg_info);
+
+            if (g_type_info_get_tag (type_info) == GI_TYPE_TAG_ERROR) {
+                /* TODO: check if an exception has been set and convert it to a GError */
+                out_args[i_out_args].v_pointer = NULL;
+                i_out_args++;
+                continue;
+            }
+
+            if (PyTuple_Check (py_retval)) {
+                PyObject *item = PyTuple_GET_ITEM (py_retval, i_py_retval);
+                _pygi_closure_assign_pyobj_to_out_argument (
+                    out_args[i_out_args].v_pointer, item, type_info, transfer);
+            } else if (i_py_retval == 0) {
+                _pygi_closure_assign_pyobj_to_out_argument (
+                    out_args[i_out_args].v_pointer, py_retval, type_info,
+                    transfer);
+            } else
+                g_assert_not_reached();
+
+            i_out_args++;
+            i_py_retval++;
+        }
+        g_base_info_unref (type_info);
+        g_base_info_unref (arg_info);
+    }
+}
+
+void
+_pygi_closure_handle (ffi_cif *cif,
+                      void    *result,
+                      void   **args,
+                      void    *data)
+{
+    PyGILState_STATE state;
+    PyGICClosure *closure = data;
+    GITypeTag  return_tag;
+    GITransfer return_transfer;
+    GITypeInfo *return_type;
+    PyObject *retval;
+    PyObject *py_args;
+    GIArgument *out_args = NULL;
+
+    /* Lock the GIL as we are coming into this code without the lock and we
+      may be executing python code */
+    state = PyGILState_Ensure();
+
+    return_type = g_callable_info_get_return_type (closure->info);
+    return_tag = g_type_info_get_tag (return_type);
+    return_transfer = g_callable_info_get_caller_owns (closure->info);
+
+    if (!_pygi_closure_convert_arguments ( (GICallableInfo *) closure->info, args,
+                                           closure->user_data,
+                                           &py_args, &out_args)) {
+        if (PyErr_Occurred ())
+            PyErr_Print();
+        goto end;
+    }
+
+    retval = PyObject_CallObject ( (PyObject *) closure->function, py_args);
+    Py_DECREF (py_args);
+
+    if (retval == NULL) {
+        PyErr_Print();
+        goto end;
+    }
+
+    _pygi_closure_set_out_arguments (closure->info, retval, out_args, result);
+
+end:
+    g_free (out_args);
+    g_base_info_unref ( (GIBaseInfo*) return_type);
+
+    PyGILState_Release (state);
+
+    /* Now that the closure has finished we can make a decision about how
+       to free it.  Scope call gets free'd at the end of wrap_g_function_info_invoke
+       scope notified will be freed,  when the notify is called and we can free async
+       anytime we want as long as its after we return from this function (you can't free the closure
+       you are currently using!)
+    */
+    switch (closure->scope) {
+        case GI_SCOPE_TYPE_CALL:
+        case GI_SCOPE_TYPE_NOTIFIED:
+            break;
+        case GI_SCOPE_TYPE_ASYNC:
+            /* Append this PyGICClosure to a list of closure that we will free
+               after we're done with this function invokation */
+            async_free_list = g_slist_prepend (async_free_list, closure);
+            break;
+        default:
+            g_error ("Invalid scope reached inside %s.  Possibly a bad annotation?",
+                     g_base_info_get_name (closure->info));
+    }
+}
+
+void _pygi_invoke_closure_free (gpointer data)
+{
+    PyGICClosure* invoke_closure = (PyGICClosure *) data;
+
+    Py_DECREF (invoke_closure->function);
+
+    g_callable_info_free_closure (invoke_closure->info,
+                                  invoke_closure->closure);
+
+    if (invoke_closure->info)
+        g_base_info_unref ( (GIBaseInfo*) invoke_closure->info);
+
+    Py_XDECREF (invoke_closure->user_data);
+
+    g_slice_free (PyGICClosure, invoke_closure);
+}
+
+
+PyGICClosure*
+_pygi_make_native_closure (GICallableInfo* info,
+                           GIScopeType scope,
+                           PyObject *py_function,
+                           gpointer py_user_data)
+{
+    PyGICClosure *closure;
+    ffi_closure *fficlosure;
+
+    /* Begin by cleaning up old async functions */
+    g_slist_foreach (async_free_list, (GFunc) _pygi_invoke_closure_free, NULL);
+    g_slist_free (async_free_list);
+    async_free_list = NULL;
+
+    /* Build the closure itself */
+    closure = g_slice_new0 (PyGICClosure);
+    closure->info = (GICallableInfo *) g_base_info_ref ( (GIBaseInfo *) info);
+    closure->function = py_function;
+    closure->user_data = py_user_data;
+
+    Py_INCREF (py_function);
+    if (closure->user_data)
+        Py_INCREF (closure->user_data);
+
+    fficlosure =
+        g_callable_info_prepare_closure (info, &closure->cif, _pygi_closure_handle,
+                                         closure);
+    closure->closure = fficlosure;
+
+    /* Give the closure the information it needs to determine when
+       to free itself later */
+    closure->scope = scope;
+
+    return closure;
+}
diff --git a/gi/pygi-closure.h b/gi/pygi-closure.h
new file mode 100644 (file)
index 0000000..6f98339
--- /dev/null
@@ -0,0 +1,57 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_CLOSURE_H__
+#define __PYGI_CLOSURE_H__
+
+#include <Python.h>
+#include <girffi.h>
+#include <ffi.h>
+
+G_BEGIN_DECLS
+
+
+/* Private */
+
+typedef struct _PyGICClosure
+{
+    GICallableInfo *info;
+    PyObject *function;
+
+    ffi_closure *closure;
+    ffi_cif cif;
+
+    GIScopeType scope;
+
+    PyObject* user_data;
+} PyGICClosure;
+
+void _pygi_closure_handle (ffi_cif *cif, void *result, void
+                           **args, void *userdata);
+
+void _pygi_invoke_closure_free (gpointer user_data);
+
+PyGICClosure* _pygi_make_native_closure (GICallableInfo* info,
+                                         GIScopeType scope,
+                                         PyObject *function,
+                                         gpointer user_data);
+
+G_END_DECLS
+
+#endif /* __PYGI_CLOSURE_H__ */
diff --git a/gi/pygi-foreign-cairo.c b/gi/pygi-foreign-cairo.c
new file mode 100644 (file)
index 0000000..e332a22
--- /dev/null
@@ -0,0 +1,136 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2010  Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include <cairo.h>
+#include <Python.h>
+
+#if PY_VERSION_HEX < 0x03000000
+#include <pycairo.h>
+#else
+#include <pycairo/py3cairo.h>
+#endif
+
+Pycairo_CAPI_t *Pycairo_CAPI;
+
+#include "pygi-foreign.h"
+
+#include <pyglib-python-compat.h>
+
+PyObject *
+cairo_context_to_arg (PyObject        *value,
+                      GIInterfaceInfo *iface_info,
+                      GITransfer       transfer,
+                      GIArgument      *arg)
+{
+    cairo_t *cr;
+
+    g_assert (transfer == GI_TRANSFER_NOTHING);
+
+    cr = PycairoContext_GET (value);
+    if (!cr) {
+        return NULL;
+    }
+
+    arg->v_pointer = cr;
+    Py_RETURN_NONE;
+}
+
+PyObject *
+cairo_context_from_arg (GIInterfaceInfo *iface_info,
+                        gpointer data)
+{
+    cairo_t *context = (cairo_t*) data;
+
+    cairo_reference (context);
+
+    return PycairoContext_FromContext (context, &PycairoContext_Type, NULL);
+}
+
+PyObject *
+cairo_context_release (GIBaseInfo *base_info,
+                       gpointer    struct_)
+{
+    cairo_destroy ( (cairo_t*) struct_);
+    Py_RETURN_NONE;
+}
+
+
+PyObject *
+cairo_surface_to_arg (PyObject        *value,
+                      GIInterfaceInfo *iface_info,
+                      GITransfer       transfer,
+                      GIArgument      *arg)
+{
+    cairo_surface_t *surface;
+
+    g_assert (transfer == GI_TRANSFER_NOTHING);
+
+    surface = ( (PycairoSurface*) value)->surface;
+    if (!surface) {
+        PyErr_SetString (PyExc_ValueError, "Surface instance wrapping a NULL surface");
+        return NULL;
+    }
+
+    arg->v_pointer = surface;
+    Py_RETURN_NONE;
+}
+
+PyObject *
+cairo_surface_from_arg (GIInterfaceInfo *iface_info, 
+                        gpointer         data)
+{
+    cairo_surface_t *surface = (cairo_surface_t*) data;
+
+    cairo_surface_reference (surface);
+
+    return PycairoSurface_FromSurface (surface, NULL);
+}
+
+PyObject *
+cairo_surface_release (GIBaseInfo *base_info,
+                       gpointer    struct_)
+{
+    cairo_surface_destroy ( (cairo_surface_t*) struct_);
+    Py_RETURN_NONE;
+}
+
+static PyMethodDef _gi_cairo_functions[] = {};
+PYGLIB_MODULE_START(_gi_cairo, "_gi_cairo")
+{
+    Pycairo_IMPORT;
+    if (Pycairo_CAPI == NULL)
+        return PYGLIB_MODULE_ERROR_RETURN;
+
+    pygi_register_foreign_struct ("cairo",
+                                  "Context",
+                                  cairo_context_to_arg,
+                                  cairo_context_from_arg,
+                                  cairo_context_release);
+
+    pygi_register_foreign_struct ("cairo",
+                                  "Surface",
+                                  cairo_surface_to_arg,
+                                  cairo_surface_from_arg,
+                                  cairo_surface_release);
+}
+PYGLIB_MODULE_END;
diff --git a/gi/pygi-foreign-gvariant.c b/gi/pygi-foreign-gvariant.c
new file mode 100644 (file)
index 0000000..9249d44
--- /dev/null
@@ -0,0 +1,62 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2010  Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "pygobject.h"
+
+#include "pygi-private.h"
+#include "pygi-foreign-gvariant.h"
+
+PyObject *
+g_variant_to_arg (PyObject        *value,
+                  GIInterfaceInfo *type_info,
+                  GITransfer       transfer,
+                  GIArgument      *arg)
+{
+    g_assert (transfer == GI_TRANSFER_NOTHING);
+
+    /* TODO check that value is a PyGPointer */
+
+    arg->v_pointer = (GVariant *) ( (PyGPointer *) value)->pointer;
+    Py_RETURN_NONE;
+}
+
+PyObject *
+g_variant_from_arg (GIInterfaceInfo *iface_info,
+                    gpointer         data)
+{
+    GVariant *variant = (GVariant *) data;
+    PyObject *type = _pygi_type_import_by_gi_info (iface_info);
+
+    g_variant_ref_sink (variant);
+
+    return _pygi_struct_new ( (PyTypeObject *) type, variant, FALSE);
+}
+
+PyObject *
+g_variant_release_foreign (GIBaseInfo *base_info,
+                           gpointer    struct_)
+{
+    g_variant_unref ( (GVariant *) struct_);
+    Py_RETURN_NONE;
+}
+
diff --git a/gi/pygi-foreign-gvariant.h b/gi/pygi-foreign-gvariant.h
new file mode 100644 (file)
index 0000000..8ebc4cd
--- /dev/null
@@ -0,0 +1,39 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2010  Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __PYGI_FOREIGN_G_VARIANT_H__
+#define __PYGI_FOREIGN_G_VARIANT_H__
+
+#include "pygi-foreign.h"
+
+PyObject *g_variant_to_arg          (PyObject        *value,
+                                     GIInterfaceInfo *iface_info,
+                                     GITransfer       transfer,
+                                     GIArgument      *arg);
+PyObject *g_variant_from_arg        (GIInterfaceInfo *iface_info,
+                                     gpointer         data);
+PyObject *g_variant_release_foreign (GIBaseInfo *base_info,
+                                     gpointer    struct_);
+
+#endif /* __PYGI_FOREIGN_G_VARIANT_H__ */
+
diff --git a/gi/pygi-foreign.c b/gi/pygi-foreign.c
new file mode 100644 (file)
index 0000000..eafaca3
--- /dev/null
@@ -0,0 +1,173 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2010  litl, LLC
+ * Copyright (c) 2010  Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include "pygi-foreign.h"
+#include "pygi-foreign-gvariant.h"
+
+#include <girepository.h>
+
+typedef struct {
+    const char *namespace;
+    const char *name;
+    PyGIArgOverrideToGIArgumentFunc to_func;
+    PyGIArgOverrideFromGIArgumentFunc from_func;
+    PyGIArgOverrideReleaseFunc release_func;
+} PyGIForeignStruct;
+
+static GPtrArray *foreign_structs = NULL;
+
+void
+init_foreign_structs ()
+{
+    foreign_structs = g_ptr_array_new ();
+
+    pygi_register_foreign_struct ("GLib",
+                                  "Variant",
+                                  g_variant_to_arg,
+                                  g_variant_from_arg,
+                                  g_variant_release_foreign);
+}
+
+static PyGIForeignStruct *
+do_lookup (const gchar *namespace, const gchar *name)
+{
+    gint i;
+    for (i = 0; i < foreign_structs->len; i++) {
+        PyGIForeignStruct *foreign_struct = \
+                g_ptr_array_index (foreign_structs, i);
+
+        if ( (strcmp (namespace, foreign_struct->namespace) == 0) &&
+                (strcmp (name, foreign_struct->name) == 0)) {
+            return foreign_struct;
+        }
+    }
+    return NULL;
+}
+
+static PyGIForeignStruct *
+pygi_struct_foreign_lookup (GIBaseInfo *base_info)
+{
+    PyGIForeignStruct *result;
+    const gchar *namespace = g_base_info_get_namespace (base_info);
+    const gchar *name = g_base_info_get_name (base_info);
+
+    if (foreign_structs == NULL) {
+        init_foreign_structs ();
+    }
+
+    result = do_lookup (namespace, name);
+
+    if (result == NULL) {
+        gchar *module_name = g_strconcat ("gi._gi_", namespace, NULL);
+        PyObject *module = PyImport_ImportModule (module_name);
+
+        g_free (module_name);
+
+        if (module == NULL)
+            PyErr_Clear ();
+        else {
+            Py_DECREF (module);
+            result = do_lookup (namespace, name);
+        }
+    }
+
+    if (result == NULL) {
+        PyErr_Format (PyExc_TypeError,
+                      "Couldn't find conversion for foreign struct '%s.%s'",
+                      namespace,
+                      name);
+    }
+
+    return result;
+}
+
+PyObject *
+pygi_struct_foreign_convert_to_g_argument (PyObject        *value,
+                                           GIInterfaceInfo *iface_info,
+                                           GITransfer       transfer,
+                                           GIArgument      *arg)
+{
+    GIBaseInfo *base_info = (GIBaseInfo *) iface_info;
+    PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (base_info);
+
+    if (foreign_struct == NULL)
+        return NULL;
+
+    if (!foreign_struct->to_func (value, iface_info, transfer, arg))
+        return NULL;
+
+    Py_RETURN_NONE;
+}
+
+PyObject *
+pygi_struct_foreign_convert_from_g_argument (GIInterfaceInfo *iface_info,
+                                             GIArgument      *arg)
+{
+    GIBaseInfo *base_info = (GIBaseInfo *) iface_info;
+    PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (base_info);
+
+    if (foreign_struct == NULL)
+        return NULL;
+
+    return foreign_struct->from_func (iface_info, arg);
+}
+
+PyObject *
+pygi_struct_foreign_release (GIBaseInfo *base_info,
+                             gpointer    struct_)
+{
+    PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (base_info);
+
+    if (foreign_struct == NULL)
+        return NULL;
+
+    if (!foreign_struct->release_func)
+        Py_RETURN_NONE;
+
+    if (!foreign_struct->release_func (base_info, struct_))
+        return NULL;
+
+    Py_RETURN_NONE;
+}
+
+void
+pygi_register_foreign_struct_real (const char* namespace_,
+                                   const char* name,
+                                   PyGIArgOverrideToGIArgumentFunc to_func,
+                                   PyGIArgOverrideFromGIArgumentFunc from_func,
+                                   PyGIArgOverrideReleaseFunc release_func)
+{
+    PyGIForeignStruct *new_struct = g_slice_new (PyGIForeignStruct);
+    new_struct->namespace = namespace_;
+    new_struct->name = name;
+    new_struct->to_func = to_func;
+    new_struct->from_func = from_func;
+    new_struct->release_func = release_func;
+
+    g_ptr_array_add (foreign_structs, new_struct);
+}
diff --git a/gi/pygi-foreign.h b/gi/pygi-foreign.h
new file mode 100644 (file)
index 0000000..b07f682
--- /dev/null
@@ -0,0 +1,48 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2010  litl, LLC
+ * Copyright (c) 2010  Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __PYGI_FOREIGN_H__
+#define __PYGI_FOREIGN_H__
+
+#include <Python.h>
+#include <girepository.h>
+
+#include "pygi.h"
+
+PyObject *pygi_struct_foreign_convert_to_g_argument   (PyObject        *value,
+                                                       GIInterfaceInfo *iface_info,
+                                                       GITransfer       transfer,
+                                                       GIArgument      *arg);
+PyObject *pygi_struct_foreign_convert_from_g_argument (GIInterfaceInfo *iface_info,
+                                                       GIArgument      *arg);
+PyObject *pygi_struct_foreign_release                 (GIBaseInfo      *base_info,
+                                                       gpointer         struct_);
+
+void pygi_register_foreign_struct_real (const char* namespace_,
+                                        const char* name,
+                                        PyGIArgOverrideToGIArgumentFunc to_func,
+                                        PyGIArgOverrideFromGIArgumentFunc from_func,
+                                        PyGIArgOverrideReleaseFunc release_func);
+
+#endif /* __PYGI_FOREIGN_H__ */
diff --git a/gi/pygi-info.c b/gi/pygi-info.c
new file mode 100644 (file)
index 0000000..1bfd7d8
--- /dev/null
@@ -0,0 +1,1617 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+ *
+ *   pygi-info.c: GI.*Info wrappers.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygi-private.h"
+
+#include <pygobject.h>
+#include <pyglib-python-compat.h>
+
+/* BaseInfo */
+
+static void
+_base_info_dealloc (PyGIBaseInfo *self)
+{
+    PyObject_GC_UnTrack ( (PyObject *) self);
+
+    PyObject_ClearWeakRefs ( (PyObject *) self);
+
+    g_base_info_unref (self->info);
+
+    Py_TYPE( (PyObject *) self)->tp_free ( (PyObject *) self);
+}
+
+static int
+_base_info_traverse (PyGIBaseInfo *self,
+                     visitproc     visit,
+                     void         *arg)
+{
+    return 0;
+}
+
+static PyObject *
+_base_info_repr (PyGIBaseInfo *self)
+{
+    return PYGLIB_PyUnicode_FromFormat ("<%s object (%s) at 0x%p>",
+                                        Py_TYPE( (PyObject *) self)->tp_name, 
+                                        g_base_info_get_name (self->info), 
+                                        (void *) self);
+}
+
+static PyObject *
+_base_info_richcompare (PyGIBaseInfo *self, PyObject *other, int op)
+{
+    PyObject *res;
+    GIBaseInfo *other_info;
+
+    if (!PyObject_TypeCheck(other, &PyGIBaseInfo_Type)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+
+    other_info = ((PyGIBaseInfo *)other)->info;
+
+    switch (op) {
+        case Py_EQ:
+            res = g_base_info_equal (self->info, other_info) ? Py_True : Py_False;
+            break;
+        case Py_NE:
+            res = g_base_info_equal (self->info, other_info) ? Py_False : Py_True;
+            break;
+        default:
+            res = Py_NotImplemented;
+            break;
+    }
+    Py_INCREF(res);
+    return res;
+}
+
+static PyMethodDef _PyGIBaseInfo_methods[];
+
+PYGLIB_DEFINE_TYPE("gi.BaseInfo", PyGIBaseInfo_Type, PyGIBaseInfo);
+
+static PyObject *
+_wrap_g_base_info_get_name (PyGIBaseInfo *self)
+{
+    return PYGLIB_PyUnicode_FromString (g_base_info_get_name (self->info));
+}
+
+static PyObject *
+_wrap_g_base_info_get_namespace (PyGIBaseInfo *self)
+{
+    return PYGLIB_PyUnicode_FromString (g_base_info_get_namespace (self->info));
+}
+
+static PyObject *
+_wrap_g_base_info_get_container (PyGIBaseInfo *self)
+{
+    GIBaseInfo *info;
+
+    info = g_base_info_get_container (self->info);
+
+    if (info == NULL) {
+        Py_RETURN_NONE;
+    }
+
+    return _pygi_info_new (info);
+}
+
+
+static PyMethodDef _PyGIBaseInfo_methods[] = {
+    { "get_name", (PyCFunction) _wrap_g_base_info_get_name, METH_NOARGS },
+    { "get_namespace", (PyCFunction) _wrap_g_base_info_get_namespace, METH_NOARGS },
+    { "get_container", (PyCFunction) _wrap_g_base_info_get_container, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+PyObject *
+_pygi_info_new (GIBaseInfo *info)
+{
+    GIInfoType info_type;
+    PyTypeObject *type = NULL;
+    PyGIBaseInfo *self;
+
+    info_type = g_base_info_get_type (info);
+
+    switch (info_type)
+    {
+        case GI_INFO_TYPE_INVALID:
+            PyErr_SetString (PyExc_RuntimeError, "Invalid info type");
+            return NULL;
+        case GI_INFO_TYPE_FUNCTION:
+            type = &PyGIFunctionInfo_Type;
+            break;
+        case GI_INFO_TYPE_CALLBACK:
+            type = &PyGICallbackInfo_Type;
+            break;
+        case GI_INFO_TYPE_STRUCT:
+            type = &PyGIStructInfo_Type;
+            break;
+        case GI_INFO_TYPE_BOXED:
+            type = &PyGIBoxedInfo_Type;
+            break;
+        case GI_INFO_TYPE_ENUM:
+        case GI_INFO_TYPE_FLAGS:
+            type = &PyGIEnumInfo_Type;
+            break;
+        case GI_INFO_TYPE_OBJECT:
+            type = &PyGIObjectInfo_Type;
+            break;
+        case GI_INFO_TYPE_INTERFACE:
+            type = &PyGIInterfaceInfo_Type;
+            break;
+        case GI_INFO_TYPE_CONSTANT:
+            type = &PyGIConstantInfo_Type;
+            break;
+        case GI_INFO_TYPE_ERROR_DOMAIN:
+            type = &PyGIErrorDomainInfo_Type;
+            break;
+        case GI_INFO_TYPE_UNION:
+            type = &PyGIUnionInfo_Type;
+            break;
+        case GI_INFO_TYPE_VALUE:
+            type = &PyGIValueInfo_Type;
+            break;
+        case GI_INFO_TYPE_SIGNAL:
+            type = &PyGISignalInfo_Type;
+            break;
+        case GI_INFO_TYPE_VFUNC:
+            type = &PyGIVFuncInfo_Type;
+            break;
+        case GI_INFO_TYPE_PROPERTY:
+            type = &PyGIPropertyInfo_Type;
+            break;
+        case GI_INFO_TYPE_FIELD:
+            type = &PyGIFieldInfo_Type;
+            break;
+        case GI_INFO_TYPE_ARG:
+            type = &PyGIArgInfo_Type;
+            break;
+        case GI_INFO_TYPE_TYPE:
+            type = &PyGITypeInfo_Type;
+            break;
+        case GI_INFO_TYPE_UNRESOLVED:
+            type = &PyGIUnresolvedInfo_Type;
+            break;
+    }
+
+    self = (PyGIBaseInfo *) type->tp_alloc (type, 0);
+    if (self == NULL) {
+        return NULL;
+    }
+
+    self->info = g_base_info_ref (info);
+
+    return (PyObject *) self;
+}
+
+GIBaseInfo *
+_pygi_object_get_gi_info (PyObject     *object,
+                          PyTypeObject *type)
+{
+    PyObject *py_info;
+    GIBaseInfo *info = NULL;
+
+    py_info = PyObject_GetAttrString (object, "__info__");
+    if (py_info == NULL) {
+        return NULL;
+    }
+    if (!PyObject_TypeCheck (py_info, type)) {
+        PyErr_Format (PyExc_TypeError, "attribute '__info__' must be %s, not %s",
+                      type->tp_name, Py_TYPE(&py_info)->tp_name);
+        goto out;
+    }
+
+    info = ( (PyGIBaseInfo *) py_info)->info;
+    g_base_info_ref (info);
+
+out:
+    Py_DECREF (py_info);
+
+    return info;
+}
+
+
+/* CallableInfo */
+PYGLIB_DEFINE_TYPE ("gi.CallableInfo", PyGICallableInfo_Type, PyGIBaseInfo);
+
+static PyObject *
+_wrap_g_callable_info_get_arguments (PyGIBaseInfo *self)
+{
+    gssize n_infos;
+    PyObject *infos;
+    gssize i;
+
+    n_infos = g_callable_info_get_n_args ( (GICallableInfo *) self->info);
+
+    infos = PyTuple_New (n_infos);
+    if (infos == NULL) {
+        return NULL;
+    }
+
+    for (i = 0; i < n_infos; i++) {
+        GIBaseInfo *info;
+        PyObject *py_info;
+
+        info = (GIBaseInfo *) g_callable_info_get_arg ( (GICallableInfo *) self->info, i);
+        g_assert (info != NULL);
+
+        py_info = _pygi_info_new (info);
+
+        g_base_info_unref (info);
+
+        if (py_info == NULL) {
+            Py_CLEAR (infos);
+            break;
+        }
+
+        PyTuple_SET_ITEM (infos, i, py_info);
+    }
+
+    return infos;
+}
+
+static PyMethodDef _PyGICallableInfo_methods[] = {
+    { "invoke", (PyCFunction) _wrap_g_callable_info_invoke, METH_VARARGS | METH_KEYWORDS },
+    { "get_arguments", (PyCFunction) _wrap_g_callable_info_get_arguments, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+/* CallbackInfo */
+PYGLIB_DEFINE_TYPE ("gi.CallbackInfo", PyGICallbackInfo_Type, PyGIBaseInfo);
+
+static PyMethodDef _PyGICallbackInfo_methods[] = {
+    { NULL, NULL, 0 }
+};
+
+/* BoxedInfo */
+PYGLIB_DEFINE_TYPE ("gi.BoxedInfo", PyGIBoxedInfo_Type, PyGIBaseInfo);
+
+static PyMethodDef _PyGIBoxedInfo_methods[] = {
+    { NULL, NULL, 0 }
+};
+
+/* ErrorDomainInfo */
+PYGLIB_DEFINE_TYPE ("gi.ErrorDomainInfo", PyGIErrorDomainInfo_Type, PyGIBaseInfo);
+
+static PyMethodDef _PyGIErrorDomainInfo_methods[] = {
+    { NULL, NULL, 0 }
+};
+
+/* SignalInfo */
+PYGLIB_DEFINE_TYPE ("gi.SignalInfo", PyGISignalInfo_Type, PyGIBaseInfo);
+
+static PyMethodDef _PyGISignalInfo_methods[] = {
+    { NULL, NULL, 0 }
+};
+
+/* PropertyInfo */
+PYGLIB_DEFINE_TYPE ("gi.PropertyInfo", PyGIPropertyInfo_Type, PyGIBaseInfo);
+
+static PyMethodDef _PyGIPropertyInfo_methods[] = {
+    { NULL, NULL, 0 }
+};
+
+/* ArgInfo */
+PYGLIB_DEFINE_TYPE ("gi.ArgInfo", PyGIArgInfo_Type, PyGIBaseInfo);
+
+static PyMethodDef _PyGIArgInfo_methods[] = {
+    { NULL, NULL, 0 }
+};
+
+/* TypeInfo */
+PYGLIB_DEFINE_TYPE ("gi.TypeInfo", PyGITypeInfo_Type, PyGIBaseInfo);
+
+static PyMethodDef _PyGITypeInfo_methods[] = {
+    { NULL, NULL, 0 }
+};
+
+
+/* FunctionInfo */
+PYGLIB_DEFINE_TYPE ("gi.FunctionInfo", PyGIFunctionInfo_Type, PyGIBaseInfo);
+
+static PyObject *
+_wrap_g_function_info_is_constructor (PyGIBaseInfo *self)
+{
+    GIFunctionInfoFlags flags;
+    gboolean is_constructor;
+
+    flags = g_function_info_get_flags ( (GIFunctionInfo*) self->info);
+    is_constructor = flags & GI_FUNCTION_IS_CONSTRUCTOR;
+
+    return PyBool_FromLong (is_constructor);
+}
+
+static PyObject *
+_wrap_g_function_info_is_method (PyGIBaseInfo *self)
+{
+    GIFunctionInfoFlags flags;
+    gboolean is_method;
+
+    flags = g_function_info_get_flags ( (GIFunctionInfo*) self->info);
+    is_method = flags & GI_FUNCTION_IS_METHOD;
+
+    return PyBool_FromLong (is_method);
+}
+
+gsize
+_pygi_g_type_tag_size (GITypeTag type_tag)
+{
+    gsize size = 0;
+
+    switch (type_tag) {
+        case GI_TYPE_TAG_BOOLEAN:
+            size = sizeof (gboolean);
+            break;
+        case GI_TYPE_TAG_INT8:
+        case GI_TYPE_TAG_UINT8:
+            size = sizeof (gint8);
+            break;
+        case GI_TYPE_TAG_INT16:
+        case GI_TYPE_TAG_UINT16:
+            size = sizeof (gint16);
+            break;
+        case GI_TYPE_TAG_INT32:
+        case GI_TYPE_TAG_UINT32:
+            size = sizeof (gint32);
+            break;
+        case GI_TYPE_TAG_INT64:
+        case GI_TYPE_TAG_UINT64:
+            size = sizeof (gint64);
+            break;
+        case GI_TYPE_TAG_FLOAT:
+            size = sizeof (gfloat);
+            break;
+        case GI_TYPE_TAG_DOUBLE:
+            size = sizeof (gdouble);
+            break;
+        case GI_TYPE_TAG_GTYPE:
+            size = sizeof (GType);
+            break;
+        case GI_TYPE_TAG_UNICHAR:
+            size = sizeof (gunichar);
+            break;
+        case GI_TYPE_TAG_VOID:
+        case GI_TYPE_TAG_UTF8:
+        case GI_TYPE_TAG_FILENAME:
+        case GI_TYPE_TAG_ARRAY:
+        case GI_TYPE_TAG_INTERFACE:
+        case GI_TYPE_TAG_GLIST:
+        case GI_TYPE_TAG_GSLIST:
+        case GI_TYPE_TAG_GHASH:
+        case GI_TYPE_TAG_ERROR:
+            PyErr_Format (PyExc_TypeError,
+                          "Unable to know the size (assuming %s is not a pointer)",
+                          g_type_tag_to_string (type_tag));
+            break;
+    }
+
+    return size;
+}
+
+gsize
+_pygi_g_type_info_size (GITypeInfo *type_info)
+{
+    gsize size = 0;
+
+    GITypeTag type_tag;
+
+    type_tag = g_type_info_get_tag (type_info);
+    switch (type_tag) {
+        case GI_TYPE_TAG_BOOLEAN:
+        case GI_TYPE_TAG_INT8:
+        case GI_TYPE_TAG_UINT8:
+        case GI_TYPE_TAG_INT16:
+        case GI_TYPE_TAG_UINT16:
+        case GI_TYPE_TAG_INT32:
+        case GI_TYPE_TAG_UINT32:
+        case GI_TYPE_TAG_INT64:
+        case GI_TYPE_TAG_UINT64:
+        case GI_TYPE_TAG_FLOAT:
+        case GI_TYPE_TAG_DOUBLE:
+        case GI_TYPE_TAG_GTYPE:
+        case GI_TYPE_TAG_UNICHAR:
+            if (g_type_info_is_pointer (type_info)) {
+                size = sizeof (gpointer);
+            } else {
+                size = _pygi_g_type_tag_size (type_tag);
+                g_assert (size > 0);
+            }
+            break;
+        case GI_TYPE_TAG_INTERFACE:
+        {
+            GIBaseInfo *info;
+            GIInfoType info_type;
+
+            info = g_type_info_get_interface (type_info);
+            info_type = g_base_info_get_type (info);
+
+            switch (info_type) {
+                case GI_INFO_TYPE_STRUCT:
+                    if (g_type_info_is_pointer (type_info)) {
+                        size = sizeof (gpointer);
+                    } else {
+                        size = g_struct_info_get_size ( (GIStructInfo *) info);
+                    }
+                    break;
+                case GI_INFO_TYPE_UNION:
+                    if (g_type_info_is_pointer (type_info)) {
+                        size = sizeof (gpointer);
+                    } else {
+                        size = g_union_info_get_size ( (GIUnionInfo *) info);
+                    }
+                    break;
+                case GI_INFO_TYPE_ENUM:
+                case GI_INFO_TYPE_FLAGS:
+                    if (g_type_info_is_pointer (type_info)) {
+                        size = sizeof (gpointer);
+                    } else {
+                        GITypeTag type_tag;
+
+                        type_tag = g_enum_info_get_storage_type ( (GIEnumInfo *) info);
+                        size = _pygi_g_type_tag_size (type_tag);
+                    }
+                    break;
+                case GI_INFO_TYPE_BOXED:
+                case GI_INFO_TYPE_OBJECT:
+                case GI_INFO_TYPE_INTERFACE:
+                case GI_INFO_TYPE_CALLBACK:
+                    size = sizeof (gpointer);
+                    break;
+                case GI_INFO_TYPE_VFUNC:
+                case GI_INFO_TYPE_INVALID:
+                case GI_INFO_TYPE_FUNCTION:
+                case GI_INFO_TYPE_CONSTANT:
+                case GI_INFO_TYPE_ERROR_DOMAIN:
+                case GI_INFO_TYPE_VALUE:
+                case GI_INFO_TYPE_SIGNAL:
+                case GI_INFO_TYPE_PROPERTY:
+                case GI_INFO_TYPE_FIELD:
+                case GI_INFO_TYPE_ARG:
+                case GI_INFO_TYPE_TYPE:
+                case GI_INFO_TYPE_UNRESOLVED:
+                    g_assert_not_reached();
+                    break;
+            }
+
+            g_base_info_unref (info);
+            break;
+        }
+        case GI_TYPE_TAG_ARRAY:
+        case GI_TYPE_TAG_VOID:
+        case GI_TYPE_TAG_UTF8:
+        case GI_TYPE_TAG_FILENAME:
+        case GI_TYPE_TAG_GLIST:
+        case GI_TYPE_TAG_GSLIST:
+        case GI_TYPE_TAG_GHASH:
+        case GI_TYPE_TAG_ERROR:
+            size = sizeof (gpointer);
+            break;
+    }
+
+    return size;
+}
+
+static PyMethodDef _PyGIFunctionInfo_methods[] = {
+    { "is_constructor", (PyCFunction) _wrap_g_function_info_is_constructor, METH_NOARGS },
+    { "is_method", (PyCFunction) _wrap_g_function_info_is_method, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+
+/* RegisteredTypeInfo */
+PYGLIB_DEFINE_TYPE ("gi.RegisteredTypeInfo", PyGIRegisteredTypeInfo_Type, PyGIBaseInfo);
+
+static PyObject *
+_wrap_g_registered_type_info_get_g_type (PyGIBaseInfo *self)
+{
+    GType type;
+
+    type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) self->info);
+
+    return pyg_type_wrapper_new (type);
+}
+
+static PyMethodDef _PyGIRegisteredTypeInfo_methods[] = {
+    { "get_g_type", (PyCFunction) _wrap_g_registered_type_info_get_g_type, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+
+/* GIStructInfo */
+PYGLIB_DEFINE_TYPE ("StructInfo", PyGIStructInfo_Type, PyGIBaseInfo);
+
+static PyObject *
+_get_fields (PyGIBaseInfo *self, GIInfoType info_type)
+{
+    gssize n_infos;
+    PyObject *infos;
+    gssize i;
+
+    switch (info_type) {
+        case GI_INFO_TYPE_STRUCT:
+            n_infos = g_struct_info_get_n_fields ( (GIStructInfo *) self->info);
+            break;
+        case GI_INFO_TYPE_OBJECT:
+            n_infos = g_object_info_get_n_fields ( (GIObjectInfo *) self->info);
+            break;
+        default:
+            g_assert_not_reached();
+    }
+
+    infos = PyTuple_New (n_infos);
+    if (infos == NULL) {
+        return NULL;
+    }
+
+    for (i = 0; i < n_infos; i++) {
+        GIBaseInfo *info;
+        PyObject *py_info;
+
+        switch (info_type) {
+            case GI_INFO_TYPE_STRUCT:
+                info = (GIBaseInfo *) g_struct_info_get_field ( (GIStructInfo *) self->info, i);
+                break;
+            case GI_INFO_TYPE_OBJECT:
+                info = (GIBaseInfo *) g_object_info_get_field ( (GIObjectInfo *) self->info, i);
+                break;
+            default:
+                g_assert_not_reached();
+        }
+        g_assert (info != NULL);
+
+        py_info = _pygi_info_new (info);
+
+        g_base_info_unref (info);
+
+        if (py_info == NULL) {
+            Py_CLEAR (infos);
+            break;
+        }
+
+        PyTuple_SET_ITEM (infos, i, py_info);
+    }
+
+    return infos;
+}
+
+static PyObject *
+_get_methods (PyGIBaseInfo *self, GIInfoType info_type)
+{
+    gssize n_infos;
+    PyObject *infos;
+    gssize i;
+
+    switch (info_type) {
+        case GI_INFO_TYPE_STRUCT:
+            n_infos = g_struct_info_get_n_methods ( (GIStructInfo *) self->info);
+            break;
+        case GI_INFO_TYPE_OBJECT:
+            n_infos = g_object_info_get_n_methods ( (GIObjectInfo *) self->info);
+            break;
+        default:
+            g_assert_not_reached();
+    }
+
+    infos = PyTuple_New (n_infos);
+    if (infos == NULL) {
+        return NULL;
+    }
+
+    for (i = 0; i < n_infos; i++) {
+        GIBaseInfo *info;
+        PyObject *py_info;
+
+        switch (info_type) {
+            case GI_INFO_TYPE_STRUCT:
+                info = (GIBaseInfo *) g_struct_info_get_method ( (GIStructInfo *) self->info, i);
+                break;
+            case GI_INFO_TYPE_OBJECT:
+                info = (GIBaseInfo *) g_object_info_get_method ( (GIObjectInfo *) self->info, i);
+                break;
+            default:
+                g_assert_not_reached();
+        }
+        g_assert (info != NULL);
+
+        py_info = _pygi_info_new (info);
+
+        g_base_info_unref (info);
+
+        if (py_info == NULL) {
+            Py_CLEAR (infos);
+            break;
+        }
+
+        PyTuple_SET_ITEM (infos, i, py_info);
+    }
+
+    return infos;
+}
+
+static PyObject *
+_get_constants (PyGIBaseInfo *self, GIInfoType info_type)
+{
+    gssize n_infos;
+    PyObject *infos;
+    gssize i;
+
+    switch (info_type) {
+        case GI_INFO_TYPE_INTERFACE:
+            n_infos = g_interface_info_get_n_constants ( (GIInterfaceInfo *) self->info);
+            break;
+        case GI_INFO_TYPE_OBJECT:
+            n_infos = g_object_info_get_n_constants ( (GIObjectInfo *) self->info);
+            break;
+        default:
+            g_assert_not_reached();
+    }
+
+    infos = PyTuple_New (n_infos);
+    if (infos == NULL) {
+        return NULL;
+    }
+
+    for (i = 0; i < n_infos; i++) {
+        GIBaseInfo *info;
+        PyObject *py_info;
+
+        switch (info_type) {
+            case GI_INFO_TYPE_INTERFACE:
+                info = (GIBaseInfo *) g_interface_info_get_constant ( (GIInterfaceInfo *) self->info, i);
+                break;
+            case GI_INFO_TYPE_OBJECT:
+                info = (GIBaseInfo *) g_object_info_get_constant ( (GIObjectInfo *) self->info, i);
+                break;
+            default:
+                g_assert_not_reached();
+        }
+        g_assert (info != NULL);
+
+        py_info = _pygi_info_new (info);
+
+        g_base_info_unref (info);
+
+        if (py_info == NULL) {
+            Py_CLEAR (infos);
+            break;
+        }
+
+        PyTuple_SET_ITEM (infos, i, py_info);
+    }
+
+    return infos;
+}
+
+static PyObject *
+_get_vfuncs (PyGIBaseInfo *self, GIInfoType info_type)
+{
+    gssize n_infos;
+    PyObject *infos;
+    gssize i;
+
+    switch (info_type) {
+        case GI_INFO_TYPE_INTERFACE:
+            n_infos = g_interface_info_get_n_vfuncs ( (GIInterfaceInfo *) self->info);
+            break;
+        case GI_INFO_TYPE_OBJECT:
+            n_infos = g_object_info_get_n_vfuncs ( (GIObjectInfo *) self->info);
+            break;
+        default:
+            g_assert_not_reached();
+    }
+
+    infos = PyTuple_New (n_infos);
+    if (infos == NULL) {
+        return NULL;
+    }
+
+    for (i = 0; i < n_infos; i++) {
+        GIBaseInfo *info;
+        PyObject *py_info;
+
+        switch (info_type) {
+            case GI_INFO_TYPE_INTERFACE:
+                info = (GIBaseInfo *) g_interface_info_get_vfunc ( (GIInterfaceInfo *) self->info, i);
+                break;
+            case GI_INFO_TYPE_OBJECT:
+                info = (GIBaseInfo *) g_object_info_get_vfunc ( (GIObjectInfo *) self->info, i);
+                break;
+            default:
+                g_assert_not_reached();
+        }
+        g_assert (info != NULL);
+
+        py_info = _pygi_info_new (info);
+
+        g_base_info_unref (info);
+
+        if (py_info == NULL) {
+            Py_CLEAR (infos);
+            break;
+        }
+
+        PyTuple_SET_ITEM (infos, i, py_info);
+    }
+
+    return infos;
+}
+
+static PyObject *
+_wrap_g_struct_info_get_fields (PyGIBaseInfo *self)
+{
+    return _get_fields (self, GI_INFO_TYPE_STRUCT);
+}
+
+static PyObject *
+_wrap_g_struct_info_get_methods (PyGIBaseInfo *self)
+{
+    return _get_methods (self, GI_INFO_TYPE_STRUCT);
+}
+
+static PyMethodDef _PyGIStructInfo_methods[] = {
+    { "get_fields", (PyCFunction) _wrap_g_struct_info_get_fields, METH_NOARGS },
+    { "get_methods", (PyCFunction) _wrap_g_struct_info_get_methods, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+gboolean
+pygi_g_struct_info_is_simple (GIStructInfo *struct_info)
+{
+    gboolean is_simple;
+    gsize n_field_infos;
+    gsize i;
+
+    is_simple = TRUE;
+
+    n_field_infos = g_struct_info_get_n_fields (struct_info);
+
+    for (i = 0; i < n_field_infos && is_simple; i++) {
+        GIFieldInfo *field_info;
+        GITypeInfo *field_type_info;
+
+        field_info = g_struct_info_get_field (struct_info, i);
+        field_type_info = g_field_info_get_type (field_info);
+
+        GITypeTag field_type_tag;
+
+        field_type_tag = g_type_info_get_tag (field_type_info);
+
+        switch (field_type_tag) {
+            case GI_TYPE_TAG_BOOLEAN:
+            case GI_TYPE_TAG_INT8:
+            case GI_TYPE_TAG_UINT8:
+            case GI_TYPE_TAG_INT16:
+            case GI_TYPE_TAG_UINT16:
+            case GI_TYPE_TAG_INT32:
+            case GI_TYPE_TAG_UINT32:
+            case GI_TYPE_TAG_INT64:
+            case GI_TYPE_TAG_UINT64:
+            case GI_TYPE_TAG_FLOAT:
+            case GI_TYPE_TAG_DOUBLE:
+            case GI_TYPE_TAG_UNICHAR:
+                if (g_type_info_is_pointer (field_type_info)) {
+                    is_simple = FALSE;
+                }
+                break;
+            case GI_TYPE_TAG_VOID:
+            case GI_TYPE_TAG_GTYPE:
+            case GI_TYPE_TAG_ERROR:
+            case GI_TYPE_TAG_UTF8:
+            case GI_TYPE_TAG_FILENAME:
+            case GI_TYPE_TAG_ARRAY:
+            case GI_TYPE_TAG_GLIST:
+            case GI_TYPE_TAG_GSLIST:
+            case GI_TYPE_TAG_GHASH:
+                is_simple = FALSE;
+                break;
+            case GI_TYPE_TAG_INTERFACE:
+            {
+                GIBaseInfo *info;
+                GIInfoType info_type;
+
+                info = g_type_info_get_interface (field_type_info);
+                info_type = g_base_info_get_type (info);
+
+                switch (info_type) {
+                    case GI_INFO_TYPE_STRUCT:
+                        if (g_type_info_is_pointer (field_type_info)) {
+                            is_simple = FALSE;
+                        } else {
+                            is_simple = pygi_g_struct_info_is_simple ( (GIStructInfo *) info);
+                        }
+                        break;
+                    case GI_INFO_TYPE_UNION:
+                        /* TODO */
+                        is_simple = FALSE;
+                        break;
+                    case GI_INFO_TYPE_ENUM:
+                    case GI_INFO_TYPE_FLAGS:
+                        if (g_type_info_is_pointer (field_type_info)) {
+                            is_simple = FALSE;
+                        }
+                        break;
+                    case GI_INFO_TYPE_BOXED:
+                    case GI_INFO_TYPE_OBJECT:
+                    case GI_INFO_TYPE_CALLBACK:
+                    case GI_INFO_TYPE_INTERFACE:
+                        is_simple = FALSE;
+                        break;
+                    case GI_INFO_TYPE_VFUNC:
+                    case GI_INFO_TYPE_INVALID:
+                    case GI_INFO_TYPE_FUNCTION:
+                    case GI_INFO_TYPE_CONSTANT:
+                    case GI_INFO_TYPE_ERROR_DOMAIN:
+                    case GI_INFO_TYPE_VALUE:
+                    case GI_INFO_TYPE_SIGNAL:
+                    case GI_INFO_TYPE_PROPERTY:
+                    case GI_INFO_TYPE_FIELD:
+                    case GI_INFO_TYPE_ARG:
+                    case GI_INFO_TYPE_TYPE:
+                    case GI_INFO_TYPE_UNRESOLVED:
+                        g_assert_not_reached();
+                }
+
+                g_base_info_unref (info);
+                break;
+            }
+        }
+
+        g_base_info_unref ( (GIBaseInfo *) field_type_info);
+        g_base_info_unref ( (GIBaseInfo *) field_info);
+    }
+
+    return is_simple;
+}
+
+
+/* EnumInfo */
+PYGLIB_DEFINE_TYPE ("gi.EnumInfo", PyGIEnumInfo_Type, PyGIBaseInfo);
+
+static PyObject *
+_wrap_g_enum_info_get_values (PyGIBaseInfo *self)
+{
+    gssize n_infos;
+    PyObject *infos;
+    gssize i;
+
+    n_infos = g_enum_info_get_n_values ( (GIEnumInfo *) self->info);
+
+    infos = PyTuple_New (n_infos);
+    if (infos == NULL) {
+        return NULL;
+    }
+
+    for (i = 0; i < n_infos; i++) {
+        GIBaseInfo *info;
+        PyObject *py_info;
+
+        info = (GIBaseInfo *) g_enum_info_get_value ( (GIEnumInfo *) self->info, i);
+        g_assert (info != NULL);
+
+        py_info = _pygi_info_new (info);
+
+        g_base_info_unref (info);
+
+        if (py_info == NULL) {
+            Py_CLEAR (infos);
+            break;
+        }
+
+        PyTuple_SET_ITEM (infos, i, py_info);
+    }
+
+    return infos;
+}
+
+static PyObject *
+_wrap_g_enum_info_is_flags (PyGIBaseInfo *self)
+{
+    GIInfoType info_type = g_base_info_get_type ((GIBaseInfo *) self->info);
+
+    if (info_type == GI_INFO_TYPE_ENUM) {
+        Py_RETURN_FALSE;
+    } else if (info_type == GI_INFO_TYPE_FLAGS) {
+        Py_RETURN_TRUE;
+    } else {
+        g_assert_not_reached();
+    }
+}
+
+static PyMethodDef _PyGIEnumInfo_methods[] = {
+    { "get_values", (PyCFunction) _wrap_g_enum_info_get_values, METH_NOARGS },
+    { "is_flags", (PyCFunction) _wrap_g_enum_info_is_flags, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+
+/* ObjectInfo */
+PYGLIB_DEFINE_TYPE ("ObjectInfo", PyGIObjectInfo_Type, PyGIBaseInfo);
+
+static PyObject *
+_wrap_g_object_info_get_parent (PyGIBaseInfo *self)
+{
+    GIBaseInfo *info;
+    PyObject *py_info;
+
+    info = (GIBaseInfo *) g_object_info_get_parent ( (GIObjectInfo*) self->info);
+
+    if (info == NULL) {
+        Py_RETURN_NONE;
+    }
+
+    py_info = _pygi_info_new (info);
+
+    g_base_info_unref (info);
+
+    return py_info;
+}
+
+static PyObject *
+_wrap_g_object_info_get_methods (PyGIBaseInfo *self)
+{
+    return _get_methods (self, GI_INFO_TYPE_OBJECT);
+}
+
+static PyObject *
+_wrap_g_object_info_get_fields (PyGIBaseInfo *self)
+{
+    return _get_fields (self, GI_INFO_TYPE_OBJECT);
+}
+
+static PyObject *
+_wrap_g_object_info_get_interfaces (PyGIBaseInfo *self)
+{
+    gssize n_infos;
+    PyObject *infos;
+    gssize i;
+
+    n_infos = g_object_info_get_n_interfaces ( (GIObjectInfo *) self->info);
+
+    infos = PyTuple_New (n_infos);
+    if (infos == NULL) {
+        return NULL;
+    }
+
+    for (i = 0; i < n_infos; i++) {
+        GIBaseInfo *info;
+        PyObject *py_info;
+
+        info = (GIBaseInfo *) g_object_info_get_interface ( (GIObjectInfo *) self->info, i);
+        g_assert (info != NULL);
+
+        py_info = _pygi_info_new (info);
+
+        g_base_info_unref (info);
+
+        if (py_info == NULL) {
+            Py_CLEAR (infos);
+            break;
+        }
+
+        PyTuple_SET_ITEM (infos, i, py_info);
+    }
+
+    return infos;
+}
+
+static PyObject *
+_wrap_g_object_info_get_constants (PyGIBaseInfo *self)
+{
+    return _get_constants (self, GI_INFO_TYPE_OBJECT);
+}
+
+static PyObject *
+_wrap_g_object_info_get_vfuncs (PyGIBaseInfo *self)
+{
+    return _get_vfuncs (self, GI_INFO_TYPE_OBJECT);
+}
+
+static PyMethodDef _PyGIObjectInfo_methods[] = {
+    { "get_parent", (PyCFunction) _wrap_g_object_info_get_parent, METH_NOARGS },
+    { "get_methods", (PyCFunction) _wrap_g_object_info_get_methods, METH_NOARGS },
+    { "get_fields", (PyCFunction) _wrap_g_object_info_get_fields, METH_NOARGS },
+    { "get_interfaces", (PyCFunction) _wrap_g_object_info_get_interfaces, METH_NOARGS },
+    { "get_constants", (PyCFunction) _wrap_g_object_info_get_constants, METH_NOARGS },
+    { "get_vfuncs", (PyCFunction) _wrap_g_object_info_get_vfuncs, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+
+/* GIInterfaceInfo */
+PYGLIB_DEFINE_TYPE ("InterfaceInfo", PyGIInterfaceInfo_Type, PyGIBaseInfo);
+
+static PyObject *
+_wrap_g_interface_info_get_methods (PyGIBaseInfo *self)
+{
+    gssize n_infos;
+    PyObject *infos;
+    gssize i;
+
+    n_infos = g_interface_info_get_n_methods ( (GIInterfaceInfo *) self->info);
+
+    infos = PyTuple_New (n_infos);
+    if (infos == NULL) {
+        return NULL;
+    }
+
+    for (i = 0; i < n_infos; i++) {
+        GIBaseInfo *info;
+        PyObject *py_info;
+
+        info = (GIBaseInfo *) g_interface_info_get_method ( (GIInterfaceInfo *) self->info, i);
+        g_assert (info != NULL);
+
+        py_info = _pygi_info_new (info);
+
+        g_base_info_unref (info);
+
+        if (py_info == NULL) {
+            Py_CLEAR (infos);
+            break;
+        }
+
+        PyTuple_SET_ITEM (infos, i, py_info);
+    }
+
+    return infos;
+}
+
+static PyObject *
+_wrap_g_interface_info_get_constants (PyGIBaseInfo *self)
+{
+    return _get_constants (self, GI_INFO_TYPE_INTERFACE);
+}
+
+static PyObject *
+_wrap_g_interface_info_get_vfuncs (PyGIBaseInfo *self)
+{
+    return _get_vfuncs (self, GI_INFO_TYPE_INTERFACE);
+}
+
+static PyMethodDef _PyGIInterfaceInfo_methods[] = {
+    { "get_methods", (PyCFunction) _wrap_g_interface_info_get_methods, METH_NOARGS },
+    { "get_constants", (PyCFunction) _wrap_g_interface_info_get_constants, METH_NOARGS },
+    { "get_vfuncs", (PyCFunction) _wrap_g_interface_info_get_vfuncs, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+/* GIConstantInfo */
+PYGLIB_DEFINE_TYPE ("gi.ConstantInfo", PyGIConstantInfo_Type, PyGIBaseInfo);
+
+static PyObject *
+_wrap_g_constant_info_get_value (PyGIBaseInfo *self)
+{
+    GITypeInfo *type_info;
+    GIArgument value;
+    PyObject *py_value;
+
+    if (g_constant_info_get_value ( (GIConstantInfo *) self->info, &value) < 0) {
+        PyErr_SetString (PyExc_RuntimeError, "unable to get value");
+        return NULL;
+    }
+
+    type_info = g_constant_info_get_type ( (GIConstantInfo *) self->info);
+
+    py_value = _pygi_argument_to_object (&value, type_info, GI_TRANSFER_NOTHING);
+
+    g_base_info_unref ( (GIBaseInfo *) type_info);
+
+    return py_value;
+}
+
+static PyMethodDef _PyGIConstantInfo_methods[] = {
+    { "get_value", (PyCFunction) _wrap_g_constant_info_get_value, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+/* GIValueInfo */
+PYGLIB_DEFINE_TYPE ("gi.ValueInfo", PyGIValueInfo_Type, PyGIBaseInfo);
+
+static PyObject *
+_wrap_g_value_info_get_value (PyGIBaseInfo *self)
+{
+    glong value;
+
+    value = g_value_info_get_value ( (GIValueInfo *) self->info);
+
+    return PYGLIB_PyLong_FromLong (value);
+}
+
+
+static PyMethodDef _PyGIValueInfo_methods[] = {
+    { "get_value", (PyCFunction) _wrap_g_value_info_get_value, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+
+/* GIFieldInfo */
+PYGLIB_DEFINE_TYPE ("gi.FieldInfo", PyGIFieldInfo_Type, PyGIBaseInfo);
+
+static PyObject *
+_wrap_g_field_info_get_value (PyGIBaseInfo *self,
+                              PyObject     *args)
+{
+    PyObject *instance;
+    GIBaseInfo *container_info;
+    GIInfoType container_info_type;
+    gpointer pointer;
+    GITypeInfo *field_type_info;
+    GIArgument value;
+    PyObject *py_value = NULL;
+
+    memset(&value, 0, sizeof(GIArgument));
+
+    if (!PyArg_ParseTuple (args, "O:FieldInfo.get_value", &instance)) {
+        return NULL;
+    }
+
+    container_info = g_base_info_get_container (self->info);
+    g_assert (container_info != NULL);
+
+    /* Check the instance. */
+    if (!_pygi_g_registered_type_info_check_object ( (GIRegisteredTypeInfo *) container_info, TRUE, instance)) {
+        _PyGI_ERROR_PREFIX ("argument 1: ");
+        return NULL;
+    }
+
+    /* Get the pointer to the container. */
+    container_info_type = g_base_info_get_type (container_info);
+    switch (container_info_type) {
+        case GI_INFO_TYPE_UNION:
+        case GI_INFO_TYPE_STRUCT:
+            pointer = pyg_boxed_get (instance, void);
+            break;
+        case GI_INFO_TYPE_OBJECT:
+            pointer = pygobject_get (instance);
+            break;
+        default:
+            /* Other types don't have fields. */
+            g_assert_not_reached();
+    }
+
+    /* Get the field's value. */
+    field_type_info = g_field_info_get_type ( (GIFieldInfo *) self->info);
+
+    /* A few types are not handled by g_field_info_get_field, so do it here. */
+    if (!g_type_info_is_pointer (field_type_info)
+            && g_type_info_get_tag (field_type_info) == GI_TYPE_TAG_INTERFACE) {
+        GIBaseInfo *info;
+        GIInfoType info_type;
+
+        if (! (g_field_info_get_flags ( (GIFieldInfo *) self->info) & GI_FIELD_IS_READABLE)) {
+            PyErr_SetString (PyExc_RuntimeError, "field is not readable");
+            goto out;
+        }
+
+        info = g_type_info_get_interface (field_type_info);
+
+        info_type = g_base_info_get_type (info);
+
+        g_base_info_unref (info);
+
+        switch (info_type) {
+            case GI_INFO_TYPE_UNION:
+                PyErr_SetString (PyExc_NotImplementedError, "getting an union is not supported yet");
+                goto out;
+            case GI_INFO_TYPE_STRUCT:
+            {
+                gsize offset;
+
+                offset = g_field_info_get_offset ( (GIFieldInfo *) self->info);
+
+                value.v_pointer = pointer + offset;
+
+                goto argument_to_object;
+            }
+            default:
+                /* Fallback. */
+                break;
+        }
+    }
+
+    if (!g_field_info_get_field ( (GIFieldInfo *) self->info, pointer, &value)) {
+        PyErr_SetString (PyExc_RuntimeError, "unable to get the value");
+        goto out;
+    }
+
+    if ( (g_type_info_get_tag (field_type_info) == GI_TYPE_TAG_ARRAY) &&
+            (g_type_info_get_array_type (field_type_info) == GI_ARRAY_TYPE_C)) {
+        value.v_pointer = _pygi_argument_to_array (&value, NULL,
+                                                   field_type_info, FALSE);
+    }
+
+argument_to_object:
+    py_value = _pygi_argument_to_object (&value, field_type_info, GI_TRANSFER_NOTHING);
+
+    if ( (value.v_pointer != NULL) &&
+            (g_type_info_get_tag (field_type_info) == GI_TYPE_TAG_ARRAY) &&
+               (g_type_info_get_array_type (field_type_info) == GI_ARRAY_TYPE_C)) {
+        g_array_free (value.v_pointer, FALSE);
+    }
+
+out:
+    g_base_info_unref ( (GIBaseInfo *) field_type_info);
+
+    return py_value;
+}
+
+static PyObject *
+_wrap_g_field_info_set_value (PyGIBaseInfo *self,
+                              PyObject     *args)
+{
+    PyObject *instance;
+    PyObject *py_value;
+    GIBaseInfo *container_info;
+    GIInfoType container_info_type;
+    gpointer pointer;
+    GITypeInfo *field_type_info;
+    GIArgument value;
+    PyObject *retval = NULL;
+
+    if (!PyArg_ParseTuple (args, "OO:FieldInfo.set_value", &instance, &py_value)) {
+        return NULL;
+    }
+
+    container_info = g_base_info_get_container (self->info);
+    g_assert (container_info != NULL);
+
+    /* Check the instance. */
+    if (!_pygi_g_registered_type_info_check_object ( (GIRegisteredTypeInfo *) container_info, TRUE, instance)) {
+        _PyGI_ERROR_PREFIX ("argument 1: ");
+        return NULL;
+    }
+
+    /* Get the pointer to the container. */
+    container_info_type = g_base_info_get_type (container_info);
+    switch (container_info_type) {
+        case GI_INFO_TYPE_UNION:
+        case GI_INFO_TYPE_STRUCT:
+            pointer = pyg_boxed_get (instance, void);
+            break;
+        case GI_INFO_TYPE_OBJECT:
+            pointer = pygobject_get (instance);
+            break;
+        default:
+            /* Other types don't have fields. */
+            g_assert_not_reached();
+    }
+
+    field_type_info = g_field_info_get_type ( (GIFieldInfo *) self->info);
+
+    /* Check the value. */
+    {
+        gboolean retval;
+
+        retval = _pygi_g_type_info_check_object (field_type_info, py_value, TRUE);
+        if (retval < 0) {
+            goto out;
+        }
+
+        if (!retval) {
+            _PyGI_ERROR_PREFIX ("argument 2: ");
+            goto out;
+        }
+    }
+
+    /* Set the field's value. */
+    /* A few types are not handled by g_field_info_set_field, so do it here. */
+    if (!g_type_info_is_pointer (field_type_info)
+            && g_type_info_get_tag (field_type_info) == GI_TYPE_TAG_INTERFACE) {
+        GIBaseInfo *info;
+        GIInfoType info_type;
+
+        if (! (g_field_info_get_flags ( (GIFieldInfo *) self->info) & GI_FIELD_IS_WRITABLE)) {
+            PyErr_SetString (PyExc_RuntimeError, "field is not writable");
+            goto out;
+        }
+
+        info = g_type_info_get_interface (field_type_info);
+
+        info_type = g_base_info_get_type (info);
+
+        switch (info_type) {
+            case GI_INFO_TYPE_UNION:
+                PyErr_SetString (PyExc_NotImplementedError, "setting an union is not supported yet");
+                goto out;
+            case GI_INFO_TYPE_STRUCT:
+            {
+                gboolean is_simple;
+                gsize offset;
+                gssize size;
+
+                is_simple = pygi_g_struct_info_is_simple ( (GIStructInfo *) info);
+
+                if (!is_simple) {
+                    PyErr_SetString (PyExc_TypeError,
+                                     "cannot set a structure which has no well-defined ownership transfer rules");
+                    g_base_info_unref (info);
+                    goto out;
+                }
+
+                value = _pygi_argument_from_object (py_value, field_type_info, GI_TRANSFER_NOTHING);
+                if (PyErr_Occurred()) {
+                    g_base_info_unref (info);
+                    goto out;
+                }
+
+                offset = g_field_info_get_offset ( (GIFieldInfo *) self->info);
+                size = g_struct_info_get_size ( (GIStructInfo *) info);
+                g_assert (size > 0);
+
+                g_memmove (pointer + offset, value.v_pointer, size);
+
+                g_base_info_unref (info);
+
+                retval = Py_None;
+                goto out;
+            }
+            default:
+                /* Fallback. */
+                break;
+        }
+
+        g_base_info_unref (info);
+    }
+
+    value = _pygi_argument_from_object (py_value, field_type_info, GI_TRANSFER_EVERYTHING);
+    if (PyErr_Occurred()) {
+        goto out;
+    }
+
+    if (!g_field_info_set_field ( (GIFieldInfo *) self->info, pointer, &value)) {
+        _pygi_argument_release (&value, field_type_info, GI_TRANSFER_NOTHING, GI_DIRECTION_IN);
+        PyErr_SetString (PyExc_RuntimeError, "unable to set value for field");
+        goto out;
+    }
+
+    retval = Py_None;
+
+out:
+    g_base_info_unref ( (GIBaseInfo *) field_type_info);
+
+    Py_XINCREF (retval);
+    return retval;
+}
+
+static PyMethodDef _PyGIFieldInfo_methods[] = {
+    { "get_value", (PyCFunction) _wrap_g_field_info_get_value, METH_VARARGS },
+    { "set_value", (PyCFunction) _wrap_g_field_info_set_value, METH_VARARGS },
+    { NULL, NULL, 0 }
+};
+
+
+/* GIUnresolvedInfo */
+PYGLIB_DEFINE_TYPE ("gi.UnresolvedInfo", PyGIUnresolvedInfo_Type, PyGIBaseInfo);
+
+static PyMethodDef _PyGIUnresolvedInfo_methods[] = {
+    { NULL, NULL, 0 }
+};
+
+/* GIVFuncInfo */
+PYGLIB_DEFINE_TYPE ("gi.VFuncInfo", PyGIVFuncInfo_Type, PyGIBaseInfo);
+
+static PyObject *
+_wrap_g_vfunc_info_get_invoker (PyGIBaseInfo *self)
+{
+    PyObject *result = Py_None;
+    GIBaseInfo *info;
+
+    info = (GIBaseInfo *) g_vfunc_info_get_invoker ( (GIVFuncInfo *) self->info );
+    if (info)
+        result = _pygi_info_new(info);
+    else
+        Py_INCREF(Py_None);
+
+    return result;
+}
+
+static PyMethodDef _PyGIVFuncInfo_methods[] = {
+    { "get_invoker", (PyCFunction) _wrap_g_vfunc_info_get_invoker, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+
+/* GIUnionInfo */
+PYGLIB_DEFINE_TYPE ("gi.UnionInfo", PyGIUnionInfo_Type, PyGIBaseInfo);
+
+static PyObject *
+_wrap_g_union_info_get_fields (PyGIBaseInfo *self)
+{
+    gssize n_infos;
+    PyObject *infos;
+    gssize i;
+
+    n_infos = g_union_info_get_n_fields ( (GIUnionInfo *) self->info);
+
+    infos = PyTuple_New (n_infos);
+    if (infos == NULL) {
+        return NULL;
+    }
+
+    for (i = 0; i < n_infos; i++) {
+        GIBaseInfo *info;
+        PyObject *py_info;
+
+        info = (GIBaseInfo *) g_union_info_get_field ( (GIUnionInfo *) self->info, i);
+        g_assert (info != NULL);
+
+        py_info = _pygi_info_new (info);
+
+        g_base_info_unref (info);
+
+        if (py_info == NULL) {
+            Py_CLEAR (infos);
+            break;
+        }
+
+        PyTuple_SET_ITEM (infos, i, py_info);
+    }
+
+    return infos;
+}
+
+static PyObject *
+_wrap_g_union_info_get_methods (PyGIBaseInfo *self)
+{
+    gssize n_infos;
+    PyObject *infos;
+    gssize i;
+
+    n_infos = g_union_info_get_n_methods ( (GIUnionInfo *) self->info);
+
+    infos = PyTuple_New (n_infos);
+    if (infos == NULL) {
+        return NULL;
+    }
+
+    for (i = 0; i < n_infos; i++) {
+        GIBaseInfo *info;
+        PyObject *py_info;
+
+        info = (GIBaseInfo *) g_union_info_get_method ( (GIUnionInfo *) self->info, i);
+        g_assert (info != NULL);
+
+        py_info = _pygi_info_new (info);
+
+        g_base_info_unref (info);
+
+        if (py_info == NULL) {
+            Py_CLEAR (infos);
+            break;
+        }
+
+        PyTuple_SET_ITEM (infos, i, py_info);
+    }
+
+    return infos;
+}
+
+static PyMethodDef _PyGIUnionInfo_methods[] = {
+    { "get_fields", (PyCFunction) _wrap_g_union_info_get_fields, METH_NOARGS },
+    { "get_methods", (PyCFunction) _wrap_g_union_info_get_methods, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+/* Private */
+
+gchar *
+_pygi_g_base_info_get_fullname (GIBaseInfo *info)
+{
+    GIBaseInfo *container_info;
+    gchar *fullname;
+
+    container_info = g_base_info_get_container (info);
+    if (container_info != NULL) {
+        fullname = g_strdup_printf ("%s.%s.%s",
+                                    g_base_info_get_namespace (container_info),
+                                    g_base_info_get_name (container_info),
+                                    g_base_info_get_name (info));
+    } else {
+        fullname = g_strdup_printf ("%s.%s",
+                                    g_base_info_get_namespace (info),
+                                    g_base_info_get_name (info));
+    }
+
+    if (fullname == NULL) {
+        PyErr_NoMemory();
+    }
+
+    return fullname;
+}
+
+void
+_pygi_info_register_types (PyObject *m)
+{
+#define _PyGI_REGISTER_TYPE(m, type, cname, base) \
+    Py_TYPE(&type) = &PyType_Type; \
+    type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE); \
+    type.tp_weaklistoffset = offsetof(PyGIBaseInfo, inst_weakreflist); \
+    type.tp_methods = _PyGI##cname##_methods; \
+    type.tp_base = &base; \
+    if (PyType_Ready(&type)) \
+        return; \
+    if (PyModule_AddObject(m, #cname, (PyObject *)&type)) \
+        return
+
+    Py_TYPE(&PyGIBaseInfo_Type) = &PyType_Type;
+
+    PyGIBaseInfo_Type.tp_dealloc = (destructor) _base_info_dealloc;
+    PyGIBaseInfo_Type.tp_repr = (reprfunc) _base_info_repr;
+    PyGIBaseInfo_Type.tp_flags = (Py_TPFLAGS_DEFAULT | 
+                                   Py_TPFLAGS_BASETYPE  | 
+                                   Py_TPFLAGS_HAVE_GC);
+    PyGIBaseInfo_Type.tp_traverse = (traverseproc) _base_info_traverse;
+    PyGIBaseInfo_Type.tp_weaklistoffset = offsetof(PyGIBaseInfo, inst_weakreflist);
+    PyGIBaseInfo_Type.tp_methods = _PyGIBaseInfo_methods; 
+    PyGIBaseInfo_Type.tp_richcompare = (richcmpfunc)_base_info_richcompare;
+
+    if (PyType_Ready(&PyGIBaseInfo_Type))
+        return;   
+    if (PyModule_AddObject(m, "BaseInfo", (PyObject *)&PyGIBaseInfo_Type))
+        return;
+
+    _PyGI_REGISTER_TYPE (m, PyGIUnresolvedInfo_Type, UnresolvedInfo,
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGICallableInfo_Type, CallableInfo, 
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGICallbackInfo_Type, CallbackInfo,
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIFunctionInfo_Type, FunctionInfo, 
+                         PyGICallableInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIRegisteredTypeInfo_Type, RegisteredTypeInfo, 
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIStructInfo_Type, StructInfo, 
+                         PyGIRegisteredTypeInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIEnumInfo_Type, EnumInfo, 
+                         PyGIRegisteredTypeInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIObjectInfo_Type, ObjectInfo, 
+                         PyGIRegisteredTypeInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIInterfaceInfo_Type, InterfaceInfo, 
+                         PyGIRegisteredTypeInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIConstantInfo_Type, ConstantInfo, 
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIValueInfo_Type, ValueInfo, 
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIFieldInfo_Type, FieldInfo,
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIVFuncInfo_Type, VFuncInfo,
+                         PyGICallableInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIUnionInfo_Type, UnionInfo,
+                         PyGIRegisteredTypeInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIBoxedInfo_Type, BoxedInfo,
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIErrorDomainInfo_Type, ErrorDomainInfo,
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGISignalInfo_Type, SignalInfo,
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIPropertyInfo_Type, PropertyInfo,
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGIArgInfo_Type, ArgInfo,
+                         PyGIBaseInfo_Type);
+    _PyGI_REGISTER_TYPE (m, PyGITypeInfo_Type, TypeInfo,
+                         PyGIBaseInfo_Type);
+
+
+#undef _PyGI_REGISTER_TYPE
+}
diff --git a/gi/pygi-info.h b/gi/pygi-info.h
new file mode 100644 (file)
index 0000000..afd65dc
--- /dev/null
@@ -0,0 +1,73 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_INFO_H__
+#define __PYGI_INFO_H__
+
+#include <Python.h>
+
+#include <girepository.h>
+
+G_BEGIN_DECLS
+
+gboolean pygi_g_struct_info_is_simple (GIStructInfo *struct_info);
+
+
+/* Private */
+
+extern PyTypeObject PyGIBaseInfo_Type;
+extern PyTypeObject PyGICallableInfo_Type;
+extern PyTypeObject PyGICallbackInfo_Type;
+extern PyTypeObject PyGIFunctionInfo_Type;
+extern PyTypeObject PyGIRegisteredTypeInfo_Type;
+extern PyTypeObject PyGIStructInfo_Type;
+extern PyTypeObject PyGIEnumInfo_Type;
+extern PyTypeObject PyGIObjectInfo_Type;
+extern PyTypeObject PyGIInterfaceInfo_Type;
+extern PyTypeObject PyGIConstantInfo_Type;
+extern PyTypeObject PyGIValueInfo_Type;
+extern PyTypeObject PyGIFieldInfo_Type;
+extern PyTypeObject PyGIUnresolvedInfo_Type;
+extern PyTypeObject PyGIVFuncInfo_Type;
+extern PyTypeObject PyGIUnionInfo_Type;
+extern PyTypeObject PyGIBoxedInfo_Type;
+extern PyTypeObject PyGIErrorDomainInfo_Type;
+extern PyTypeObject PyGISignalInfo_Type;
+extern PyTypeObject PyGIPropertyInfo_Type;
+extern PyTypeObject PyGIArgInfo_Type;
+extern PyTypeObject PyGITypeInfo_Type;
+
+#define PyGIBaseInfo_GET_GI_INFO(object) g_base_info_ref(((PyGIBaseInfo *)object)->info)
+
+PyObject* _pygi_info_new (GIBaseInfo *info);
+GIBaseInfo* _pygi_object_get_gi_info (PyObject     *object,
+                                      PyTypeObject *type);
+
+gchar* _pygi_g_base_info_get_fullname (GIBaseInfo *info);
+
+gsize _pygi_g_type_tag_size (GITypeTag type_tag);
+gsize _pygi_g_type_info_size (GITypeInfo *type_info);
+
+void _pygi_info_register_types (PyObject *m);
+
+G_END_DECLS
+
+#endif /* __PYGI_INFO_H__ */
diff --git a/gi/pygi-invoke.c b/gi/pygi-invoke.c
new file mode 100644 (file)
index 0000000..f9e09bb
--- /dev/null
@@ -0,0 +1,1034 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+ *
+ *   pygi-invoke.c: main invocation function
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include <pyglib.h>
+#include "pygi-invoke.h"
+
+struct invocation_state
+{
+    gboolean is_method;
+    gboolean is_constructor;
+
+    gsize n_args;
+    gsize n_in_args;
+    gsize n_out_args;
+    gsize n_backup_args;
+    Py_ssize_t n_py_args;
+    gsize n_aux_in_args;
+    gsize n_aux_out_args;
+    gsize n_return_values;
+
+    guint8 callback_index;
+    guint8 user_data_index;
+    guint8 destroy_notify_index;
+    PyGICClosure *closure;
+
+    glong error_arg_pos;
+
+    GIArgInfo **arg_infos;
+    GITypeInfo **arg_type_infos;
+    GITypeInfo *return_type_info;
+    GITypeTag return_type_tag;
+
+    GIArgument **args;
+    gboolean *args_is_auxiliary;
+
+    GIArgument *in_args;
+    GIArgument *out_args;
+    GIArgument *out_values;
+    GIArgument *backup_args;
+    GIArgument return_arg;
+
+    PyObject  *return_value;
+
+    GType      implementor_gtype;
+
+    /* hack to avoid treating C arrays as GArrays during free
+     * due to overly complicated array handling
+     * this will be removed when the new invoke branch is merged
+     */
+    gboolean c_arrays_are_wrapped;
+};
+
+static gboolean
+_initialize_invocation_state (struct invocation_state *state,
+                              GIFunctionInfo *info,
+                              PyObject *py_args,
+                              PyObject *kwargs)
+{
+    if (g_base_info_get_type (info) == GI_INFO_TYPE_FUNCTION) {
+        GIFunctionInfoFlags flags = g_function_info_get_flags (info);
+
+        state->is_method = (flags & GI_FUNCTION_IS_METHOD) != 0;
+        state->is_constructor = (flags & GI_FUNCTION_IS_CONSTRUCTOR) != 0;
+        state->implementor_gtype = 0;
+    } else {
+        PyObject *obj;
+
+        state->is_method = TRUE;
+        state->is_constructor = FALSE;
+
+        obj = PyDict_GetItemString (kwargs, "gtype");
+        if (obj == NULL) {
+            PyErr_SetString (PyExc_TypeError,
+                             "need the GType of the implementor class");
+            return FALSE;
+        }
+
+        state->implementor_gtype = pyg_type_from_object (obj);
+        if (state->implementor_gtype == 0)
+            return FALSE;
+    }
+
+    /* Count arguments. */
+    state->n_args = g_callable_info_get_n_args ( (GICallableInfo *) info);
+    state->n_in_args = 0;
+    state->n_out_args = 0;
+    state->n_backup_args = 0;
+    state->n_aux_in_args = 0;
+    state->n_aux_out_args = 0;
+
+    /* Check the argument count. */
+    state->n_py_args = PyTuple_Size (py_args);
+    g_assert (state->n_py_args >= 0);
+
+    state->error_arg_pos = -1;
+
+    state->arg_infos = g_slice_alloc0 (sizeof (gpointer) * state->n_args);
+    state->arg_type_infos = g_slice_alloc0 (sizeof (gpointer) * state->n_args);
+    state->args_is_auxiliary = g_slice_alloc0 (sizeof (gboolean) * state->n_args);
+
+    state->return_value = NULL;
+    state->closure = NULL;
+    state->return_type_info = NULL;
+    state->args = NULL;
+    state->in_args = NULL;
+    state->out_args = NULL;
+    state->out_values = NULL;
+    state->backup_args = NULL;
+
+    /* HACK: this gets marked FALSE whenever a C array in the args is
+     *       not wrapped by a GArray
+     */
+    state->c_arrays_are_wrapped = TRUE;
+
+    return TRUE;
+}
+
+static gboolean
+_prepare_invocation_state (struct invocation_state *state,
+                           GIFunctionInfo *function_info, PyObject *py_args)
+{
+    gsize i;
+
+    if (!_pygi_scan_for_callbacks (function_info,
+                                   state->is_method,
+                                   &state->callback_index, &state->user_data_index,
+                                   &state->destroy_notify_index))
+        return FALSE;
+
+    if (state->callback_index != G_MAXUINT8) {
+
+        if (!_pygi_create_callback (function_info,
+                                    state->is_method,
+                                    state->is_constructor,
+                                    state->n_args, state->n_py_args,
+                                    py_args, state->callback_index,
+                                    state->user_data_index,
+                                    state->destroy_notify_index, &state->closure))
+            return FALSE;
+
+        state->args_is_auxiliary[state->callback_index] = FALSE;
+        if (state->destroy_notify_index != G_MAXUINT8) {
+            state->args_is_auxiliary[state->destroy_notify_index] = TRUE;
+            state->n_aux_in_args += 1;
+        }
+    }
+
+    if (state->is_method) {
+        /* The first argument is the instance. */
+        state->n_in_args += 1;
+    }
+
+    /* We do a first (well, second) pass here over the function to scan for special cases.
+     * This is currently array+length combinations, GError and GValue.
+     */
+    for (i = 0; i < state->n_args; i++) {
+        GIDirection direction;
+        GITransfer transfer;
+        GITypeTag arg_type_tag;
+
+        state->arg_infos[i] = g_callable_info_get_arg ( (GICallableInfo *) function_info,
+                                                        i);
+
+        state->arg_type_infos[i] = g_arg_info_get_type (state->arg_infos[i]);
+
+        direction = g_arg_info_get_direction (state->arg_infos[i]);
+        transfer = g_arg_info_get_ownership_transfer (state->arg_infos[i]);
+        arg_type_tag = g_type_info_get_tag (state->arg_type_infos[i]);
+
+        if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT) {
+            state->n_in_args += 1;
+        }
+        if (direction == GI_DIRECTION_INOUT) {
+            state->n_backup_args += 1;
+        }
+        if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
+            state->n_out_args += 1;
+        }
+
+        switch (arg_type_tag) {
+            case GI_TYPE_TAG_ARRAY:
+            {
+                gint length_arg_pos;
+
+                length_arg_pos = g_type_info_get_array_length (state->arg_type_infos[i]);
+
+                if (length_arg_pos < 0) {
+                    break;
+                }
+
+                /* For array lengths, we're going to delete the length argument;
+                 * so remove the extra backup we just added above */
+                if (direction == GI_DIRECTION_INOUT) {
+                    state->n_backup_args -= 1;
+                }
+
+                g_assert (length_arg_pos < state->n_args);
+                state->args_is_auxiliary[length_arg_pos] = TRUE;
+
+                if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT) {
+                    state->n_aux_in_args += 1;
+                }
+                if (direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) {
+                    state->n_aux_out_args += 1;
+                }
+
+                break;
+            }
+            case GI_TYPE_TAG_ERROR:
+                g_warn_if_fail (state->error_arg_pos < 0);
+                state->error_arg_pos = i;
+                break;
+            default:
+                break;
+        }
+    }
+
+    state->return_type_info = g_callable_info_get_return_type ( (GICallableInfo *) function_info);
+    state->return_type_tag = g_type_info_get_tag (state->return_type_info);
+
+    if (state->return_type_tag == GI_TYPE_TAG_ARRAY) {
+        gint length_arg_pos;
+        length_arg_pos = g_type_info_get_array_length (state->return_type_info);
+
+        if (length_arg_pos >= 0) {
+            g_assert (length_arg_pos < state->n_args);
+            state->args_is_auxiliary[length_arg_pos] = TRUE;
+            state->n_aux_out_args += 1;
+        }
+    }
+
+    state->n_return_values = state->n_out_args - state->n_aux_out_args;
+    if (state->return_type_tag != GI_TYPE_TAG_VOID) {
+        state->n_return_values += 1;
+    }
+
+    {
+        gsize n_py_args_expected;
+        Py_ssize_t py_args_pos;
+
+        n_py_args_expected = state->n_in_args
+                             + (state->is_constructor ? 1 : 0)
+                             - state->n_aux_in_args
+                             - (state->error_arg_pos >= 0 ? 1 : 0);
+
+        if (state->n_py_args != n_py_args_expected) {
+            PyErr_Format (PyExc_TypeError,
+                          "%s() takes exactly %zd argument(s) (%zd given)",
+                          g_base_info_get_name ( (GIBaseInfo *) function_info),
+                          n_py_args_expected, state->n_py_args);
+            return FALSE;
+        }
+
+        /* Check argument typestate-> */
+        py_args_pos = 0;
+        if (state->is_constructor || state->is_method) {
+            py_args_pos += 1;
+        }
+
+        for (i = 0; i < state->n_args; i++) {
+            GIDirection direction;
+            GITypeTag type_tag;
+            PyObject *py_arg;
+            gint retval;
+            gboolean allow_none;
+
+            direction = g_arg_info_get_direction (state->arg_infos[i]);
+            type_tag = g_type_info_get_tag (state->arg_type_infos[i]);
+
+            if (direction == GI_DIRECTION_OUT
+                    || state->args_is_auxiliary[i]
+                    || type_tag == GI_TYPE_TAG_ERROR) {
+                continue;
+            }
+
+            g_assert (py_args_pos < state->n_py_args);
+            py_arg = PyTuple_GET_ITEM (py_args, py_args_pos);
+
+            allow_none = g_arg_info_may_be_null (state->arg_infos[i]);
+
+            retval = _pygi_g_type_info_check_object (state->arg_type_infos[i],
+                                                     py_arg,
+                                                     allow_none);
+
+            if (retval < 0) {
+                return FALSE;
+            } else if (!retval) {
+                _PyGI_ERROR_PREFIX ("argument %zd: ", py_args_pos);
+                return FALSE;
+            }
+
+            py_args_pos += 1;
+        }
+
+        g_assert (py_args_pos == state->n_py_args);
+    }
+
+    state->args = g_slice_alloc0 (sizeof (gpointer) * state->n_args);
+    state->in_args = g_slice_alloc0 (sizeof (GIArgument) * state->n_in_args);
+    state->out_args = g_slice_alloc0 (sizeof (GIArgument) * state->n_out_args);
+    state->out_values = g_slice_alloc0 (sizeof (GIArgument) * state->n_out_args);
+    state->backup_args = g_slice_alloc0 (sizeof (GIArgument) * state->n_backup_args);
+
+    /* Bind args so we can use an unique index. */
+    {
+        gsize in_args_pos;
+        gsize out_args_pos;
+
+        in_args_pos = state->is_method ? 1 : 0;
+        out_args_pos = 0;
+
+        for (i = 0; i < state->n_args; i++) {
+            GIDirection direction;
+            GIBaseInfo *info;
+            gboolean is_caller_allocates;
+
+            direction = g_arg_info_get_direction (state->arg_infos[i]);
+            is_caller_allocates = g_arg_info_is_caller_allocates (state->arg_infos[i]);
+
+            switch (direction) {
+                case GI_DIRECTION_IN:
+                    g_assert (in_args_pos < state->n_in_args);
+                    state->args[i] = &state->in_args[in_args_pos];
+                    in_args_pos += 1;
+                    break;
+                case GI_DIRECTION_INOUT:
+                    g_assert (in_args_pos < state->n_in_args);
+                    g_assert (out_args_pos < state->n_out_args);
+
+                    state->in_args[in_args_pos].v_pointer = &state->out_values[out_args_pos];
+                    in_args_pos += 1;
+                case GI_DIRECTION_OUT:
+                    g_assert (out_args_pos < state->n_out_args);
+
+                    /* caller allocates only applies to structures but GI has
+                     * no way to denote that yet, so we only use caller allocates
+                     * if we see  a structure
+                     */
+                    if (is_caller_allocates) {
+                        GITypeTag type_tag;
+
+                        is_caller_allocates = FALSE;
+                        type_tag = g_type_info_get_tag (state->arg_type_infos[i]);
+
+                        if (type_tag  == GI_TYPE_TAG_INTERFACE) {
+                            GIInfoType info_type;
+
+                            info = g_type_info_get_interface (state->arg_type_infos[i]);
+                            g_assert (info != NULL);
+                            info_type = g_base_info_get_type (info);
+
+                            if (info_type == GI_INFO_TYPE_STRUCT)
+                                is_caller_allocates = TRUE;
+                        }
+                    }
+
+                    if (is_caller_allocates) {
+                        /* if caller allocates only use one level of indirection */
+                        state->out_args[out_args_pos].v_pointer = NULL;
+                        state->args[i] = &state->out_args[out_args_pos];
+                        if (g_struct_info_is_foreign((GIStructInfo *) info) ) {
+                            PyObject *foreign_struct =
+                                pygi_struct_foreign_convert_from_g_argument(info, NULL);
+
+                            pygi_struct_foreign_convert_to_g_argument(
+                                foreign_struct,
+                                info,
+                                GI_TRANSFER_EVERYTHING,
+                                state->args[i]);
+
+                            Py_DECREF(foreign_struct);
+                        } else if (g_type_is_a (g_registered_type_info_get_g_type (info), G_TYPE_BOXED)) {
+                            state->args[i]->v_pointer = _pygi_boxed_alloc (info, NULL);
+                        } else {
+                            gssize size = g_struct_info_get_size ( (GIStructInfo *) info);
+                            state->args[i]->v_pointer = g_malloc0 (size);
+                        }
+                    } else {
+                        state->out_args[out_args_pos].v_pointer = &state->out_values[out_args_pos];
+                        state->out_values[out_args_pos].v_pointer = NULL;
+                        state->args[i] = &state->out_values[out_args_pos];
+                    }
+
+                    out_args_pos += 1;
+            }
+        }
+
+        g_assert (in_args_pos == state->n_in_args);
+        g_assert (out_args_pos == state->n_out_args);
+    }
+
+    /* Convert the input arguments. */
+    {
+        Py_ssize_t py_args_pos;
+        gsize backup_args_pos;
+
+        py_args_pos = 0;
+        backup_args_pos = 0;
+
+        if (state->is_constructor) {
+            /* Skip the first argument. */
+            py_args_pos += 1;
+        } else if (state->is_method) {
+            /* Get the instance. */
+            GIBaseInfo *container_info;
+            GIInfoType container_info_type;
+            PyObject *py_arg;
+            gint check_val;
+
+            container_info = g_base_info_get_container (function_info);
+            container_info_type = g_base_info_get_type (container_info);
+
+            g_assert (py_args_pos < state->n_py_args);
+            py_arg = PyTuple_GET_ITEM (py_args, py_args_pos);
+
+            /* In python 2 python takes care of checking the type
+             * of the self instance.  In python 3 it does not
+             * so we have to check it here
+             */
+            check_val = _pygi_g_type_interface_check_object(container_info,
+                                                            py_arg);
+            if (check_val < 0) {
+                return FALSE;
+            } else if (!check_val) {
+                _PyGI_ERROR_PREFIX ("instance: ");
+                return FALSE;
+            }
+
+            switch (container_info_type) {
+                case GI_INFO_TYPE_UNION:
+                case GI_INFO_TYPE_STRUCT:
+                {
+                    GType type;
+
+                    type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) container_info);
+
+                    if (g_type_is_a (type, G_TYPE_BOXED)) {
+                        g_assert (state->n_in_args > 0);
+                        state->in_args[0].v_pointer = pyg_boxed_get (py_arg, void);
+                    } else if (g_struct_info_is_foreign (container_info)) {
+                        PyObject *result;
+                        result = pygi_struct_foreign_convert_to_g_argument (
+                                     py_arg, container_info,
+                                     GI_TRANSFER_NOTHING,
+                                     &state->in_args[0]);
+                    } else if (g_type_is_a (type, G_TYPE_POINTER) || type == G_TYPE_NONE) {
+                        g_assert (state->n_in_args > 0);
+                        state->in_args[0].v_pointer = pyg_pointer_get (py_arg, void);
+                    } else {
+                        PyErr_Format (PyExc_TypeError, "unable to convert an instance of '%s'", g_type_name (type));
+                        return FALSE;
+                    }
+
+                    break;
+                }
+                case GI_INFO_TYPE_OBJECT:
+                case GI_INFO_TYPE_INTERFACE:
+                    g_assert (state->n_in_args > 0);
+                    state->in_args[0].v_pointer = pygobject_get (py_arg);
+                    break;
+                default:
+                    /* Other types don't have methods. */
+                    g_assert_not_reached();
+            }
+
+            py_args_pos += 1;
+        }
+
+        for (i = 0; i < state->n_args; i++) {
+            GIDirection direction;
+
+            if (i == state->callback_index) {
+                if (state->closure)
+                    state->args[i]->v_pointer = state->closure->closure;
+                else
+                    /* Some callbacks params accept NULL */
+                    state->args[i]->v_pointer = NULL;
+                py_args_pos++;
+                continue;
+            } else if (i == state->user_data_index) {
+                state->args[i]->v_pointer = state->closure;
+                py_args_pos++;
+                continue;
+            } else if (i == state->destroy_notify_index) {
+                if (state->closure) {
+                    /* No need to clean up if the callback is NULL */
+                    PyGICClosure *destroy_notify = _pygi_destroy_notify_create();
+                    state->args[i]->v_pointer = destroy_notify->closure;
+                }
+                continue;
+            }
+
+            if (state->args_is_auxiliary[i]) {
+                continue;
+            }
+
+            direction = g_arg_info_get_direction (state->arg_infos[i]);
+
+            if (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT) {
+                PyObject *py_arg;
+                GITypeTag arg_type_tag;
+                GITransfer transfer;
+
+                arg_type_tag = g_type_info_get_tag (state->arg_type_infos[i]);
+
+                if (arg_type_tag == GI_TYPE_TAG_ERROR) {
+                    GError **error;
+
+                    error = g_slice_new (GError *);
+                    *error = NULL;
+
+                    state->args[i]->v_pointer = error;
+                    continue;
+                }
+
+                transfer = g_arg_info_get_ownership_transfer (state->arg_infos[i]);
+
+                g_assert (py_args_pos < state->n_py_args);
+                py_arg = PyTuple_GET_ITEM (py_args, py_args_pos);
+
+                *state->args[i] = _pygi_argument_from_object (py_arg, state->arg_type_infos[i], transfer);
+
+                if (PyErr_Occurred()) {
+                    /* TODO: release previous input arguments. */
+                    return FALSE;
+                }
+
+                if (direction == GI_DIRECTION_INOUT) {
+                    /* We need to keep a copy of the argument to be able to release it later. */
+                    g_assert (backup_args_pos < state->n_backup_args);
+                    state->backup_args[backup_args_pos] = *state->args[i];
+                    backup_args_pos += 1;
+                }
+
+                if (arg_type_tag == GI_TYPE_TAG_ARRAY) {
+                    GArray *array;
+                    gssize length_arg_pos;
+
+                    array = state->args[i]->v_pointer;
+
+                    length_arg_pos = g_type_info_get_array_length (state->arg_type_infos[i]);
+                    if (length_arg_pos >= 0) {
+                        int len = 0;
+                        /* Set the auxiliary argument holding the length. */
+                        if (array)
+                            len = array->len;
+
+                        state->args[length_arg_pos]->v_size = len;
+                    }
+
+                    /* Get rid of the GArray. */
+                    if ( (array != NULL) &&
+                            (g_type_info_get_array_type (state->arg_type_infos[i]) == GI_ARRAY_TYPE_C)) {
+                        state->args[i]->v_pointer = array->data;
+
+                        /* HACK: We have unwrapped a C array so
+                         *       set the state to reflect this.
+                         *       If there is an error between now
+                         *       and when we rewrap the array
+                         *       we will leak C arrays due to
+                         *       being in an inconsitant state.
+                         *       e.g. for interfaces with more
+                         *       than one C array argument, an
+                         *       error may occure when not all
+                         *       C arrays have been rewrapped.
+                         *       This will be removed once the invoke
+                         *       rewrite branch is merged.
+                         */
+                        state->c_arrays_are_wrapped = FALSE;
+                        if (direction != GI_DIRECTION_INOUT || transfer != GI_TRANSFER_NOTHING) {
+                            /* The array hasn't been referenced anywhere, so free it to avoid losing memory. */
+                            g_array_free (array, FALSE);
+                        }
+                    }
+                }
+
+                py_args_pos += 1;
+            }
+        }
+
+        g_assert (py_args_pos == state->n_py_args);
+        g_assert (backup_args_pos == state->n_backup_args);
+    }
+
+    return TRUE;
+}
+
+static gboolean
+_invoke_function (struct invocation_state *state,
+                  GICallableInfo *callable_info, PyObject *py_args)
+{
+    GError *error;
+    gint retval;
+
+    error = NULL;
+
+    pyg_begin_allow_threads;
+    if (g_base_info_get_type (callable_info) == GI_INFO_TYPE_FUNCTION) {
+        retval = g_function_info_invoke ( (GIFunctionInfo *) callable_info,
+                                          state->in_args,
+                                          state->n_in_args,
+                                          state->out_args,
+                                          state->n_out_args,
+                                          &state->return_arg,
+                                          &error);
+    } else {
+        retval = g_vfunc_info_invoke ( (GIVFuncInfo *) callable_info,
+                                       state->implementor_gtype,
+                                       state->in_args,
+                                       state->n_in_args,
+                                       state->out_args,
+                                       state->n_out_args,
+                                       &state->return_arg,
+                                       &error);
+    }
+    pyg_end_allow_threads;
+
+    if (!retval) {
+        pyglib_error_check(&error);
+
+        /* TODO: release input arguments. */
+
+        return FALSE;
+    }
+
+    if (state->error_arg_pos >= 0) {
+        GError **error;
+
+        error = state->args[state->error_arg_pos]->v_pointer;
+
+        if (pyglib_error_check(error)) {
+            /* TODO: release input arguments. */
+
+            return FALSE;
+        }
+    }
+
+    return TRUE;
+}
+
+static gboolean
+_process_invocation_state (struct invocation_state *state,
+                           GIFunctionInfo *function_info, PyObject *py_args)
+{
+    gsize i;
+
+    /* Convert the return value. */
+    if (state->is_constructor) {
+        PyTypeObject *py_type;
+        GIBaseInfo *info;
+        GIInfoType info_type;
+        GITransfer transfer;
+
+        if (state->return_arg.v_pointer == NULL) {
+            PyErr_SetString (PyExc_TypeError, "constructor returned NULL");
+            return FALSE;
+        }
+
+        g_assert (state->n_py_args > 0);
+        py_type = (PyTypeObject *) PyTuple_GET_ITEM (py_args, 0);
+
+        info = g_type_info_get_interface (state->return_type_info);
+        g_assert (info != NULL);
+
+        info_type = g_base_info_get_type (info);
+
+        transfer = g_callable_info_get_caller_owns ( (GICallableInfo *) function_info);
+
+        switch (info_type) {
+            case GI_INFO_TYPE_UNION:
+            case GI_INFO_TYPE_STRUCT:
+            {
+                GType type;
+
+                type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
+
+                if (g_struct_info_is_foreign (info)) {
+                    state->return_value =
+                        pygi_struct_foreign_convert_from_g_argument (
+                            info, state->return_arg.v_pointer);
+                } else if (g_type_is_a (type, G_TYPE_BOXED)) {
+                    g_warn_if_fail (transfer == GI_TRANSFER_EVERYTHING);
+                    state->return_value = _pygi_boxed_new (py_type, state->return_arg.v_pointer, transfer == GI_TRANSFER_EVERYTHING);
+                } else if (g_type_is_a (type, G_TYPE_POINTER) || type == G_TYPE_NONE) {
+                    if (transfer != GI_TRANSFER_NOTHING)
+                        g_warning ("Return argument in %s returns a struct "
+                                   "with a transfer mode of \"full\" "
+                                   "Transfer mode should be set to None for "
+                                   "struct types as there is no way to free "
+                                   "them safely.  Ignoring transfer mode "
+                                   "to prevent a potential invalid free. "
+                                   "This may cause a leak in your application.",
+                                   g_base_info_get_name ( (GIBaseInfo *) function_info) );
+
+                    state->return_value = _pygi_struct_new (py_type, state->return_arg.v_pointer, FALSE);
+                } else {
+                    PyErr_Format (PyExc_TypeError, "cannot create '%s' instances", py_type->tp_name);
+                    g_base_info_unref (info);
+                    return FALSE;
+                }
+
+                break;
+            }
+            case GI_INFO_TYPE_OBJECT:
+                if (state->return_arg.v_pointer == NULL) {
+                    PyErr_SetString (PyExc_TypeError, "constructor returned NULL");
+                    break;
+                }
+                state->return_value = pygobject_new (state->return_arg.v_pointer);
+                if (transfer == GI_TRANSFER_EVERYTHING) {
+                    /* The new wrapper increased the reference count, so decrease it. */
+                    g_object_unref (state->return_arg.v_pointer);
+                }
+                if (state->is_constructor && G_IS_INITIALLY_UNOWNED (state->return_arg.v_pointer)) {
+                    /* GInitiallyUnowned constructors always end up with one extra reference, so decrease it. */
+                    g_object_unref (state->return_arg.v_pointer);
+                }
+                break;
+            default:
+                /* Other types don't have neither methods nor constructors. */
+                g_assert_not_reached();
+        }
+
+        g_base_info_unref (info);
+
+        if (state->return_value == NULL) {
+            /* TODO: release arguments. */
+            return FALSE;
+        }
+    } else {
+        GITransfer transfer;
+
+        if ( (state->return_type_tag == GI_TYPE_TAG_ARRAY) &&
+                (g_type_info_get_array_type (state->return_type_info) == GI_ARRAY_TYPE_C)) {
+            /* Create a #GArray. */
+            state->return_arg.v_pointer = _pygi_argument_to_array (&state->return_arg, state->args, state->return_type_info, state->is_method);
+        }
+
+        transfer = g_callable_info_get_caller_owns ( (GICallableInfo *) function_info);
+
+        state->return_value = _pygi_argument_to_object (&state->return_arg, state->return_type_info, transfer);
+        if (state->return_value == NULL) {
+            /* TODO: release argument. */
+            return FALSE;
+        }
+
+        _pygi_argument_release (&state->return_arg, state->return_type_info, transfer, GI_DIRECTION_OUT);
+
+        if (state->return_type_tag == GI_TYPE_TAG_ARRAY
+                && transfer == GI_TRANSFER_NOTHING) {
+            /* We created a #GArray, so free it. */
+            state->return_arg.v_pointer = g_array_free (state->return_arg.v_pointer, FALSE);
+        }
+    }
+
+    /* Convert output arguments and release arguments. */
+    {
+        gsize return_values_pos;
+
+        return_values_pos = 0;
+
+        if (state->n_return_values > 1) {
+            /* Return a tuple. */
+            PyObject *return_values;
+
+            return_values = PyTuple_New (state->n_return_values);
+            if (return_values == NULL) {
+                /* TODO: release arguments. */
+                return FALSE;
+            }
+
+            if (state->return_type_tag == GI_TYPE_TAG_VOID) {
+                /* The current return value is None. */
+                Py_DECREF (state->return_value);
+            } else {
+                /* Put the return value first. */
+                g_assert (state->return_value != NULL);
+                PyTuple_SET_ITEM (return_values, return_values_pos, state->return_value);
+                return_values_pos += 1;
+            }
+
+            state->return_value = return_values;
+        }
+
+        for (i = 0; i < state->n_args; i++) {
+            GIDirection direction;
+            GITypeTag type_tag;
+            GITransfer transfer;
+
+            if (state->args_is_auxiliary[i]) {
+                /* Auxiliary arguments are handled at the same time as their relatives. */
+                continue;
+            }
+
+            direction = g_arg_info_get_direction (state->arg_infos[i]);
+            transfer = g_arg_info_get_ownership_transfer (state->arg_infos[i]);
+
+            type_tag = g_type_info_get_tag (state->arg_type_infos[i]);
+
+            if ( (type_tag == GI_TYPE_TAG_ARRAY) &&
+                    (g_type_info_get_array_type (state->arg_type_infos[i]) == GI_ARRAY_TYPE_C) &&
+                    (direction != GI_DIRECTION_IN || transfer == GI_TRANSFER_NOTHING)) {
+                /* Create a #GArray. */
+                state->args[i]->v_pointer = _pygi_argument_to_array (state->args[i], state->args, state->arg_type_infos[i], state->is_method);
+            }
+
+            if (direction == GI_DIRECTION_INOUT || direction == GI_DIRECTION_OUT) {
+                /* Convert the argument. */
+                PyObject *obj;
+
+                /* If we created it, deallocate when it goes out of scope
+                 * otherwise it is unsafe to deallocate random structures
+                 * we are given
+                 */
+                if (type_tag == GI_TYPE_TAG_INTERFACE) {
+                    GIBaseInfo *info;
+                    GIInfoType info_type;
+                    GType type;
+
+                    info = g_type_info_get_interface (state->arg_type_infos[i]);
+                    g_assert (info != NULL);
+                    info_type = g_base_info_get_type (info);
+                    type = g_registered_type_info_get_g_type ( (GIRegisteredTypeInfo *) info);
+
+                    if ( (info_type == GI_INFO_TYPE_STRUCT) &&
+                             !g_struct_info_is_foreign((GIStructInfo *) info) &&
+                             !g_type_is_a (type, G_TYPE_BOXED)) {
+                        if (g_arg_info_is_caller_allocates (state->arg_infos[i])) {
+                            transfer = GI_TRANSFER_EVERYTHING;
+                        } else if (transfer == GI_TRANSFER_EVERYTHING) {
+                            transfer = GI_TRANSFER_NOTHING;
+                            g_warning ("Out argument %ld in %s returns a struct "
+                                       "with a transfer mode of \"full\". "
+                                       "Transfer mode should be set to \"none\" for "
+                                       "struct type returns as there is no way to free "
+                                       "them safely.  Ignoring transfer mode "
+                                       "to prevent a potential invalid free. "
+                                       "This may cause a leak in your application.",
+                                       i, g_base_info_get_name ( (GIBaseInfo *) function_info) );
+                        }
+                    }
+                }
+
+                obj = _pygi_argument_to_object (state->args[i], state->arg_type_infos[i], transfer);
+                if (obj == NULL) {
+                    /* TODO: release arguments. */
+                    return FALSE;
+                }
+
+                g_assert (return_values_pos < state->n_return_values);
+
+                if (state->n_return_values > 1) {
+                    PyTuple_SET_ITEM (state->return_value, return_values_pos, obj);
+                } else {
+                    /* The current return value is None. */
+                    Py_DECREF (state->return_value);
+                    state->return_value = obj;
+                }
+
+                return_values_pos += 1;
+            }
+
+        }
+
+        /* HACK: We rewrapped any C arrays above in a GArray so they are ok to
+         *       free as GArrays.  We will always leak C arrays if there is
+         *       an error before we reach this state as there is no easy way
+         *       to know which arrays were wrapped if there are more than one.
+         *       This will be removed with better array handling once merge
+         *       the invoke rewrite branch.
+         */
+        state->c_arrays_are_wrapped = TRUE;
+        g_assert (state->n_return_values <= 1 || return_values_pos == state->n_return_values);
+    }
+
+    return TRUE;
+}
+
+static void
+_free_invocation_state (struct invocation_state *state)
+{
+    gsize i;
+    gsize backup_args_pos;
+
+    if (state->return_type_info != NULL) {
+        g_base_info_unref ( (GIBaseInfo *) state->return_type_info);
+    }
+
+    if (state->closure != NULL) {
+        if (state->closure->scope == GI_SCOPE_TYPE_CALL)
+            _pygi_invoke_closure_free (state->closure);
+    }
+
+    /* release all arguments. */
+    backup_args_pos = 0;
+    for (i = 0; i < state->n_args; i++) {
+
+        if (state->args_is_auxiliary[i]) {
+            /* Auxiliary arguments are not released. */
+            continue;
+        }
+
+        if (state->arg_infos[i] != NULL
+            && state->arg_type_infos[i] != NULL) {
+            GIDirection direction;
+            GITypeTag type_tag;
+            GITransfer transfer;
+
+            direction = g_arg_info_get_direction (state->arg_infos[i]);
+            transfer = g_arg_info_get_ownership_transfer (state->arg_infos[i]);
+
+            /* Release the argument. */
+            if (direction == GI_DIRECTION_INOUT) {
+                if (state->args != NULL) {
+                    _pygi_argument_release (&state->backup_args[backup_args_pos],
+                                            state->arg_type_infos[i],
+                                            transfer, GI_DIRECTION_IN);
+                }
+                backup_args_pos += 1;
+            }
+            if (state->args != NULL && state->args[i] != NULL) {
+                type_tag = g_type_info_get_tag (state->arg_type_infos[i]);
+
+                if (type_tag == GI_TYPE_TAG_ARRAY &&
+                        (direction == GI_DIRECTION_IN || direction == GI_DIRECTION_INOUT) &&
+                        (g_type_info_get_array_type (state->arg_type_infos[i]) == GI_ARRAY_TYPE_C) &&
+                        !state->c_arrays_are_wrapped) {
+                    /* HACK: Noop - we are in an inconsitant state due to
+                     *       complex array handler so leak any C arrays
+                     *       as we don't know if we can free them safely.
+                     *       This will be removed when we merge the
+                     *       invoke rewrite branch.
+                     */
+                } else {
+                    _pygi_argument_release (state->args[i], state->arg_type_infos[i],
+                                            transfer, direction);
+                }
+
+                if (type_tag == GI_TYPE_TAG_ARRAY
+                    && (direction != GI_DIRECTION_IN && transfer == GI_TRANSFER_NOTHING)) {
+                    /* We created an *out* #GArray and it has not been released above, so free it. */
+                    state->args[i]->v_pointer = g_array_free (state->args[i]->v_pointer, FALSE);
+                }
+            }
+
+        }
+
+        if (state->arg_type_infos[i] != NULL)
+            g_base_info_unref ( (GIBaseInfo *) state->arg_type_infos[i]);
+        if (state->arg_infos[i] != NULL)
+            g_base_info_unref ( (GIBaseInfo *) state->arg_infos[i]);
+    }
+    g_assert (backup_args_pos == state->n_backup_args);
+
+    g_slice_free1 (sizeof (gpointer) * state->n_args, state->arg_infos);
+    g_slice_free1 (sizeof (gpointer) * state->n_args, state->arg_type_infos);
+    g_slice_free1 (sizeof (gboolean) * state->n_args, state->args_is_auxiliary);
+
+    if (state->args != NULL) {
+        g_slice_free1 (sizeof (gpointer) * state->n_args, state->args);
+    }
+
+    if (state->in_args != NULL) {
+        g_slice_free1 (sizeof (GIArgument) * state->n_in_args, state->in_args);
+    }
+
+    if (state->out_args != NULL) {
+        g_slice_free1 (sizeof (GIArgument) * state->n_out_args, state->out_args);
+    }
+
+    if (state->out_values != NULL) {
+        g_slice_free1 (sizeof (GIArgument) * state->n_out_args, state->out_values);
+    }
+
+    if (state->backup_args != NULL) {
+        g_slice_free1 (sizeof (GIArgument) * state->n_backup_args, state->backup_args);
+    }
+
+    if (PyErr_Occurred()) {
+        Py_CLEAR (state->return_value);
+    }
+}
+
+
+PyObject *
+_wrap_g_callable_info_invoke (PyGIBaseInfo *self, PyObject *py_args,
+                              PyObject *kwargs)
+{
+    struct invocation_state state = { 0, };
+
+    if (!_initialize_invocation_state (&state, self->info, py_args, kwargs)) {
+        _free_invocation_state (&state);
+        return NULL;
+    }
+
+    if (!_prepare_invocation_state (&state, self->info, py_args)) {
+        _free_invocation_state (&state);
+        return NULL;
+    }
+
+    if (!_invoke_function (&state, self->info, py_args)) {
+        _free_invocation_state (&state);
+        return NULL;
+    }
+
+    if (!_process_invocation_state (&state, self->info, py_args)) {
+        _free_invocation_state (&state);
+        return NULL;
+    }
+
+    _free_invocation_state (&state);
+    return state.return_value;
+}
+
diff --git a/gi/pygi-invoke.h b/gi/pygi-invoke.h
new file mode 100644 (file)
index 0000000..dc1ce18
--- /dev/null
@@ -0,0 +1,38 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_INVOKE_H__
+#define __PYGI_INVOKE_H__
+
+#include <Python.h>
+
+#include <girepository.h>
+
+#include "pygi-private.h"
+
+G_BEGIN_DECLS
+
+PyObject *_wrap_g_callable_info_invoke (PyGIBaseInfo *self, PyObject *py_args,
+                                        PyObject *kwargs);
+
+G_END_DECLS
+
+#endif /* __PYGI_INVOKE_H__ */
diff --git a/gi/pygi-private.h b/gi/pygi-private.h
new file mode 100644 (file)
index 0000000..efe62c8
--- /dev/null
@@ -0,0 +1,84 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ */
+#ifndef __PYGI_PRIVATE_H__
+#define __PYGI_PRIVATE_H__
+
+#ifdef __PYGI_H__
+#   error "Import pygi.h or pygi-private.h, but not both"
+#endif
+
+#ifdef HAVE_CONFIG_H
+#   include <config.h>
+#endif
+
+#include <Python.h>
+
+#include "pygi.h"
+
+#include "pygobject-external.h"
+
+#include "pygi-repository.h"
+#include "pygi-info.h"
+#include "pygi-struct.h"
+#include "pygi-boxed.h"
+#include "pygi-argument.h"
+#include "pygi-type.h"
+#include "pygi-foreign.h"
+#include "pygi-closure.h"
+#include "pygi-callbacks.h"
+#include "pygi-invoke.h"
+#include "pygi-property.h"
+#include "pygi-signal-closure.h"
+
+G_BEGIN_DECLS
+#if PY_VERSION_HEX >= 0x03000000
+
+#define _PyGI_ERROR_PREFIX(format, ...) G_STMT_START { \
+    PyObject *py_error_prefix; \
+    py_error_prefix = PyUnicode_FromFormat(format, ## __VA_ARGS__); \
+    if (py_error_prefix != NULL) { \
+        PyObject *py_error_type, *py_error_value, *py_error_traceback; \
+        PyErr_Fetch(&py_error_type, &py_error_value, &py_error_traceback); \
+        if (PyUnicode_Check(py_error_value)) { \
+            PyObject *new; \
+            new = PyUnicode_Concat(py_error_prefix, py_error_value); \
+            Py_DECREF(py_error_value); \
+            if (new != NULL) { \
+                py_error_value = new; \
+            } \
+        } \
+        PyErr_Restore(py_error_type, py_error_value, py_error_traceback); \
+    } \
+} G_STMT_END
+
+#else
+
+#define _PyGI_ERROR_PREFIX(format, ...) G_STMT_START { \
+    PyObject *py_error_prefix; \
+    py_error_prefix = PyString_FromFormat(format, ## __VA_ARGS__); \
+    if (py_error_prefix != NULL) { \
+        PyObject *py_error_type, *py_error_value, *py_error_traceback; \
+        PyErr_Fetch(&py_error_type, &py_error_value, &py_error_traceback); \
+        if (PyString_Check(py_error_value)) { \
+            PyString_ConcatAndDel(&py_error_prefix, py_error_value); \
+            if (py_error_prefix != NULL) { \
+                py_error_value = py_error_prefix; \
+            } \
+        } \
+        PyErr_Restore(py_error_type, py_error_value, py_error_traceback); \
+    } \
+} G_STMT_END
+
+#endif
+
+/* Redefine g_array_index because we want it to return the i-th element, casted
+ * to the type t, of the array a, and not the i-th element of the array a
+ * casted to the type t. */
+#define _g_array_index(a,t,i) \
+    *(t *)((a)->data + g_array_get_element_size(a) * (i))
+
+
+G_END_DECLS
+
+#endif /* __PYGI_PRIVATE_H__ */
diff --git a/gi/pygi-property.c b/gi/pygi-property.c
new file mode 100644 (file)
index 0000000..2f8970d
--- /dev/null
@@ -0,0 +1,349 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2010  Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "pygi-private.h"
+
+#include <girepository.h>
+
+/* Copied from glib */
+static void
+canonicalize_key (gchar *key)
+{
+    gchar *p;
+
+    for (p = key; *p != 0; p++)
+    {
+        gchar c = *p;
+
+        if (c != '-' &&
+            (c < '0' || c > '9') &&
+            (c < 'A' || c > 'Z') &&
+            (c < 'a' || c > 'z'))
+                *p = '-';
+    }
+}
+
+static GIPropertyInfo *
+_pygi_lookup_property_from_g_type (GType g_type, const gchar *attr_name)
+{
+    GIRepository *repository;
+    GIBaseInfo *info;
+    gssize n_infos;
+    gssize i;
+    GType parent;
+
+    repository = g_irepository_get_default();
+    info = g_irepository_find_by_gtype (repository, g_type);
+    if (info == NULL) {
+        return NULL;
+    }
+
+    n_infos = g_object_info_get_n_properties ( (GIObjectInfo *) info);
+    for (i = 0; i < n_infos; i++) {
+        GIPropertyInfo *property_info;
+
+        property_info = g_object_info_get_property ( (GIObjectInfo *) info, i);
+        g_assert (info != NULL);
+
+        if (strcmp (attr_name, g_base_info_get_name (property_info)) == 0) {
+            g_base_info_unref (info);
+            return property_info;
+        }
+
+        g_base_info_unref (property_info);
+    }
+
+    g_base_info_unref (info);
+
+    parent = g_type_parent (g_type);
+    if (parent > 0)
+        return _pygi_lookup_property_from_g_type (parent, attr_name);
+
+    return NULL;
+}
+
+PyObject *
+pygi_get_property_value_real (PyGObject *instance,
+                              const gchar *attr_name)
+{
+    GType g_type;
+    GIPropertyInfo *property_info = NULL;
+    char *property_name = g_strdup (attr_name);
+    GParamSpec *pspec = NULL;
+    GValue value = { 0, };
+    GIArgument arg = { 0, };
+    PyObject *py_value = NULL;
+    GITypeInfo *type_info = NULL;
+    GITransfer transfer;
+
+    canonicalize_key (property_name);
+
+    g_type = pyg_type_from_object ((PyObject *)instance);
+    property_info = _pygi_lookup_property_from_g_type (g_type, property_name);
+
+    if (property_info == NULL)
+        goto out;
+
+    pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (instance->obj),
+                                          attr_name);
+    if (pspec == NULL)
+        goto out;
+
+    g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
+    g_object_get_property (instance->obj, attr_name, &value);
+
+    type_info = g_property_info_get_type (property_info);
+    transfer = g_property_info_get_ownership_transfer (property_info);
+
+    GITypeTag type_tag = g_type_info_get_tag (type_info);
+    switch (type_tag) {
+        case GI_TYPE_TAG_BOOLEAN:
+            arg.v_boolean = g_value_get_boolean (&value);
+            break;
+        case GI_TYPE_TAG_INT8:
+        case GI_TYPE_TAG_INT16:
+        case GI_TYPE_TAG_INT32:
+        case GI_TYPE_TAG_INT64:
+            arg.v_int = g_value_get_int (&value);
+            break;
+        case GI_TYPE_TAG_UINT8:
+        case GI_TYPE_TAG_UINT16:
+        case GI_TYPE_TAG_UINT32:
+        case GI_TYPE_TAG_UINT64:
+            arg.v_uint = g_value_get_uint (&value);
+            break;
+        case GI_TYPE_TAG_FLOAT:
+            arg.v_float = g_value_get_float (&value);
+            break;
+        case GI_TYPE_TAG_DOUBLE:
+            arg.v_double = g_value_get_double (&value);
+            break;
+        case GI_TYPE_TAG_GTYPE:
+            arg.v_size = g_value_get_gtype (&value);
+            break;
+        case GI_TYPE_TAG_UTF8:
+        case GI_TYPE_TAG_FILENAME:
+            arg.v_string = g_value_dup_string (&value);
+            break;
+        case GI_TYPE_TAG_INTERFACE:
+        {
+            GIBaseInfo *info;
+            GIInfoType info_type;
+            GType type;
+
+            info = g_type_info_get_interface (type_info);
+            type = g_registered_type_info_get_g_type (info);
+            info_type = g_base_info_get_type (info);
+
+            g_base_info_unref (info);
+
+            switch (info_type) {
+                case GI_INFO_TYPE_ENUM:
+                    arg.v_int32 = g_value_get_enum (&value);
+                    break;
+                case GI_INFO_TYPE_INTERFACE:
+                case GI_INFO_TYPE_OBJECT:
+                    arg.v_pointer = g_value_get_object (&value);
+                    break;
+                case GI_INFO_TYPE_BOXED:
+                case GI_INFO_TYPE_STRUCT:
+                case GI_INFO_TYPE_UNION:
+
+                    if (g_type_is_a (type, G_TYPE_BOXED)) {
+                        arg.v_pointer = g_value_get_boxed (&value);
+                    } else if (g_type_is_a (type, G_TYPE_POINTER)) {
+                        arg.v_pointer = g_value_get_pointer (&value);
+                    } else {
+                        PyErr_Format (PyExc_NotImplementedError,
+                                      "Retrieving properties of type '%s' is not implemented",
+                                      g_type_name (type));
+                    }
+                    break;
+                default:
+                    PyErr_Format (PyExc_NotImplementedError,
+                                  "Retrieving properties of type '%s' is not implemented",
+                                  g_type_name (type));
+                    goto out;
+            }
+            break;
+        }
+        case GI_TYPE_TAG_GHASH:
+            arg.v_pointer = g_value_get_boxed (&value);
+            break;
+        case GI_TYPE_TAG_GLIST:
+            arg.v_pointer = g_value_get_pointer (&value);
+            break;
+        default:
+            PyErr_Format (PyExc_NotImplementedError,
+                          "Retrieving properties of type %s is not implemented",
+                          g_type_tag_to_string (g_type_info_get_tag (type_info)));
+            goto out;
+    }
+
+    py_value = _pygi_argument_to_object (&arg, type_info, transfer);
+
+out:
+    g_free (property_name);
+    if (property_info != NULL)
+        g_base_info_unref (property_info);
+    if (type_info != NULL)
+        g_base_info_unref (type_info);
+
+    return py_value;
+}
+
+gint
+pygi_set_property_value_real (PyGObject *instance,
+                              const gchar *attr_name,
+                              PyObject *py_value)
+{
+    GType g_type;
+    GIPropertyInfo *property_info = NULL;
+    char *property_name = g_strdup (attr_name);
+    GITypeInfo *type_info = NULL;
+    GITypeTag type_tag;
+    GITransfer transfer;
+    GValue value = { 0, };
+    GIArgument arg = { 0, };
+    GParamSpec *pspec = NULL;
+    gint ret_value = -1;
+
+    canonicalize_key (property_name);
+
+    g_type = pyg_type_from_object ((PyObject *)instance);
+    property_info = _pygi_lookup_property_from_g_type (g_type, property_name);
+
+    if (property_info == NULL)
+        goto out;
+
+    pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (instance->obj),
+                                          attr_name);
+    if (pspec == NULL)
+        goto out;
+
+    if (! (pspec->flags & G_PARAM_WRITABLE))
+        goto out;
+
+    type_info = g_property_info_get_type (property_info);
+    transfer = g_property_info_get_ownership_transfer (property_info);
+    arg = _pygi_argument_from_object (py_value, type_info, transfer);
+
+    g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
+
+    // FIXME: Lots of types still unhandled
+    type_tag = g_type_info_get_tag (type_info);
+    switch (type_tag) {
+        case GI_TYPE_TAG_INTERFACE:
+        {
+            GIBaseInfo *info;
+            GIInfoType info_type;
+            GType type;
+
+            info = g_type_info_get_interface (type_info);
+            type = g_registered_type_info_get_g_type (info);
+            info_type = g_base_info_get_type (info);
+
+            g_base_info_unref (info);
+
+            switch (info_type) {
+                case GI_INFO_TYPE_ENUM:
+                    g_value_set_enum (&value, arg.v_int32);
+                    break;
+                case GI_INFO_TYPE_INTERFACE:
+                case GI_INFO_TYPE_OBJECT:
+                    g_value_set_object (&value, arg.v_pointer);
+                    break;
+                case GI_INFO_TYPE_BOXED:
+                case GI_INFO_TYPE_STRUCT:
+                case GI_INFO_TYPE_UNION:
+                    if (g_type_is_a (type, G_TYPE_BOXED)) {
+                        g_value_set_boxed (&value, arg.v_pointer);
+                    } else {
+                        PyErr_Format (PyExc_NotImplementedError,
+                                      "Setting properties of type '%s' is not implemented",
+                                      g_type_name (type));
+                    }
+                    break;
+                default:
+                    PyErr_Format (PyExc_NotImplementedError,
+                                  "Setting properties of type '%s' is not implemented",
+                                  g_type_name (type));
+                    goto out;
+            }
+            break;
+        }
+        case GI_TYPE_TAG_BOOLEAN:
+            g_value_set_boolean (&value, arg.v_boolean);
+            break;
+        case GI_TYPE_TAG_INT8:
+        case GI_TYPE_TAG_INT16:
+        case GI_TYPE_TAG_INT32:
+        case GI_TYPE_TAG_INT64:
+            g_value_set_int (&value, arg.v_int);
+            break;
+        case GI_TYPE_TAG_UINT8:
+        case GI_TYPE_TAG_UINT16:
+        case GI_TYPE_TAG_UINT32:
+        case GI_TYPE_TAG_UINT64:
+            g_value_set_uint (&value, arg.v_uint);
+            break;
+        case GI_TYPE_TAG_FLOAT:
+            g_value_set_float (&value, arg.v_float);
+            break;
+        case GI_TYPE_TAG_DOUBLE:
+            g_value_set_double (&value, arg.v_double);
+            break;
+        case GI_TYPE_TAG_GTYPE:
+            g_value_set_gtype (&value, arg.v_size);
+            break;
+        case GI_TYPE_TAG_UTF8:
+        case GI_TYPE_TAG_FILENAME:
+            g_value_set_string (&value, arg.v_string);
+            break;
+        case GI_TYPE_TAG_GHASH:
+            g_value_set_boxed (&value, arg.v_pointer);
+            break;
+        case GI_TYPE_TAG_GLIST:
+            g_value_set_pointer (&value, arg.v_pointer);
+            break;
+        default:
+            PyErr_Format (PyExc_NotImplementedError,
+                          "Setting properties of type %s is not implemented",
+                          g_type_tag_to_string (g_type_info_get_tag (type_info)));
+            goto out;
+    }
+
+    g_object_set_property (instance->obj, attr_name, &value);
+
+    ret_value = 0;
+
+out:
+    g_free (property_name);
+    if (property_info != NULL)
+        g_base_info_unref (property_info);
+    if (type_info != NULL)
+        g_base_info_unref (type_info);
+
+    return ret_value;
+}
+
diff --git a/gi/pygi-property.h b/gi/pygi-property.h
new file mode 100644 (file)
index 0000000..31d0e42
--- /dev/null
@@ -0,0 +1,39 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2010  Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __PYGI_PROPERTY_H__
+#define __PYGI_PROPERTY_H__
+
+#include <Python.h>
+#include <girepository.h>
+
+#include "pygi.h"
+
+PyObject *pygi_get_property_value_real (PyGObject *instance,
+                                        const gchar *attr_name);
+
+gint pygi_set_property_value_real (PyGObject *instance,
+                                   const gchar *attr_name,
+                                   PyObject *py_value);
+
+#endif /* __PYGI_PROPERTY_H__ */
diff --git a/gi/pygi-repository.c b/gi/pygi-repository.c
new file mode 100644 (file)
index 0000000..c48d2ce
--- /dev/null
@@ -0,0 +1,292 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+ *
+ *   pygi-repository.c: GIRepository wrapper.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygi-private.h"
+
+#include <pyglib-python-compat.h>
+
+PyObject *PyGIRepositoryError;
+
+static PyMethodDef _PyGIRepository_methods[];
+
+PYGLIB_DEFINE_TYPE("gi.Repository", PyGIRepository_Type, PyGIRepository);
+
+static PyObject *
+_wrap_g_irepository_enumerate_versions (PyGIRepository *self,
+                                        PyObject       *args,
+                                        PyObject       *kwargs)
+{
+    static char *kwlist[] = { "namespace", NULL };
+    const char *namespace_;
+    GList *versions, *item;
+    PyObject *ret = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs, "s:Repository.enumerate_versions",
+                                      kwlist, &namespace_)) {
+        return NULL;
+    }
+
+    versions = g_irepository_enumerate_versions (self->repository, namespace_);
+    ret = PyList_New(0);
+    for (item = versions; item; item = item->next) {
+        char *version = item->data;
+        PyObject *py_version = PYGLIB_PyUnicode_FromString (version);
+        PyList_Append(ret, py_version);
+        Py_DECREF(py_version);
+        g_free (version);
+    }
+    g_list_free(versions);
+
+    return ret;
+}
+
+static PyObject *
+_wrap_g_irepository_get_default (PyObject *self)
+{
+    static PyGIRepository *repository = NULL;
+
+    if (!repository) {
+        repository = (PyGIRepository *) PyObject_New (PyGIRepository, &PyGIRepository_Type);
+        if (repository == NULL) {
+            return NULL;
+        }
+
+        repository->repository = g_irepository_get_default();
+    }
+
+    Py_INCREF ( (PyObject *) repository);
+    return (PyObject *) repository;
+}
+
+static PyObject *
+_wrap_g_irepository_require (PyGIRepository *self,
+                             PyObject       *args,
+                             PyObject       *kwargs)
+{
+    static char *kwlist[] = { "namespace", "version", "lazy", NULL };
+
+    const char *namespace_;
+    const char *version = NULL;
+    PyObject *lazy = NULL;
+    GIRepositoryLoadFlags flags = 0;
+    GTypelib *typelib;
+    GError *error;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs, "s|zO:Repository.require",
+                                      kwlist, &namespace_, &version, &lazy)) {
+        return NULL;
+    }
+
+    if (lazy != NULL && PyObject_IsTrue (lazy)) {
+        flags |= G_IREPOSITORY_LOAD_FLAG_LAZY;
+    }
+
+    error = NULL;
+    typelib = g_irepository_require (self->repository, namespace_, version, flags, &error);
+    if (error != NULL) {
+        PyErr_SetString (PyGIRepositoryError, error->message);
+        g_error_free (error);
+        return NULL;
+    }
+
+    Py_RETURN_NONE;
+}
+
+static PyObject *
+_wrap_g_irepository_find_by_name (PyGIRepository *self,
+                                  PyObject       *args,
+                                  PyObject       *kwargs)
+{
+    static char *kwlist[] = { "namespace", "name", NULL };
+
+    const char *namespace_;
+    const char *name;
+    GIBaseInfo *info;
+    PyObject *py_info;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+                                      "ss:Repository.find_by_name", kwlist, &namespace_, &name)) {
+        return NULL;
+    }
+
+    info = g_irepository_find_by_name (self->repository, namespace_, name);
+    if (info == NULL) {
+        Py_RETURN_NONE;
+    }
+
+    py_info = _pygi_info_new (info);
+
+    g_base_info_unref (info);
+
+    return py_info;
+}
+
+static PyObject *
+_wrap_g_irepository_get_infos (PyGIRepository *self,
+                               PyObject       *args,
+                               PyObject       *kwargs)
+{
+    static char *kwlist[] = { "namespace", NULL };
+
+    const char *namespace_;
+    gssize n_infos;
+    PyObject *infos;
+    gssize i;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs, "s:Repository.get_infos",
+                                      kwlist, &namespace_)) {
+        return NULL;
+    }
+
+    n_infos = g_irepository_get_n_infos (self->repository, namespace_);
+    if (n_infos < 0) {
+        PyErr_Format (PyExc_RuntimeError, "Namespace '%s' not loaded", namespace_);
+        return NULL;
+    }
+
+    infos = PyTuple_New (n_infos);
+
+    for (i = 0; i < n_infos; i++) {
+        GIBaseInfo *info;
+        PyObject *py_info;
+
+        info = g_irepository_get_info (self->repository, namespace_, i);
+        g_assert (info != NULL);
+
+        py_info = _pygi_info_new (info);
+
+        g_base_info_unref (info);
+
+        if (py_info == NULL) {
+            Py_CLEAR (infos);
+            break;
+        }
+
+        PyTuple_SET_ITEM (infos, i, py_info);
+    }
+
+    return infos;
+}
+
+static PyObject *
+_wrap_g_irepository_get_typelib_path (PyGIRepository *self,
+                                      PyObject       *args,
+                                      PyObject       *kwargs)
+{
+    static char *kwlist[] = { "namespace", NULL };
+    const char *namespace_;
+    const gchar *typelib_path;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+                                      "s:Repository.get_typelib_path", kwlist, &namespace_)) {
+        return NULL;
+    }
+
+    typelib_path = g_irepository_get_typelib_path (self->repository, namespace_);
+    if (typelib_path == NULL) {
+        PyErr_Format (PyExc_RuntimeError, "Namespace '%s' not loaded", namespace_);
+        return NULL;
+    }
+
+    return PYGLIB_PyBytes_FromString (typelib_path);
+}
+
+static PyObject *
+_wrap_g_irepository_get_version (PyGIRepository *self,
+                                 PyObject       *args,
+                                 PyObject       *kwargs)
+{
+    static char *kwlist[] = { "namespace", NULL };
+    const char *namespace_;
+    const gchar *version;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+                                      "s:Repository.get_version", kwlist, &namespace_)) {
+        return NULL;
+    }
+
+    version = g_irepository_get_version (self->repository, namespace_);
+    if (version == NULL) {
+        PyErr_Format (PyExc_RuntimeError, "Namespace '%s' not loaded", namespace_);
+        return NULL;
+    }
+
+    return PYGLIB_PyUnicode_FromString (version);
+}
+
+static PyObject *
+_wrap_g_irepository_get_loaded_namespaces (PyGIRepository *self)
+{
+    char **namespaces;
+    PyObject *py_namespaces;
+    gssize i;
+
+    namespaces = g_irepository_get_loaded_namespaces (self->repository);
+
+    py_namespaces = PyList_New (0);
+    for (i = 0; namespaces[i] != NULL; i++) {
+        PyObject *py_namespace = PYGLIB_PyUnicode_FromString (namespaces[i]);
+        PyList_Append (py_namespaces, py_namespace);
+        Py_DECREF(py_namespace);
+        g_free (namespaces[i]);
+    }
+
+    g_free (namespaces);
+
+    return py_namespaces;
+}
+
+static PyMethodDef _PyGIRepository_methods[] = {
+    { "enumerate_versions", (PyCFunction) _wrap_g_irepository_enumerate_versions, METH_VARARGS | METH_KEYWORDS },
+    { "get_default", (PyCFunction) _wrap_g_irepository_get_default, METH_STATIC | METH_NOARGS },
+    { "require", (PyCFunction) _wrap_g_irepository_require, METH_VARARGS | METH_KEYWORDS },
+    { "get_infos", (PyCFunction) _wrap_g_irepository_get_infos, METH_VARARGS | METH_KEYWORDS },
+    { "find_by_name", (PyCFunction) _wrap_g_irepository_find_by_name, METH_VARARGS | METH_KEYWORDS },
+    { "get_typelib_path", (PyCFunction) _wrap_g_irepository_get_typelib_path, METH_VARARGS | METH_KEYWORDS },
+    { "get_version", (PyCFunction) _wrap_g_irepository_get_version, METH_VARARGS | METH_KEYWORDS },
+    { "get_loaded_namespaces", (PyCFunction) _wrap_g_irepository_get_loaded_namespaces, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+void
+_pygi_repository_register_types (PyObject *m)
+{
+    Py_TYPE(&PyGIRepository_Type) = &PyType_Type;
+
+    PyGIRepository_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+    PyGIRepository_Type.tp_methods = _PyGIRepository_methods;
+
+    if (PyType_Ready (&PyGIRepository_Type)) {
+        return;
+    }
+
+    if (PyModule_AddObject (m, "Repository", (PyObject *) &PyGIRepository_Type)) {
+        return;
+    }
+
+    PyGIRepositoryError = PyErr_NewException ("gi.RepositoryError", NULL, NULL);
+    if (PyModule_AddObject (m, "RepositoryError", PyGIRepositoryError)) {
+        return;
+    }
+}
+
diff --git a/gi/pygi-repository.h b/gi/pygi-repository.h
new file mode 100644 (file)
index 0000000..d8eb8cf
--- /dev/null
@@ -0,0 +1,39 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_REPOSITORY_H__
+#define __PYGI_REPOSITORY_H__
+
+#include <Python.h>
+
+G_BEGIN_DECLS
+
+/* Private */
+
+extern PyTypeObject PyGIRepository_Type;
+
+extern PyObject *PyGIRepositoryError;
+
+void _pygi_repository_register_types (PyObject *m);
+
+G_END_DECLS
+
+#endif /* __PYGI_REPOSITORY_H__ */
diff --git a/gi/pygi-signal-closure.c b/gi/pygi-signal-closure.c
new file mode 100644 (file)
index 0000000..1482529
--- /dev/null
@@ -0,0 +1,245 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2011  Laszlo Pandy <lpandy@src.gnome.org>
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygi-private.h"
+
+/* Copied from glib */
+static void
+canonicalize_key (gchar *key)
+{
+    gchar *p;
+
+    for (p = key; *p != 0; p++)
+    {
+        gchar c = *p;
+
+        if (c != '-' &&
+            (c < '0' || c > '9') &&
+            (c < 'A' || c > 'Z') &&
+            (c < 'a' || c > 'z'))
+                *p = '-';
+    }
+}
+
+static GISignalInfo *
+_pygi_lookup_signal_from_g_type (GType g_type,
+                                 const gchar *signal_name)
+{
+    GIRepository *repository;
+    GIBaseInfo *info;
+    gssize n_infos;
+    gssize i;
+    GType parent;
+
+    repository = g_irepository_get_default();
+    info = g_irepository_find_by_gtype (repository, g_type);
+    if (info != NULL) {
+        n_infos = g_object_info_get_n_signals ( (GIObjectInfo *) info);
+        for (i = 0; i < n_infos; i++) {
+            GISignalInfo *signal_info;
+
+            signal_info = g_object_info_get_signal ( (GIObjectInfo *) info, i);
+            g_assert (info != NULL);
+
+            if (strcmp (signal_name, g_base_info_get_name (signal_info)) == 0) {
+                g_base_info_unref (info);
+                return signal_info;
+            }
+
+            g_base_info_unref (signal_info);
+        }
+
+        g_base_info_unref (info);
+    }
+
+    parent = g_type_parent (g_type);
+    if (parent > 0)
+        return _pygi_lookup_signal_from_g_type (parent, signal_name);
+
+    return NULL;
+}
+
+static void
+pygi_signal_closure_invalidate(gpointer data,
+                               GClosure *closure)
+{
+    PyGClosure *pc = (PyGClosure *)closure;
+    PyGILState_STATE state;
+
+    state = PyGILState_Ensure();
+    Py_XDECREF(pc->callback);
+    Py_XDECREF(pc->extra_args);
+    Py_XDECREF(pc->swap_data);
+    PyGILState_Release(state);
+
+    pc->callback = NULL;
+    pc->extra_args = NULL;
+    pc->swap_data = NULL;
+
+    g_base_info_unref (((PyGISignalClosure *) pc)->signal_info);
+    ((PyGISignalClosure *) pc)->signal_info = NULL;
+}
+
+static void
+pygi_signal_closure_marshal(GClosure *closure,
+                            GValue *return_value,
+                            guint n_param_values,
+                            const GValue *param_values,
+                            gpointer invocation_hint,
+                            gpointer marshal_data)
+{
+    PyGILState_STATE state;
+    PyGClosure *pc = (PyGClosure *)closure;
+    PyObject *params, *ret = NULL;
+    guint i;
+    GISignalInfo *signal_info;
+    gint n_sig_info_args;
+    gint sig_info_highest_arg;
+
+    state = PyGILState_Ensure();
+
+    signal_info = ((PyGISignalClosure *)closure)->signal_info;
+    n_sig_info_args = g_callable_info_get_n_args(signal_info);
+    /* the first argument to a signal callback is instance,
+       but instance is not counted in the introspection data */
+    sig_info_highest_arg = n_sig_info_args + 1;
+    g_assert_cmpint(sig_info_highest_arg, ==, n_param_values);
+
+    /* construct Python tuple for the parameter values */
+    params = PyTuple_New(n_param_values);
+    for (i = 0; i < n_param_values; i++) {
+        /* swap in a different initial data for connect_object() */
+        if (i == 0 && G_CCLOSURE_SWAP_DATA(closure)) {
+            g_return_if_fail(pc->swap_data != NULL);
+            Py_INCREF(pc->swap_data);
+            PyTuple_SetItem(params, 0, pc->swap_data);
+
+        } else if (i == 0) {
+            PyObject *item = pyg_value_as_pyobject(&param_values[i], FALSE);
+
+            if (!item) {
+                goto out;
+            }
+            PyTuple_SetItem(params, i, item);
+
+        } else if (i < sig_info_highest_arg) {
+            GIArgInfo arg_info;
+            GITypeInfo type_info;
+            GITransfer transfer;
+            GIArgument arg = { 0, };
+            PyObject *item = NULL;
+
+            g_callable_info_load_arg(signal_info, i - 1, &arg_info);
+            g_arg_info_load_type(&arg_info, &type_info);
+            transfer = g_arg_info_get_ownership_transfer(&arg_info);
+
+            arg = _pygi_argument_from_g_value(&param_values[i], &type_info);
+            item = _pygi_argument_to_object(&arg, &type_info, transfer);
+
+            if (item == NULL) {
+                goto out;
+            }
+            PyTuple_SetItem(params, i, item);
+        }
+    }
+    /* params passed to function may have extra arguments */
+    if (pc->extra_args) {
+        PyObject *tuple = params;
+        params = PySequence_Concat(tuple, pc->extra_args);
+        Py_DECREF(tuple);
+    }
+    ret = PyObject_CallObject(pc->callback, params);
+    if (ret == NULL) {
+        if (pc->exception_handler)
+            pc->exception_handler(return_value, n_param_values, param_values);
+        else
+            PyErr_Print();
+        goto out;
+    }
+
+    if (return_value && pyg_value_from_pyobject(return_value, ret) != 0) {
+        PyErr_SetString(PyExc_TypeError,
+                        "can't convert return value to desired type");
+
+        if (pc->exception_handler)
+            pc->exception_handler(return_value, n_param_values, param_values);
+        else
+            PyErr_Print();
+    }
+    Py_DECREF(ret);
+
+ out:
+    Py_DECREF(params);
+    PyGILState_Release(state);
+}
+
+GClosure *
+pygi_signal_closure_new_real (PyGObject *instance,
+                              const gchar *sig_name,
+                              PyObject *callback,
+                              PyObject *extra_args,
+                              PyObject *swap_data)
+{
+    GClosure *closure = NULL;
+    PyGISignalClosure *pygi_closure = NULL;
+    GType g_type;
+    GISignalInfo *signal_info = NULL;
+    char *signal_name = g_strdup (sig_name);
+
+    g_return_val_if_fail(callback != NULL, NULL);
+
+    canonicalize_key(signal_name);
+
+    g_type = pyg_type_from_object ((PyObject *)instance);
+    signal_info = _pygi_lookup_signal_from_g_type (g_type, signal_name);
+
+    if (signal_info == NULL)
+        goto out;
+
+    closure = g_closure_new_simple(sizeof(PyGISignalClosure), NULL);
+    g_closure_add_invalidate_notifier(closure, NULL, pygi_signal_closure_invalidate);
+    g_closure_set_marshal(closure, pygi_signal_closure_marshal);
+
+    pygi_closure = (PyGISignalClosure *)closure;
+
+    pygi_closure->signal_info = signal_info;
+    Py_INCREF(callback);
+    pygi_closure->pyg_closure.callback = callback;
+
+    if (extra_args != NULL && extra_args != Py_None) {
+        Py_INCREF(extra_args);
+        if (!PyTuple_Check(extra_args)) {
+            PyObject *tmp = PyTuple_New(1);
+            PyTuple_SetItem(tmp, 0, extra_args);
+            extra_args = tmp;
+        }
+        pygi_closure->pyg_closure.extra_args = extra_args;
+    }
+    if (swap_data) {
+        Py_INCREF(swap_data);
+        pygi_closure->pyg_closure.swap_data = swap_data;
+        closure->derivative_flag = TRUE;
+    }
+
+out:
+    g_free (signal_name);
+
+    return closure;
+}
diff --git a/gi/pygi-signal-closure.h b/gi/pygi-signal-closure.h
new file mode 100644 (file)
index 0000000..4687f3f
--- /dev/null
@@ -0,0 +1,46 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2011  Laszlo Pandy <lpandy@src.gnome.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __PYGI_SIGNAL_CLOSURE_H__
+#define __PYGI_SIGNAL_CLOSURE_H__
+
+#include "pygi.h"
+
+G_BEGIN_DECLS
+
+/* Private */
+typedef struct _PyGISignalClosure
+{
+    PyGClosure pyg_closure;
+    GISignalInfo *signal_info;
+} PyGISignalClosure;
+
+GClosure * pygi_signal_closure_new_real (PyGObject *instance,
+                                         const gchar *sig_name,
+                                         PyObject *callback,
+                                         PyObject *extra_args,
+                                         PyObject *swap_data);
+
+G_END_DECLS
+
+#endif /* __PYGI_SIGNAL_CLOSURE_H__ */
diff --git a/gi/pygi-struct.c b/gi/pygi-struct.c
new file mode 100644 (file)
index 0000000..c2e1f4d
--- /dev/null
@@ -0,0 +1,146 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2009 Simon van der Linden <svdlinden@src.gnome.org>
+ *
+ *   pygi-struct.c: wrapper to handle non-registered structures.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygi-private.h"
+
+#include <pygobject.h>
+#include <girepository.h>
+#include <pyglib-python-compat.h>
+
+static void
+_struct_dealloc (PyGIStruct *self)
+{
+    GIBaseInfo *info = _pygi_object_get_gi_info (
+                           (PyObject *) self,
+                           &PyGIStructInfo_Type);
+
+    PyObject_GC_UnTrack ( (PyObject *) self);
+
+    PyObject_ClearWeakRefs ( (PyObject *) self);
+
+    if (info != NULL && g_struct_info_is_foreign ( (GIStructInfo *) info)) {
+        pygi_struct_foreign_release (info, ( (PyGPointer *) self)->pointer);
+    } else if (self->free_on_dealloc) {
+        g_free ( ( (PyGPointer *) self)->pointer);
+    }
+
+    g_base_info_unref (info);
+
+    Py_TYPE( (PyGPointer *) self )->tp_free ( (PyObject *) self);
+}
+
+static PyObject *
+_struct_new (PyTypeObject *type,
+             PyObject     *args,
+             PyObject     *kwargs)
+{
+    static char *kwlist[] = { NULL };
+
+    GIBaseInfo *info;
+    gsize size;
+    gpointer pointer;
+    PyObject *self = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs, "", kwlist)) {
+        return NULL;
+    }
+
+    info = _pygi_object_get_gi_info ( (PyObject *) type, &PyGIStructInfo_Type);
+    if (info == NULL) {
+        if (PyErr_ExceptionMatches (PyExc_AttributeError)) {
+            PyErr_Format (PyExc_TypeError, "missing introspection information");
+        }
+        return NULL;
+    }
+
+    size = g_struct_info_get_size ( (GIStructInfo *) info);
+    pointer = g_try_malloc0 (size);
+    if (pointer == NULL) {
+        PyErr_NoMemory();
+        goto out;
+    }
+
+    self = _pygi_struct_new (type, pointer, TRUE);
+    if (self == NULL) {
+        g_free (pointer);
+    }
+
+out:
+    g_base_info_unref (info);
+
+    return (PyObject *) self;
+}
+
+static int
+_struct_init (PyObject *self,
+              PyObject *args,
+              PyObject *kwargs)
+{
+    /* Don't call PyGPointer's init, which raises an exception. */
+    return 0;
+}
+
+PYGLIB_DEFINE_TYPE("gi.Struct", PyGIStruct_Type, PyGIStruct);
+
+PyObject *
+_pygi_struct_new (PyTypeObject *type,
+                  gpointer      pointer,
+                  gboolean      free_on_dealloc)
+{
+    PyGIStruct *self;
+    GType g_type;
+
+    if (!PyType_IsSubtype (type, &PyGIStruct_Type)) {
+        PyErr_SetString (PyExc_TypeError, "must be a subtype of gi.Struct");
+        return NULL;
+    }
+
+    self = (PyGIStruct *) type->tp_alloc (type, 0);
+    if (self == NULL) {
+        return NULL;
+    }
+
+    g_type = pyg_type_from_object ( (PyObject *) type);
+
+    ( (PyGPointer *) self)->gtype = g_type;
+    ( (PyGPointer *) self)->pointer = pointer;
+    self->free_on_dealloc = free_on_dealloc;
+
+    return (PyObject *) self;
+}
+
+void
+_pygi_struct_register_types (PyObject *m)
+{
+    Py_TYPE(&PyGIStruct_Type) = &PyType_Type;
+    PyGIStruct_Type.tp_base = &PyGPointer_Type;
+    PyGIStruct_Type.tp_new = (newfunc) _struct_new;
+    PyGIStruct_Type.tp_init = (initproc) _struct_init;
+    PyGIStruct_Type.tp_dealloc = (destructor) _struct_dealloc;
+    PyGIStruct_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);
+
+    if (PyType_Ready (&PyGIStruct_Type))
+        return;
+    if (PyModule_AddObject (m, "Struct", (PyObject *) &PyGIStruct_Type))
+        return;
+}
diff --git a/gi/pygi-struct.h b/gi/pygi-struct.h
new file mode 100644 (file)
index 0000000..963d05a
--- /dev/null
@@ -0,0 +1,40 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2009 Simon van der Linden <svdlinden@src.gnome.org>
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_STRUCT_H__
+#define __PYGI_STRUCT_H__
+
+#include <Python.h>
+
+G_BEGIN_DECLS
+
+extern PyTypeObject PyGIStruct_Type;
+
+PyObject *
+_pygi_struct_new (PyTypeObject *type,
+                  gpointer      pointer,
+                  gboolean      free_on_dealloc);
+
+void _pygi_struct_register_types (PyObject *m);
+
+G_END_DECLS
+
+#endif /* __PYGI_STRUCT_H__ */
diff --git a/gi/pygi-type.c b/gi/pygi-type.c
new file mode 100644 (file)
index 0000000..129ea98
--- /dev/null
@@ -0,0 +1,99 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2009 Simon van der Linden <svdlinden@src.gnome.org>
+ *
+ *   pygi-type.c: helpers to lookup Python wrappers from GType and GIBaseInfo.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygi-private.h"
+
+
+PyObject *
+_pygi_type_import_by_name (const char *namespace_,
+                           const char *name)
+{
+    gchar *module_name;
+    PyObject *py_module;
+    PyObject *py_object;
+
+    module_name = g_strconcat ("gi.repository.", namespace_, NULL);
+
+    py_module = PyImport_ImportModule (module_name);
+
+    g_free (module_name);
+
+    if (py_module == NULL) {
+        return NULL;
+    }
+
+    py_object = PyObject_GetAttrString (py_module, name);
+
+    Py_DECREF (py_module);
+
+    return py_object;
+}
+
+PyObject *
+pygi_type_import_by_g_type_real (GType g_type)
+{
+    GIRepository *repository;
+    GIBaseInfo *info;
+    PyObject *type;
+
+    repository = g_irepository_get_default();
+
+    info = g_irepository_find_by_gtype (repository, g_type);
+    if (info == NULL) {
+        return NULL;
+    }
+
+    type = _pygi_type_import_by_gi_info (info);
+    g_base_info_unref (info);
+
+    return type;
+}
+
+PyObject *
+_pygi_type_import_by_gi_info (GIBaseInfo *info)
+{
+    return _pygi_type_import_by_name (g_base_info_get_namespace (info),
+                                      g_base_info_get_name (info));
+}
+
+PyObject *
+_pygi_type_get_from_g_type (GType g_type)
+{
+    PyObject *py_g_type;
+    PyObject *py_type;
+
+    py_g_type = pyg_type_wrapper_new (g_type);
+    if (py_g_type == NULL) {
+        return NULL;
+    }
+
+    py_type = PyObject_GetAttrString (py_g_type, "pytype");
+    if (py_type == Py_None) {
+        py_type = pygi_type_import_by_g_type_real (g_type);
+    }
+
+    Py_DECREF (py_g_type);
+
+    return py_type;
+}
+
diff --git a/gi/pygi-type.h b/gi/pygi-type.h
new file mode 100644 (file)
index 0000000..bb43d19
--- /dev/null
@@ -0,0 +1,45 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2009 Simon van der Linden <svdlinden@src.gnome.org>
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_TYPE_H__
+#define __PYGI_TYPE_H__
+
+#include <Python.h>
+
+G_BEGIN_DECLS
+
+/* Public */
+
+PyObject *pygi_type_import_by_g_type_real (GType g_type);
+
+
+/* Private */
+
+PyObject *_pygi_type_import_by_name (const char *namespace_, const char *name);
+
+PyObject *_pygi_type_import_by_gi_info (GIBaseInfo *info);
+
+PyObject *_pygi_type_get_from_g_type (GType g_type);
+
+
+G_END_DECLS
+
+#endif /* __PYGI_TYPE_H__ */
diff --git a/gi/pygi.h b/gi/pygi.h
new file mode 100644 (file)
index 0000000..1c3bf5e
--- /dev/null
+++ b/gi/pygi.h
@@ -0,0 +1,208 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGI_H__
+#define __PYGI_H__
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#define NO_IMPORT_PYGOBJECT
+#include <pygobject.h>
+
+#if ENABLE_INTROSPECTION
+
+#include <girepository.h>
+
+typedef struct {
+    PyObject_HEAD
+    GIRepository *repository;
+} PyGIRepository;
+
+typedef struct {
+    PyObject_HEAD
+    GIBaseInfo *info;
+    PyObject *inst_weakreflist;
+} PyGIBaseInfo;
+
+typedef struct {
+    PyGPointer base;
+    gboolean free_on_dealloc;
+} PyGIStruct;
+
+typedef struct {
+    PyGBoxed base;
+    gboolean slice_allocated;
+    gsize size;
+} PyGIBoxed;
+
+typedef PyObject * (*PyGIArgOverrideToGIArgumentFunc) (PyObject       *value,
+                                                      GITypeInfo     *type_info,
+                                                      GITransfer      transfer,
+                                                      GIArgument      *arg);
+typedef PyObject * (*PyGIArgOverrideFromGIArgumentFunc) (GITypeInfo *type_info,
+                                                         gpointer    data);
+typedef PyObject * (*PyGIArgOverrideReleaseFunc) (GITypeInfo *type_info,
+                                                  gpointer  struct_);
+
+struct PyGI_API {
+    PyObject* (*type_import_by_g_type) (GType g_type);
+    PyObject* (*get_property_value) (PyGObject *instance,
+                                     const gchar *attr_name);
+    gint (*set_property_value) (PyGObject *instance,
+                                const gchar *attr_name,
+                                PyObject *value);
+    GClosure * (*signal_closure_new) (PyGObject *instance,
+                                      const gchar *sig_name,
+                                      PyObject *callback,
+                                      PyObject *extra_args,
+                                      PyObject *swap_data);
+    void (*register_foreign_struct) (const char* namespace_,
+                                     const char* name,
+                                     PyGIArgOverrideToGIArgumentFunc to_func,
+                                     PyGIArgOverrideFromGIArgumentFunc from_func,
+                                     PyGIArgOverrideReleaseFunc release_func);
+};
+
+static struct PyGI_API *PyGI_API = NULL;
+
+static int
+_pygi_import (void)
+{
+    PyObject *modules_dict;
+
+    if (PyGI_API != NULL) {
+        return 1;
+    }
+
+    modules_dict = PyImport_GetModuleDict(); /* borrowed reference -- don't unref */
+    if (PyMapping_HasKeyString(modules_dict, "gi")) {
+#if PY_VERSION_HEX >= 0x03000000
+        PyGI_API = (struct PyGI_API*) PyCapsule_Import("gi._API", FALSE);
+#else
+        PyGI_API = (struct PyGI_API*) PyCObject_Import("gi", "_API");
+#endif
+    }
+    if (PyGI_API == NULL) {
+        return -1;
+    }
+
+    return 0;
+}
+
+static inline PyObject *
+pygi_type_import_by_g_type (GType g_type)
+{
+    if (_pygi_import() < 0) {
+        return NULL;
+    }
+    return PyGI_API->type_import_by_g_type(g_type);
+}
+
+static inline PyObject *
+pygi_get_property_value (PyGObject *instance,
+                         const gchar *attr_name)
+{
+    if (_pygi_import() < 0) {
+        return NULL;
+    }
+    return PyGI_API->get_property_value(instance, attr_name);
+}
+
+static inline gint
+pygi_set_property_value (PyGObject *instance,
+                         const gchar *attr_name,
+                         PyObject *value)
+{
+    if (_pygi_import() < 0) {
+        return -1;
+    }
+    return PyGI_API->set_property_value(instance, attr_name, value);
+}
+
+static inline GClosure *
+pygi_signal_closure_new (PyGObject *instance,
+                         const gchar *sig_name,
+                         PyObject *callback,
+                         PyObject *extra_args,
+                         PyObject *swap_data)
+{
+    if (_pygi_import() < 0) {
+        return NULL;
+    }
+    return PyGI_API->signal_closure_new(instance, sig_name, callback, extra_args, swap_data);
+}
+
+static inline PyObject *
+pygi_register_foreign_struct (const char* namespace_,
+                              const char* name,
+                              PyGIArgOverrideToGIArgumentFunc to_func,
+                              PyGIArgOverrideFromGIArgumentFunc from_func,
+                              PyGIArgOverrideReleaseFunc release_func)
+{
+    if (_pygi_import() < 0) {
+        return NULL;
+    }
+    PyGI_API->register_foreign_struct(namespace_,
+                                      name,
+                                      to_func,
+                                      from_func,
+                                      release_func);
+    Py_RETURN_NONE;
+}
+
+#else /* ENABLE_INTROSPECTION */
+
+static inline PyObject *
+pygi_type_import_by_g_type (GType g_type)
+{
+    return NULL;
+}
+
+static inline PyObject *
+pygi_get_property_value (PyGObject *instance,
+                         const gchar *attr_name)
+{
+    return NULL;
+}
+
+static inline gint
+pygi_set_property_value (PyGObject *instance,
+                         const gchar *attr_name,
+                         PyObject *value)
+{
+    return -1;
+}
+
+static inline GClosure *
+pygi_signal_closure_new (PyGObject *instance,
+                         const gchar *sig_name,
+                         PyObject *callback,
+                         PyObject *extra_args,
+                         PyObject *swap_data)
+{
+    return NULL;
+}
+
+#endif /* ENABLE_INTROSPECTION */
+
+#endif /* __PYGI_H__ */
diff --git a/gi/pygobject-external.h b/gi/pygobject-external.h
new file mode 100644 (file)
index 0000000..00b8b6f
--- /dev/null
@@ -0,0 +1,83 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * vim: tabstop=4 shiftwidth=4 expandtab
+ *
+ * Copyright (C) 2009 Simon van der Linden <svdlinden@src.gnome.org>
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_EXTERN_H__
+#define __PYGOBJECT_EXTERN_H__
+
+#include <Python.h>
+
+G_BEGIN_DECLS
+
+static PyTypeObject *_PyGObject_Type;
+static PyTypeObject *_PyGTypeWrapper_Type;
+
+#define PyGObject_Type (*_PyGObject_Type)
+#define PyGTypeWrapper_Type (*_PyGTypeWrapper_Type)
+
+__attribute__ ( (unused))
+static int
+_pygobject_import (void)
+{
+    static gboolean imported = FALSE;
+    PyObject *from_list;
+    PyObject *module;
+    int retval = 0;
+
+    if (imported) {
+        return 1;
+    }
+
+    from_list = Py_BuildValue ("(ss)", "GObject", "GTypeWrapper");
+    if (from_list == NULL) {
+        return -1;
+    }
+
+    module = PyImport_ImportModuleEx ("gobject", NULL, NULL, from_list);
+
+    Py_DECREF (from_list);
+
+    if (module == NULL) {
+        return -1;
+    }
+
+    _PyGObject_Type = (PyTypeObject *) PyObject_GetAttrString (module, "GObject");
+    if (_PyGObject_Type == NULL) {
+        retval = -1;
+        goto out;
+    }
+
+    _PyGTypeWrapper_Type = (PyTypeObject *) PyObject_GetAttrString (module, "GType");
+    if (_PyGTypeWrapper_Type == NULL) {
+        retval = -1;
+        goto out;
+    }
+
+    imported = TRUE;
+
+out:
+    Py_DECREF (module);
+
+    return retval;
+}
+
+G_END_DECLS
+
+#endif /* __PYGOBJECT_EXTERN_H__ */
diff --git a/gi/repository/Makefile.am b/gi/repository/Makefile.am
new file mode 100644 (file)
index 0000000..ece9c4f
--- /dev/null
@@ -0,0 +1,10 @@
+PLATFORM_VERSION = 2.0
+
+pkgpyexecdir = $(pyexecdir)/gi
+
+pygirepositorydir = $(pkgpyexecdir)/repository
+pygirepository_PYTHON = \
+       __init__.py
+
+
+-include $(top_srcdir)/git.mk
diff --git a/gi/repository/Makefile.in b/gi/repository/Makefile.in
new file mode 100644 (file)
index 0000000..7da2e99
--- /dev/null
@@ -0,0 +1,478 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = gi/repository
+DIST_COMMON = $(pygirepository_PYTHON) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+       $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pygirepositorydir)"
+py_compile = $(top_srcdir)/py-compile
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
+GI_LIBS = @GI_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PLATFORM = @PLATFORM@
+PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
+PYCAIRO_LIBS = @PYCAIRO_LIBS@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = $(pyexecdir)/gi
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+PLATFORM_VERSION = 2.0
+pygirepositorydir = $(pkgpyexecdir)/repository
+pygirepository_PYTHON = \
+       __init__.py
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gi/repository/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign gi/repository/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-pygirepositoryPYTHON: $(pygirepository_PYTHON)
+       @$(NORMAL_INSTALL)
+       test -z "$(pygirepositorydir)" || $(MKDIR_P) "$(DESTDIR)$(pygirepositorydir)"
+       @list='$(pygirepository_PYTHON)'; dlist=; list2=; test -n "$(pygirepositorydir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+         if test -f $$b$$p; then \
+           $(am__strip_dir) \
+           dlist="$$dlist $$f"; \
+           list2="$$list2 $$b$$p"; \
+         else :; fi; \
+       done; \
+       for file in $$list2; do echo $$file; done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pygirepositorydir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pygirepositorydir)" || exit $$?; \
+       done || exit $$?; \
+       if test -n "$$dlist"; then \
+         if test -z "$(DESTDIR)"; then \
+           PYTHON=$(PYTHON) $(py_compile) --basedir "$(pygirepositorydir)" $$dlist; \
+         else \
+           PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pygirepositorydir)" $$dlist; \
+         fi; \
+       else :; fi
+
+uninstall-pygirepositoryPYTHON:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pygirepository_PYTHON)'; test -n "$(pygirepositorydir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       filesc=`echo "$$files" | sed 's|$$|c|'`; \
+       fileso=`echo "$$files" | sed 's|$$|o|'`; \
+       echo " ( cd '$(DESTDIR)$(pygirepositorydir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pygirepositorydir)" && rm -f $$files || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pygirepositorydir)' && rm -f" $$filesc ")"; \
+       cd "$(DESTDIR)$(pygirepositorydir)" && rm -f $$filesc || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pygirepositorydir)' && rm -f" $$fileso ")"; \
+       cd "$(DESTDIR)$(pygirepositorydir)" && rm -f $$fileso
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$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
+installdirs:
+       for dir in "$(DESTDIR)$(pygirepositorydir)"; 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:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pygirepositoryPYTHON
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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-pygirepositoryPYTHON
+
+.MAKE: install-am install-strip
+
+.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-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am \
+       install-pygirepositoryPYTHON 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-pygirepositoryPYTHON
+
+
+-include $(top_srcdir)/git.mk
+
+# 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:
diff --git a/gi/repository/__init__.py b/gi/repository/__init__.py
new file mode 100644 (file)
index 0000000..5c5552a
--- /dev/null
@@ -0,0 +1,30 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+#
+# Copyright (C) 2009 Johan Dahlin <johan@gnome.org>
+#
+# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+from __future__ import absolute_import
+
+import sys
+
+from ..importer import DynamicImporter
+
+sys.meta_path.append(DynamicImporter('gi.repository'))
+
+del DynamicImporter
+del sys
diff --git a/gi/types.py b/gi/types.py
new file mode 100644 (file)
index 0000000..210fdc1
--- /dev/null
@@ -0,0 +1,301 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+#
+# Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
+#
+#   types.py: base types for introspected items.
+#
+# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+# USA
+
+from __future__ import absolute_import
+
+import sys
+import gobject
+
+from ._gi import \
+    InterfaceInfo, \
+    ObjectInfo, \
+    StructInfo, \
+    VFuncInfo, \
+    set_object_has_new_constructor, \
+    register_interface_info, \
+    hook_up_vfunc_implementation
+
+if sys.version_info > (3, 0):
+    def callable(obj):
+        return hasattr(obj, '__call__')
+
+def Function(info):
+
+    def function(*args):
+        return info.invoke(*args)
+    function.__info__ = info
+    function.__name__ = info.get_name()
+    function.__module__ = info.get_namespace()
+
+    return function
+
+
+def NativeVFunc(info, cls):
+
+    def native_vfunc(*args):
+        return info.invoke(*args, **dict(gtype=cls.__gtype__))
+    native_vfunc.__info__ = info
+    native_vfunc.__name__ = info.get_name()
+    native_vfunc.__module__ = info.get_namespace()
+
+    return native_vfunc
+
+def Constructor(info):
+
+    def constructor(cls, *args):
+        cls_name = info.get_container().get_name()
+        if cls.__name__ != cls_name:
+            raise TypeError('%s constructor cannot be used to create instances of a subclass' % cls_name)
+        return info.invoke(cls, *args)
+
+    constructor.__info__ = info
+    constructor.__name__ = info.get_name()
+    constructor.__module__ = info.get_namespace()
+
+    return constructor
+
+
+class MetaClassHelper(object):
+
+    def _setup_constructors(cls):
+        for method_info in cls.__info__.get_methods():
+            if method_info.is_constructor():
+                name = method_info.get_name()
+                constructor = classmethod(Constructor(method_info))
+                setattr(cls, name, constructor)
+
+    def _setup_methods(cls):
+        for method_info in cls.__info__.get_methods():
+            name = method_info.get_name()
+            function = Function(method_info)
+            if method_info.is_method():
+                method = function
+            elif method_info.is_constructor():
+                continue
+            else:
+                method = staticmethod(function)
+            setattr(cls, name, method)
+
+    def _setup_fields(cls):
+        for field_info in cls.__info__.get_fields():
+            name = field_info.get_name().replace('-', '_')
+            setattr(cls, name, property(field_info.get_value, field_info.set_value))
+
+    def _setup_constants(cls):
+        for constant_info in cls.__info__.get_constants():
+            name = constant_info.get_name()
+            value = constant_info.get_value()
+            setattr(cls, name, value)
+
+    def _setup_vfuncs(cls):
+        for vfunc_name, py_vfunc in cls.__dict__.items():
+            if not vfunc_name.startswith("do_") or not callable(py_vfunc):
+                continue
+
+            # If a method name starts with "do_" assume it is a vfunc, and search
+            # in the base classes for a method with the same name to override.
+            # Recursion is not necessary here because getattr() searches all
+            # super class attributes as well.
+            vfunc_info = None
+            for base in cls.__bases__:
+                method = getattr(base, vfunc_name, None)
+                if method is not None and hasattr(method, '__info__') and \
+                        isinstance(method.__info__, VFuncInfo):
+                    vfunc_info = method.__info__
+                    break
+
+            # If we did not find a matching method name in the bases, we might
+            # be overriding an interface virtual method. Since interfaces do not
+            # provide implementations, there will be no method attribute installed
+            # on the object. Instead we have to search through
+            # InterfaceInfo.get_vfuncs(). Note that the infos returned by
+            # get_vfuncs() use the C vfunc name (ie. there is no "do_" prefix).
+            if vfunc_info is None:
+                vfunc_info = find_vfunc_info_in_interface(cls.__bases__, vfunc_name[len("do_"):])
+
+            if vfunc_info is not None:
+                assert vfunc_name == ('do_' + vfunc_info.get_name())
+                # Check to see if there are vfuncs with the same name in the bases.
+                # We have no way of specifying which one we are supposed to override.
+                ambiguous_base = find_vfunc_conflict_in_bases(vfunc_info, cls.__bases__)
+                if ambiguous_base is not None:
+                    base_info = vfunc_info.get_container()
+                    raise TypeError('Method %s() on class %s.%s is ambiguous '
+                            'with methods in base classes %s.%s and %s.%s' %
+                            (vfunc_name,
+                             cls.__info__.get_namespace(),
+                             cls.__info__.get_name(),
+                             base_info.get_namespace(),
+                             base_info.get_name(),
+                             ambiguous_base.__info__.get_namespace(),
+                             ambiguous_base.__info__.get_name()))
+
+                hook_up_vfunc_implementation(vfunc_info, cls.__gtype__,
+                                             py_vfunc)
+
+    def _setup_native_vfuncs(cls):
+        # Only InterfaceInfo and ObjectInfo have the get_vfuncs() method.
+        # We skip InterfaceInfo because interfaces have no implementations for vfuncs.
+        # Also check if __info__ in __dict__, not hasattr('__info__', ...)
+        # because we do not want to accidentally retrieve __info__ from a base class.
+        class_info = cls.__dict__.get('__info__')
+        if class_info is None or not isinstance(class_info, ObjectInfo):
+            return
+
+        for vfunc_info in class_info.get_vfuncs():
+            name = 'do_%s' % vfunc_info.get_name()
+            value = NativeVFunc(vfunc_info, cls)
+            setattr(cls, name, value)
+
+def find_vfunc_info_in_interface(bases, vfunc_name):
+    for base in bases:
+        # All wrapped interfaces inherit from GInterface.
+        # This can be seen in IntrospectionModule.__getattr__() in module.py.
+        # We do not need to search regular classes here, only wrapped interfaces.
+        # We also skip GInterface, because it is not wrapped and has no __info__ attr.
+        if base is gobject.GInterface or\
+                not issubclass(base, gobject.GInterface) or\
+                not isinstance(base.__info__, InterfaceInfo):
+            continue
+
+        for vfunc in base.__info__.get_vfuncs():
+            if vfunc.get_name() == vfunc_name:
+                return vfunc
+
+        vfunc = find_vfunc_info_in_interface(base.__bases__, vfunc_name)
+        if vfunc is not None:
+            return vfunc
+
+    return None
+
+def find_vfunc_conflict_in_bases(vfunc, bases):
+    for klass in bases:
+        if not hasattr(klass, '__info__') or \
+                not hasattr(klass.__info__, 'get_vfuncs'):
+            continue
+        vfuncs = klass.__info__.get_vfuncs()
+        vfunc_name = vfunc.get_name()
+        for v in vfuncs:
+            if v.get_name() == vfunc_name and v != vfunc:
+                return klass
+
+        aklass = find_vfunc_conflict_in_bases(vfunc, klass.__bases__)
+        if aklass is not None:
+            return aklass
+    return None
+
+class GObjectMeta(gobject.GObjectMeta, MetaClassHelper):
+
+    def __init__(cls, name, bases, dict_):
+        super(GObjectMeta, cls).__init__(name, bases, dict_)
+        is_gi_defined = False
+        if cls.__module__ == 'gi.repository.' + cls.__info__.get_namespace():
+            is_gi_defined = True
+
+        is_python_defined = False
+        if not is_gi_defined and cls.__module__ != GObjectMeta.__module__:
+            is_python_defined = True
+
+        if is_python_defined:
+            cls._setup_vfuncs()
+        elif is_gi_defined:
+            cls._setup_methods()
+            cls._setup_constants()
+            cls._setup_native_vfuncs()
+
+            if isinstance(cls.__info__, ObjectInfo):
+                cls._setup_fields()
+                cls._setup_constructors()
+                set_object_has_new_constructor(cls.__info__.get_g_type())
+            elif isinstance(cls.__info__, InterfaceInfo):
+                register_interface_info(cls.__info__.get_g_type())
+
+    def mro(cls):
+        return mro(cls)
+
+    def _must_register_type(cls, namespace):
+        ## don't register the class if already registered
+        if '__gtype__' in namespace:
+            return False
+
+        # Do not register a new GType for the overrides, as this would sort of
+        # defeat the purpose of overrides...
+        return not cls.__module__.startswith('gi.overrides.')
+
+
+def mro(C):
+    """Compute the class precedence list (mro) according to C3
+
+    Based on http://www.python.org/download/releases/2.3/mro/
+    Modified to consider that interfaces don't create the diamond problem
+    """
+    # TODO: If this turns out being too slow, consider using generators
+    bases = []
+    bases_of_subclasses = [[C]]
+
+    if C.__bases__:
+        bases_of_subclasses += list(map(mro, C.__bases__)) + [list(C.__bases__)]
+
+    while bases_of_subclasses:
+        for subclass_bases in bases_of_subclasses:
+            candidate = subclass_bases[0]
+            not_head = [s for s in bases_of_subclasses if candidate in s[1:]]
+            if not_head and gobject.GInterface not in candidate.__bases__:
+                candidate = None # conflict, reject candidate
+            else:
+                break
+
+        if candidate is None:
+            raise TypeError('Cannot create a consistent method resolution '
+                            'order (MRO)')
+
+        bases.append(candidate)
+
+        for subclass_bases in bases_of_subclasses[:]: # remove candidate
+            if subclass_bases and subclass_bases[0] == candidate:
+                del subclass_bases[0]
+                if not subclass_bases:
+                    bases_of_subclasses.remove(subclass_bases)
+
+    return bases
+
+
+class StructMeta(type, MetaClassHelper):
+
+    def __init__(cls, name, bases, dict_):
+        super(StructMeta, cls).__init__(name, bases, dict_)
+
+        # Avoid touching anything else than the base class.
+        g_type = cls.__info__.get_g_type()
+        if g_type != gobject.TYPE_INVALID and g_type.pytype is not None:
+            return
+
+        cls._setup_fields()
+        cls._setup_methods()
+        cls._setup_constructors()
+
+        for method_info in cls.__info__.get_methods():
+            if method_info.is_constructor() and \
+                    method_info.get_name() == 'new' and \
+                    not method_info.get_arguments():
+                cls.__new__ = staticmethod(Constructor(method_info))
+                break
diff --git a/gio/Makefile.am b/gio/Makefile.am
new file mode 100644 (file)
index 0000000..6b3eb57
--- /dev/null
@@ -0,0 +1,117 @@
+AUTOMAKE_OPTIONS = 1.7
+
+PLATFORM_VERSION = 2.0
+
+INCLUDES =                             \
+       -I$(top_srcdir)/glib            \
+       -I$(top_srcdir)/gobject         \
+       $(PYTHON_INCLUDES)              \
+       $(PYGOBJECT_CFLAGS)             \
+       $(GIO_CFLAGS)
+
+# defs files
+defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
+defs_DATA =
+
+# python
+pyexec_LTLIBRARIES =
+
+# gio extension modules
+pkgpyexecdir = $(pyexecdir)/gtk-2.0/gio
+pkgpyexec_LTLIBRARIES =
+
+# gio python scripts
+pygiodir = $(pkgpyexecdir)
+pygio_PYTHON =         __init__.py
+
+# linker flags
+common_ldflags = -module -avoid-version
+if PLATFORM_WIN32
+common_ldflags += -no-undefined
+endif
+
+CLEANFILES =
+EXTRA_DIST =
+
+# gio module
+GIO_OVERRIDES =                        \
+       gio.override                    \
+       gappinfo.override               \
+       gapplaunchcontext.override      \
+       gbufferedinputstream.override   \
+       gcancellable.override           \
+       gdatainputstream.override       \
+       gdrive.override                 \
+       gfile.override                  \
+       gfileattribute.override         \
+       gfileenumerator.override        \
+       gfileinfo.override              \
+       gfileinputstream.override       \
+       gfileiostream.override          \
+       gfileoutputstream.override      \
+       gicon.override                  \
+       giostream.override              \
+       ginputstream.override           \
+       gmemoryinputstream.override     \
+       gmemoryoutputstream.override    \
+       gmount.override                 \
+       goutputstream.override          \
+       gresolver.override              \
+       gsocket.override                \
+       gvolume.override                \
+       gvolumemonitor.override
+
+GIO_DEFS = gio.defs gio-types.defs $(GIO_OVERRIDES)
+CLEANFILES += gio.c
+EXTRA_DIST += $(GIO_DEFS) $(GIO_OVERRIDES)
+gio.c: $(GIO_DEFS) $(GIO_OVERRIDES)
+_gio_la_CFLAGS = $(GIO_CFLAGS)
+_gio_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gio
+_gio_la_LIBADD = $(GIO_LIBS) $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+_gio_la_SOURCES = \
+       giomodule.c \
+       pygio-utils.c \
+       pygio-utils.h
+nodist__gio_la_SOURCES = gio.c
+if BUILD_GIO
+pkgpyexec_LTLIBRARIES += _gio.la
+defs_DATA += $(GIO_DEFS)
+endif
+
+# giounix module
+GIOUNIX_DEFS = unix.defs unix-types.defs unix.override
+CLEANFILES += unix.c
+EXTRA_DIST += $(GIOUNIX_DEFS) unix.override
+unix.c: $(GIOUNIX_DEFS) unix.override
+unix_la_CFLAGS = $(GIOUNIX_CFLAGS)
+unix_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initunix
+unix_la_LIBADD = $(GIOUNIX_LIBS)
+unix_la_SOURCES = unixmodule.c
+nodist_unix_la_SOURCES = unix.c
+if BUILD_GIOUNIX
+pkgpyexec_LTLIBRARIES += unix.la
+defs_DATA += $(GIOUNIX_DEFS)
+endif
+
+
+# code generator
+.defs.c:
+       (cd $(srcdir)\
+        && $(PYTHON) $(top_srcdir)/codegen/codegen.py \
+           --py_ssize_t-clean \
+           --register gio-types.defs \
+           --register unix-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
+
+
+if BUILD_GIO
+all: $(pkgpyexec_LTLIBRARIES:.la=.so)
+check-local: $(pkgpyexec_LTLIBRARIES:.la=.so)
+clean-local:
+       rm -f $(pkgpyexec_LTLIBRARIES:.la=.so)
+.la.so:
+       $(LN_S) .libs/$@ $@ || true
+endif
diff --git a/gio/Makefile.in b/gio/Makefile.in
new file mode 100644 (file)
index 0000000..041c085
--- /dev/null
@@ -0,0 +1,848 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+@PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined
+@BUILD_GIO_TRUE@am__append_2 = _gio.la
+@BUILD_GIO_TRUE@am__append_3 = $(GIO_DEFS)
+@BUILD_GIOUNIX_TRUE@am__append_4 = unix.la
+@BUILD_GIOUNIX_TRUE@am__append_5 = $(GIOUNIX_DEFS)
+subdir = gio
+DIST_COMMON = $(pygio_PYTHON) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+       $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" \
+       "$(DESTDIR)$(pygiodir)" "$(DESTDIR)$(defsdir)"
+LTLIBRARIES = $(pkgpyexec_LTLIBRARIES) $(pyexec_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+_gio_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+       $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+am__gio_la_OBJECTS = _gio_la-giomodule.lo _gio_la-pygio-utils.lo
+nodist__gio_la_OBJECTS = _gio_la-gio.lo
+_gio_la_OBJECTS = $(am__gio_la_OBJECTS) $(nodist__gio_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+_gio_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(_gio_la_CFLAGS) \
+       $(CFLAGS) $(_gio_la_LDFLAGS) $(LDFLAGS) -o $@
+@BUILD_GIO_TRUE@am__gio_la_rpath = -rpath $(pkgpyexecdir)
+unix_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_unix_la_OBJECTS = unix_la-unixmodule.lo
+nodist_unix_la_OBJECTS = unix_la-unix.lo
+unix_la_OBJECTS = $(am_unix_la_OBJECTS) $(nodist_unix_la_OBJECTS)
+unix_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(unix_la_CFLAGS) \
+       $(CFLAGS) $(unix_la_LDFLAGS) $(LDFLAGS) -o $@
+@BUILD_GIOUNIX_TRUE@am_unix_la_rpath = -rpath $(pkgpyexecdir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(_gio_la_SOURCES) $(nodist__gio_la_SOURCES) \
+       $(unix_la_SOURCES) $(nodist_unix_la_SOURCES)
+DIST_SOURCES = $(_gio_la_SOURCES) $(unix_la_SOURCES)
+py_compile = $(top_srcdir)/py-compile
+DATA = $(defs_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
+GI_LIBS = @GI_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PLATFORM = @PLATFORM@
+PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
+PYCAIRO_LIBS = @PYCAIRO_LIBS@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+
+# gio extension modules
+pkgpyexecdir = $(pyexecdir)/gtk-2.0/gio
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.7
+PLATFORM_VERSION = 2.0
+INCLUDES = \
+       -I$(top_srcdir)/glib            \
+       -I$(top_srcdir)/gobject         \
+       $(PYTHON_INCLUDES)              \
+       $(PYGOBJECT_CFLAGS)             \
+       $(GIO_CFLAGS)
+
+
+# defs files
+defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
+defs_DATA = $(am__append_3) $(am__append_5)
+
+# python
+pyexec_LTLIBRARIES = 
+pkgpyexec_LTLIBRARIES = $(am__append_2) $(am__append_4)
+
+# gio python scripts
+pygiodir = $(pkgpyexecdir)
+pygio_PYTHON = __init__.py
+
+# linker flags
+common_ldflags = -module -avoid-version $(am__append_1)
+CLEANFILES = gio.c unix.c
+EXTRA_DIST = $(GIO_DEFS) $(GIO_OVERRIDES) $(GIOUNIX_DEFS) \
+       unix.override
+
+# gio module
+GIO_OVERRIDES = \
+       gio.override                    \
+       gappinfo.override               \
+       gapplaunchcontext.override      \
+       gbufferedinputstream.override   \
+       gcancellable.override           \
+       gdatainputstream.override       \
+       gdrive.override                 \
+       gfile.override                  \
+       gfileattribute.override         \
+       gfileenumerator.override        \
+       gfileinfo.override              \
+       gfileinputstream.override       \
+       gfileiostream.override          \
+       gfileoutputstream.override      \
+       gicon.override                  \
+       giostream.override              \
+       ginputstream.override           \
+       gmemoryinputstream.override     \
+       gmemoryoutputstream.override    \
+       gmount.override                 \
+       goutputstream.override          \
+       gresolver.override              \
+       gsocket.override                \
+       gvolume.override                \
+       gvolumemonitor.override
+
+GIO_DEFS = gio.defs gio-types.defs $(GIO_OVERRIDES)
+_gio_la_CFLAGS = $(GIO_CFLAGS)
+_gio_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gio
+_gio_la_LIBADD = $(GIO_LIBS) $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+_gio_la_SOURCES = \
+       giomodule.c \
+       pygio-utils.c \
+       pygio-utils.h
+
+nodist__gio_la_SOURCES = gio.c
+
+# giounix module
+GIOUNIX_DEFS = unix.defs unix-types.defs unix.override
+unix_la_CFLAGS = $(GIOUNIX_CFLAGS)
+unix_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initunix
+unix_la_LIBADD = $(GIOUNIX_LIBS)
+unix_la_SOURCES = unixmodule.c
+nodist_unix_la_SOURCES = unix.c
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .defs .la .lo .o .obj .so
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gio/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign gio/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-pkgpyexecLTLIBRARIES: $(pkgpyexec_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(pkgpyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgpyexecdir)"
+       @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \
+       list2=; for p in $$list; do \
+         if test -f $$p; then \
+           list2="$$list2 $$p"; \
+         else :; fi; \
+       done; \
+       test -z "$$list2" || { \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgpyexecdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgpyexecdir)"; \
+       }
+
+uninstall-pkgpyexecLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgpyexecdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgpyexecdir)/$$f"; \
+       done
+
+clean-pkgpyexecLTLIBRARIES:
+       -test -z "$(pkgpyexec_LTLIBRARIES)" || rm -f $(pkgpyexec_LTLIBRARIES)
+       @list='$(pkgpyexec_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)"
+       @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
+       list2=; for p in $$list; do \
+         if test -f $$p; then \
+           list2="$$list2 $$p"; \
+         else :; fi; \
+       done; \
+       test -z "$$list2" || { \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \
+       }
+
+uninstall-pyexecLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \
+       done
+
+clean-pyexecLTLIBRARIES:
+       -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES)
+       @list='$(pyexec_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+_gio.la: $(_gio_la_OBJECTS) $(_gio_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(_gio_la_LINK) $(am__gio_la_rpath) $(_gio_la_OBJECTS) $(_gio_la_LIBADD) $(LIBS)
+unix.la: $(unix_la_OBJECTS) $(unix_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(unix_la_LINK) $(am_unix_la_rpath) $(unix_la_OBJECTS) $(unix_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gio_la-gio.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gio_la-giomodule.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gio_la-pygio-utils.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix_la-unix.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix_la-unixmodule.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+
+_gio_la-giomodule.lo: giomodule.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -MT _gio_la-giomodule.lo -MD -MP -MF $(DEPDIR)/_gio_la-giomodule.Tpo -c -o _gio_la-giomodule.lo `test -f 'giomodule.c' || echo '$(srcdir)/'`giomodule.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gio_la-giomodule.Tpo $(DEPDIR)/_gio_la-giomodule.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='giomodule.c' object='_gio_la-giomodule.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -c -o _gio_la-giomodule.lo `test -f 'giomodule.c' || echo '$(srcdir)/'`giomodule.c
+
+_gio_la-pygio-utils.lo: pygio-utils.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -MT _gio_la-pygio-utils.lo -MD -MP -MF $(DEPDIR)/_gio_la-pygio-utils.Tpo -c -o _gio_la-pygio-utils.lo `test -f 'pygio-utils.c' || echo '$(srcdir)/'`pygio-utils.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gio_la-pygio-utils.Tpo $(DEPDIR)/_gio_la-pygio-utils.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygio-utils.c' object='_gio_la-pygio-utils.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -c -o _gio_la-pygio-utils.lo `test -f 'pygio-utils.c' || echo '$(srcdir)/'`pygio-utils.c
+
+_gio_la-gio.lo: gio.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -MT _gio_la-gio.lo -MD -MP -MF $(DEPDIR)/_gio_la-gio.Tpo -c -o _gio_la-gio.lo `test -f 'gio.c' || echo '$(srcdir)/'`gio.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gio_la-gio.Tpo $(DEPDIR)/_gio_la-gio.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='gio.c' object='_gio_la-gio.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -c -o _gio_la-gio.lo `test -f 'gio.c' || echo '$(srcdir)/'`gio.c
+
+unix_la-unixmodule.lo: unixmodule.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -MT unix_la-unixmodule.lo -MD -MP -MF $(DEPDIR)/unix_la-unixmodule.Tpo -c -o unix_la-unixmodule.lo `test -f 'unixmodule.c' || echo '$(srcdir)/'`unixmodule.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unix_la-unixmodule.Tpo $(DEPDIR)/unix_la-unixmodule.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='unixmodule.c' object='unix_la-unixmodule.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -c -o unix_la-unixmodule.lo `test -f 'unixmodule.c' || echo '$(srcdir)/'`unixmodule.c
+
+unix_la-unix.lo: unix.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -MT unix_la-unix.lo -MD -MP -MF $(DEPDIR)/unix_la-unix.Tpo -c -o unix_la-unix.lo `test -f 'unix.c' || echo '$(srcdir)/'`unix.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unix_la-unix.Tpo $(DEPDIR)/unix_la-unix.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='unix.c' object='unix_la-unix.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -c -o unix_la-unix.lo `test -f 'unix.c' || echo '$(srcdir)/'`unix.c
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-pygioPYTHON: $(pygio_PYTHON)
+       @$(NORMAL_INSTALL)
+       test -z "$(pygiodir)" || $(MKDIR_P) "$(DESTDIR)$(pygiodir)"
+       @list='$(pygio_PYTHON)'; dlist=; list2=; test -n "$(pygiodir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+         if test -f $$b$$p; then \
+           $(am__strip_dir) \
+           dlist="$$dlist $$f"; \
+           list2="$$list2 $$b$$p"; \
+         else :; fi; \
+       done; \
+       for file in $$list2; do echo $$file; done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pygiodir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pygiodir)" || exit $$?; \
+       done || exit $$?; \
+       if test -n "$$dlist"; then \
+         if test -z "$(DESTDIR)"; then \
+           PYTHON=$(PYTHON) $(py_compile) --basedir "$(pygiodir)" $$dlist; \
+         else \
+           PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pygiodir)" $$dlist; \
+         fi; \
+       else :; fi
+
+uninstall-pygioPYTHON:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pygio_PYTHON)'; test -n "$(pygiodir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       filesc=`echo "$$files" | sed 's|$$|c|'`; \
+       fileso=`echo "$$files" | sed 's|$$|o|'`; \
+       echo " ( cd '$(DESTDIR)$(pygiodir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pygiodir)" && rm -f $$files || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pygiodir)' && rm -f" $$filesc ")"; \
+       cd "$(DESTDIR)$(pygiodir)" && rm -f $$filesc || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pygiodir)' && rm -f" $$fileso ")"; \
+       cd "$(DESTDIR)$(pygiodir)" && rm -f $$fileso
+install-defsDATA: $(defs_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(defsdir)" || $(MKDIR_P) "$(DESTDIR)$(defsdir)"
+       @list='$(defs_DATA)'; test -n "$(defsdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(defsdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(defsdir)" || exit $$?; \
+       done
+
+uninstall-defsDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(defs_DATA)'; test -n "$(defsdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(defsdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(defsdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+@BUILD_GIO_FALSE@check-local:
+check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs:
+       for dir in "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pygiodir)" "$(DESTDIR)$(defsdir)"; 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:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+@BUILD_GIO_FALSE@clean-local:
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local \
+       clean-pkgpyexecLTLIBRARIES clean-pyexecLTLIBRARIES \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-defsDATA install-pygioPYTHON
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pkgpyexecLTLIBRARIES \
+       install-pyexecLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-defsDATA uninstall-pkgpyexecLTLIBRARIES \
+       uninstall-pyexecLTLIBRARIES uninstall-pygioPYTHON
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+       clean-generic clean-libtool clean-local \
+       clean-pkgpyexecLTLIBRARIES clean-pyexecLTLIBRARIES ctags \
+       distclean distclean-compile distclean-generic \
+       distclean-libtool distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-defsDATA install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-pkgpyexecLTLIBRARIES install-ps \
+       install-ps-am install-pyexecLTLIBRARIES install-pygioPYTHON \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags uninstall uninstall-am \
+       uninstall-defsDATA uninstall-pkgpyexecLTLIBRARIES \
+       uninstall-pyexecLTLIBRARIES uninstall-pygioPYTHON
+
+gio.c: $(GIO_DEFS) $(GIO_OVERRIDES)
+unix.c: $(GIOUNIX_DEFS) unix.override
+
+# code generator
+.defs.c:
+       (cd $(srcdir)\
+        && $(PYTHON) $(top_srcdir)/codegen/codegen.py \
+           --py_ssize_t-clean \
+           --register gio-types.defs \
+           --register unix-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
+
+@BUILD_GIO_TRUE@all: $(pkgpyexec_LTLIBRARIES:.la=.so)
+@BUILD_GIO_TRUE@check-local: $(pkgpyexec_LTLIBRARIES:.la=.so)
+@BUILD_GIO_TRUE@clean-local:
+@BUILD_GIO_TRUE@       rm -f $(pkgpyexec_LTLIBRARIES:.la=.so)
+@BUILD_GIO_TRUE@.la.so:
+@BUILD_GIO_TRUE@       $(LN_S) .libs/$@ $@ || true
+
+# 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:
diff --git a/gio/__init__.py b/gio/__init__.py
new file mode 100644 (file)
index 0000000..c4b02bb
--- /dev/null
@@ -0,0 +1,40 @@
+# -*- Mode: Python -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2008  Johan Dahlin
+#
+#   gio/__init__.py: initialisation file for gio module
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+from gobject import GObjectMeta
+from _gio import *
+from _gio import \
+     _app_info_init, _install_app_info_meta, \
+     _file_init, _install_file_meta
+try:
+    import unix
+    unix # pyflakes
+except ImportError:
+    unix = None
+del _gio
+
+class GFileMeta(GObjectMeta):
+    __call__ = _file_init
+_install_file_meta(GFileMeta)
+
+class GAppInfoMeta(GObjectMeta):
+    __call__ = _app_info_init
+_install_app_info_meta(GAppInfoMeta)
diff --git a/gio/gappinfo.override b/gio/gappinfo.override
new file mode 100644 (file)
index 0000000..7f09ce8
--- /dev/null
@@ -0,0 +1,213 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ * Copyright (C) 2008  Gian Mario Tagliaretti
+ *
+ *   gappinfo.override: module overrides for GInputStream
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+define _install_app_info_meta
+static PyObject *
+_wrap__install_app_info_meta(PyObject *self, PyObject *args)
+{
+    PyObject *metaclass;
+
+    if (!PyArg_ParseTuple(args, "O", &metaclass))
+       return NULL;
+
+    Py_INCREF(metaclass);
+    PyGAppInfo_Type.ob_type = (PyTypeObject*)metaclass;
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+%%
+define _app_info_init kwargs
+static PyObject *
+_wrap__app_info_init(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "commandline", "application_name",
+                             "flags", NULL };
+    char *commandline, *application_name = NULL;
+    PyObject *py_flags = NULL;
+    GAppInfo *ret;
+    GError *error = NULL;
+    GAppInfoCreateFlags flags = G_APP_INFO_CREATE_NONE;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "s|zO:gio.AppInfo",
+                                    kwlist,
+                                    &commandline, &application_name,
+                                    &py_flags))
+        return NULL;
+    if (py_flags && pyg_flags_get_value(G_TYPE_APP_INFO_CREATE_FLAGS,
+                                       py_flags, (gpointer)&flags))
+        return NULL;
+
+    ret = g_app_info_create_from_commandline(commandline,
+                                            application_name, flags, &error);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    /* pygobject_new handles NULL checking */
+    return pygobject_new((GObject *)ret);
+}
+%%
+override g_app_info_launch_uris kwargs
+static PyObject *
+_wrap_g_app_info_launch_uris(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "files", "launch_context", NULL };
+
+    GList *file_list = NULL;
+    PyGObject *pycontext = NULL;
+    GAppLaunchContext *ctx;
+    PyObject *pyfile_list = Py_None;
+    int ret;
+    GError *error = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "|OO:gio.AppInfo.launch_uris",
+                                    kwlist,
+                                    &pyfile_list, &pycontext))
+        return NULL;
+
+    if (!pygio_check_launch_context(pycontext, &ctx))
+       return NULL;
+
+    if (pyfile_list == Py_None)
+        file_list = NULL;
+
+    else if (PySequence_Check (pyfile_list))
+        file_list = pygio_pylist_to_uri_glist(pyfile_list);
+
+    else {
+        PyErr_SetString(PyExc_TypeError,
+                        "file_list should be a list of strings or None");
+        return NULL;
+    }
+
+    ret = g_app_info_launch_uris(G_APP_INFO(self->obj),
+                                 file_list, ctx, &error);
+
+    /* in python 3 the C strings are not internal to the Unicode string object
+     * so we now strdup when adding element to the list and must free them here
+     */
+    g_list_foreach (file_list,
+                   (GFunc) g_free, NULL);
+    g_list_free(file_list);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    return PyBool_FromLong(ret);
+}
+%%
+override g_app_info_launch kwargs
+static PyObject *
+_wrap_g_app_info_launch(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "files", "launch_context", NULL };
+
+    GList *file_list = NULL;
+    PyGObject *pycontext = NULL;
+    GAppLaunchContext *ctx;
+    PyObject *pyfile_list = Py_None;
+    int ret;
+    GError *error = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "|OO:gio.AppInfo.launch",
+                                    kwlist,
+                                    &pyfile_list, &pycontext))
+        return NULL;
+
+    if (!pygio_check_launch_context(pycontext, &ctx))
+       return NULL;
+
+    if (pyfile_list == Py_None)
+        file_list = NULL;
+
+    else if (PySequence_Check (pyfile_list))
+        file_list = pygio_pylist_to_gfile_glist(pyfile_list);
+
+    else {
+        PyErr_SetString(PyExc_TypeError,
+                        "file_list should be a list of strings or None");
+        return NULL;
+    }
+
+    ret = g_app_info_launch(G_APP_INFO(self->obj),
+                            file_list, ctx, &error);
+
+    g_list_free(file_list);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    return PyBool_FromLong(ret);
+}
+%%
+override-slot GAppInfo.tp_richcompare
+static PyObject *
+_wrap_g_app_info_tp_richcompare(PyGObject *self, PyGObject *other, int op)
+{
+    PyObject *result;
+
+    if (PyObject_TypeCheck(self, &PyGAppInfo_Type)
+        && PyObject_TypeCheck(other, &PyGAppInfo_Type)) {
+        GAppInfo *info1 = G_APP_INFO(self->obj);
+        GAppInfo *info2 = G_APP_INFO(other->obj);
+
+        switch (op) {
+        case Py_EQ:
+            result = (g_app_info_equal(info1, info2)
+                      ? Py_True : Py_False);
+            break;
+        case Py_NE:
+            result = (!g_app_info_equal(info1, info2)
+                      ? Py_True : Py_False);
+            break;
+        default:
+            result = Py_NotImplemented;
+        }
+    }
+    else
+        result = Py_NotImplemented;
+
+    Py_INCREF(result);
+    return result;
+}
+%%
+override-slot GAppInfo.tp_repr
+static PyObject *
+_wrap_g_app_info_tp_repr(PyGObject *self)
+{
+    const char *name = g_app_info_get_name(G_APP_INFO(self->obj));
+    gchar *representation;
+    PyObject *result;
+
+    representation = g_strdup_printf("<%s at %p: %s>",
+                                    self->ob_type->tp_name, self,
+                                    name ? name : "UNKNOWN NAME");
+
+    result = PyString_FromString(representation);
+    g_free(representation);
+    return result;
+}
diff --git a/gio/gapplaunchcontext.override b/gio/gapplaunchcontext.override
new file mode 100644 (file)
index 0000000..a10f959
--- /dev/null
@@ -0,0 +1,99 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Gian Mario Tagliaretti
+ *
+ *   gapplaunchcontext.override: module overrides for GAppLaunchContext
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_app_launch_context_get_display kwargs
+static PyObject *
+_wrap_g_app_launch_context_get_display(PyGObject *self,
+                                       PyObject *args,
+                                       PyObject *kwargs)
+{
+    static char *kwlist[] = { "info", "files", NULL };
+
+    GList *file_list = NULL;
+    PyGObject *py_info;
+    PyObject *pyfile_list;
+    gchar *ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                           "O!O:gio.AppLaunchContext.get_display",
+                           kwlist,
+                           &PyGAppInfo_Type, &py_info, &pyfile_list))
+        return NULL;
+
+    if (!PySequence_Check (pyfile_list)) {
+        PyErr_Format (PyExc_TypeError,
+                      "argument must be a list or tuple of GFile objects");
+        return NULL;
+    }
+
+    file_list = pygio_pylist_to_gfile_glist(pyfile_list);
+
+    ret = g_app_launch_context_get_display(G_APP_LAUNCH_CONTEXT(self->obj),
+                                           G_APP_INFO(py_info->obj), file_list);
+    g_list_free(file_list);
+
+    if (ret)
+        return PyString_FromString(ret);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+%%
+override g_app_launch_context_get_startup_notify_id kwargs
+static PyObject *
+_wrap_g_app_launch_context_get_startup_notify_id(PyGObject *self,
+                                                 PyObject *args,
+                                                 PyObject *kwargs)
+{
+    static char *kwlist[] = { "info", "files", NULL };
+
+    GList       *file_list = NULL;
+    PyGObject   *py_info;
+    PyObject    *pyfile_list;
+    gchar       *ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                           "O!O:gio.AppLaunchContext.get_startup_notify_id",
+                           kwlist,
+                           &PyGAppInfo_Type, &py_info, &pyfile_list))
+        return NULL;
+
+    if (!PySequence_Check (pyfile_list)) {
+        PyErr_Format (PyExc_TypeError,
+                      "argument must be a list or tuple of GFile objects");
+        return NULL;
+    }
+
+    file_list = pygio_pylist_to_gfile_glist(pyfile_list);
+
+    ret = g_app_launch_context_get_startup_notify_id(
+                                        G_APP_LAUNCH_CONTEXT(self->obj),
+                                        G_APP_INFO(py_info->obj), file_list);
+    g_list_free(file_list);
+
+    if (ret)
+        return PyString_FromString(ret);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
diff --git a/gio/gbufferedinputstream.override b/gio/gbufferedinputstream.override
new file mode 100644 (file)
index 0000000..047a663
--- /dev/null
@@ -0,0 +1,70 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009  Gian Mario Tagliaretti
+ *
+ *   gbufferedinputstream.override: module overrides for GBufferedInputStream
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_buffered_input_stream_fill_async kwargs
+static PyObject *
+_wrap_g_buffered_input_stream_fill_async(PyGObject *self,
+                                         PyObject *args,
+                                         PyObject *kwargs)
+{
+    static char *kwlist[] = { "count", "callback", "io_priority",
+                              "cancellable", "user_data", NULL };
+    long count = -1;
+    int io_priority = G_PRIORITY_DEFAULT;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "lO|iOO:gio.BufferedInputStream.fill_async",
+                                    kwlist,
+                                    &count,
+                                    &notify->callback,
+                                    &io_priority,
+                                    &pycancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_buffered_input_stream_fill_async(G_BUFFERED_INPUT_STREAM(self->obj),
+                            count,
+                            io_priority,
+                            cancellable,
+                            (GAsyncReadyCallback) async_result_callback_marshal,
+                            notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
diff --git a/gio/gcancellable.override b/gio/gcancellable.override
new file mode 100644 (file)
index 0000000..1eefb3b
--- /dev/null
@@ -0,0 +1,38 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009  Gian Mario Tagliaretti
+ *
+ *   gcancellable.override: module overrides for GCancellable
+ *
+ * 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
+ */
+
+%%
+override g_cancellable_make_pollfd noargs
+static PyObject *
+_wrap_g_cancellable_make_pollfd (PyGObject *self)
+{
+    GPollFD pollfd;
+    gboolean ret;
+    PyGPollFD *pypollfd;
+
+    ret = g_cancellable_make_pollfd(G_CANCELLABLE(self->obj), &pollfd);
+  
+    pypollfd = PyObject_NEW(PyGPollFD, &PyGPollFD_Type);
+    pypollfd->fd_obj = NULL;
+    pypollfd->pollfd = pollfd;
+    return (PyObject *) pypollfd;
+}
diff --git a/gio/gdatainputstream.override b/gio/gdatainputstream.override
new file mode 100644 (file)
index 0000000..92b0f99
--- /dev/null
@@ -0,0 +1,250 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ * Copyright (C) 2009  Paul Pogonyshev
+ *
+ *   gdatainputstream.override: module overrides for GDataInputStream
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_data_input_stream_read_line kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_line(PyGObject *self,
+                                   PyObject *args,
+                                   PyObject *kwargs)
+{
+    static char *kwlist[] = { "cancellable", NULL };
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    char *line;
+    gsize length;
+    PyObject *py_line;
+    GError *error = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "|O:gio.DataInputStream.read_line",
+                                     kwlist, &pycancellable))
+        return NULL;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+       return NULL;
+
+    line = g_data_input_stream_read_line(G_DATA_INPUT_STREAM(self->obj),
+                                        &length, cancellable, &error);
+    if (pyg_error_check(&error))
+        return NULL;
+
+    py_line = PyString_FromStringAndSize(line, length);
+    g_free(line);
+    return py_line;
+}
+
+%%
+override g_data_input_stream_read_line_async kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_line_async(PyGObject *self,
+                                         PyObject *args,
+                                         PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "io_priority",
+                              "cancellable", "user_data", NULL };
+    int io_priority = G_PRIORITY_DEFAULT;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|iOO:gio.DataInputStream.read_line_async",
+                                     kwlist,
+                                     &notify->callback,
+                                     &io_priority,
+                                     &pycancellable,
+                                     &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_data_input_stream_read_line_async(G_DATA_INPUT_STREAM(self->obj),
+                                        io_priority,
+                                        cancellable,
+                                        (GAsyncReadyCallback) async_result_callback_marshal,
+                                        notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+
+%%
+override g_data_input_stream_read_line_finish kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_line_finish(PyGObject *self,
+                                           PyObject *args,
+                                           PyObject *kwargs)
+{
+    static char *kwlist[] = { "result", NULL };
+    PyGObject *result;
+    GError *error = NULL;
+    gchar *line;
+    gsize length;
+    PyObject *py_line;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!:gio.DataInputStream.read_line_finish",
+                                     kwlist, &PyGAsyncResult_Type, &result))
+        return NULL;
+
+    line = g_data_input_stream_read_line_finish(G_DATA_INPUT_STREAM(self->obj),
+                                                G_ASYNC_RESULT(result->obj),
+                                                &length,
+                                                &error);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    py_line = PyString_FromStringAndSize(line, length);
+    g_free(line);
+    return py_line;
+}
+
+%%
+override g_data_input_stream_read_until kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_until(PyGObject *self,
+                                    PyObject *args,
+                                    PyObject *kwargs)
+{
+    static char *kwlist[] = { "stop_chars", "cancellable", NULL };
+    const char *stop_chars;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    char *line;
+    gsize length;
+    PyObject *py_line;
+    GError *error = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "s|O:gio.DataInputStream.read_line",
+                                     kwlist, &stop_chars, &pycancellable))
+        return NULL;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+       return NULL;
+
+    line = g_data_input_stream_read_until(G_DATA_INPUT_STREAM(self->obj),
+                                         stop_chars, &length, cancellable, &error);
+    if (pyg_error_check(&error))
+        return NULL;
+
+    py_line = PyString_FromStringAndSize(line, length);
+    g_free(line);
+    return py_line;
+}
+
+%%
+override g_data_input_stream_read_until_async kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_until_async(PyGObject *self,
+                                           PyObject *args,
+                                           PyObject *kwargs)
+{
+    static char *kwlist[] = { "stop_chars", "callback", "io_priority",
+                              "cancellable", "user_data", NULL };
+    const char *stop_chars;
+    int io_priority = G_PRIORITY_DEFAULT;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "sO|iOO:gio.DataInputStream.read_until_async",
+                                     kwlist,
+                                     &stop_chars,
+                                     &notify->callback,
+                                     &io_priority,
+                                     &pycancellable,
+                                     &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_data_input_stream_read_until_async(G_DATA_INPUT_STREAM(self->obj),
+                                         stop_chars,
+                                         io_priority,
+                                         cancellable,
+                                         (GAsyncReadyCallback) async_result_callback_marshal,
+                                         notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+
+%%
+override g_data_input_stream_read_until_finish kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_until_finish(PyGObject *self,
+                                           PyObject *args,
+                                           PyObject *kwargs)
+{
+    static char *kwlist[] = { "result", NULL };
+    PyGObject *result;
+    GError *error = NULL;
+    gchar *line;
+    gsize length;
+    PyObject *py_line;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!:gio.DataInputStream.read_until_finish",
+                                     kwlist, &PyGAsyncResult_Type, &result))
+        return NULL;
+
+    line = g_data_input_stream_read_until_finish(G_DATA_INPUT_STREAM(self->obj),
+                                                 G_ASYNC_RESULT(result->obj),
+                                                 &length,
+                                                 &error);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    py_line = PyString_FromStringAndSize(line, length);
+    g_free(line);
+    return py_line;
+}
diff --git a/gio/gdrive.override b/gio/gdrive.override
new file mode 100644 (file)
index 0000000..7961856
--- /dev/null
@@ -0,0 +1,347 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ * Copyright (C) 2009  Gian Mario Tagliaretti
+ *
+ *   gdrive.override: module overrides for GDrive and related types
+ *
+ * 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
+ */
+
+%%
+override g_drive_get_volumes noargs
+static PyObject *
+_wrap_g_drive_get_volumes (PyGObject *self)
+{
+  GList *list, *l;
+  PyObject *ret;
+
+  pyg_begin_allow_threads;
+
+  list = g_drive_get_volumes (G_DRIVE (self->obj));
+
+  pyg_end_allow_threads;
+
+  ret = PyList_New(0);
+  for (l = list; l; l = l->next) {
+    GVolume *volume = l->data;
+    PyObject *item = pygobject_new((GObject *)volume);
+    PyList_Append(ret, item);
+    Py_DECREF(item);
+    g_object_unref(volume);
+  }
+  g_list_free(list);
+
+  return ret;
+}
+%%
+override g_drive_eject kwargs
+static PyObject *
+_wrap_g_drive_eject(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OOO:gio.Drive.eject",
+                                    kwlist,
+                                    &notify->callback,
+                                    &py_flags,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+    
+    if (PyErr_Warn(PyExc_DeprecationWarning,
+                   "gio.Drive.ejectis deprecated, \
+                   use gtk.Drive.eject_with_operation instead") < 0)
+        return NULL;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                       py_flags, (gpointer) &flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_drive_eject(G_DRIVE(self->obj),
+                 flags,
+                 cancellable,
+                 (GAsyncReadyCallback) async_result_callback_marshal,
+                 notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_drive_poll_for_media kwargs
+static PyObject *
+_wrap_g_drive_poll_for_media(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OO:gio.Drive.eject",
+                                    kwlist,
+                                    &notify->callback,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    pyg_begin_allow_threads;
+
+    g_drive_poll_for_media(G_DRIVE(self->obj),
+                          cancellable,
+                          (GAsyncReadyCallback) async_result_callback_marshal,
+                          notify);
+    
+    pyg_end_allow_threads;
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override-slot GDrive.tp_repr
+static PyObject *
+_wrap_g_drive_tp_repr(PyGObject *self)
+{
+    char *name = g_drive_get_name(G_DRIVE(self->obj));
+    gchar *representation;
+    PyObject *result;
+
+    if (name) {
+       representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, name);
+       g_free(name);
+    }
+    else
+       representation = g_strdup_printf("<%s at %p: UNKNOWN NAME>", self->ob_type->tp_name, self);
+
+    result = PyString_FromString(representation);
+    g_free(representation);
+    return result;
+}
+%%
+override g_drive_enumerate_identifiers noargs
+static PyObject *
+_wrap_g_drive_enumerate_identifiers (PyGObject *self)
+{
+    char **ids;
+    PyObject *ret;
+  
+    pyg_begin_allow_threads;
+  
+    ids = g_drive_enumerate_identifiers(G_DRIVE (self->obj));
+  
+    pyg_end_allow_threads;
+  
+    if (ids && ids[0] != NULL) {
+       ret = strv_to_pylist(ids);
+       g_strfreev (ids);
+    } else {
+       ret = Py_None;
+       Py_INCREF(ret);
+    }
+    return ret;
+}
+%%
+override g_drive_eject_with_operation kwargs
+static PyObject *
+_wrap_g_drive_eject_with_operation(PyGObject *self,
+                                   PyObject *args,
+                                   PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "mount_operation",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *mount_operation;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OOOO:gio.Drive.eject_with_operation",
+                                     kwlist,
+                                     &notify->callback,
+                                     &py_flags,
+                                     &mount_operation,
+                                     &py_cancellable,
+                                     &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                        py_flags, (gpointer) &flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_drive_eject_with_operation(G_DRIVE(self->obj),
+                          flags,
+                          G_MOUNT_OPERATION(mount_operation->obj),
+                          cancellable,
+                          (GAsyncReadyCallback) async_result_callback_marshal,
+                          notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_drive_start kwargs
+static PyObject *
+_wrap_g_drive_start(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "mount_operation",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *mount_operation;
+    GDriveStartFlags flags = G_DRIVE_START_NONE;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OOOO:gio.Drive.start",
+                                     kwlist,
+                                     &notify->callback,
+                                     &py_flags,
+                                     &mount_operation,
+                                     &py_cancellable,
+                                     &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_DRIVE_START_FLAGS,
+                                        py_flags, (gpointer) &flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_drive_start(G_DRIVE(self->obj), 
+                  flags,
+                  G_MOUNT_OPERATION(mount_operation->obj),
+                  cancellable,
+                  (GAsyncReadyCallback) async_result_callback_marshal,
+                  notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_drive_stop kwargs
+static PyObject *
+_wrap_g_drive_stop(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "mount_operation",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *mount_operation;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OOOO:gio.Drive.stop",
+                                     kwlist,
+                                     &notify->callback,
+                                     &py_flags,
+                                     &mount_operation,
+                                     &py_cancellable,
+                                     &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                        py_flags, (gpointer) &flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_drive_stop(G_DRIVE(self->obj), 
+                 flags,
+                 G_MOUNT_OPERATION(mount_operation->obj),
+                 cancellable,
+                 (GAsyncReadyCallback) async_result_callback_marshal,
+                 notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
diff --git a/gio/gfile.override b/gio/gfile.override
new file mode 100644 (file)
index 0000000..1301963
--- /dev/null
@@ -0,0 +1,2215 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   gfile.override: module overrides for GInputStream
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+headers
+
+static void
+file_progress_callback_marshal(goffset current_num_bytes,
+                              goffset total_num_bytes,
+                              PyGIONotify *notify)
+{
+    PyObject *ret;
+    PyGILState_STATE state;
+
+    state = pyg_gil_state_ensure();
+
+    if (notify->data)
+       ret = PyObject_CallFunction(notify->callback, "(KKO)",
+                                   current_num_bytes,
+                                   total_num_bytes,
+                                   notify->data);
+    else
+       ret = PyObject_CallFunction(notify->callback, "(KK)",
+                                   current_num_bytes,
+                                   total_num_bytes);
+
+    if (ret == NULL)
+      {
+       PyErr_Print();
+       PyErr_Clear();
+      }
+
+    Py_XDECREF(ret);
+    pyg_gil_state_release(state);
+}
+%%
+define _install_file_meta
+static PyObject *
+_wrap__install_file_meta(PyObject *self, PyObject *args)
+{
+    PyObject *metaclass;
+
+    if (!PyArg_ParseTuple(args, "O", &metaclass))
+       return NULL;
+
+    Py_INCREF(metaclass);
+    PyGFile_Type.ob_type = (PyTypeObject*)metaclass;
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+%%
+define _file_init kwargs
+static PyObject*
+_wrap__file_init(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    GFile *file;
+    Py_ssize_t n_args, n_kwargs;
+    char *arg;
+    PyObject *py_ret;
+
+    n_args = PyTuple_Size(args);
+    n_kwargs = kwargs != NULL ? PyDict_Size(kwargs) : 0;
+
+    if (n_args == 1 && n_kwargs == 0) {
+       if (!PyArg_ParseTuple(args, "s:gio.File.__init__", &arg))
+           return NULL;
+       file = g_file_new_for_commandline_arg(arg);
+    } else if (n_args == 0 && n_kwargs == 1) {
+       if (PyDict_GetItemString(kwargs, "path")) {
+           char *kwlist[] = { "path", NULL };
+           if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                            "s:gio.File.__init__", kwlist, &arg))
+               return NULL;
+           file = g_file_new_for_path(arg);
+       } else if (PyDict_GetItemString(kwargs, "uri")) {
+           char *kwlist[] = { "uri", NULL };
+           if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                            "s:gio.File.__init__", kwlist, &arg))
+               return NULL;
+           file = g_file_new_for_uri(arg);
+       } else {
+           PyErr_Format(PyExc_TypeError,
+                        "gio.File() got an unexpected keyword argument '%s'",
+                        "unknown");
+           return NULL;
+       }
+    } else {
+       PyErr_Format(PyExc_TypeError,
+                    "gio.File() takes exactly 1 argument (%zd given)",
+                    n_args + n_kwargs);
+       return NULL;
+    }
+
+    if (!file) {
+        PyErr_SetString(PyExc_RuntimeError,
+                       "could not create GFile object");
+        return NULL;
+    }
+
+    py_ret = pygobject_new((GObject *)file);
+    g_object_unref(file);
+
+    return py_ret;
+}
+%%
+override g_file_read_async kwargs
+static PyObject *
+_wrap_g_file_read_async(PyGObject *self,
+                       PyObject *args,
+                       PyObject *kwargs)
+{
+  static char *kwlist[] = { "callback", "io_priority",
+                           "cancellable", "user_data", NULL };
+  int io_priority = G_PRIORITY_DEFAULT;
+  PyGObject *pycancellable = NULL;
+  GCancellable *cancellable;
+  PyGIONotify *notify;
+
+  notify = pygio_notify_new();
+
+  if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                   "O|iOO:File.read_async",
+                                   kwlist,
+                                   &notify->callback,
+                                   &io_priority,
+                                   &pycancellable,
+                                   &notify->data))
+      goto error;
+
+  if (!pygio_notify_callback_is_valid(notify))
+      goto error;
+
+  if (!pygio_check_cancellable(pycancellable, &cancellable))
+      goto error;
+
+  pygio_notify_reference_callback(notify);
+
+  g_file_read_async(G_FILE(self->obj),
+                    io_priority,
+                    cancellable,
+                    (GAsyncReadyCallback)async_result_callback_marshal,
+                    notify);
+
+  Py_INCREF(Py_None);
+  return Py_None;
+
+ error:
+  pygio_notify_free(notify);
+  return NULL;
+}
+%%
+override g_file_load_contents kwargs
+static PyObject *
+_wrap_g_file_load_contents(PyGObject *self,
+                           PyObject *args,
+                           PyObject *kwargs)
+{
+    static char *kwlist[] = { "cancellable", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    gchar *contents, *etag_out;
+    gsize length;
+    GError *error = NULL;
+    gboolean ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "|O:File.load_contents",
+                                      kwlist,
+                                      &pycancellable))
+        return NULL;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+       return NULL;
+
+    pyg_begin_allow_threads;
+
+    ret = g_file_load_contents(G_FILE(self->obj), cancellable,
+                               &contents, &length, &etag_out, &error);
+
+    pyg_end_allow_threads;
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (ret) {
+        PyObject *pyret;
+
+        pyret = Py_BuildValue("(s#ks)", contents, length, length, etag_out);
+        g_free(contents);
+       g_free(etag_out);
+        return pyret;
+    } else {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+%%
+override g_file_load_contents_async kwargs
+static PyObject *
+_wrap_g_file_load_contents_async(PyGObject *self,
+                                 PyObject *args,
+                                 PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OO:File.load_contents_async",
+                                      kwlist,
+                                      &notify->callback,
+                                      &pycancellable,
+                                      &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_load_contents_async(G_FILE(self->obj),
+                              cancellable,
+                              (GAsyncReadyCallback)async_result_callback_marshal,
+                              notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_load_contents_finish kwargs
+static PyObject *
+_wrap_g_file_load_contents_finish(PyGObject *self,
+                           PyObject *args,
+                           PyObject *kwargs)
+{
+    static char *kwlist[] = { "res", NULL };
+    PyGObject *res;
+    gchar *contents, *etag_out;
+    gsize length;
+    GError *error = NULL;
+    gboolean ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!:File.load_contents_finish",
+                                      kwlist,
+                                      &PyGAsyncResult_Type,
+                                      &res))
+        return NULL;
+
+    ret = g_file_load_contents_finish(G_FILE(self->obj),
+                                      G_ASYNC_RESULT(res->obj), &contents,
+                                      &length, &etag_out, &error);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (ret) {
+        PyObject *pyret;
+
+        pyret = Py_BuildValue("(s#ks)", contents, length, length, etag_out);
+        g_free(contents);
+       g_free(etag_out);
+        return pyret;
+    } else {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+%%
+override g_file_enumerate_children_async kwargs
+static PyObject *
+_wrap_g_file_enumerate_children_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "attributes", "callback", "flags",
+                             "io_priority", "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    char *attributes;
+    PyObject *py_flags = NULL;
+    int io_priority = G_PRIORITY_DEFAULT;
+    GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
+    GCancellable *cancellable = NULL;
+    PyGObject *py_cancellable = NULL;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "sO|OiOO:gio.File.enumerate_children_async",
+                                    kwlist,
+                                    &attributes,
+                                    &notify->callback,
+                                    &py_flags,
+                                    &io_priority,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_FILE_QUERY_INFO_FLAGS,
+                                       py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+       goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_enumerate_children_async(G_FILE(self->obj),
+                                   attributes,
+                                   flags,
+                                   io_priority,
+                                   (GCancellable *) cancellable,
+                                   (GAsyncReadyCallback)async_result_callback_marshal,
+                                   notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_mount_mountable kwargs
+static PyObject *
+_wrap_g_file_mount_mountable(PyGObject *self,
+                            PyObject *args,
+                            PyObject *kwargs)
+{
+    static char *kwlist[] = { "mount_operation", "callback", "flags",
+                             "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *mount_operation;
+    PyGObject *py_cancellable = NULL;
+    GMountMountFlags flags = G_MOUNT_MOUNT_NONE;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!O|OOO:File.mount_mountable",
+                                    kwlist,
+                                    &PyGMountOperation_Type,
+                                    &mount_operation,
+                                    &notify->callback,
+                                    &py_flags,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_MOUNT_FLAGS,
+                                       py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_mount_mountable(G_FILE(self->obj),
+                          flags,
+                          G_MOUNT_OPERATION(mount_operation->obj),
+                          cancellable,
+                          (GAsyncReadyCallback)async_result_callback_marshal,
+                          notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_unmount_mountable kwargs
+static PyObject *
+_wrap_g_file_unmount_mountable(PyGObject *self,
+                            PyObject *args,
+                            PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags",
+                             "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *py_cancellable = NULL;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OOO:File.unmount_mountable",
+                                    kwlist,
+                                    &notify->callback,
+                                    &py_flags,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                       py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_unmount_mountable(G_FILE(self->obj),
+                            flags,
+                            cancellable,
+                            (GAsyncReadyCallback)async_result_callback_marshal,
+                            notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_unmount_mountable_with_operation kwargs
+static PyObject *
+_wrap_g_file_unmount_mountable_with_operation(PyGObject *self,
+                                              PyObject *args,
+                                              PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "mount_operation",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *mount_operation;
+    PyGObject *py_cancellable = NULL;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                "O|OOOO:File.unmount_mountable_with_operation",
+                                kwlist,
+                                &notify->callback,
+                                &py_flags,
+                               &mount_operation,
+                                &py_cancellable,
+                                &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_unmount_mountable_with_operation(G_FILE(self->obj),
+                             flags,
+                            G_MOUNT_OPERATION(mount_operation->obj),
+                             cancellable,
+                             (GAsyncReadyCallback)async_result_callback_marshal,
+                             notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_mount_enclosing_volume kwargs
+static PyObject *
+_wrap_g_file_mount_enclosing_volume(PyGObject *self,
+                                   PyObject *args,
+                                   PyObject *kwargs)
+{
+    static char *kwlist[] = { "mount_operation", "callback", "flags",
+                             "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *mount_operation;
+    PyGObject *py_cancellable = NULL;
+    GMountMountFlags flags = G_MOUNT_MOUNT_NONE;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!O|OOO:File.mount_enclosing_volume",
+                                    kwlist,
+                                    &PyGMountOperation_Type,
+                                    &mount_operation,
+                                    &notify->callback,
+                                    &py_flags,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_MOUNT_FLAGS,
+                                       py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_mount_enclosing_volume(G_FILE(self->obj),
+                                 flags,
+                                 G_MOUNT_OPERATION(mount_operation->obj),
+                                 cancellable,
+                                 (GAsyncReadyCallback)async_result_callback_marshal,
+                                 notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_copy kwargs
+static PyObject *
+_wrap_g_file_copy(PyGObject *self,
+                 PyObject *args,
+                 PyObject *kwargs)
+{
+    static char *kwlist[] = { "destination", "progress_callback",
+                             "flags", "cancellable", 
+                             "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *destination = NULL;
+    PyGObject *py_cancellable = NULL;
+    GFileCopyFlags flags = G_FILE_COPY_NONE;
+    GCancellable *cancellable;
+    int ret;
+    GError *error = NULL;
+    GFileProgressCallback callback = NULL;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!|OOOO:File.copy",
+                                    kwlist,
+                                    &PyGFile_Type,
+                                    &destination,
+                                    &notify->callback,
+                                    &py_flags,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (pygio_notify_using_optional_callback(notify)) {
+        callback = (GFileProgressCallback)file_progress_callback_marshal;
+        if (!pygio_notify_callback_is_valid(notify))
+            goto error;
+    }
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_FILE_COPY_FLAGS,
+                                       py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    /* No need to reference callback here, because it will be used
+     * only while this function is in progress. */
+
+    pyg_begin_allow_threads;
+
+    ret = g_file_copy(G_FILE(self->obj),
+                     G_FILE(destination->obj),
+                     flags,
+                     cancellable,
+                     callback,
+                     notify,
+                     &error);
+
+    pyg_end_allow_threads;
+
+    if (pyg_error_check(&error))
+        goto error;
+
+    pygio_notify_free(notify);
+    return PyBool_FromLong(ret);
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_copy_async kwargs
+static PyObject *
+_wrap_g_file_copy_async(PyGObject *self,
+                       PyObject *args,
+                       PyObject *kwargs)
+{
+  static char *kwlist[] = { "destination", "callback", "progress_callback",
+                            "flags", "io_priority", "cancellable",
+                            "user_data", "progress_callback_data", NULL };
+  PyGIONotify *notify, *progress_notify;
+  PyObject *py_flags = NULL;
+  PyGObject *destination = NULL;
+  PyGObject *py_cancellable = NULL;
+  GFileCopyFlags flags = G_FILE_COPY_NONE;
+  int io_priority = G_PRIORITY_DEFAULT;
+  PyGObject *pycancellable = NULL;
+  GCancellable *cancellable;
+  GFileProgressCallback progress_callback = NULL;
+
+  /* After the creation, referencing/freeing will automatically be
+   * done on the master and the slave. */
+  notify = pygio_notify_new();
+  progress_notify = pygio_notify_new_slave(notify);
+
+  if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                   "O!O|OOiOOO:File.copy_async",
+                                   kwlist,
+                                   &PyGFile_Type,
+                                   &destination,
+                                   &notify->callback,
+                                   &progress_notify->callback,
+                                   &py_flags,
+                                   &io_priority,
+                                   &pycancellable,
+                                   &notify->data,
+                                   &progress_notify->data))
+      goto error;
+
+  if (!pygio_notify_callback_is_valid(notify))
+      goto error;
+
+  if (!pygio_check_cancellable(py_cancellable, &cancellable))
+      goto error;
+
+  if (pygio_notify_using_optional_callback(progress_notify)) {
+      progress_callback = (GFileProgressCallback) file_progress_callback_marshal;
+      if (!pygio_notify_callback_is_valid_full(progress_notify, "progress_callback"))
+          goto error;
+  }
+
+  if (!pygio_check_cancellable(pycancellable, &cancellable))
+      goto error;
+
+  pygio_notify_reference_callback(notify);
+
+  g_file_copy_async(G_FILE(self->obj),
+                    G_FILE(destination->obj),
+                    flags,
+                    io_priority,
+                    cancellable,
+                    progress_callback,
+                    progress_notify,
+                    (GAsyncReadyCallback)async_result_callback_marshal,
+                    notify);
+
+  Py_INCREF(Py_None);
+  return Py_None;
+
+ error:
+  pygio_notify_free(notify);
+  return NULL;
+}
+%%
+override g_file_move kwargs
+static PyObject *
+_wrap_g_file_move(PyGObject *self,
+                 PyObject *args,
+                 PyObject *kwargs)
+{
+    static char *kwlist[] = { "destination", "progress_callback",
+                             "flags", "cancellable", 
+                             "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *destination = NULL;
+    PyGObject *py_cancellable = NULL;
+    GFileCopyFlags flags = G_FILE_COPY_NONE;
+    GCancellable *cancellable;
+    int ret;
+    GError *error = NULL;
+    GFileProgressCallback callback = NULL;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!|OOOO:File.move",
+                                    kwlist,
+                                    &PyGFile_Type,
+                                    &destination,
+                                    &notify->callback,
+                                    &py_flags,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (pygio_notify_using_optional_callback(notify)) {
+        callback = (GFileProgressCallback)file_progress_callback_marshal;
+        if (!pygio_notify_callback_is_valid(notify))
+            goto error;
+    }
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_FILE_COPY_FLAGS,
+                                       py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    /* No need to reference callback here, because it will be used
+     * only while this function is in progress. */
+
+    pyg_begin_allow_threads;
+
+    ret = g_file_move(G_FILE(self->obj),
+                     G_FILE(destination->obj),
+                     flags,
+                     cancellable,
+                     callback,
+                     notify,
+                     &error);
+    
+    pyg_end_allow_threads;
+
+    if (pyg_error_check(&error))
+        goto error;
+
+    pygio_notify_free(notify);
+    return PyBool_FromLong(ret);
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_set_attribute kwargs
+static char**
+pyg_strv_from_pyobject(PyObject *value, const char *exc_msg)
+{
+    gchar** strv;
+    Py_ssize_t len, i;
+    PyObject* fast_seq;
+
+    fast_seq = PySequence_Fast(value, exc_msg);
+    if (fast_seq == NULL)
+       return NULL;
+
+    len = PySequence_Length(fast_seq);
+    if (len == -1)
+       return NULL;
+
+    strv = g_malloc(sizeof(char*) * (len + 1));
+    if (strv == NULL) {
+       PyErr_NoMemory();
+       goto failure;
+    }
+
+    for (i = 0; i < len + 1; i++)
+       strv[i] = NULL;
+
+    for (i = 0; i < len; i++) {
+       PyObject* item = PySequence_Fast_GET_ITEM(fast_seq, i);
+       const char *s;
+
+       if (!PyString_Check(item)) {
+           PyErr_SetString(PyExc_TypeError, exc_msg);
+           goto failure;
+       }
+
+       s = PyString_AsString(item);
+       if (s == NULL)
+           goto failure;
+               
+       strv[i] = g_strdup(s);
+       if (strv[i] == NULL) { 
+           PyErr_NoMemory();
+           goto failure;
+       }
+    }
+
+    return strv;
+
+ failure:
+    g_strfreev(strv);
+    Py_XDECREF(fast_seq);
+    return NULL;
+}
+
+static PyObject *
+_wrap_g_file_set_attribute(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "attribute", "type", "value_p",
+                              "flags", "cancellable", NULL };
+    GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
+    int ret = 0;
+    GCancellable *cancellable = NULL;
+    GError *error = NULL;
+    char *attribute;
+    PyObject *py_type = NULL, *py_flags = NULL, *value;
+    PyGObject *pycancellable = NULL;
+    GFileAttributeType type;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"sOO|OO:gio.File.set_attribute",
+                                     kwlist, &attribute, &py_type, &value,
+                                     &py_flags, &pycancellable))
+        return NULL;
+
+    if (pyg_enum_get_value(G_TYPE_FILE_ATTRIBUTE_TYPE, py_type,
+                            (gpointer)&type))
+        return NULL;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_FILE_QUERY_INFO_FLAGS, py_flags,
+                                        (gpointer)&flags))
+        return NULL;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        return NULL;
+
+    switch (type) {
+    case G_FILE_ATTRIBUTE_TYPE_STRING:
+       {
+           char* s;
+           if (!PyString_Check(value)) {
+               PyErr_Format(PyExc_TypeError, 
+                            "set_attribute value must be a str when type is FILE_ATTRIBUTE_TYPE_STRING");
+               return NULL;
+           }
+
+           s = PyString_AsString(value);
+           if (s == NULL)
+               return NULL;
+
+           ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+                                      s, flags, (GCancellable *) cancellable,
+                                      &error);
+       }
+       break;
+
+    case G_FILE_ATTRIBUTE_TYPE_BYTE_STRING:
+       {
+           char* s;
+           if (!PyString_Check(value)) {
+               PyErr_Format(PyExc_TypeError, 
+                            "set_attribute value must be a bytes instance when type is FILE_ATTRIBUTE_TYPE_BYTE_STRING");
+               return NULL;
+           }
+
+           s = PyString_AsString(value);
+           if (s == NULL)
+               return NULL;
+
+           ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+                                      s, flags, (GCancellable *) cancellable,
+                                      &error);
+       }
+       break;
+
+    case G_FILE_ATTRIBUTE_TYPE_STRINGV:
+       {
+           gchar** strv;
+           
+           strv = pyg_strv_from_pyobject(value, "set_attribute value must be a list of strings when type is FILE_ATTRIBUTE_TYPE_STRINGV");
+           if (strv == NULL)
+               break;
+           ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+                                      strv, flags, (GCancellable *) cancellable,
+                                      &error);
+           g_strfreev(strv);
+       }
+       break;
+
+    case G_FILE_ATTRIBUTE_TYPE_OBJECT:
+       {
+           GObject* obj;
+
+           if (!pygobject_check(value, &PyGObject_Type)) {
+               PyErr_Format(PyExc_TypeError, 
+                            "set_attribute value must be a GObject instance when type is FILE_ATTRIBUTE_TYPE_OBJECT");
+               return NULL;
+           }
+               
+           obj = pygobject_get(value);
+
+           ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+                                      obj, flags, (GCancellable *) cancellable,
+                                      &error);
+       }
+       break;
+
+    case G_FILE_ATTRIBUTE_TYPE_BOOLEAN:
+       {
+           gboolean boolval;
+
+           boolval = PyObject_IsTrue(value);
+           if (boolval == -1 && PyErr_Occurred())
+               return NULL;
+
+           ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+                                      &boolval, flags, (GCancellable *) cancellable,
+                                      &error);
+       }
+       break;
+
+    case G_FILE_ATTRIBUTE_TYPE_UINT32:
+       {
+           guint32 intval;
+
+           if (!PyInt_Check(value) && !PyLong_Check(value)) {
+               PyErr_Format(PyExc_TypeError, 
+                            "set_attribute value must be an int when type is FILE_ATTRIBUTE_TYPE_UINT32");
+               return NULL;
+           }
+               
+           intval = PyLong_AsUnsignedLong(value);
+           if (intval == -1 && PyErr_Occurred())
+               return NULL;
+
+           ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+                                      &intval, flags, (GCancellable *) cancellable,
+                                      &error);
+       }
+       break;
+
+    case G_FILE_ATTRIBUTE_TYPE_INT32:
+       {
+           gint32 intval;
+
+           if (!PyInt_Check(value)) {
+               PyErr_Format(PyExc_TypeError, 
+                            "set_attribute value must be an int when type is FILE_ATTRIBUTE_TYPE_INT32");
+               return NULL;
+           }
+               
+           intval = PyInt_AsLong(value);
+           if (intval == -1 && PyErr_Occurred())
+               return NULL;
+
+           ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+                                      &intval, flags, (GCancellable *) cancellable,
+                                      &error);
+       }
+       break;
+
+    case G_FILE_ATTRIBUTE_TYPE_UINT64:
+       {
+           guint64 intval;
+
+           if (!PyInt_Check(value) && !PyLong_Check(value)) {
+               PyErr_Format(PyExc_TypeError, 
+                            "set_attribute value must be a long int when type is FILE_ATTRIBUTE_TYPE_UINT64");
+               return NULL;
+           }
+               
+           intval = PyLong_AsLongLong(value);
+           if (intval == -1 && PyErr_Occurred())
+               return NULL;
+
+           ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+                                      &intval, flags, (GCancellable *) cancellable,
+                                      &error);
+       }
+       break;
+
+    case G_FILE_ATTRIBUTE_TYPE_INT64:
+       {
+           gint64 intval;
+
+           if (!PyInt_Check(value) && !PyLong_Check(value)) {
+               PyErr_Format(PyExc_TypeError, 
+                            "set_attribute value must be a long int when type is FILE_ATTRIBUTE_TYPE_INT64");
+               return NULL;
+           }
+               
+           intval = PyLong_AsUnsignedLongLong(value);
+           if (intval == -1 && PyErr_Occurred())
+               return NULL;
+
+           ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+                                      &intval, flags, (GCancellable *) cancellable,
+                                      &error);
+       }
+       break;
+
+    case G_FILE_ATTRIBUTE_TYPE_INVALID:
+
+    default:
+        PyErr_SetString(PyExc_TypeError, 
+                       "Unknown type specified in set_attribute\n");
+       return NULL;
+    }
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    return PyBool_FromLong(ret);
+}
+%%
+override g_file_query_settable_attributes kwargs
+static PyObject *
+_wrap_g_file_query_settable_attributes(PyGObject *self,
+                                       PyObject *args,
+                                       PyObject *kwargs)
+{
+    static char *kwlist[] = { "cancellable", NULL };
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable = NULL;
+    GFileAttributeInfoList *ret;
+    GError *error = NULL;
+    gint i, n_infos;
+    GFileAttributeInfo *infos;
+    PyObject *py_ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "|O:gio.File.query_settable_attributes",
+                                     kwlist, &pycancellable))
+        return NULL;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        return NULL;
+
+    ret = g_file_query_settable_attributes(G_FILE(self->obj),
+                                           (GCancellable *) cancellable,
+                                           &error);
+    if (pyg_error_check(&error))
+        return NULL;
+
+    n_infos = ret->n_infos;
+    infos = ret->infos;
+
+    if (n_infos > 0) {
+        py_ret = PyList_New(n_infos);
+        for (i = 0; i < n_infos; i++) {
+            PyList_SetItem(py_ret, i, pyg_file_attribute_info_new(&infos[i]));
+        }
+        g_file_attribute_info_list_unref(ret);
+        return py_ret;
+
+    } else {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+%%
+override g_file_query_writable_namespaces kwargs
+static PyObject *
+_wrap_g_file_query_writable_namespaces(PyGObject *self,
+                                       PyObject *args,
+                                       PyObject *kwargs)
+{
+    static char *kwlist[] = { "cancellable", NULL };
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable = NULL;
+    GFileAttributeInfoList *ret;
+    GError *error = NULL;
+    gint i, n_infos;
+    GFileAttributeInfo *infos;
+    PyObject *py_ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "|O:gio.File.query_writable_namespaces",
+                                     kwlist, &pycancellable))
+        return NULL;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        return NULL;
+
+    ret = g_file_query_writable_namespaces(G_FILE(self->obj),
+                                           (GCancellable *) cancellable,
+                                           &error);
+    if (pyg_error_check(&error))
+        return NULL;
+
+    n_infos = ret->n_infos;
+    infos = ret->infos;
+
+    if (n_infos > 0) {
+        py_ret = PyList_New(n_infos);
+        for (i = 0; i < n_infos; i++) {
+            PyList_SetItem(py_ret, i, pyg_file_attribute_info_new(&infos[i]));
+        }
+        g_file_attribute_info_list_unref(ret);
+        return py_ret;
+
+    } else {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+%%
+override g_file_append_to_async kwargs
+static PyObject *
+_wrap_g_file_append_to_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "io_priority",
+                              "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    GFileCreateFlags flags = G_FILE_CREATE_NONE;
+    PyObject *py_flags = NULL;
+    int io_priority = G_PRIORITY_DEFAULT;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OiOO:File.append_to_async",
+                                      kwlist,
+                                      &notify->callback,
+                                      &py_flags, &io_priority,
+                                      &pycancellable,
+                                      &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_append_to_async(G_FILE(self->obj), flags, io_priority, cancellable,
+                           (GAsyncReadyCallback)async_result_callback_marshal,
+                           notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_create_async kwargs
+static PyObject *
+_wrap_g_file_create_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "io_priority",
+                              "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    GFileCreateFlags flags = G_FILE_CREATE_NONE;
+    PyObject *py_flags = NULL;
+    int io_priority = G_PRIORITY_DEFAULT;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OiOO:File.create_async",
+                                      kwlist,
+                                      &notify->callback,
+                                      &py_flags, &io_priority,
+                                      &pycancellable,
+                                      &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_create_async(G_FILE(self->obj), flags, io_priority, cancellable,
+                        (GAsyncReadyCallback)async_result_callback_marshal,
+                        notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_create_readwrite_async kwargs
+static PyObject *
+_wrap_g_file_create_readwrite_async(PyGObject *self,
+                                   PyObject *args,
+                                   PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "io_priority",
+                              "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    GFileCreateFlags flags = G_FILE_CREATE_NONE;
+    PyObject *py_flags = NULL;
+    int io_priority = G_PRIORITY_DEFAULT;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OiOO:File.create_readwrite_async",
+                                      kwlist,
+                                      &notify->callback,
+                                      &py_flags, &io_priority,
+                                      &pycancellable,
+                                      &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_create_readwrite_async(G_FILE(self->obj), flags, io_priority,
+                       cancellable,
+                        (GAsyncReadyCallback)async_result_callback_marshal,
+                        notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_open_readwrite_async kwargs
+static PyObject *
+_wrap_g_file_open_readwrite_async(PyGObject *self,
+                                  PyObject *args,
+                                  PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "io_priority",
+                              "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    int io_priority = G_PRIORITY_DEFAULT;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|iOO:File.open_readwrite_async",
+                                      kwlist,
+                                      &notify->callback,
+                                      &io_priority,
+                                      &pycancellable,
+                                      &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_open_readwrite_async(G_FILE(self->obj), io_priority, cancellable,
+                        (GAsyncReadyCallback)async_result_callback_marshal,
+                        notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_replace_readwrite_async kwargs
+static PyObject *
+_wrap_g_file_replace_readwrite_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "etag", "make_backup", "flags",
+                              "io_priority", "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    GFileCreateFlags flags = G_FILE_CREATE_NONE;
+    PyObject *py_flags = NULL;
+    int io_priority = G_PRIORITY_DEFAULT;
+    char *etag = NULL;
+    gboolean make_backup = TRUE;
+    PyObject *py_backup = Py_True;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|zOOiOO:File.replace_readwrite_async",
+                                      kwlist,
+                                      &notify->callback,
+                                      &etag, &py_backup,
+                                      &flags, &io_priority,
+                                      &pycancellable,
+                                      &notify->data))
+        goto error;
+
+    make_backup = PyObject_IsTrue(py_backup) ? TRUE : FALSE;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_replace_readwrite_async(G_FILE(self->obj), etag, make_backup, flags,
+                         io_priority, cancellable,
+                         (GAsyncReadyCallback)async_result_callback_marshal,
+                         notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_replace_async kwargs
+static PyObject *
+_wrap_g_file_replace_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "etag", "make_backup", "flags",
+                              "io_priority", "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    GFileCreateFlags flags = G_FILE_CREATE_NONE;
+    PyObject *py_flags = NULL;
+    int io_priority = G_PRIORITY_DEFAULT;
+    char *etag = NULL;
+    gboolean make_backup = TRUE;
+    PyObject *py_backup = Py_True;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|zOOiOO:File.replace_async",
+                                      kwlist,
+                                      &notify->callback,
+                                      &etag, &py_backup,
+                                      &py_flags, &io_priority,
+                                      &pycancellable,
+                                      &notify->data))
+        goto error;
+
+    make_backup = PyObject_IsTrue(py_backup) ? TRUE : FALSE;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_replace_async(G_FILE(self->obj), etag, make_backup, flags,
+                         io_priority, cancellable,
+                         (GAsyncReadyCallback)async_result_callback_marshal,
+                         notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_query_info_async kwargs
+static PyObject *
+_wrap_g_file_query_info_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "attributes", "callback", "flags",
+                              "io_priority", "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
+    PyObject *py_flags = NULL;
+    int io_priority = G_PRIORITY_DEFAULT;
+    char *attributes;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "sO|OiOO:File.query_info_async",
+                                     kwlist,
+                                     &attributes,
+                                     &notify->callback,
+                                     &flags, &io_priority,
+                                     &pycancellable,
+                                     &notify->data)) {
+        /* To preserve compatibility with 2.16 we also allow swapped
+         * 'attributes' and 'callback'.  FIXME: Remove for 3.0. */
+        static char *old_kwlist[] = { "callback", "attributes", "flags",
+                                      "io_priority", "cancellable", "user_data", NULL };
+        PyObject *exc_type, *exc_value, *exc_traceback;
+
+        PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
+
+        if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                         "Os|OiOO:File.query_info_async",
+                                         old_kwlist,
+                                         &notify->callback,
+                                         &attributes,
+                                         &flags, &io_priority,
+                                         &pycancellable,
+                                         &notify->data)
+            || !pygio_notify_callback_is_valid(notify)) {
+            /* Report the error with new parameters. */
+            PyErr_Restore(exc_type, exc_value, exc_traceback);
+            goto error;
+        }
+
+        Py_XDECREF(exc_type);
+        Py_XDECREF(exc_value);
+        Py_XDECREF(exc_traceback);
+    }
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_query_info_async(G_FILE(self->obj), attributes, flags,
+                         io_priority, cancellable,
+                         (GAsyncReadyCallback)async_result_callback_marshal,
+                         notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_replace_contents kwargs
+static PyObject *
+_wrap_g_file_replace_contents(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "contents", "etag", "make_backup",
+                              "flags", "cancellable", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    GFileCreateFlags flags = G_FILE_CREATE_NONE;
+    PyObject *py_flags = NULL;
+    gsize length;
+    gboolean make_backup = FALSE;
+    char *contents;
+    char *etag = NULL;
+    char *new_etag = NULL;
+    GError *error = NULL;
+    gboolean ret;
+    PyObject *py_ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "s#|zbOO:File.replace_contents",
+                                     kwlist,
+                                     &contents,
+                                     &length,
+                                     &etag,
+                                     &make_backup,
+                                     &flags,
+                                     &cancellable))
+    {
+        return NULL;
+    }
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        return NULL;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        return NULL;
+
+    pyg_begin_allow_threads;
+
+    ret = g_file_replace_contents(G_FILE(self->obj), contents, length, etag,
+                                  make_backup, flags, &new_etag, cancellable,
+                                  &error);
+
+    pyg_end_allow_threads;
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (ret) {
+        py_ret = PyString_FromString(new_etag);
+    } else {
+        py_ret = Py_None;
+        Py_INCREF(py_ret);
+    }
+
+    g_free(new_etag);
+    return py_ret;
+}
+%%
+override g_file_replace_contents_finish kwargs
+static PyObject *
+_wrap_g_file_replace_contents_finish(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "result", NULL };
+    PyGObject *res;
+    gchar *etag_out = NULL;
+    GError *error = NULL;
+    gboolean ret;
+    PyObject *py_ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!:File.replace_contents_finish",
+                                      kwlist,
+                                      &PyGAsyncResult_Type,
+                                      &res))
+        return NULL;
+
+    ret = g_file_replace_contents_finish(G_FILE(self->obj),
+                                         G_ASYNC_RESULT(res->obj), &etag_out,
+                                         &error);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (ret) {
+        py_ret = PyString_FromString(etag_out);
+        return py_ret;
+    } else {
+        py_ret = Py_None;
+        Py_INCREF(py_ret);
+    }
+
+    g_free(etag_out);
+    return py_ret;
+}
+%%
+override g_file_replace_contents_async kwargs
+static PyObject *
+_wrap_g_file_replace_contents_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "contents", "callback", "etag", "make_backup",
+                              "flags", "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    PyGIONotify *notify;
+    GFileCreateFlags flags = G_FILE_CREATE_NONE;
+    PyObject *py_flags = NULL;
+    gsize length;
+    gboolean make_backup = FALSE;
+    char *contents;
+    char *etag = NULL;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "s#O|zbOOO:File.replace_contents_async",
+                                      kwlist,
+                                      &contents,
+                                      &length,
+                                      &notify->callback,
+                                      &etag,
+                                      &make_backup,
+                                      &py_flags,
+                                      &pycancellable,
+                                      &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+    pygio_notify_copy_buffer(notify, contents, length);
+
+    g_file_replace_contents_async(G_FILE(self->obj),
+                                  notify->buffer,
+                                  notify->buffer_size,
+                                  etag,
+                                  make_backup,
+                                  flags,
+                                  cancellable,
+                                  (GAsyncReadyCallback)async_result_callback_marshal,
+                                  notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override-slot GFile.tp_richcompare
+static PyObject *
+_wrap_g_file_tp_richcompare(PyGObject *self, PyGObject *other, int op)
+{
+    PyObject *result;
+
+    if (PyObject_TypeCheck(self, &PyGFile_Type)
+        && PyObject_TypeCheck(other, &PyGFile_Type)) {
+        GFile *file1 = G_FILE(self->obj);
+        GFile *file2 = G_FILE(other->obj);
+
+        switch (op) {
+        case Py_EQ:
+            result = (g_file_equal(file1, file2)
+                      ? Py_True : Py_False);
+            break;
+        case Py_NE:
+            result = (!g_file_equal(file1, file2)
+                      ? Py_True : Py_False);
+            break;
+        default:
+            result = Py_NotImplemented;
+        }
+    }
+    else
+        result = Py_NotImplemented;
+
+    Py_INCREF(result);
+    return result;
+}
+%%
+override-slot GFile.tp_hash
+static long
+_wrap_g_file_tp_hash(PyGObject *self)
+{
+    return g_file_hash(G_FILE(self->obj));
+}
+%%
+override-slot GFile.tp_repr
+static PyObject *
+_wrap_g_file_tp_repr(PyGObject *self)
+{
+    char *uri = g_file_get_uri(G_FILE(self->obj));
+    gchar *representation;
+    PyObject *result;
+
+    if (uri) {
+       representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, uri);
+       g_free(uri);
+    }
+    else
+       representation = g_strdup_printf("<%s at %p: UNKNOWN URI>", self->ob_type->tp_name, self);
+
+    result = PyString_FromString(representation);
+    g_free(representation);
+    return result;
+}
+%%
+override g_file_eject_mountable kwargs
+static PyObject *
+_wrap_g_file_eject_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags",
+                              "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    GFileCreateFlags flags = G_FILE_CREATE_NONE;
+    PyObject *py_flags = NULL;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OOO:File.eject_mountable",
+                                      kwlist,
+                                      &notify->callback,
+                                      &flags,
+                                      &pycancellable,
+                                      &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_eject_mountable(G_FILE(self->obj), flags, cancellable,
+                           (GAsyncReadyCallback)async_result_callback_marshal,
+                           notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_eject_mountable_with_operation kwargs
+static PyObject *
+_wrap_g_file_eject_mountable_with_operation(PyGObject *self,
+                                           PyObject *args,
+                                           PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "mount_operation",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *mount_operation;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                "O|OOOO:File.eject_mountable_with_operation",
+                                kwlist,
+                                &notify->callback,
+                                &py_flags,
+                                &mount_operation,
+                                &py_cancellable,
+                                &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                        py_flags, (gpointer) &flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_eject_mountable_with_operation(G_FILE(self->obj), 
+                           flags,
+                           G_MOUNT_OPERATION(mount_operation->obj),
+                           cancellable,
+                           (GAsyncReadyCallback) async_result_callback_marshal,
+                           notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_find_enclosing_mount_async kwargs
+static PyObject *
+_wrap_g_file_find_enclosing_mount_async(PyGObject *self,
+                                  PyObject *args,
+                                  PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "io_priority",
+                             "cancellable", "user_data", NULL };
+    int io_priority = G_PRIORITY_DEFAULT;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    PyGIONotify *notify;
+  
+    notify = pygio_notify_new();
+  
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "O|iOO:File.enclosing_mount_async",
+                                    kwlist,
+                                    &notify->callback,
+                                    &io_priority,
+                                    &pycancellable,
+                                    &notify->data))
+       goto error;
+  
+    if (!pygio_notify_callback_is_valid(notify))
+       goto error;
+  
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+       goto error;
+  
+    pygio_notify_reference_callback(notify);
+  
+    g_file_find_enclosing_mount_async(G_FILE(self->obj),
+                           io_priority,
+                           cancellable,
+                           (GAsyncReadyCallback)async_result_callback_marshal,
+                           notify);
+  
+    Py_INCREF(Py_None);
+       return Py_None;
+  
+    error:
+       pygio_notify_free(notify);
+       return NULL;
+}
+%%
+override g_file_query_filesystem_info_async kwargs
+static PyObject *
+_wrap_g_file_query_filesystem_info_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "attributes", "callback",
+                             "io_priority", "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    char *attributes;
+    int io_priority = G_PRIORITY_DEFAULT;
+    GCancellable *cancellable = NULL;
+    PyGObject *py_cancellable = NULL;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "sO|iOO:gio.File.query_filesystem_info_async",
+                                    kwlist,
+                                    &attributes,
+                                    &notify->callback,
+                                    &io_priority,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+       goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_query_filesystem_info_async(G_FILE(self->obj),
+                                      attributes,
+                                      io_priority,
+                                      (GCancellable *) cancellable,
+                                      (GAsyncReadyCallback)async_result_callback_marshal,
+                                      notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_set_attributes_async kwargs
+static PyObject *
+_wrap_g_file_set_attributes_async(PyGObject *self,
+                                 PyObject *args,
+                                 PyObject *kwargs)
+{
+    static char *kwlist[] = { "info", "callback", "flags",
+                             "io_priority", "cancellable", "user_data", NULL };
+    PyGObject *info;
+    PyGIONotify *notify;
+    GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
+    int io_priority = G_PRIORITY_DEFAULT;
+    GCancellable *cancellable = NULL;
+    PyGObject *py_cancellable = NULL;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "O!O|OiOO:gio.File.set_attributes_async",
+                                    kwlist,
+                                    &PyGFileInfo_Type,
+                                    &info,
+                                    &notify->callback,
+                                    &flags,
+                                    &io_priority,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+       goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_set_attributes_async(G_FILE(self->obj),
+                           G_FILE_INFO(info->obj),
+                           flags,
+                           io_priority,
+                           (GCancellable *) cancellable,
+                           (GAsyncReadyCallback)async_result_callback_marshal,
+                           notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+
+%%
+override g_file_set_attributes_finish kwargs
+static PyObject *
+_wrap_g_file_set_attributes_finish(PyGObject *self,
+                                  PyObject *args,
+                                  PyObject *kwargs)
+{
+    static char *kwlist[] = { "result", NULL };
+    PyGObject *res;
+    GFileInfo *info = NULL;
+    GError *error = NULL;
+    gboolean ret;
+    PyObject *py_ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!:File.set_attributes_finish",
+                                      kwlist,
+                                      &PyGAsyncResult_Type,
+                                      &res))
+        return NULL;
+
+    ret = g_file_set_attributes_finish(G_FILE(self->obj),
+                                       G_ASYNC_RESULT(res->obj), &info,
+                                       &error);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (ret) {
+        py_ret = pygobject_new((GObject *)info);
+    } else {
+        py_ret = Py_None;
+        Py_INCREF(py_ret);
+    }
+
+    return py_ret;
+}
+%%
+override g_file_set_display_name_async kwargs
+static PyObject *
+_wrap_g_file_set_display_name_async(PyGObject *self,
+                                   PyObject *args,
+                                   PyObject *kwargs)
+{
+    static char *kwlist[] = { "display_name", "callback",
+                             "io_priority", "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    char *display_name;
+    int io_priority = G_PRIORITY_DEFAULT;
+    GCancellable *cancellable = NULL;
+    PyGObject *py_cancellable = NULL;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "sO|iOO:gio.File.set_display_name_async",
+                                    kwlist,
+                                    &display_name,
+                                    &notify->callback,
+                                    &io_priority,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+       goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_set_display_name_async(G_FILE(self->obj),
+                           display_name,
+                           io_priority,
+                           (GCancellable *) cancellable,
+                           (GAsyncReadyCallback)async_result_callback_marshal,
+                           notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_poll_mountable kwargs
+static PyObject *
+_wrap_g_file_poll_mountable(PyGObject *self,
+                                  PyObject *args,
+                                  PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OO:File.poll_mountable",
+                                      kwlist,
+                                      &notify->callback,
+                                      &pycancellable,
+                                      &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_poll_mountable(G_FILE(self->obj), cancellable,
+                        (GAsyncReadyCallback)async_result_callback_marshal,
+                        notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_start_mountable kwargs
+static PyObject *
+_wrap_g_file_start_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "start_operation",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *mount_operation;
+    GDriveStartFlags flags = G_DRIVE_START_NONE;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OOOO:File.start_mountable",
+                                     kwlist,
+                                     &notify->callback,
+                                     &py_flags,
+                                     &mount_operation,
+                                     &py_cancellable,
+                                     &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_DRIVE_START_FLAGS,
+                                        py_flags, (gpointer) &flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_start_mountable(G_FILE(self->obj), 
+                 flags,
+                 G_MOUNT_OPERATION(mount_operation->obj),
+                 cancellable,
+                 (GAsyncReadyCallback) async_result_callback_marshal,
+                 notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_stop_mountable kwargs
+static PyObject *
+_wrap_g_file_stop_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "mount_operation",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *mount_operation;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OOOO:gio.File.stop_mountable",
+                                     kwlist,
+                                     &notify->callback,
+                                     &py_flags,
+                                     &mount_operation,
+                                     &py_cancellable,
+                                     &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                        py_flags, (gpointer) &flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_stop_mountable(G_FILE(self->obj), 
+                 flags,
+                 G_MOUNT_OPERATION(mount_operation->obj),
+                 cancellable,
+                 (GAsyncReadyCallback) async_result_callback_marshal,
+                 notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+
+/* GFile.load_partial_contents_async: No ArgType for GFileReadMoreCallback */
+/* GFile.load_partial_contents_finish: No ArgType for char** */
diff --git a/gio/gfileattribute.override b/gio/gfileattribute.override
new file mode 100644 (file)
index 0000000..e51ec63
--- /dev/null
@@ -0,0 +1,153 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Gian Mario Tagliaretti
+ *
+ *   gfileattribute.override: module overrides for GFileAttribute*
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+headers
+
+extern PyTypeObject PyGFileAttributeInfo_Type;
+
+typedef struct {
+    PyObject_HEAD
+    const GFileAttributeInfo *info;
+} PyGFileAttributeInfo;
+
+static PyObject *
+pygio_file_attribute_info_tp_new(PyTypeObject *type)
+{
+    PyGFileAttributeInfo *self;
+    GFileAttributeInfo *info = NULL;
+
+    self = (PyGFileAttributeInfo *) PyObject_NEW(PyGFileAttributeInfo,
+                                              &PyGFileAttributeInfo_Type);
+    self->info = info;
+    return (PyObject *) self;
+}
+
+static PyMethodDef pyg_file_attribute_info_methods[] = {
+    { NULL,  0, 0 }
+};
+
+static PyObject *
+pyg_file_attribute_info__get_name(PyObject *self, void *closure)
+{
+    const gchar *ret;
+
+    ret = ((PyGFileAttributeInfo*)self)->info->name;
+    if (ret)
+        return PyString_FromString(ret);
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pyg_file_attribute_info__get_type(PyObject *self, void *closure)
+{
+    gint ret;
+
+    ret = ((PyGFileAttributeInfo*)self)->info->type;
+    return pyg_enum_from_gtype(G_TYPE_FILE_ATTRIBUTE_TYPE, ret);
+}
+
+static PyObject *
+pyg_file_attribute_info__get_flags(PyObject *self, void *closure)
+{
+    guint ret;
+
+    ret = ((PyGFileAttributeInfo*)self)->info->flags;
+    return pyg_flags_from_gtype(G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS, ret);
+}
+
+static const PyGetSetDef pyg_file_attribute_info_getsets[] = {
+    { "name", (getter)pyg_file_attribute_info__get_name, (setter)0 },
+    { "type", (getter)pyg_file_attribute_info__get_type, (setter)0 },
+    { "flags", (getter)pyg_file_attribute_info__get_flags, (setter)0 },
+    { NULL, (getter)0, (setter)0 },
+};
+
+PyTypeObject PyGFileAttributeInfo_Type = {
+    PyObject_HEAD_INIT(NULL)
+    0,                                  /* ob_size */
+    "gio.FileAttributeInfo",            /* tp_name */
+    sizeof(PyGFileAttributeInfo),      /* tp_basicsize */
+    0,                                  /* tp_itemsize */
+    /* methods */
+    (destructor)0,                      /* tp_dealloc */
+    (printfunc)0,                       /* tp_print */
+    (getattrfunc)0,                     /* tp_getattr */
+    (setattrfunc)0,                     /* tp_setattr */
+    (cmpfunc)0,                         /* tp_compare */
+    (reprfunc)0,                        /* tp_repr */
+    0,                                  /* tp_as_number */
+    0,                                  /* tp_as_sequence */
+    0,                                  /* tp_as_mapping */
+    (hashfunc)0,                        /* tp_hash */
+    (ternaryfunc)0,                     /* tp_call */
+    (reprfunc)0,                        /* tp_str */
+    (getattrofunc)0,                    /* tp_getattro */
+    (setattrofunc)0,                    /* tp_setattro */
+    0,                                  /* tp_as_buffer */
+    Py_TPFLAGS_DEFAULT,                 /* tp_flags */
+    "Holds information about an attribute", /* Documentation string */
+    (traverseproc)0,                    /* tp_traverse */
+    (inquiry)0,                         /* tp_clear */
+    (richcmpfunc)0,                     /* tp_richcompare */
+    0,                                  /* tp_weaklistoffset */
+    (getiterfunc)0,                     /* tp_iter */
+    (iternextfunc)0,                    /* tp_iternext */
+    (struct PyMethodDef*)pyg_file_attribute_info_methods,    /* tp_methods */
+    0,                                  /* tp_members */
+    (struct PyGetSetDef*)pyg_file_attribute_info_getsets,    /* tp_getset */
+    (PyTypeObject *)0,                  /* tp_base */
+    (PyObject *)0,                      /* tp_dict */
+    0,                                  /* tp_descr_get */
+    0,                                  /* tp_descr_set */
+    0,                                  /* tp_dictoffset */
+    (initproc)0,                        /* tp_init */
+    0,                                  /* tp_alloc */
+    (newfunc)pygio_file_attribute_info_tp_new,   /* tp_new */
+    0,                                  /* tp_free */
+    (inquiry)0,                         /* tp_is_gc */
+    (PyObject *)0,                      /* tp_bases */
+};
+
+PyObject*
+pyg_file_attribute_info_new(const GFileAttributeInfo *info)
+{
+    PyGFileAttributeInfo *self;
+
+    self = (PyGFileAttributeInfo *)PyObject_NEW(PyGFileAttributeInfo,
+                                             &PyGFileAttributeInfo_Type);
+    if (G_UNLIKELY(self == NULL))
+        return NULL;
+    if (info)
+        self->info = info;
+    return (PyObject *)self;
+}
+
+%%
+init
+if (PyType_Ready(&PyGFileAttributeInfo_Type) < 0) {
+    g_return_if_reached();
+}
+if (PyDict_SetItemString(d, "FileAttributeInfo",
+                         (PyObject *)&PyGFileAttributeInfo_Type) < 0) {
+    g_return_if_reached();
+}
diff --git a/gio/gfileenumerator.override b/gio/gfileenumerator.override
new file mode 100644 (file)
index 0000000..db29550
--- /dev/null
@@ -0,0 +1,184 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   gfileenumerator.override: module overrides for GFileEnumerator
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override-slot GFileEnumerator.tp_iter
+static PyObject*
+_wrap_g_file_enumerator_tp_iter(PyGObject *self)
+{
+    Py_INCREF (self);
+    return (PyObject *) self;
+}
+%%
+override-slot GFileEnumerator.tp_iternext
+static PyObject*
+_wrap_g_file_enumerator_tp_iternext(PyGObject *iter)
+{
+    GFileInfo *file_info;
+    GError *error = NULL;
+
+    if (!iter->obj) {
+       PyErr_SetNone(PyExc_StopIteration);
+       return NULL;
+    }
+
+    file_info = g_file_enumerator_next_file(G_FILE_ENUMERATOR(iter->obj),
+                                           NULL,
+                                           &error);
+    if (pyg_error_check(&error)) {
+        return NULL;
+    }
+    
+    if (!file_info) {
+       PyErr_SetNone(PyExc_StopIteration);
+       return NULL;
+    }
+
+    return pygobject_new((GObject*)file_info);
+}
+%%
+override g_file_enumerator_next_files_async kwargs
+static PyObject *
+_wrap_g_file_enumerator_next_files_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "num_files", "callback",
+                             "io_priority", "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    int num_files;
+    int io_priority = G_PRIORITY_DEFAULT;
+    GCancellable *cancellable = NULL;
+    PyGObject *py_cancellable = NULL;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "iO|iOO:gio.FileEnumerator.enumerate_next_files_async",
+                                    kwlist,
+                                    &num_files,
+                                    &notify->callback,
+                                    &io_priority,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+       goto error;
+
+    pygio_notify_reference_callback(notify);  
+    
+    g_file_enumerator_next_files_async(G_FILE_ENUMERATOR(self->obj),
+                                      num_files,
+                                      io_priority,
+                                      (GCancellable *) cancellable,
+                                      (GAsyncReadyCallback)async_result_callback_marshal,
+                                      notify);
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_file_enumerator_next_files_finish kwargs
+static PyObject *
+_wrap_g_file_enumerator_next_files_finish(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "result", NULL };
+    PyGObject *result;
+    GList *next_files, *l;
+    GError *error = NULL;
+    PyObject *ret;
+    
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "O!:gio.FileEnumerator.next_files_finish",
+                                    kwlist,
+                                    &PyGAsyncResult_Type, &result))
+        return NULL;
+    
+    next_files = g_file_enumerator_next_files_finish(G_FILE_ENUMERATOR(self->obj),
+                                                    G_ASYNC_RESULT(result->obj),
+                                                    &error);
+    if (pyg_error_check(&error))
+        return NULL;
+
+    ret = PyList_New(0);
+    for (l = next_files; l; l = l->next) {
+       GFileInfo *file_info = l->data;
+       PyObject *item = pygobject_new((GObject *)file_info);
+       PyList_Append(ret, item);
+       Py_DECREF(item);
+       g_object_unref(file_info);
+    }
+    g_list_free(next_files);
+
+    return ret;
+}
+%%
+override g_file_enumerator_close_async kwargs
+static PyObject *
+_wrap_g_file_enumerator_close_async(PyGObject *self,
+                                    PyObject *args,
+                                    PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "io_priority", "cancellable",
+                              "user_data", NULL };
+    int io_priority = G_PRIORITY_DEFAULT;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|iOO:gio.FileEnumerator.close_async",
+                                     kwlist,
+                                     &notify->callback,
+                                     &io_priority,
+                                     &pycancellable,
+                                     &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_enumerator_close_async(G_FILE_ENUMERATOR(self->obj),
+                           io_priority,
+                            cancellable,
+                            (GAsyncReadyCallback)async_result_callback_marshal,
+                            notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
diff --git a/gio/gfileinfo.override b/gio/gfileinfo.override
new file mode 100644 (file)
index 0000000..730e91b
--- /dev/null
@@ -0,0 +1,121 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ *               2009  Gian Mario Tagliaretti
+ *
+ *   gfileinfo.override: module overrides for GFileInfo
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+headers
+
+#ifndef G_TYPE_FILE_ATTRIBUTE_MATCHER
+#define G_TYPE_FILE_ATTRIBUTE_MATCHER (_g_file_attribute_matcher_get_type ())
+
+static GType _g_file_attribute_matcher_get_type (void)
+{
+  static GType our_type = 0;
+  
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static ("GFileAttributeMatcher",
+                                (GBoxedCopyFunc)g_file_attribute_matcher_ref,
+                                (GBoxedFreeFunc)g_file_attribute_matcher_unref);
+
+  return our_type;
+}
+#endif
+
+%%
+override g_file_info_list_attributes kwargs
+static PyObject *
+_wrap_g_file_info_list_attributes(PyGObject *self, 
+                                  PyObject  *args, 
+                                 PyObject  *kwargs)
+{
+    char *kwlist[] = { "name_space", NULL};
+    gchar *name_space = NULL;
+    gchar **names;
+    gchar **n;
+    PyObject *ret;
+    
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "|z:gio.FileInfo.list_attributes",
+                                    kwlist, &name_space))
+       return NULL;
+
+    names = g_file_info_list_attributes(G_FILE_INFO(self->obj),
+                                       name_space);
+
+    ret = PyList_New(0);
+    n = names;
+    while (n && *n) {
+        PyObject *item = PyString_FromString(n[0]);
+        PyList_Append(ret, item);
+        Py_DECREF(item);
+
+        n++;
+    }
+    
+    g_strfreev(names);
+    return ret;
+}
+%%
+override g_file_info_get_modification_time noargs
+static PyObject *
+_wrap_g_file_info_get_modification_time(PyGObject *self, PyObject *unused)
+{
+    GTimeVal timeval;
+
+    g_file_info_get_modification_time(G_FILE_INFO(self->obj), &timeval);
+    return pyglib_float_from_timeval(timeval);
+}
+%%
+override g_file_info_set_modification_time kwargs
+static PyObject *
+_wrap_g_file_info_set_modification_time(PyGObject *self, 
+                                        PyObject  *args, 
+                                        PyObject  *kwargs)
+{
+    char *kwlist[] = { "mtime", NULL};
+    double py_mtime = 0.0;
+    GTimeVal ttime, *mtime;
+    
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "d:gio.FileInfo.set_modification_time",
+                                     kwlist, &py_mtime))
+        return NULL;
+
+    if (py_mtime > 0.0) {
+       ttime.tv_sec = (glong) py_mtime;
+       ttime.tv_usec = (glong)((py_mtime - ttime.tv_sec) * G_USEC_PER_SEC);
+        mtime = &ttime;
+    } else if (py_mtime == 0.0) {
+       mtime = NULL;
+    } else {
+        PyErr_SetString(PyExc_ValueError, "mtime must be >= 0.0");
+        return NULL;
+    }
+    
+    g_file_info_set_modification_time(G_FILE_INFO(self->obj), mtime);
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+/* GFileInfo.get_attribute_data: No ArgType for GFileAttributeType* */
+/* GFileInfo.set_attribute: No ArgType for gpointer */
diff --git a/gio/gfileinputstream.override b/gio/gfileinputstream.override
new file mode 100644 (file)
index 0000000..5190a13
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009  Gian Mario Tagliaretti
+ *
+ *   gfileinputstream.override: module overrides for GFileInputStream
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_file_input_stream_query_info_async kwargs
+static PyObject *
+_wrap_g_file_input_stream_query_info_async(PyGObject *self,
+                                           PyObject *args,
+                                           PyObject *kwargs)
+{
+    static char *kwlist[] = { "attributes", "callback",
+                              "io_priority", "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    int io_priority = G_PRIORITY_DEFAULT;
+    char *attributes;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                "sO|iOO:gio.FileInputStream.query_info_async",
+                                kwlist,
+                                &attributes,
+                                &notify->callback,
+                                &io_priority,
+                                &pycancellable,
+                                &notify->data))
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_input_stream_query_info_async(G_FILE_INPUT_STREAM(self->obj),
+                         attributes, io_priority, cancellable,
+                         (GAsyncReadyCallback)async_result_callback_marshal,
+                         notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
diff --git a/gio/gfileiostream.override b/gio/gfileiostream.override
new file mode 100644 (file)
index 0000000..7be6124
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009  Gian Mario Tagliaretti
+ *
+ *   gfileiostream.override: module overrides for GFileIOStream
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_file_io_stream_query_info_async kwargs
+static PyObject *
+_wrap_g_file_io_stream_query_info_async(PyGObject *self,
+                                           PyObject *args,
+                                           PyObject *kwargs)
+{
+    static char *kwlist[] = { "attributes", "callback",
+                              "io_priority", "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    int io_priority = G_PRIORITY_DEFAULT;
+    char *attributes;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                "sO|iOO:gio.FileIOStream.query_info_async",
+                                kwlist,
+                                &attributes,
+                                &notify->callback,
+                                &io_priority,
+                                &pycancellable,
+                                &notify->data))
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_io_stream_query_info_async(G_FILE_IO_STREAM(self->obj),
+                         attributes, io_priority, cancellable,
+                         (GAsyncReadyCallback)async_result_callback_marshal,
+                         notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
diff --git a/gio/gfileoutputstream.override b/gio/gfileoutputstream.override
new file mode 100644 (file)
index 0000000..c5c184d
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009  Gian Mario Tagliaretti
+ *
+ *   gfileoutputstream.override: module overrides for GFileOuputStream
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_file_output_stream_query_info_async kwargs
+static PyObject *
+_wrap_g_file_output_stream_query_info_async(PyGObject *self,
+                                           PyObject *args,
+                                           PyObject *kwargs)
+{
+    static char *kwlist[] = { "attributes", "callback",
+                              "io_priority", "cancellable", "user_data", NULL };
+    GCancellable *cancellable;
+    PyGObject *pycancellable = NULL;
+    int io_priority = G_PRIORITY_DEFAULT;
+    char *attributes;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                "sO|iOO:gio.FileOutputStream.query_info_async",
+                                kwlist,
+                                &attributes,
+                                &notify->callback,
+                                &io_priority,
+                                &pycancellable,
+                                &notify->data))
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_output_stream_query_info_async(G_FILE_OUTPUT_STREAM(self->obj),
+                         attributes, io_priority, cancellable,
+                         (GAsyncReadyCallback)async_result_callback_marshal,
+                         notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
diff --git a/gio/gicon.override b/gio/gicon.override
new file mode 100644 (file)
index 0000000..c429556
--- /dev/null
@@ -0,0 +1,310 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   gicon.override: module overrides for GIcon and related types
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+ignore-glob
+  g_icon_hash
+  g_themed_icon_new_from_names
+  g_themed_icon_new_with_default_fallbacks
+%%
+override-slot GIcon.tp_richcompare
+static PyObject *
+_wrap_g_icon_tp_richcompare(PyGObject *self, PyGObject *other, int op)
+{
+    PyObject *result;
+
+    if (PyObject_TypeCheck(self, &PyGIcon_Type)
+        && PyObject_TypeCheck(other, &PyGIcon_Type)) {
+        GIcon *icon1 = G_ICON(self->obj);
+        GIcon *icon2 = G_ICON(other->obj);
+
+        switch (op) {
+        case Py_EQ:
+            result = (g_icon_equal(icon1, icon2)
+                      ? Py_True : Py_False);
+            break;
+        case Py_NE:
+            result = (!g_icon_equal(icon1, icon2)
+                      ? Py_True : Py_False);
+            break;
+        default:
+            result = Py_NotImplemented;
+        }
+    }
+    else
+        result = Py_NotImplemented;
+
+    Py_INCREF(result);
+    return result;
+}
+%%
+override-slot GIcon.tp_hash
+static long
+_wrap_g_icon_tp_hash(PyGObject *self)
+{
+    return g_icon_hash(G_ICON(self->obj));
+}
+%%
+override g_loadable_icon_load kwargs
+static PyObject *
+_wrap_g_loadable_icon_load(PyGObject *self,
+                           PyObject *args,
+                           PyObject *kwargs)
+{
+    static char *kwlist[] = { "size", "cancellable", NULL };
+    int size = 0;
+    char *type = NULL;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    GError *error = NULL;
+    GInputStream *stream;
+    PyObject *result;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "|iO:gio.LoadableIcon.load",
+                                    kwlist,
+                                    &size, &pycancellable))
+        return NULL;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+       return NULL;
+
+    stream = g_loadable_icon_load(G_LOADABLE_ICON(self->obj), size, &type,
+                                 cancellable, &error);
+    if (pyg_error_check(&error))
+        return NULL;
+
+    result = Py_BuildValue("Ns", pygobject_new((GObject *) stream), type);
+    g_free(type);
+    return result;
+}
+%%
+override g_loadable_icon_load_async kwargs
+static PyObject *
+_wrap_g_loadable_icon_load_async(PyGObject *self,
+                                PyObject *args,
+                                PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "size", "cancellable", "user_data", NULL };
+    int size = 0;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|iOO:gio.LoadableIcon.load_async",
+                                    kwlist,
+                                    &notify->callback, &size, &pycancellable, &notify->data))
+       goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+       goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_loadable_icon_load_async(G_LOADABLE_ICON(self->obj),
+                              size,
+                              cancellable,
+                              (GAsyncReadyCallback) async_result_callback_marshal,
+                              notify);
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_loadable_icon_load_finish kwargs
+static PyObject *
+_wrap_g_loadable_icon_load_finish(PyGObject *self,
+                                 PyObject *args,
+                                 PyObject *kwargs)
+{
+    static char *kwlist[] = { "res", NULL };
+    PyGObject *res;
+    char *type = NULL;
+    GError *error = NULL;
+    GInputStream *stream;
+    PyObject *result;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!:gio.LoadableIcon.load_finish",
+                                    kwlist,
+                                    &PyGAsyncResult_Type, &res))
+        return NULL;
+
+    stream = g_loadable_icon_load_finish(G_LOADABLE_ICON(self->obj),
+                                        G_ASYNC_RESULT(res->obj), &type, &error);
+    if (pyg_error_check(&error))
+        return NULL;
+
+    result = Py_BuildValue("Ns", pygobject_new((GObject *) stream), type);
+    g_free(type);
+    return result;
+}
+%%
+override-slot GFileIcon.tp_repr
+static PyObject *
+_wrap_g_file_icon_tp_repr(PyGObject *self)
+{
+    GFile *file = g_file_icon_get_file(G_FILE_ICON(self->obj));
+    char *uri = (file ? g_file_get_uri(file) : NULL);
+    gchar *representation;
+    PyObject *result;
+
+    if (uri) {
+       representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, uri);
+       g_free(uri);
+    }
+    else
+       representation = g_strdup_printf("<%s at %p: UNKNOWN URI>", self->ob_type->tp_name, self);
+
+    result = PyString_FromString(representation);
+    g_free(representation);
+    return result;
+}
+%%
+new-constructor G_TYPE_THEMED_ICON
+%%
+override g_themed_icon_new kwargs
+static int
+_wrap_g_themed_icon_new(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "name", "use_default_fallbacks", NULL };
+    PyObject *name;
+    gboolean use_default_fallbacks = FALSE;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:gio.ThemedIcon.__init__",
+                                    kwlist, &name, &use_default_fallbacks))
+       return -1;
+
+    if (PyString_Check(name)) {
+       pygobject_construct(self,
+                           "name", PyString_AsString(name),
+                           "use-default-fallbacks", use_default_fallbacks, NULL);
+       return 0;
+    }
+    else if (PySequence_Check(name)) {
+       PyObject *tuple = PySequence_Tuple(name);
+
+       if (tuple) {
+           int k;
+           int length = PyTuple_Size(tuple);
+           char **names = g_new(char *, length + 1);
+
+           for (k = 0; k < length; k++) {
+               PyObject *str = PyTuple_GetItem(tuple, k);
+               if (str && PyString_Check(str))
+                   names[k] = PyString_AsString(str);
+               else {
+                   Py_DECREF(tuple);
+                   g_free(names);
+                   goto error;
+               }
+           }
+
+           names[length] = NULL;
+           pygobject_construct(self,
+                               "names", names,
+                               "use-default-fallbacks", use_default_fallbacks, NULL);
+           Py_DECREF(tuple);
+           g_free(names);
+           return 0;
+       }
+    }
+
+ error:
+    if (!PyErr_Occurred()) {
+       PyErr_SetString(PyExc_TypeError,
+                       "argument 1 of gio.ThemedIcon.__init__ "
+                       "must be either a string or a sequence of strings");
+    }
+    return -1;
+}
+%%
+override g_themed_icon_get_names noargs
+static PyObject *
+_wrap_g_themed_icon_get_names(PyGObject *self)
+{
+    const char * const *names;
+    PyObject *ret;
+
+    names = g_themed_icon_get_names(G_THEMED_ICON(self->obj));
+
+    ret = PyList_New(0);
+    while (names && *names) {
+        PyObject *item = PyString_FromString(names[0]);
+        PyList_Append(ret, item);
+        Py_DECREF(item);
+
+        names++;
+    }
+
+    return ret;
+}
+%%
+override-slot GThemedIcon.tp_repr
+static PyObject *
+_wrap_g_themed_icon_tp_repr(PyGObject *self)
+{
+    const char * const *names = g_themed_icon_get_names(G_THEMED_ICON(self->obj));
+    GString *representation = g_string_new(NULL);
+    PyObject *result;
+
+    g_string_append_printf(representation, "<%s at %p: ", self->ob_type->tp_name, self);
+
+    if (names) {
+       gboolean first_name = TRUE;
+       while (*names) {
+           if (!first_name)
+               g_string_append(representation, ", ");
+           else
+               first_name = FALSE;
+
+           g_string_append(representation, *names++);
+       }
+    }
+
+    g_string_append(representation, ">");
+    result = PyString_FromString(representation->str);
+    g_string_free(representation, TRUE);
+    return result;
+}
+%%
+override g_emblemed_icon_get_emblems noargs
+static PyObject *
+_wrap_g_emblemed_icon_get_emblems(PyGObject *self)
+{
+    GList *list;
+    PyObject *ret;
+
+    list = g_emblemed_icon_get_emblems(G_EMBLEMED_ICON(self->obj));
+    
+    PYLIST_FROMGLIST(ret, list, pygobject_new(list_item), NULL, NULL);
+
+    return ret;
+}
diff --git a/gio/ginputstream.override b/gio/ginputstream.override
new file mode 100644 (file)
index 0000000..260b2fc
--- /dev/null
@@ -0,0 +1,344 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   ginputstream.override: module overrides for GInputStream
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+headers
+#define BUFSIZE 8192
+
+%%
+override g_input_stream_read kwargs
+static PyObject *
+_wrap_g_input_stream_read(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "count", "cancellable", NULL };
+    PyGObject *pycancellable = NULL;
+    PyObject *v;
+    GCancellable *cancellable;
+    long count = -1;
+    GError *error = NULL;
+    size_t bytesread, buffersize, chunksize;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "|lO:InputStream.read",
+                                     kwlist, &count,
+                                     &pycancellable))
+        return NULL;
+
+    buffersize = (count < 0 ? BUFSIZE : count);
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        return NULL;
+
+    v = PyString_FromStringAndSize((char *)NULL, buffersize);
+    if (v == NULL)
+        return NULL;
+
+    bytesread = 0;
+    for (;;)
+        {
+            pyg_begin_allow_threads;
+            errno = 0;
+            chunksize = g_input_stream_read(G_INPUT_STREAM(self->obj),
+                                            PyString_AS_STRING((PyStringObject *)v) + bytesread,
+                                            buffersize - bytesread, cancellable,
+                                            &error);
+            pyg_end_allow_threads;
+
+            if (pyg_error_check(&error)) {
+               Py_DECREF(v);
+               return NULL;
+           }
+           if (chunksize == 0) {
+               /* End of file. */
+                break;
+           }
+
+            bytesread += chunksize;
+            if (bytesread < buffersize) {
+               /* g_input_stream_read() decided to not read full buffer.  We
+                * then return early too, even if 'count' is less than 0.
+                */
+                break;
+           }
+
+            if (count < 0) {
+               buffersize += BUFSIZE;
+               if (_PyString_Resize(&v, buffersize) < 0)
+                   return NULL;
+           }
+            else {
+                /* Got what was requested. */
+                break;
+           }
+        }
+
+    if (bytesread != buffersize)
+        _PyString_Resize(&v, bytesread);
+
+    return v;
+}
+%%
+override g_input_stream_read_all kwargs
+static PyObject *
+_wrap_g_input_stream_read_all(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "count", "cancellable", NULL };
+    PyGObject *pycancellable = NULL;
+    PyObject *v;
+    GCancellable *cancellable;
+    long count = -1;
+    GError *error = NULL;
+    size_t bytesread, buffersize, chunksize;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "|lO:InputStream.read",
+                                     kwlist, &count,
+                                     &pycancellable))
+        return NULL;
+
+    buffersize = (count < 0 ? BUFSIZE : count);
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        return NULL;
+
+    v = PyString_FromStringAndSize((char *)NULL, buffersize);
+    if (v == NULL)
+        return NULL;
+
+    bytesread = 0;
+    for (;;)
+        {
+            pyg_begin_allow_threads;
+            errno = 0;
+            g_input_stream_read_all(G_INPUT_STREAM(self->obj),
+                                   PyString_AS_STRING((PyStringObject *)v) + bytesread,
+                                   buffersize - bytesread,
+                                   &chunksize,
+                                   cancellable, &error);
+            pyg_end_allow_threads;
+
+            if (pyg_error_check(&error)) {
+               Py_DECREF(v);
+               return NULL;
+           }
+
+            bytesread += chunksize;
+            if (bytesread < buffersize || chunksize == 0) {
+               /* End of file. */
+                break;
+           }
+
+            if (count < 0) {
+               buffersize += BUFSIZE;
+               if (_PyString_Resize(&v, buffersize) < 0)
+                   return NULL;
+           }
+            else {
+                /* Got what was requested. */
+                break;
+           }
+        }
+
+    if (bytesread != buffersize)
+        _PyString_Resize(&v, bytesread);
+
+    return v;
+}
+%%
+override g_input_stream_read_async kwargs
+static PyObject *
+_wrap_g_input_stream_read_async(PyGObject *self,
+                                PyObject *args,
+                                PyObject *kwargs)
+{
+    static char *kwlist[] = { "count", "callback", "io_priority",
+                              "cancellable", "user_data", NULL };
+    long count = -1;
+    int io_priority = G_PRIORITY_DEFAULT;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "lO|iOO:InputStream.read_async",
+                                     kwlist,
+                                     &count,
+                                     &notify->callback,
+                                     &io_priority,
+                                     &pycancellable,
+                                     &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    if (!pygio_notify_allocate_buffer(notify, count))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+    pygio_notify_attach_to_result(notify);
+
+    g_input_stream_read_async(G_INPUT_STREAM(self->obj),
+                              notify->buffer,
+                              notify->buffer_size,
+                              io_priority,
+                              cancellable,
+                              (GAsyncReadyCallback) async_result_callback_marshal,
+                              notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_input_stream_read_finish kwargs
+static PyObject *
+_wrap_g_input_stream_read_finish(PyGObject *self,
+                                 PyObject *args,
+                                 PyObject *kwargs)
+{
+    static char *kwlist[] = { "result", NULL };
+    PyGObject *result;
+    GError *error = NULL;
+    Py_ssize_t bytesread;
+    PyGIONotify *notify;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!:gio.InputStream.read_finish",
+                                     kwlist, &PyGAsyncResult_Type, &result))
+        return NULL;
+
+    bytesread = g_input_stream_read_finish(G_INPUT_STREAM(self->obj),
+                                           G_ASYNC_RESULT(result->obj), &error);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (bytesread == 0)
+        return PyString_FromString("");
+
+    notify = pygio_notify_get_attached(result);
+    return PyString_FromStringAndSize(notify->buffer, bytesread);
+}
+%%
+override g_input_stream_close_async kwargs
+static PyObject *
+_wrap_g_input_stream_close_async(PyGObject *self,
+                                 PyObject *args,
+                                 PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "io_priority", "cancellable",
+                              "user_data", NULL };
+    int io_priority = G_PRIORITY_DEFAULT;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|iOO:InputStream.close_async",
+                                     kwlist,
+                                     &notify->callback,
+                                     &io_priority,
+                                     &pycancellable,
+                                     &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_input_stream_close_async(G_INPUT_STREAM(self->obj),
+                               io_priority,
+                               cancellable,
+                               (GAsyncReadyCallback)async_result_callback_marshal,
+                               notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_input_stream_skip_async kwargs
+static PyObject *
+_wrap_g_input_stream_skip_async(PyGObject *self,
+                                PyObject *args,
+                                PyObject *kwargs)
+{
+    static char *kwlist[] = { "count", "callback", "io_priority",
+                              "cancellable", "user_data", NULL };
+    long count = -1;
+    int io_priority = G_PRIORITY_DEFAULT;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "lO|iOO:InputStream.skip_async",
+                                     kwlist,
+                                     &count,
+                                     &notify->callback,
+                                     &io_priority,
+                                     &pycancellable,
+                                     &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+    
+
+    g_input_stream_skip_async(G_INPUT_STREAM(self->obj),
+                              count,
+                              io_priority,
+                              cancellable,
+                              (GAsyncReadyCallback) async_result_callback_marshal,
+                              notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
diff --git a/gio/gio-types.defs b/gio/gio-types.defs
new file mode 100644 (file)
index 0000000..331e0bc
--- /dev/null
@@ -0,0 +1,807 @@
+;; -*- scheme -*-
+
+; interface definitions ...
+
+(define-interface AppInfo
+  (in-module "gio")
+  (c-name "GAppInfo")
+  (gtype-id "G_TYPE_APP_INFO")
+)
+
+(define-interface AsyncInitable
+  (in-module "gio")
+  (c-name "GAsyncInitable")
+  (gtype-id "G_TYPE_ASYNC_INITABLE")
+)
+
+(define-interface AsyncResult
+  (in-module "gio")
+  (c-name "GAsyncResult")
+  (gtype-id "G_TYPE_ASYNC_RESULT")
+)
+
+(define-interface Drive
+  (in-module "gio")
+  (c-name "GDrive")
+  (gtype-id "G_TYPE_DRIVE")
+)
+
+(define-interface File
+  (docstring
+"File(arg, path=None, uri=None) -> gio.File subclass\n"
+"\n"
+"If arg is specified; creates a GFile with the given argument from the\n"
+"command line.  The value of arg can be either a URI, an absolute path\n"
+"or a relative path resolved relative to the current working directory.\n"
+"If path is specified, create a file from an absolute or relative path.\n"
+"If uri is specified, create a file from a URI.\n\n"
+"This operation never fails, but the returned object might not \n"
+"support any I/O operation if arg points to a malformed path.")
+  (in-module "gio")
+  (c-name "GFile")
+  (gtype-id "G_TYPE_FILE")
+)
+
+(define-interface Icon
+  (in-module "gio")
+  (c-name "GIcon")
+  (gtype-id "G_TYPE_ICON")
+)
+
+(define-interface Initable
+  (in-module "gio")
+  (c-name "GInitable")
+  (gtype-id "G_TYPE_INITABLE")
+)
+
+(define-interface LoadableIcon
+  (in-module "gio")
+  (c-name "GLoadableIcon")
+  (gtype-id "G_TYPE_LOADABLE_ICON")
+)
+
+(define-interface Mount
+  (in-module "gio")
+  (c-name "GMount")
+  (gtype-id "G_TYPE_MOUNT")
+)
+
+(define-interface Seekable
+  (in-module "gio")
+  (c-name "GSeekable")
+  (gtype-id "G_TYPE_SEEKABLE")
+)
+
+(define-interface SocketConnectable
+  (in-module "gio")
+  (c-name "GSocketConnectable")
+  (gtype-id "G_TYPE_SOCKET_CONNECTABLE")
+)
+
+(define-interface Volume
+  (in-module "gio")
+  (c-name "GVolume")
+  (gtype-id "G_TYPE_VOLUME")
+)
+
+; boxed definitions ...
+
+(define-boxed FileAttributeMatcher
+  (in-module "gio")
+  (c-name "GFileAttributeMatcher")
+  (gtype-id "G_TYPE_FILE_ATTRIBUTE_MATCHER")
+)
+
+(define-boxed SrvTarget
+  (in-module "gio")
+  (c-name "GSrvTarget")
+  (gtype-id "G_TYPE_SRV_TARGET")
+)
+
+; object definitions ...
+
+(define-object AppLaunchContext
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GAppLaunchContext")
+  (gtype-id "G_TYPE_APP_LAUNCH_CONTEXT")
+)
+
+(define-object Cancellable
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GCancellable")
+  (gtype-id "G_TYPE_CANCELLABLE")
+)
+
+(define-object Emblem
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GEmblem")
+  (gtype-id "G_TYPE_EMBLEM")
+)
+
+(define-object EmblemedIcon
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GEmblemedIcon")
+  (gtype-id "G_TYPE_EMBLEMED_ICON")
+)
+
+(define-object FileEnumerator
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GFileEnumerator")
+  (gtype-id "G_TYPE_FILE_ENUMERATOR")
+)
+
+(define-object FileInfo
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GFileInfo")
+  (gtype-id "G_TYPE_FILE_INFO")
+)
+
+(define-object FileMonitor
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GFileMonitor")
+  (gtype-id "G_TYPE_FILE_MONITOR")
+)
+
+(define-object InputStream
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GInputStream")
+  (gtype-id "G_TYPE_INPUT_STREAM")
+)
+
+(define-object FileInputStream
+  (in-module "gio")
+  (parent "GInputStream")
+  (c-name "GFileInputStream")
+  (gtype-id "G_TYPE_FILE_INPUT_STREAM")
+)
+
+(define-object FileIOStream
+  (in-module "gio")
+  (parent "GIOStream")
+  (c-name "GFileIOStream")
+  (gtype-id "G_TYPE_FILE_IO_STREAM")
+)
+
+(define-object FilterInputStream
+  (in-module "gio")
+  (parent "GInputStream")
+  (c-name "GFilterInputStream")
+  (gtype-id "G_TYPE_FILTER_INPUT_STREAM")
+)
+
+(define-object BufferedInputStream
+  (in-module "gio")
+  (parent "GFilterInputStream")
+  (c-name "GBufferedInputStream")
+  (gtype-id "G_TYPE_BUFFERED_INPUT_STREAM")
+)
+
+(define-object DataInputStream
+  (in-module "gio")
+  (parent "GFilterInputStream")
+  (c-name "GDataInputStream")
+  (gtype-id "G_TYPE_DATA_INPUT_STREAM")
+)
+
+(define-object MemoryInputStream
+  (in-module "gio")
+  (parent "GInputStream")
+  (c-name "GMemoryInputStream")
+  (gtype-id "G_TYPE_MEMORY_INPUT_STREAM")
+)
+
+(define-object MountOperation
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GMountOperation")
+  (gtype-id "G_TYPE_MOUNT_OPERATION")
+)
+
+(define-object InetAddress
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GInetAddress")
+  (gtype-id "G_TYPE_INET_ADDRESS")
+)
+
+(define-object InetSocketAddress
+  (in-module "gio")
+  (parent "GSocketAddress")
+  (c-name "GInetSocketAddress")
+  (gtype-id "G_TYPE_INET_SOCKET_ADDRESS")
+)
+
+(define-object NetworkAddress
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GNetworkAddress")
+  (gtype-id "G_TYPE_NETWORK_ADDRESS")
+)
+
+(define-object NetworkService
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GNetworkService")
+  (gtype-id "G_TYPE_NETWORK_SERVICE")
+)
+
+(define-object Resolver
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GResolver")
+  (gtype-id "G_TYPE_RESOLVER")
+)
+
+(define-object Socket
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GSocket")
+  (gtype-id "G_TYPE_SOCKET")
+)
+
+(define-object SocketAddress
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GSocketAddress")
+  (gtype-id "G_TYPE_SOCKET_ADDRESS")
+)
+
+(define-object SocketAddressEnumerator
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GSocketAddressEnumerator")
+  (gtype-id "G_TYPE_SOCKET_ADDRESS_ENUMERATOR")
+)
+
+(define-object SocketClient
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GSocketClient")
+  (gtype-id "G_TYPE_SOCKET_CLIENT")
+)
+
+(define-object SocketConnection
+  (in-module "gio")
+  (parent "GIOStream")
+  (c-name "GSocketConnection")
+  (gtype-id "G_TYPE_SOCKET_CONNECTION")
+)
+
+(define-object SocketControlMessage
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GSocketControlMessage")
+  (gtype-id "G_TYPE_SOCKET_CONTROL_MESSAGE")
+)
+
+(define-object SocketListener
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GSocketListener")
+  (gtype-id "G_TYPE_SOCKET_LISTENER")
+)
+
+(define-object SocketService
+  (in-module "gio")
+  (parent "GSocketListener")
+  (c-name "GSocketService")
+  (gtype-id "G_TYPE_SOCKET_SERVICE")
+)
+
+(define-object TcpConnection
+  (in-module "gio")
+  (parent "GSocketConnection")
+  (c-name "GTcpConnection")
+  (gtype-id "G_TYPE_TCP_CONNECTION")
+)
+
+(define-object ThreadedSocketService
+  (in-module "gio")
+  (parent "GSocketService")
+  (c-name "GThreadedSocketService")
+  (gtype-id "G_TYPE_THREADED_SOCKET_SERVICE")
+)
+
+(define-object IOStream
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GIOStream")
+  (gtype-id "G_TYPE_IO_STREAM")
+)
+
+(define-object OutputStream
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GOutputStream")
+  (gtype-id "G_TYPE_OUTPUT_STREAM")
+)
+
+(define-object MemoryOutputStream
+  (in-module "gio")
+  (parent "GOutputStream")
+  (c-name "GMemoryOutputStream")
+  (gtype-id "G_TYPE_MEMORY_OUTPUT_STREAM")
+)
+
+(define-object FilterOutputStream
+  (in-module "gio")
+  (parent "GOutputStream")
+  (c-name "GFilterOutputStream")
+  (gtype-id "G_TYPE_FILTER_OUTPUT_STREAM")
+)
+
+(define-object BufferedOutputStream
+  (in-module "gio")
+  (parent "GFilterOutputStream")
+  (c-name "GBufferedOutputStream")
+  (gtype-id "G_TYPE_BUFFERED_OUTPUT_STREAM")
+)
+
+(define-object DataOutputStream
+  (in-module "gio")
+  (parent "GFilterOutputStream")
+  (c-name "GDataOutputStream")
+  (gtype-id "G_TYPE_DATA_OUTPUT_STREAM")
+)
+
+(define-object FileOutputStream
+  (in-module "gio")
+  (parent "GOutputStream")
+  (c-name "GFileOutputStream")
+  (gtype-id "G_TYPE_FILE_OUTPUT_STREAM")
+)
+
+(define-object SimpleAsyncResult
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GSimpleAsyncResult")
+  (gtype-id "G_TYPE_SIMPLE_ASYNC_RESULT")
+)
+
+(define-object Vfs
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GVfs")
+  (gtype-id "G_TYPE_VFS")
+)
+
+(define-object VolumeMonitor
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GVolumeMonitor")
+  (gtype-id "G_TYPE_VOLUME_MONITOR")
+)
+
+(define-object NativeVolumeMonitor
+  (in-module "gio")
+  (parent "GVolumeMonitor")
+  (c-name "GNativeVolumeMonitor")
+  (gtype-id "G_TYPE_NATIVE_VOLUME_MONITOR")
+)
+
+(define-object FileIcon
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GFileIcon")
+  (gtype-id "G_TYPE_FILE_ICON")
+  (implements "GIcon")
+  (implements "GLoadableIcon")
+)
+
+(define-object ThemedIcon
+  (in-module "gio")
+  (parent "GObject")
+  (c-name "GThemedIcon")
+  (gtype-id "G_TYPE_THEMED_ICON")
+  (implements "GIcon")
+)
+
+
+
+;; Enumerations and flags ...
+
+(define-flags AppInfoCreateFlags
+  (in-module "gio")
+  (c-name "GAppInfoCreateFlags")
+  (gtype-id "G_TYPE_APP_INFO_CREATE_FLAGS")
+  (values
+    '("none" "G_APP_INFO_CREATE_NONE")
+    '("needs-terminal" "G_APP_INFO_CREATE_NEEDS_TERMINAL")
+    '("supports-uris" "G_APP_INFO_CREATE_SUPPORTS_URIS")
+  )
+)
+
+(define-flags ConverterFlags
+  (in-module "gio")
+  (c-name "GConverterFlags")
+  (gtype-id "G_TYPE_CONVERTER_FLAGS")
+  (values
+    '("no-flags" "G_CONVERTER_NO_FLAGS")
+    '("input-at-end" "G_CONVERTER_INPUT_AT_END")
+    '("flush" "G_CONVERTER_FLUSH")
+  )
+)
+
+(define-enum ConverterResult
+  (in-module "gio")
+  (c-name "GConverterResult")
+  (gtype-id "G_TYPE_CONVERTER_RESULT")
+  (values
+    '("error" "G_CONVERTER_ERROR")
+    '("converted" "G_CONVERTER_CONVERTED")
+    '("finished" "G_CONVERTER_FINISHED")
+    '("flushed" "G_CONVERTER_FLUSHED")
+  )
+)
+
+(define-enum DataStreamByteOrder
+  (in-module "gio")
+  (c-name "GDataStreamByteOrder")
+  (gtype-id "G_TYPE_DATA_STREAM_BYTE_ORDER")
+  (values
+    '("big-endian" "G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN")
+    '("little-endian" "G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN")
+    '("host-endian" "G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN")
+  )
+)
+
+(define-enum DataStreamNewlineType
+  (in-module "gio")
+  (c-name "GDataStreamNewlineType")
+  (gtype-id "G_TYPE_DATA_STREAM_NEWLINE_TYPE")
+  (values
+    '("lf" "G_DATA_STREAM_NEWLINE_TYPE_LF")
+    '("cr" "G_DATA_STREAM_NEWLINE_TYPE_CR")
+    '("cr-lf" "G_DATA_STREAM_NEWLINE_TYPE_CR_LF")
+    '("any" "G_DATA_STREAM_NEWLINE_TYPE_ANY")
+  )
+)
+
+(define-enum FileAttributeType
+  (in-module "gio")
+  (c-name "GFileAttributeType")
+  (gtype-id "G_TYPE_FILE_ATTRIBUTE_TYPE")
+  (values
+    '("invalid" "G_FILE_ATTRIBUTE_TYPE_INVALID")
+    '("string" "G_FILE_ATTRIBUTE_TYPE_STRING")
+    '("byte-string" "G_FILE_ATTRIBUTE_TYPE_BYTE_STRING")
+    '("boolean" "G_FILE_ATTRIBUTE_TYPE_BOOLEAN")
+    '("uint32" "G_FILE_ATTRIBUTE_TYPE_UINT32")
+    '("int32" "G_FILE_ATTRIBUTE_TYPE_INT32")
+    '("uint64" "G_FILE_ATTRIBUTE_TYPE_UINT64")
+    '("int64" "G_FILE_ATTRIBUTE_TYPE_INT64")
+    '("object" "G_FILE_ATTRIBUTE_TYPE_OBJECT")
+    '("stringv" "G_FILE_ATTRIBUTE_TYPE_STRINGV")
+  )
+)
+
+(define-flags FileAttributeInfoFlags
+  (in-module "gio")
+  (c-name "GFileAttributeInfoFlags")
+  (gtype-id "G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS")
+  (values
+    '("none" "G_FILE_ATTRIBUTE_INFO_NONE")
+    '("copy-with-file" "G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE")
+    '("copy-when-moved" "G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED")
+  )
+)
+
+(define-enum FileAttributeStatus
+  (in-module "gio")
+  (c-name "GFileAttributeStatus")
+  (gtype-id "G_TYPE_FILE_ATTRIBUTE_STATUS")
+  (values
+    '("unset" "G_FILE_ATTRIBUTE_STATUS_UNSET")
+    '("set" "G_FILE_ATTRIBUTE_STATUS_SET")
+    '("error-setting" "G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING")
+  )
+)
+
+(define-flags FileQueryInfoFlags
+  (in-module "gio")
+  (c-name "GFileQueryInfoFlags")
+  (gtype-id "G_TYPE_FILE_QUERY_INFO_FLAGS")
+  (values
+    '("none" "G_FILE_QUERY_INFO_NONE")
+    '("nofollow-symlinks" "G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS")
+  )
+)
+
+(define-flags FileCreateFlags
+  (in-module "gio")
+  (c-name "GFileCreateFlags")
+  (gtype-id "G_TYPE_FILE_CREATE_FLAGS")
+  (values
+    '("none" "G_FILE_CREATE_NONE")
+    '("private" "G_FILE_CREATE_PRIVATE")
+    '("replace-destination" "G_FILE_CREATE_REPLACE_DESTINATION")
+  )
+)
+
+(define-enum MountMountFlags
+  (in-module "gio")
+  (c-name "GMountMountFlags")
+  (gtype-id "G_TYPE_MOUNT_MOUNT_FLAGS")
+  (values
+    '("none" "G_MOUNT_MOUNT_NONE")
+  )
+)
+
+(define-flags MountUnmountFlags
+  (in-module "gio")
+  (c-name "GMountUnmountFlags")
+  (gtype-id "G_TYPE_MOUNT_UNMOUNT_FLAGS")
+  (values
+    '("none" "G_MOUNT_UNMOUNT_NONE")
+    '("force" "G_MOUNT_UNMOUNT_FORCE")
+  )
+)
+
+(define-enum DriveStartFlags
+  (in-module "gio")
+  (c-name "GDriveStartFlags")
+  (gtype-id "G_TYPE_DRIVE_START_FLAGS")
+  (values
+    '("none" "G_DRIVE_START_NONE")
+  )
+)
+
+(define-enum DriveStartStopType
+  (in-module "gio")
+  (c-name "GDriveStartStopType")
+  (gtype-id "G_TYPE_DRIVE_START_STOP_TYPE")
+  (values
+    '("unknown" "G_DRIVE_START_STOP_TYPE_UNKNOWN")
+    '("shutdown" "G_DRIVE_START_STOP_TYPE_SHUTDOWN")
+    '("network" "G_DRIVE_START_STOP_TYPE_NETWORK")
+    '("multidisk" "G_DRIVE_START_STOP_TYPE_MULTIDISK")
+    '("password" "G_DRIVE_START_STOP_TYPE_PASSWORD")
+  )
+)
+
+(define-flags FileCopyFlags
+  (in-module "gio")
+  (c-name "GFileCopyFlags")
+  (gtype-id "G_TYPE_FILE_COPY_FLAGS")
+  (values
+    '("none" "G_FILE_COPY_NONE")
+    '("overwrite" "G_FILE_COPY_OVERWRITE")
+    '("backup" "G_FILE_COPY_BACKUP")
+    '("nofollow-symlinks" "G_FILE_COPY_NOFOLLOW_SYMLINKS")
+    '("all-metadata" "G_FILE_COPY_ALL_METADATA")
+    '("no-fallback-for-move" "G_FILE_COPY_NO_FALLBACK_FOR_MOVE")
+    '("target-default-perms" "G_FILE_COPY_TARGET_DEFAULT_PERMS")
+  )
+)
+
+(define-flags FileMonitorFlags
+  (in-module "gio")
+  (c-name "GFileMonitorFlags")
+  (gtype-id "G_TYPE_FILE_MONITOR_FLAGS")
+  (values
+    '("none" "G_FILE_MONITOR_NONE")
+    '("watch-mounts" "G_FILE_MONITOR_WATCH_MOUNTS")
+  )
+)
+
+(define-enum FileType
+  (in-module "gio")
+  (c-name "GFileType")
+  (gtype-id "G_TYPE_FILE_TYPE")
+  (values
+    '("unknown" "G_FILE_TYPE_UNKNOWN")
+    '("regular" "G_FILE_TYPE_REGULAR")
+    '("directory" "G_FILE_TYPE_DIRECTORY")
+    '("symbolic-link" "G_FILE_TYPE_SYMBOLIC_LINK")
+    '("special" "G_FILE_TYPE_SPECIAL")
+    '("shortcut" "G_FILE_TYPE_SHORTCUT")
+    '("mountable" "G_FILE_TYPE_MOUNTABLE")
+  )
+)
+
+(define-enum FilesystemPreviewType
+  (in-module "gio")
+  (c-name "GFilesystemPreviewType")
+  (gtype-id "G_TYPE_FILESYSTEM_PREVIEW_TYPE")
+  (values
+    '("if-always" "G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS")
+    '("if-local" "G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL")
+    '("never" "G_FILESYSTEM_PREVIEW_TYPE_NEVER")
+  )
+)
+
+(define-enum FileMonitorEvent
+  (in-module "gio")
+  (c-name "GFileMonitorEvent")
+  (gtype-id "G_TYPE_FILE_MONITOR_EVENT")
+  (values
+    '("changed" "G_FILE_MONITOR_EVENT_CHANGED")
+    '("changes-done-hint" "G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT")
+    '("deleted" "G_FILE_MONITOR_EVENT_DELETED")
+    '("created" "G_FILE_MONITOR_EVENT_CREATED")
+    '("attribute-changed" "G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED")
+    '("pre-unmount" "G_FILE_MONITOR_EVENT_PRE_UNMOUNT")
+    '("unmounted" "G_FILE_MONITOR_EVENT_UNMOUNTED")
+  )
+)
+
+(define-enum ErrorEnum
+  (in-module "gio")
+  (c-name "GIOErrorEnum")
+  (gtype-id "G_TYPE_IO_ERROR_ENUM")
+  (values
+    '("failed" "G_IO_ERROR_FAILED")
+    '("not-found" "G_IO_ERROR_NOT_FOUND")
+    '("exists" "G_IO_ERROR_EXISTS")
+    '("is-directory" "G_IO_ERROR_IS_DIRECTORY")
+    '("not-directory" "G_IO_ERROR_NOT_DIRECTORY")
+    '("not-empty" "G_IO_ERROR_NOT_EMPTY")
+    '("not-regular-file" "G_IO_ERROR_NOT_REGULAR_FILE")
+    '("not-symbolic-link" "G_IO_ERROR_NOT_SYMBOLIC_LINK")
+    '("not-mountable-file" "G_IO_ERROR_NOT_MOUNTABLE_FILE")
+    '("filename-too-long" "G_IO_ERROR_FILENAME_TOO_LONG")
+    '("invalid-filename" "G_IO_ERROR_INVALID_FILENAME")
+    '("too-many-links" "G_IO_ERROR_TOO_MANY_LINKS")
+    '("no-space" "G_IO_ERROR_NO_SPACE")
+    '("invalid-argument" "G_IO_ERROR_INVALID_ARGUMENT")
+    '("permission-denied" "G_IO_ERROR_PERMISSION_DENIED")
+    '("not-supported" "G_IO_ERROR_NOT_SUPPORTED")
+    '("not-mounted" "G_IO_ERROR_NOT_MOUNTED")
+    '("already-mounted" "G_IO_ERROR_ALREADY_MOUNTED")
+    '("closed" "G_IO_ERROR_CLOSED")
+    '("cancelled" "G_IO_ERROR_CANCELLED")
+    '("pending" "G_IO_ERROR_PENDING")
+    '("read-only" "G_IO_ERROR_READ_ONLY")
+    '("cant-create-backup" "G_IO_ERROR_CANT_CREATE_BACKUP")
+    '("wrong-etag" "G_IO_ERROR_WRONG_ETAG")
+    '("timed-out" "G_IO_ERROR_TIMED_OUT")
+    '("would-recurse" "G_IO_ERROR_WOULD_RECURSE")
+    '("busy" "G_IO_ERROR_BUSY")
+    '("would-block" "G_IO_ERROR_WOULD_BLOCK")
+    '("host-not-found" "G_IO_ERROR_HOST_NOT_FOUND")
+    '("would-merge" "G_IO_ERROR_WOULD_MERGE")
+    '("failed-handled" "G_IO_ERROR_FAILED_HANDLED")
+    '("too-many-open-files" "G_IO_ERROR_TOO_MANY_OPEN_FILES")
+    '("not-initialized" "G_IO_ERROR_NOT_INITIALIZED")
+    '("address-in-use" "G_IO_ERROR_ADDRESS_IN_USE")
+    '("partial-input" "G_IO_ERROR_PARTIAL_INPUT")
+    '("invalid-data" "G_IO_ERROR_INVALID_DATA")
+  )
+)
+
+(define-flags AskPasswordFlags
+  (in-module "gio")
+  (c-name "GAskPasswordFlags")
+  (gtype-id "G_TYPE_ASK_PASSWORD_FLAGS")
+  (values
+    '("need-password" "G_ASK_PASSWORD_NEED_PASSWORD")
+    '("need-username" "G_ASK_PASSWORD_NEED_USERNAME")
+    '("need-domain" "G_ASK_PASSWORD_NEED_DOMAIN")
+    '("saving-supported" "G_ASK_PASSWORD_SAVING_SUPPORTED")
+    '("anonymous-supported" "G_ASK_PASSWORD_ANONYMOUS_SUPPORTED")
+  )
+)
+
+(define-enum PasswordSave
+  (in-module "gio")
+  (c-name "GPasswordSave")
+  (gtype-id "G_TYPE_PASSWORD_SAVE")
+  (values
+    '("never" "G_PASSWORD_SAVE_NEVER")
+    '("for-session" "G_PASSWORD_SAVE_FOR_SESSION")
+    '("permanently" "G_PASSWORD_SAVE_PERMANENTLY")
+  )
+)
+
+(define-enum MountOperationResult
+  (in-module "gio")
+  (c-name "GMountOperationResult")
+  (gtype-id "G_TYPE_MOUNT_OPERATION_RESULT")
+  (values
+    '("handled" "G_MOUNT_OPERATION_HANDLED")
+    '("aborted" "G_MOUNT_OPERATION_ABORTED")
+    '("unhandled" "G_MOUNT_OPERATION_UNHANDLED")
+  )
+)
+
+(define-flags OutputStreamSpliceFlags
+  (in-module "gio")
+  (c-name "GOutputStreamSpliceFlags")
+  (gtype-id "G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS")
+  (values
+    '("none" "G_OUTPUT_STREAM_SPLICE_NONE")
+    '("close-source" "G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE")
+    '("close-target" "G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET")
+  )
+)
+
+(define-enum EmblemOrigin
+  (in-module "gio")
+  (c-name "GEmblemOrigin")
+  (gtype-id "G_TYPE_EMBLEM_ORIGIN")
+  (values
+    '("unknown" "G_EMBLEM_ORIGIN_UNKNOWN")
+    '("device" "G_EMBLEM_ORIGIN_DEVICE")
+    '("livemetadata" "G_EMBLEM_ORIGIN_LIVEMETADATA")
+    '("tag" "G_EMBLEM_ORIGIN_TAG")
+  )
+)
+
+(define-enum ResolverError
+  (in-module "gio")
+  (c-name "GResolverError")
+  (gtype-id "G_TYPE_RESOLVER_ERROR")
+  (values
+    '("not-found" "G_RESOLVER_ERROR_NOT_FOUND")
+    '("temporary-failure" "G_RESOLVER_ERROR_TEMPORARY_FAILURE")
+    '("internal" "G_RESOLVER_ERROR_INTERNAL")
+  )
+)
+
+(define-enum SocketFamily
+  (in-module "gio")
+  (c-name "GSocketFamily")
+  (gtype-id "G_TYPE_SOCKET_FAMILY")
+  (values
+    '("invalid" "G_SOCKET_FAMILY_INVALID")
+    '("unix" "G_SOCKET_FAMILY_UNIX")
+    '("ipv4" "G_SOCKET_FAMILY_IPV4")
+    '("ipv6" "G_SOCKET_FAMILY_IPV6")
+  )
+)
+
+(define-enum SocketType
+  (in-module "gio")
+  (c-name "GSocketType")
+  (gtype-id "G_TYPE_SOCKET_TYPE")
+  (values
+    '("invalid" "G_SOCKET_TYPE_INVALID")
+    '("stream" "G_SOCKET_TYPE_STREAM")
+    '("datagram" "G_SOCKET_TYPE_DATAGRAM")
+    '("seqpacket" "G_SOCKET_TYPE_SEQPACKET")
+  )
+)
+
+(define-enum SocketMsgFlags
+  (in-module "gio")
+  (c-name "GSocketMsgFlags")
+  (gtype-id "G_TYPE_SOCKET_MSG_FLAGS")
+  (values
+    '("none" "G_SOCKET_MSG_NONE")
+    '("oob" "G_SOCKET_MSG_OOB")
+    '("peek" "G_SOCKET_MSG_PEEK")
+    '("dontroute" "G_SOCKET_MSG_DONTROUTE")
+  )
+)
+
+(define-enum SocketProtocol
+  (in-module "gio")
+  (c-name "GSocketProtocol")
+  (gtype-id "G_TYPE_SOCKET_PROTOCOL")
+  (values
+    '("unknown" "G_SOCKET_PROTOCOL_UNKNOWN")
+    '("default" "G_SOCKET_PROTOCOL_DEFAULT")
+    '("tcp" "G_SOCKET_PROTOCOL_TCP")
+    '("udp" "G_SOCKET_PROTOCOL_UDP")
+    '("sctp" "G_SOCKET_PROTOCOL_SCTP")
+  )
+)
+
+(define-enum ZlibCompressorFormat
+  (in-module "gio")
+  (c-name "GZlibCompressorFormat")
+  (gtype-id "G_TYPE_ZLIB_COMPRESSOR_FORMAT")
+  (values
+    '("zlib" "G_ZLIB_COMPRESSOR_FORMAT_ZLIB")
+    '("gzip" "G_ZLIB_COMPRESSOR_FORMAT_GZIP")
+    '("raw" "G_ZLIB_COMPRESSOR_FORMAT_RAW")
+  )
+)
diff --git a/gio/gio.defs b/gio/gio.defs
new file mode 100644 (file)
index 0000000..f5a28b6
--- /dev/null
@@ -0,0 +1,7465 @@
+;; -*- scheme -*-
+
+(include "gio-types.defs")
+
+;; From gappinfo.h
+
+(define-function app_info_get_type
+  (c-name "g_app_info_get_type")
+  (return-type "GType")
+)
+
+(define-function app_launch_context_get_type
+  (c-name "g_app_launch_context_get_type")
+  (return-type "GType")
+)
+
+(define-function app_info_create_from_commandline
+  (c-name "g_app_info_create_from_commandline")
+  (is-constructor-of "GAppInfo")
+  (return-type "GAppInfo*")
+  (parameters
+    '("const-char*" "commandline")
+    '("const-char*" "application_name" (null-ok) (default "NULL"))
+    '("GAppInfoCreateFlags" "flags" (default "G_APP_INFO_CREATE_NONE"))
+    '("GError**" "error")
+  )
+)
+
+(define-method dup
+  (of-object "GAppInfo")
+  (c-name "g_app_info_dup")
+  (return-type "GAppInfo*")
+  (caller-owns-return #t)
+)
+
+(define-method equal
+  (of-object "GAppInfo")
+  (c-name "g_app_info_equal")
+  (return-type "gboolean")
+  (parameters
+    '("GAppInfo*" "appinfo2")
+  )
+)
+
+(define-method get_id
+  (of-object "GAppInfo")
+  (c-name "g_app_info_get_id")
+  (return-type "const-char*")
+)
+
+(define-method get_name
+  (of-object "GAppInfo")
+  (c-name "g_app_info_get_name")
+  (return-type "const-char*")
+)
+
+(define-method get_description
+  (of-object "GAppInfo")
+  (c-name "g_app_info_get_description")
+  (return-type "const-char*")
+)
+
+(define-method get_executable
+  (of-object "GAppInfo")
+  (c-name "g_app_info_get_executable")
+  (return-type "const-char*")
+)
+
+(define-method get_icon
+  (of-object "GAppInfo")
+  (c-name "g_app_info_get_icon")
+  (return-type "GIcon*")
+)
+
+;;
+;; wrapped in gappinfo.override
+;;
+(define-method launch
+  (docstring
+  "launch (files=None, launch_context=None) -> gboolean\n"
+  "\n"
+  "Launches the application. Passes files to the launched application\n"
+  "as arguments, using the optional launch_context to get information\n"
+  "about the details of the launcher (like what screen it is on).\n"
+  "On error, error will be set accordingly.\n\n"
+  "Note that even if the launch is successful the application launched\n"
+  "can fail to start if it runs into problems during startup.\n"
+  "There is no way to detect this.\n\n"
+  "Some URIs can be changed when passed through a gio.File\n"
+  "(for instance unsupported uris with strange formats like mailto:),\n"
+  "so if you have a textual uri you want to pass in as argument,\n"
+  "consider using gio.AppInfo.launch_uris() instead."
+  )
+  (of-object "GAppInfo")
+  (c-name "g_app_info_launch")
+  (return-type "gboolean")
+  (parameters
+    '("GList*" "files")
+    '("GAppLaunchContext*" "launch_context")
+    '("GError**" "error")
+  )
+)
+
+(define-method supports_uris
+  (of-object "GAppInfo")
+  (c-name "g_app_info_supports_uris")
+  (return-type "gboolean")
+)
+
+(define-method supports_files
+  (of-object "GAppInfo")
+  (c-name "g_app_info_supports_files")
+  (return-type "gboolean")
+)
+
+;;
+;; wrapped in gappinfo.override
+;;
+(define-method launch_uris
+  (docstring
+  "launch_uris (files=None, launch_context=None) -> gboolean\n"
+  "\n"
+  "Launches the application. Passes files to the launched application\n"
+  "as arguments, using the optional launch_context to get information\n"
+  "about the details of the launcher (like what screen it is on).\n"
+  "On error, error will be set accordingly.\n\n"
+  "Note that even if the launch is successful the application launched\n"
+  "can fail to start if it runs into problems during startup.\n"
+  "There is no way to detect this.\n\n"
+  )
+  (of-object "GAppInfo")
+  (c-name "g_app_info_launch_uris")
+  (return-type "gboolean")
+  (parameters
+    '("GList*" "uris")
+    '("GAppLaunchContext*" "launch_context")
+    '("GError**" "error")
+  )
+)
+
+(define-method should_show
+  (of-object "GAppInfo")
+  (c-name "g_app_info_should_show")
+  (return-type "gboolean")
+)
+
+(define-method set_as_default_for_type
+  (of-object "GAppInfo")
+  (c-name "g_app_info_set_as_default_for_type")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "content_type")
+    '("GError**" "error")
+  )
+)
+
+(define-method set_as_default_for_extension
+  (of-object "GAppInfo")
+  (c-name "g_app_info_set_as_default_for_extension")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "extension")
+    '("GError**" "error")
+  )
+)
+
+(define-method add_supports_type
+  (of-object "GAppInfo")
+  (c-name "g_app_info_add_supports_type")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "content_type")
+    '("GError**" "error")
+  )
+)
+
+(define-method can_remove_supports_type
+  (of-object "GAppInfo")
+  (c-name "g_app_info_can_remove_supports_type")
+  (return-type "gboolean")
+)
+
+(define-method remove_supports_type
+  (of-object "GAppInfo")
+  (c-name "g_app_info_remove_supports_type")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "content_type")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-function app_info_get_all
+  (c-name "g_app_info_get_all")
+  (return-type "GList*")
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-function app_info_get_all_for_type
+  (c-name "g_app_info_get_all_for_type")
+  (return-type "GList*")
+  (parameters
+    '("const-char*" "content_type")
+  )
+)
+
+(define-function app_info_get_default_for_type
+  (c-name "g_app_info_get_default_for_type")
+  (return-type "GAppInfo*")
+  (parameters
+    '("const-char*" "content_type")
+    '("gboolean" "must_support_uris")
+  )
+)
+
+(define-function app_info_get_default_for_uri_scheme
+  (c-name "g_app_info_get_default_for_uri_scheme")
+  (return-type "GAppInfo*")
+  (parameters
+    '("const-char*" "uri_scheme")
+  )
+)
+
+(define-function app_launch_context_new
+  (c-name "g_app_launch_context_new")
+  (is-constructor-of "GAppLaunchContext")
+  (return-type "GAppLaunchContext*")
+)
+
+;;
+;; wrapped in gapplaunchcontext.override
+;;
+(define-method get_display
+  (of-object "GAppLaunchContext")
+  (c-name "g_app_launch_context_get_display")
+  (return-type "char*")
+  (parameters
+    '("GAppInfo*" "info")
+    '("GList*" "files")
+  )
+)
+
+;;
+;; wrapped in gapplaunchcontext.override
+;;
+(define-method get_startup_notify_id
+  (of-object "GAppLaunchContext")
+  (c-name "g_app_launch_context_get_startup_notify_id")
+  (return-type "char*")
+  (parameters
+    '("GAppInfo*" "info")
+    '("GList*" "files")
+  )
+)
+
+(define-method launch_failed
+  (of-object "GAppLaunchContext")
+  (c-name "g_app_launch_context_launch_failed")
+  (return-type "none")
+  (parameters
+    '("const-char*" "startup_notify_id")
+  )
+)
+
+(define-function app_info_reset_type_associations
+  (c-name "g_app_info_reset_type_associations")
+  (return-type "none")
+  (parameters
+    '("const-char*" "content_type")
+  )
+)
+
+(define-method can_delete
+  (of-object "GAppInfo")
+  (c-name "g_app_info_can_delete")
+  (return-type "gboolean")
+)
+
+(define-method delete
+  (of-object "GAppInfo")
+  (c-name "g_app_info_delete")
+  (return-type "gboolean")
+)
+
+(define-method get_commandline
+  (of-object "GAppInfo")
+  (c-name "g_app_info_get_commandline")
+  (return-type "const-char*")
+)
+
+
+
+;; From gasyncinitable.h
+
+(define-function async_initable_get_type
+  (c-name "g_async_initable_get_type")
+  (return-type "GType")
+)
+
+(define-method init_async
+  (of-object "GAsyncInitable")
+  (c-name "g_async_initable_init_async")
+  (return-type "none")
+  (parameters
+    '("int" "io_priority")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method init_finish
+  (of-object "GAsyncInitable")
+  (c-name "g_async_initable_init_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+(define-function async_initable_new_async
+  (c-name "g_async_initable_new_async")
+  (return-type "none")
+  (parameters
+    '("GType" "object_type")
+    '("int" "io_priority")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+    '("const-gchar*" "first_property_name")
+  )
+  (varargs #t)
+)
+
+(define-function async_initable_newv_async
+  (c-name "g_async_initable_newv_async")
+  (return-type "none")
+  (parameters
+    '("GType" "object_type")
+    '("guint" "n_parameters")
+    '("GParameter*" "parameters")
+    '("int" "io_priority")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-function async_initable_new_valist_async
+  (c-name "g_async_initable_new_valist_async")
+  (return-type "none")
+  (parameters
+    '("GType" "object_type")
+    '("const-gchar*" "first_property_name")
+    '("va_list" "var_args")
+    '("int" "io_priority")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method new_finish
+  (of-object "GAsyncInitable")
+  (c-name "g_async_initable_new_finish")
+  (return-type "GObject*")
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From gasyncresult.h
+
+(define-function async_result_get_type
+  (c-name "g_async_result_get_type")
+  (return-type "GType")
+)
+
+(define-method get_user_data
+  (of-object "GAsyncResult")
+  (c-name "g_async_result_get_user_data")
+  (return-type "gpointer")
+)
+
+(define-method get_source_object
+  (of-object "GAsyncResult")
+  (c-name "g_async_result_get_source_object")
+  (return-type "GObject*")
+)
+
+
+
+;; From gbufferedinputstream.h
+
+(define-function buffered_input_stream_get_type
+  (c-name "g_buffered_input_stream_get_type")
+  (return-type "GType")
+)
+
+(define-function buffered_input_stream_new
+  (c-name "g_buffered_input_stream_new")
+  (is-constructor-of "GBufferedInputStream")
+  (return-type "GInputStream*")
+  (properties
+    '("base_stream")
+  )
+)
+
+(define-function buffered_input_stream_new_sized
+  (c-name "g_buffered_input_stream_new_sized")
+  (return-type "GInputStream*")
+  (parameters
+    '("GInputStream*" "base_stream")
+    '("gsize" "size")
+  )
+)
+
+(define-method get_buffer_size
+  (of-object "GBufferedInputStream")
+  (c-name "g_buffered_input_stream_get_buffer_size")
+  (return-type "gsize")
+)
+
+(define-method set_buffer_size
+  (of-object "GBufferedInputStream")
+  (c-name "g_buffered_input_stream_set_buffer_size")
+  (return-type "none")
+  (parameters
+    '("gsize" "size")
+  )
+)
+
+(define-method get_available
+  (of-object "GBufferedInputStream")
+  (c-name "g_buffered_input_stream_get_available")
+  (return-type "gsize")
+)
+
+(define-method peek
+  (of-object "GBufferedInputStream")
+  (c-name "g_buffered_input_stream_peek")
+  (return-type "gsize")
+  (parameters
+    '("void*" "buffer")
+    '("gsize" "offset")
+    '("gsize" "count")
+  )
+)
+
+(define-method peek_buffer
+  (of-object "GBufferedInputStream")
+  (c-name "g_buffered_input_stream_peek_buffer")
+  (return-type "const-void*")
+  (parameters
+    '("gsize*" "count")
+  )
+)
+
+(define-method fill
+  (of-object "GBufferedInputStream")
+  (c-name "g_buffered_input_stream_fill")
+  (return-type "gssize")
+  (unblock-threads #t)
+  (parameters
+    '("gssize" "count")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method fill_async
+  (of-object "GBufferedInputStream")
+  (c-name "g_buffered_input_stream_fill_async")
+  (return-type "none")
+  (parameters
+    '("gssize" "count")
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method fill_finish
+  (of-object "GBufferedInputStream")
+  (c-name "g_buffered_input_stream_fill_finish")
+  (return-type "gssize")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method read_byte
+  (of-object "GBufferedInputStream")
+  (c-name "g_buffered_input_stream_read_byte")
+  (return-type "int")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From gbufferedoutputstream.h
+
+(define-function buffered_output_stream_get_type
+  (c-name "g_buffered_output_stream_get_type")
+  (return-type "GType")
+)
+
+(define-function buffered_output_stream_new
+  (c-name "g_buffered_output_stream_new")
+  (is-constructor-of "GBufferedOutputStream")
+  (return-type "GOutputStream*")
+  (properties
+    '("base_stream")
+  )
+)
+
+(define-function buffered_output_stream_new_sized
+  (c-name "g_buffered_output_stream_new_sized")
+  (return-type "GOutputStream*")
+  (parameters
+    '("GOutputStream*" "base_stream")
+    '("guint" "size")
+  )
+)
+
+(define-method get_buffer_size
+  (of-object "GBufferedOutputStream")
+  (c-name "g_buffered_output_stream_get_buffer_size")
+  (return-type "gsize")
+)
+
+(define-method set_buffer_size
+  (of-object "GBufferedOutputStream")
+  (c-name "g_buffered_output_stream_set_buffer_size")
+  (return-type "none")
+  (parameters
+    '("gsize" "size")
+  )
+)
+
+(define-method get_auto_grow
+  (of-object "GBufferedOutputStream")
+  (c-name "g_buffered_output_stream_get_auto_grow")
+  (return-type "gboolean")
+)
+
+(define-method set_auto_grow
+  (of-object "GBufferedOutputStream")
+  (c-name "g_buffered_output_stream_set_auto_grow")
+  (return-type "none")
+  (parameters
+    '("gboolean" "auto_grow")
+  )
+)
+
+
+
+;; From gcancellable.h
+
+(define-function cancellable_get_type
+  (c-name "g_cancellable_get_type")
+  (return-type "GType")
+)
+
+(define-function cancellable_new
+  (c-name "g_cancellable_new")
+  (is-constructor-of "GCancellable")
+  (return-type "GCancellable*")
+)
+
+(define-method is_cancelled
+  (of-object "GCancellable")
+  (c-name "g_cancellable_is_cancelled")
+  (return-type "gboolean")
+)
+
+(define-method set_error_if_cancelled
+  (of-object "GCancellable")
+  (c-name "g_cancellable_set_error_if_cancelled")
+  (return-type "gboolean")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-method get_fd
+  (of-object "GCancellable")
+  (c-name "g_cancellable_get_fd")
+  (return-type "int")
+)
+
+(define-method make_pollfd
+  (of-object "GCancellable")
+  (c-name "g_cancellable_make_pollfd")
+  (return-type "none")
+  (parameters
+    '("GPollFD*" "pollfd")
+  )
+)
+
+(define-function cancellable_get_current
+  (c-name "g_cancellable_get_current")
+  (return-type "GCancellable*")
+)
+
+(define-method push_current
+  (of-object "GCancellable")
+  (c-name "g_cancellable_push_current")
+  (return-type "none")
+)
+
+(define-method pop_current
+  (of-object "GCancellable")
+  (c-name "g_cancellable_pop_current")
+  (return-type "none")
+)
+
+(define-method reset
+  (of-object "GCancellable")
+  (c-name "g_cancellable_reset")
+  (return-type "none")
+)
+
+(define-method cancel
+  (of-object "GCancellable")
+  (c-name "g_cancellable_cancel")
+  (return-type "none")
+)
+
+(define-method connect
+  (of-object "GCancellable")
+  (c-name "g_cancellable_connect")
+  (return-type "gulong")
+  (parameters
+    '("GCallback" "callback")
+    '("gpointer" "data")
+    '("GDestroyNotify" "data_destroy_func")
+  )
+)
+
+(define-method disconnect
+  (of-object "GCancellable")
+  (c-name "g_cancellable_disconnect")
+  (return-type "none")
+  (parameters
+    '("gulong" "handler_id")
+  )
+)
+
+(define-method release_fd
+  (of-object "GCancellable")
+  (c-name "g_cancellable_release_fd")
+  (return-type "none")
+)
+
+
+
+;; From gcontenttype.h
+
+(define-function content_type_equals
+  (c-name "g_content_type_equals")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "type1")
+    '("const-char*" "type2")
+  )
+)
+
+(define-function content_type_is_a
+  (c-name "g_content_type_is_a")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "type")
+    '("const-char*" "supertype")
+  )
+)
+
+(define-function content_type_is_unknown
+  (c-name "g_content_type_is_unknown")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "type")
+  )
+)
+
+(define-function content_type_get_description
+  (c-name "g_content_type_get_description")
+  (return-type "char*")
+  (parameters
+    '("const-char*" "type")
+  )
+)
+
+(define-function content_type_get_mime_type
+  (c-name "g_content_type_get_mime_type")
+  (return-type "char*")
+  (parameters
+    '("const-char*" "type")
+  )
+)
+
+(define-function content_type_get_icon
+  (c-name "g_content_type_get_icon")
+  (return-type "GIcon*")
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "type")
+  )
+)
+
+(define-function content_type_can_be_executable
+  (c-name "g_content_type_can_be_executable")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "type")
+  )
+)
+
+(define-function content_type_from_mime_type
+  (c-name "g_content_type_from_mime_type")
+  (return-type "char*")
+  (parameters
+    '("const-char*" "mime_type")
+  )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-function content_type_guess
+  (docstring
+"content_type_guess([filename, data, want_uncertain]) -> mime type\n"
+"\n"
+"Guesses the content type based on the parameters passed.\n"
+"Either filename or data must be specified\n"
+"Returns a string containing the mime type.\n"
+"If want_uncertain is set to True, return a tuple with the mime type and \n"
+"True/False if the type guess was uncertain or not.")
+  (c-name "g_content_type_guess")
+  (return-type "char*")
+  (parameters
+    '("const-char*" "filename")
+    '("const-guchar*" "data")
+    '("gsize" "data_size")
+    '("gboolean*" "result_uncertain")
+  )
+)
+
+(define-function content_type_guess_for_tree
+  (c-name "g_content_type_guess_for_tree")
+  (return-type "char**")
+  (parameters
+    '("GFile*" "root")
+  )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-function content_types_get_registered
+  (c-name "g_content_types_get_registered")
+  (return-type "GList*")
+)
+
+
+
+;; From gdatainputstream.h
+
+(define-function data_input_stream_get_type
+  (c-name "g_data_input_stream_get_type")
+  (return-type "GType")
+)
+
+(define-function data_input_stream_new
+  (c-name "g_data_input_stream_new")
+  (is-constructor-of "GDataInputStream")
+  (return-type "GDataInputStream*")
+  (properties
+    '("base_stream")
+  )
+)
+
+(define-method set_byte_order
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_set_byte_order")
+  (return-type "none")
+  (parameters
+    '("GDataStreamByteOrder" "order")
+  )
+)
+
+(define-method get_byte_order
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_get_byte_order")
+  (return-type "GDataStreamByteOrder")
+)
+
+(define-method set_newline_type
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_set_newline_type")
+  (return-type "none")
+  (parameters
+    '("GDataStreamNewlineType" "type")
+  )
+)
+
+(define-method get_newline_type
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_get_newline_type")
+  (return-type "GDataStreamNewlineType")
+)
+
+(define-method read_byte
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_read_byte")
+  (return-type "guchar")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method read_int16
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_read_int16")
+  (return-type "gint16")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method read_uint16
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_read_uint16")
+  (return-type "guint16")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method read_int32
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_read_int32")
+  (return-type "gint32")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method read_uint32
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_read_uint32")
+  (return-type "guint32")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method read_int64
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_read_int64")
+  (return-type "gint64")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method read_uint64
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_read_uint64")
+  (return-type "guint64")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gdatainputstream.override
+;;
+(define-method read_line
+  (of-object "GDataInputStream")
+  (docstring
+   "S.read_line([cancellable]) -> str\n"
+   "Read a line from the stream. Return value includes ending newline\n"
+   "character.")
+  (c-name "g_data_input_stream_read_line")
+  (return-type "char*")
+  (parameters
+    '("gsize*" "length")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gdatainputstream.override
+;;
+(define-method read_until
+  (of-object "GDataInputStream")
+  (docstring
+   "S.read_until(stop_chars, [cancellable]) -> str\n"
+   "Read characters from the string, stopping at the end or upon reading\n"
+   "any character in stop_chars. Return value does not include the stopping\n"
+   "character.")
+  (c-name "g_data_input_stream_read_until")
+  (return-type "char*")
+  (parameters
+    '("const-gchar*" "stop_chars")
+    '("gsize*" "length")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method read_until_async
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_read_until_async")
+  (return-type "none")
+  (parameters
+    '("const-gchar*" "stop_chars")
+    '("gint" "io_priority")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method read_until_finish
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_read_until_finish")
+  (return-type "char*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("gsize*" "length")
+    '("GError**" "error")
+  )
+)
+
+(define-method read_line_async
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_read_line_async")
+  (return-type "none")
+  (parameters
+    '("gint" "io_priority")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method read_line_finish
+  (of-object "GDataInputStream")
+  (c-name "g_data_input_stream_read_line_finish")
+  (return-type "char*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("gsize*" "length")
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From gdataoutputstream.h
+
+(define-function data_output_stream_get_type
+  (c-name "g_data_output_stream_get_type")
+  (return-type "GType")
+)
+
+(define-function data_output_stream_new
+  (c-name "g_data_output_stream_new")
+  (is-constructor-of "GDataOutputStream")
+  (return-type "GDataOutputStream*")
+  (properties
+    '("base_stream")
+  )
+)
+
+(define-method set_byte_order
+  (of-object "GDataOutputStream")
+  (c-name "g_data_output_stream_set_byte_order")
+  (return-type "none")
+  (parameters
+    '("GDataStreamByteOrder" "order")
+  )
+)
+
+(define-method get_byte_order
+  (of-object "GDataOutputStream")
+  (c-name "g_data_output_stream_get_byte_order")
+  (return-type "GDataStreamByteOrder")
+)
+
+(define-method put_byte
+  (of-object "GDataOutputStream")
+  (c-name "g_data_output_stream_put_byte")
+  (return-type "gboolean")
+  (parameters
+    '("guchar" "data")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method put_int16
+  (of-object "GDataOutputStream")
+  (c-name "g_data_output_stream_put_int16")
+  (return-type "gboolean")
+  (parameters
+    '("gint16" "data")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method put_uint16
+  (of-object "GDataOutputStream")
+  (c-name "g_data_output_stream_put_uint16")
+  (return-type "gboolean")
+  (parameters
+    '("guint16" "data")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method put_int32
+  (of-object "GDataOutputStream")
+  (c-name "g_data_output_stream_put_int32")
+  (return-type "gboolean")
+  (parameters
+    '("gint32" "data")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method put_uint32
+  (of-object "GDataOutputStream")
+  (c-name "g_data_output_stream_put_uint32")
+  (return-type "gboolean")
+  (parameters
+    '("guint32" "data")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method put_int64
+  (of-object "GDataOutputStream")
+  (c-name "g_data_output_stream_put_int64")
+  (return-type "gboolean")
+  (parameters
+    '("gint64" "data")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method put_uint64
+  (of-object "GDataOutputStream")
+  (c-name "g_data_output_stream_put_uint64")
+  (return-type "gboolean")
+  (parameters
+    '("guint64" "data")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method put_string
+  (of-object "GDataOutputStream")
+  (c-name "g_data_output_stream_put_string")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "str")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+
+
+
+
+
+;; From gdrive.h
+
+(define-function drive_get_type
+  (c-name "g_drive_get_type")
+  (return-type "GType")
+)
+
+(define-method get_name
+  (of-object "GDrive")
+  (c-name "g_drive_get_name")
+  (return-type "char*")
+)
+
+(define-method get_icon
+  (of-object "GDrive")
+  (c-name "g_drive_get_icon")
+  (return-type "GIcon*")
+  (caller-owns-return #t)
+)
+
+(define-method has_volumes
+  (of-object "GDrive")
+  (c-name "g_drive_has_volumes")
+  (return-type "gboolean")
+)
+
+;;
+;; wrapped in gdrive.override
+;;
+(define-method get_volumes
+  (of-object "GDrive")
+  (c-name "g_drive_get_volumes")
+  (return-type "GList*")
+)
+
+(define-method is_media_removable
+  (of-object "GDrive")
+  (c-name "g_drive_is_media_removable")
+  (return-type "gboolean")
+)
+
+(define-method has_media
+  (of-object "GDrive")
+  (c-name "g_drive_has_media")
+  (return-type "gboolean")
+)
+
+(define-method is_media_check_automatic
+  (of-object "GDrive")
+  (c-name "g_drive_is_media_check_automatic")
+  (return-type "gboolean")
+)
+
+(define-method can_poll_for_media
+  (of-object "GDrive")
+  (c-name "g_drive_can_poll_for_media")
+  (return-type "gboolean")
+)
+
+(define-method can_eject
+  (of-object "GDrive")
+  (c-name "g_drive_can_eject")
+  (return-type "gboolean")
+)
+
+;;
+;; wrapped in gdrive.override
+;;
+(define-method eject
+  (of-object "GDrive")
+  (c-name "g_drive_eject")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method eject_finish
+  (of-object "GDrive")
+  (c-name "g_drive_eject_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gdrive.override
+;;
+(define-method poll_for_media
+  (of-object "GDrive")
+  (c-name "g_drive_poll_for_media")
+  (return-type "none")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method poll_for_media_finish
+  (of-object "GDrive")
+  (c-name "g_drive_poll_for_media_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method get_identifier
+  (of-object "GDrive")
+  (c-name "g_drive_get_identifier")
+  (return-type "char*")
+  (parameters
+    '("const-char*" "kind")
+  )
+)
+
+;;
+;; wrapped in gdrive.override
+;;
+(define-method enumerate_identifiers
+  (of-object "GDrive")
+  (c-name "g_drive_enumerate_identifiers")
+  (return-type "char**")
+)
+
+(define-method can_start
+  (of-object "GDrive")
+  (c-name "g_drive_can_start")
+  (return-type "gboolean")
+)
+
+(define-method can_start_degraded
+  (of-object "GDrive")
+  (c-name "g_drive_can_start_degraded")
+  (return-type "gboolean")
+)
+
+(define-method can_stop
+  (of-object "GDrive")
+  (c-name "g_drive_can_stop")
+  (return-type "gboolean")
+)
+
+(define-method eject_with_operation
+  (of-object "GDrive")
+  (c-name "g_drive_eject_with_operation")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags")
+    '("GMountOperation*" "mount_operation")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method eject_with_operation_finish
+  (of-object "GDrive")
+  (c-name "g_drive_eject_with_operation_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method get_start_stop_type
+  (of-object "GDrive")
+  (c-name "g_drive_get_start_stop_type")
+  (return-type "GDriveStartStopType")
+)
+
+(define-method start
+  (of-object "GDrive")
+  (c-name "g_drive_start")
+  (return-type "none")
+  (parameters
+    '("GDriveStartFlags" "flags")
+    '("GMountOperation*" "mount_operation")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method start_finish
+  (of-object "GDrive")
+  (c-name "g_drive_start_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method stop
+  (of-object "GDrive")
+  (c-name "g_drive_stop")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags")
+    '("GMountOperation*" "mount_operation")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method stop_finish
+  (of-object "GDrive")
+  (c-name "g_drive_stop_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From gemblemedicon.h
+
+(define-function emblemed_icon_get_type
+  (c-name "g_emblemed_icon_get_type")
+  (return-type "GType")
+)
+
+(define-function emblemed_icon_new
+  (c-name "g_emblemed_icon_new")
+  (is-constructor-of "GEmblemedIcon")
+  (return-type "GIcon*")
+  (parameters
+    '("GIcon*" "icon")
+    '("GEmblem*" "emblem")
+  )
+)
+
+(define-method get_icon
+  (of-object "GEmblemedIcon")
+  (c-name "g_emblemed_icon_get_icon")
+  (return-type "GIcon*")
+)
+
+(define-method get_emblems
+  (of-object "GEmblemedIcon")
+  (c-name "g_emblemed_icon_get_emblems")
+  (return-type "GList*")
+)
+
+(define-method add_emblem
+  (of-object "GEmblemedIcon")
+  (c-name "g_emblemed_icon_add_emblem")
+  (return-type "none")
+  (parameters
+    '("GEmblem*" "emblem")
+  )
+)
+
+
+
+;; From gemblem.h
+
+(define-function emblem_get_type
+  (c-name "g_emblem_get_type")
+  (return-type "GType")
+)
+
+(define-function emblem_new
+  (c-name "g_emblem_new")
+  (is-constructor-of "GEmblem")
+  (return-type "GEmblem*")
+  (properties
+    '("icon")
+    '("origin" (optional))
+  )
+)
+
+(define-function emblem_new_with_origin
+  (c-name "g_emblem_new_with_origin")
+  (return-type "GEmblem*")
+  (parameters
+    '("GIcon*" "icon")
+    '("GEmblemOrigin" "origin")
+  )
+)
+
+(define-method get_icon
+  (of-object "GEmblem")
+  (c-name "g_emblem_get_icon")
+  (return-type "GIcon*")
+)
+
+(define-method get_origin
+  (of-object "GEmblem")
+  (c-name "g_emblem_get_origin")
+  (return-type "GEmblemOrigin")
+)
+
+
+
+;; From gfileattribute.h
+
+(define-function file_attribute_info_list_new
+  (c-name "g_file_attribute_info_list_new")
+  (is-constructor-of "GFileAttributeInfoList")
+  (return-type "GFileAttributeInfoList*")
+)
+
+(define-method ref
+  (of-object "GFileAttributeInfoList")
+  (c-name "g_file_attribute_info_list_ref")
+  (return-type "GFileAttributeInfoList*")
+)
+
+(define-method unref
+  (of-object "GFileAttributeInfoList")
+  (c-name "g_file_attribute_info_list_unref")
+  (return-type "none")
+)
+
+(define-method dup
+  (of-object "GFileAttributeInfoList")
+  (c-name "g_file_attribute_info_list_dup")
+  (return-type "GFileAttributeInfoList*")
+)
+
+(define-method lookup
+  (of-object "GFileAttributeInfoList")
+  (c-name "g_file_attribute_info_list_lookup")
+  (return-type "const-GFileAttributeInfo*")
+  (parameters
+    '("const-char*" "name")
+  )
+)
+
+(define-method add
+  (of-object "GFileAttributeInfoList")
+  (c-name "g_file_attribute_info_list_add")
+  (return-type "none")
+  (parameters
+    '("const-char*" "name")
+    '("GFileAttributeType" "type")
+    '("GFileAttributeInfoFlags" "flags" (default "G_FILE_ATTRIBUTE_INFO_NONE"))
+  )
+)
+
+
+
+;; From gfileenumerator.h
+
+(define-function file_enumerator_get_type
+  (c-name "g_file_enumerator_get_type")
+  (return-type "GType")
+)
+
+(define-method next_file
+  (of-object "GFileEnumerator")
+  (c-name "g_file_enumerator_next_file")
+  (return-type "GFileInfo*")
+  (caller-owns-return #t)
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method close
+  (of-object "GFileEnumerator")
+  (c-name "g_file_enumerator_close")
+  (return-type "gboolean")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfileenumerator.override
+;;
+(define-method next_files_async
+  (docstring
+"FE.next_files_async(num_files, callback, [io_priority, cancellable,\n"
+"                    user_data])\n"
+"Request information for a number of files from the enumerator\n"
+"asynchronously. When all i/o for the operation is finished the callback\n"
+"will be called with the requested information.\n"
+"\n"
+"The callback can be called with less than num_files files in case of error\n"
+"or at the end of the enumerator. In case of a partial error the callback\n"
+"will be called with any succeeding items and no error, and on the next\n"
+"request the error will be reported. If a request is cancelled the callback\n"
+"will be called with gio.ERROR_CANCELLED.\n"
+"\n"
+"During an async request no other sync and async calls are allowed, and will\n"
+"result in gio.ERROR_PENDING errors.\n"
+"\n"
+"Any outstanding i/o request with higher priority (lower numerical value)\n"
+"will be executed before an outstanding request with lower priority.\n"
+"Default priority is gobject.PRIORITY_DEFAULT.")
+
+  (of-object "GFileEnumerator")
+  (c-name "g_file_enumerator_next_files_async")
+  (return-type "none")
+  (parameters
+    '("int" "num_files")
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+;;
+;; wrapped in gfileenumerator.override
+;;
+(define-method next_files_finish
+  (docstring
+"FE.next_files_finish(result) -> a list of gio.FileInfos\n"
+"Finishes the asynchronous operation started with\n"
+"gio.FileEnumerator.next_files_async().")
+  (of-object "GFileEnumerator")
+  (c-name "g_file_enumerator_next_files_finish")
+  (return-type "GList*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfileenumerator.override
+;;
+(define-method close_async
+  (of-object "GFileEnumerator")
+  (c-name "g_file_enumerator_close_async")
+  (return-type "none")
+  (parameters
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method close_finish
+  (of-object "GFileEnumerator")
+  (c-name "g_file_enumerator_close_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method is_closed
+  (of-object "GFileEnumerator")
+  (c-name "g_file_enumerator_is_closed")
+  (return-type "gboolean")
+)
+
+(define-method has_pending
+  (of-object "GFileEnumerator")
+  (c-name "g_file_enumerator_has_pending")
+  (return-type "gboolean")
+)
+
+(define-method set_pending
+  (of-object "GFileEnumerator")
+  (c-name "g_file_enumerator_set_pending")
+  (return-type "none")
+  (parameters
+    '("gboolean" "pending")
+  )
+)
+
+(define-method get_container
+  (of-object "GFileEnumerator")
+  (c-name "g_file_enumerator_get_container")
+  (return-type "GFile*")
+)
+
+
+
+;; From gfile.h
+
+(define-function file_get_type
+  (c-name "g_file_get_type")
+  (return-type "GType")
+)
+
+(define-function file_new_for_path
+  (c-name "g_file_new_for_path")
+  (is-constructor-of "GFile")
+  (return-type "GFile*")
+  (parameters
+    '("const-char*" "path")
+  )
+)
+
+(define-function file_new_for_uri
+  (c-name "g_file_new_for_uri")
+  (is-constructor-of "GFile")
+  (return-type "GFile*")
+  (parameters
+    '("const-char*" "uri")
+  )
+)
+
+(define-function file_new_for_commandline_arg
+  (is-constructor-of "GFile")
+  (c-name "g_file_new_for_commandline_arg")
+  (return-type "GFile*")
+  (parameters
+    '("const-char*" "arg")
+  )
+)
+
+(define-function file_parse_name
+  (c-name "g_file_parse_name")
+  (return-type "GFile*")
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "parse_name")
+  )
+)
+
+(define-method dup
+  (of-object "GFile")
+  (c-name "g_file_dup")
+  (return-type "GFile*")
+  (caller-owns-return #t)
+)
+
+(define-function file_hash
+  (c-name "g_file_hash")
+  (return-type "guint")
+  (parameters
+    '("gconstpointer" "file")
+  )
+)
+
+(define-method equal
+  (of-object "GFile")
+  (c-name "g_file_equal")
+  (return-type "gboolean")
+  (parameters
+    '("GFile*" "file2")
+  )
+)
+
+(define-method get_basename
+  (of-object "GFile")
+  (c-name "g_file_get_basename")
+  (return-type "char*")
+)
+
+(define-method get_path
+  (of-object "GFile")
+  (c-name "g_file_get_path")
+  (return-type "char*")
+)
+
+(define-method get_uri
+  (of-object "GFile")
+  (c-name "g_file_get_uri")
+  (return-type "char*")
+)
+
+(define-method get_parse_name
+  (of-object "GFile")
+  (c-name "g_file_get_parse_name")
+  (return-type "char*")
+)
+
+(define-method get_parent
+  (of-object "GFile")
+  (c-name "g_file_get_parent")
+  (return-type "GFile*")
+  (caller-owns-return #t)
+)
+
+(define-method get_child
+  (of-object "GFile")
+  (c-name "g_file_get_child")
+  (return-type "GFile*")
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "name")
+  )
+)
+
+(define-method get_child_for_display_name
+  (of-object "GFile")
+  (c-name "g_file_get_child_for_display_name")
+  (return-type "GFile*")
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "display_name")
+    '("GError**" "error")
+  )
+)
+
+(define-method has_prefix
+  (of-object "GFile")
+  (c-name "g_file_has_prefix")
+  (return-type "gboolean")
+  (parameters
+    '("GFile*" "descendant")
+  )
+)
+
+(define-method get_relative_path
+  (of-object "GFile")
+  (c-name "g_file_get_relative_path")
+  (return-type "char*")
+  (parameters
+    '("GFile*" "descendant")
+  )
+)
+
+(define-method resolve_relative_path
+  (of-object "GFile")
+  (c-name "g_file_resolve_relative_path")
+  (return-type "GFile*")
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "relative_path")
+  )
+)
+
+(define-method is_native
+  (of-object "GFile")
+  (c-name "g_file_is_native")
+  (return-type "gboolean")
+)
+
+(define-method has_uri_scheme
+  (of-object "GFile")
+  (c-name "g_file_has_uri_scheme")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "uri_scheme")
+  )
+)
+
+(define-method get_uri_scheme
+  (of-object "GFile")
+  (c-name "g_file_get_uri_scheme")
+  (return-type "char*")
+)
+
+(define-method read
+  (of-object "GFile")
+  (docstring
+  "F.read([cancellable]) -> input stream\n"
+  "Opens a file for reading. The result is a GFileInputStream that\n"
+  "can be used to read the contents of the file.\n"
+  "\n"
+  "If cancellable is specified, then the operation can be cancelled\n"
+  "by triggering the cancellable object from another thread. If the\n"
+  "operation was cancelled, the error gio.IO_ERROR_CANCELLED will\n"
+  "be returned. If the file does not exist, the gio.IO_ERROR_NOT_FOUND\n"
+  "error will be returned. If the file is a directory, the\n"
+  "gio.IO_ERROR_IS_DIRECTORY error will be returned. Other errors\n"
+  "are possible too, and depend on what kind of filesystem the file is on."
+  )
+  (c-name "g_file_read")
+  (return-type "GFileInputStream*")
+  (unblock-threads #t)
+  (caller-owns-return #t)
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method read_async
+  (of-object "GFile")
+  (docstring
+  "F.read_async(callback [,io_priority [,cancellable [,user_data]]])\n"
+  "-> start read\n"
+  "\n"
+  "For more details, see gio.File.read() which is the synchronous\n"
+  "version of this call. Asynchronously opens file for reading.\n"
+  "When the operation is finished, callback will be called.\n"
+  "You can then call g_file_read_finish() to get the result of the\n"
+  "operation.\n"
+  )
+  (c-name "g_file_read_async")
+  (return-type "none")
+  (parameters
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method read_finish
+  (of-object "GFile")
+  (c-name "g_file_read_finish")
+  (return-type "GFileInputStream*")
+  (caller-owns-return #t)
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+(define-method append_to
+  (of-object "GFile")
+  (c-name "g_file_append_to")
+  (return-type "GFileOutputStream*")
+  (unblock-threads #t)
+  (caller-owns-return #t)
+  (parameters
+    '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method create
+  (of-object "GFile")
+  (c-name "g_file_create")
+  (return-type "GFileOutputStream*")
+  (unblock-threads #t)
+  (caller-owns-return #t)
+  (parameters
+    '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method replace
+  (of-object "GFile")
+  (c-name "g_file_replace")
+  (return-type "GFileOutputStream*")
+  (unblock-threads #t)
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "etag")
+    '("gboolean" "make_backup")
+    '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method append_to_async
+  (docstring
+  "F.append_to_async(callback [flags, [,io_priority [,cancellable\n"
+  "                  [,user_data]]]]) -> open for append\n"
+  "\n"
+  "Asynchronously opens file for appending.\n"
+  "For more details, see gio.File.append_to() which is the synchronous\n"
+  "version of this call. When the operation is finished, callback will\n"
+  "be called. You can then call F.append_to_finish() to get the result\n"
+  "of the operation."
+  )
+  (of-object "GFile")
+  (c-name "g_file_append_to_async")
+  (return-type "none")
+  (parameters
+    '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method append_to_finish
+  (of-object "GFile")
+  (c-name "g_file_append_to_finish")
+  (return-type "GFileOutputStream*")
+  (caller-owns-return #t)
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method create_async
+  (docstring
+  "F.create_async(callback [flags, [,io_priority [,cancellable\n"
+  "               [,user_data]]]]) -> file created\n"
+  "\n"
+  "Asynchronously creates a new file and returns an output stream for\n"
+  "writing to it. The file must not already exist.\n"
+  "For more details, see F.create() which is the synchronous\n"
+  "version of this call.\n"
+  "When the operation is finished, callback will be called. You can\n"
+  "then call F.create_finish() to get the result of the operation."
+  )
+  (of-object "GFile")
+  (c-name "g_file_create_async")
+  (return-type "none")
+  (parameters
+    '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method create_finish
+  (of-object "GFile")
+  (c-name "g_file_create_finish")
+  (return-type "GFileOutputStream*")
+  (caller-owns-return #t)
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method replace_async
+  (docstring
+  "F.replace_async(callback [etag, [make_backup, [flags, [io_priority,\n"
+  "                [cancellable, [user_data]]]]]]) -> file replace\n"
+  "\n"
+  "Asynchronously overwrites the file, replacing the contents, possibly\n"
+  "creating a backup copy of the file first.\n"
+  "For more details, see F.replace() which is the synchronous\n"
+  "version of this call.\n"
+  "When the operation is finished, callback will be called. You can\n"
+  "then call F.replace_finish() to get the result of the operation."
+  )
+  (of-object "GFile")
+  (c-name "g_file_replace_async")
+  (return-type "none")
+  (parameters
+    '("const-char*" "etag")
+    '("gboolean" "make_backup")
+    '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method replace_finish
+  (of-object "GFile")
+  (c-name "g_file_replace_finish")
+  (return-type "GFileOutputStream*")
+  (caller-owns-return #t)
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+(define-method query_exists
+  (of-object "GFile")
+  (c-name "g_file_query_exists")
+  (return-type "gboolean")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+  )
+)
+
+(define-method query_file_type
+  (of-object "GFile")
+  (c-name "g_file_query_file_type")
+  (return-type "GFileType")
+  (parameters
+    '("GFileQueryInfoFlags" "flags")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+  )
+)
+
+(define-method query_info
+  (of-object "GFile")
+  (c-name "g_file_query_info")
+  (return-type "GFileInfo*")
+  (unblock-threads #t)
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "attributes")
+    '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method query_info_async
+  (docstring
+  "F.query_info_async(attributes, callback, [flags, [io_priority,\n"
+  "                   [cancellable, [user_data]]]]) -> query attributes\n"
+  "\n"
+  "Asynchronously gets the requested information about specified file.\n"
+  "The result is a GFileInfo object that contains key-value attributes\n"
+  "(such as type or size for the file).\n"
+  "For more details, see F.query_info() which is the synchronous\n"
+  "version of this call. \n"
+  "When the operation is finished, callback will be called. You can\n"
+  "then call F.query_info_finish() to get the result of the operation.\n"
+  )
+  (of-object "GFile")
+  (c-name "g_file_query_info_async")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attributes")
+    '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method query_info_finish
+  (of-object "GFile")
+  (c-name "g_file_query_info_finish")
+  (return-type "GFileInfo*")
+  (caller-owns-return #t)
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+(define-method query_filesystem_info
+  (of-object "GFile")
+  (c-name "g_file_query_filesystem_info")
+  (return-type "GFileInfo*")
+  (unblock-threads #t)
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "attributes")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method query_filesystem_info_async
+  (of-object "GFile")
+  (c-name "g_file_query_filesystem_info_async")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attributes")
+    '("int" "io_priority")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method query_filesystem_info_finish
+  (of-object "GFile")
+  (c-name "g_file_query_filesystem_info_finish")
+  (return-type "GFileInfo*")
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+(define-method find_enclosing_mount
+  (of-object "GFile")
+  (c-name "g_file_find_enclosing_mount")
+  (return-type "GMount*")
+  (unblock-threads #t)
+  (caller-owns-return #t)
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method find_enclosing_mount_async
+  (of-object "GFile")
+  (c-name "g_file_find_enclosing_mount_async")
+  (return-type "none")
+  (parameters
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method find_enclosing_mount_finish
+  (of-object "GFile")
+  (c-name "g_file_find_enclosing_mount_finish")
+  (return-type "GMount*")
+  (caller-owns-return #t)
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+(define-method enumerate_children
+  (docstring
+"F.enumerate_children(attributes, [flags, cancellable]) -> enumerator\n"
+"Gets the requested information about the files in a directory.\n"
+"The result is a gio.FileEnumerator object that will give out gio.FileInfo\n"
+"objects for all the files in the directory.\n"
+"The attribute value is a string that specifies the file attributes that\n"
+"should be gathered. It is not an error if it's not possible to read a \n"
+"particular requested attribute from a file - it just won't be set.\n"
+"attribute should be a comma-separated list of attribute or attribute\n"
+"wildcards. The wildcard \"*\" means all attributes, and a wildcard like\n"
+"\"standard::*\" means all attributes in the standard namespace.\n"
+"An example attribute query be \"standard::*,owner::user\". The standard\n"
+"attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled by\n"
+"triggering the cancellable object from another thread. If the operation was\n"
+"cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
+"\n"
+"If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned.\n"
+"If the file is not a directory, the gio.FILE_ERROR_NOTDIR error will\n"
+"be returned. Other errors are possible too.")
+  (of-object "GFile")
+  (c-name "g_file_enumerate_children")
+  (return-type "GFileEnumerator*")
+  (unblock-threads #t)
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "attributes")
+    '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method enumerate_children_async
+  (docstring
+"F.enumerate_children_async(attributes, callback,\n"
+"                           [flags, io_priority, cancellable, user_data])\n"
+"Asynchronously gets the requested information about the files in a\n"
+"directory. The result is a GFileEnumerator object that will give out\n"
+"GFileInfo objects for all the files in the directory.\n"
+"\n"
+"For more details, see gio.File.enumerate_children() which is the synchronous\n"
+"version of this call.\n"
+"\n"
+"When the operation is finished, callback will be called. You can then call\n"
+"gio.File.enumerate_children_finish() to get the result of the operation.")
+  (of-object "GFile")
+  (c-name "g_file_enumerate_children_async")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attributes")
+    '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method enumerate_children_finish
+  (of-object "GFile")
+  (c-name "g_file_enumerate_children_finish")
+  (return-type "GFileEnumerator*")
+  (caller-owns-return #t)
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+(define-method set_display_name
+  (of-object "GFile")
+  (c-name "g_file_set_display_name")
+  (return-type "GFile*")
+  (unblock-threads #t)
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "display_name")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method set_display_name_async
+  (of-object "GFile")
+  (c-name "g_file_set_display_name_async")
+  (return-type "none")
+  (parameters
+    '("const-char*" "display_name")
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method set_display_name_finish
+  (of-object "GFile")
+  (c-name "g_file_set_display_name_finish")
+  (return-type "GFile*")
+  (caller-owns-return #t)
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+(define-method delete
+  (of-object "GFile")
+  (c-name "g_file_delete")
+  (return-type "gboolean")
+  (unblock-threads #t)
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method trash
+  (of-object "GFile")
+  (c-name "g_file_trash")
+  (return-type "gboolean")
+  (unblock-threads #t)
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method copy
+  (docstring
+"F.copy(destination, [callback, flags, cancellable, user_data])\n"
+"Copies the file source to the location specified by destination.\n"
+"Can not handle recursive copies of directories.\n"
+"\n"
+"If the flag gio.FILE_COPY_OVERWRITE is specified an already existing\n"
+"destination file is overwritten.\n"
+"\n"
+"If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlink\n"
+"will be copied as symlinks, otherwise the target of the source symlink\n"
+"will be copied.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled b\n"
+"triggering the cancellable object from another thread.\n"
+"If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
+"will be returned.\n"
+"\n"
+"If progress_callback is not None, then the operation can be monitored\n"
+"by setting this to a callable. if specified progress_callback_data will\n"
+"be passed to this function. It is guaranteed that this callback\n"
+"will be called after all data has been transferred with the total number\n"
+"of bytes copied during the operation.\n"
+"\n"
+"If the source file does not exist then the gio.ERROR_NOT_FOUND\n"
+"error is returned, independent on the status of the destination.\n"
+"\n"
+"If gio.FILE_COPY_OVERWRITE is not specified and the target exists\n"
+"then the error gio.ERROR_EXISTS is returned.\n"
+"\n"
+"If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY\n"
+"error is returned. If trying to overwrite a directory with a directory\n"
+"the gio.ERROR_WOULD_MERGE error is returned.\n"
+"\n"
+"If the source is a directory and the target does not exist\n"
+"or gio.FILE_COPY_OVERWRITE is specified and the target is a file\n"
+"then the gio.ERROR_WOULD_RECURSE error is returned.\n"
+"\n"
+"If you are interested in copying the GFile object itself\n"
+"(not the on-disk file), see gio.File.dup().")
+  (of-object "GFile")
+  (c-name "g_file_copy")
+  (unblock-threads #t)
+  (return-type "gboolean")
+  (parameters
+    '("GFile*" "destination")
+    '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GFileProgressCallback" "progress_callback")
+    '("gpointer" "progress_callback_data")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method copy_async
+  (of-object "GFile")
+  (docstring
+  "F.copy_async(destination, callback, [flags, io_priority, user_data, cancellable, progress_callback])\n"
+  "-> start copy\n"
+  "\n"
+  "For more details, see gio.File.copy() which is the synchronous\n"
+  "version of this call. Asynchronously copies file.\n"
+  "When the operation is finished, callback will be called.\n"
+  "You can then call g_file_copy_finish() to get the result of the\n"
+  "operation.\n"
+  )
+  (c-name "g_file_copy_async")
+  (return-type "none")
+  (parameters
+    '("GFile*" "destination")
+    '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GFileProgressCallback" "progress_callback")
+    '("gpointer" "progress_callback_data")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method copy_finish
+  (of-object "GFile")
+  (c-name "g_file_copy_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method move
+  (docstring
+"F.move(destination, [callback, flags, cancellable, user_data])\n"
+"Tries to move the file or directory source to the location\n"
+"specified by destination. If native move operations are\n"
+"supported then this is used, otherwise a copy + delete fallback\n"
+"is used. The native implementation may support moving directories\n"
+"(for instance on moves inside the same filesystem), but the \n"
+"fallback code does not.\n"
+"\n"
+"If the flag gio.FILE_COPY_OVERWRITE is specified an already existing\n"
+"destination file is overwritten.\n"
+"\n"
+"If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlink\n"
+"will be copied as symlinks, otherwise the target of the source symlink\n"
+"will be copied.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled b\n"
+"triggering the cancellable object from another thread.\n"
+"If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
+"will be returned.\n"
+"\n"
+"If progress_callback is not None, then the operation can be monitored\n"
+"by setting this to a callable. if specified progress_callback_data will\n"
+"be passed to this function. It is guaranteed that this callback\n"
+"will be called after all data has been transferred with the total number\n"
+"of bytes copied during the operation.\n"
+"\n"
+"If the source file does not exist then the gio.ERROR_NOT_FOUND\n"
+"error is returned, independent on the status of the destination.\n"
+"\n"
+"If gio.FILE_COPY_OVERWRITE is not specified and the target exists\n"
+"then the error gio.ERROR_EXISTS is returned.\n"
+"\n"
+"If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY\n"
+"error is returned. If trying to overwrite a directory with a directory\n"
+"the gio.ERROR_WOULD_MERGE error is returned.\n"
+"\n"
+"If the source is a directory and the target does not exist\n"
+"or gio.FILE_COPY_OVERWRITE is specified and the target is a file\n"
+"then the gio.ERROR_WOULD_RECURSE error is returned.")
+  (of-object "GFile")
+  (c-name "g_file_move")
+  (return-type "gboolean")
+  (parameters
+    '("GFile*" "destination")
+    '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GFileProgressCallback" "progress_callback")
+    '("gpointer" "progress_callback_data")
+    '("GError**" "error")
+  )
+)
+
+(define-method make_directory
+  (of-object "GFile")
+  (c-name "g_file_make_directory")
+  (return-type "gboolean")
+  (unblock-threads #t)
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method make_directory_with_parents
+  (of-object "GFile")
+  (c-name "g_file_make_directory_with_parents")
+  (return-type "gboolean")
+  (unblock-threads #t)
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method make_symbolic_link
+  (of-object "GFile")
+  (c-name "g_file_make_symbolic_link")
+  (return-type "gboolean")
+  (unblock-threads #t)
+  (parameters
+    '("const-char*" "symlink_value")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method query_settable_attributes
+  (docstring
+  "F.query_settable_attributes([cancellable]) -> list\n\n"
+  "Obtain the list of settable attributes for the file.\n"
+  "Returns the type and full attribute name of all the attributes that\n"
+  "can be set on this file. This doesn't mean setting it will always\n"
+  "succeed though, you might get an access failure, or some specific\n"
+  "file may not support a specific attribute.\n\n"
+  "If cancellable is not None, then the operation can be cancelled by\n"
+  "triggering the cancellable object from another thread. If the operation\n"
+  "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned."
+  )
+  (of-object "GFile")
+  (c-name "g_file_query_settable_attributes")
+  (return-type "GFileAttributeInfoList*")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method query_writable_namespaces
+  (docstring
+  "F.query_writable_namespaces([cancellable]) -> list\n\n"
+  "Obtain the list of attribute namespaces where new attributes can\n"
+  "be created by a user. An example of this is extended attributes\n"
+  "(in the "xattr" namespace).\n"
+  "If cancellable is not None, then the operation can be cancelled\n"
+  "by triggering the cancellable object from another thread. If the\n"
+  "operation was cancelled, the error gio.IO_ERROR_CANCELLED\n"
+  "will be returned."
+  )
+  (of-object "GFile")
+  (c-name "g_file_query_writable_namespaces")
+  (return-type "GFileAttributeInfoList*")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method set_attribute
+  (docstring
+  "F.set_attribute(attribute, type, value_p [,flags [,cancellable ]])->bool\n"
+  "\n"
+  "Sets an attribute in the file with attribute name attribute to value_p.\n"
+  "If cancellable is not None, then the operation can be cancelled by\n"
+  "triggering the cancellable object from another thread. If the operation\n"
+  "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned."
+  )
+  (of-object "GFile")
+  (c-name "g_file_set_attribute")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "attribute")
+    '("GFileAttributeType" "type")
+    '("gpointer" "value_p")
+    '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method set_attributes_from_info
+  (of-object "GFile")
+  (c-name "g_file_set_attributes_from_info")
+  (return-type "gboolean")
+  (parameters
+    '("GFileInfo*" "info")
+    '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method set_attributes_async
+  (of-object "GFile")
+  (c-name "g_file_set_attributes_async")
+  (return-type "none")
+  (parameters
+    '("GFileInfo*" "info")
+    '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method set_attributes_finish
+  (of-object "GFile")
+  (c-name "g_file_set_attributes_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GFileInfo**" "info")
+    '("GError**" "error")
+  )
+)
+
+(define-method set_attribute_string
+  (of-object "GFile")
+  (c-name "g_file_set_attribute_string")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "attribute")
+    '("const-char*" "value")
+    '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method set_attribute_byte_string
+  (of-object "GFile")
+  (c-name "g_file_set_attribute_byte_string")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "attribute")
+    '("const-char*" "value")
+    '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method set_attribute_uint32
+  (of-object "GFile")
+  (c-name "g_file_set_attribute_uint32")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "attribute")
+    '("guint32" "value")
+    '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method set_attribute_int32
+  (of-object "GFile")
+  (c-name "g_file_set_attribute_int32")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "attribute")
+    '("gint32" "value")
+    '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method set_attribute_uint64
+  (of-object "GFile")
+  (c-name "g_file_set_attribute_uint64")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "attribute")
+    '("guint64" "value")
+    '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method set_attribute_int64
+  (of-object "GFile")
+  (c-name "g_file_set_attribute_int64")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "attribute")
+    '("gint64" "value")
+    '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method mount_enclosing_volume
+  (docstring
+"F.mount_enclosing_volume(mount_operation, callback, [cancellable,\n"
+"                         user_data])\n"
+"Starts a mount_operation, mounting the volume that contains\n"
+"the file location.\n"
+"\n"
+"When this operation has completed, callback will be called with\n"
+"user_user data, and the operation can be finalized with\n"
+"gio.File.mount_enclosing_volume_finish().\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled\n"
+"by triggering the cancellable object from another thread.\n"
+"If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
+"will be returned.")
+  (of-object "GFile")
+  (c-name "g_file_mount_enclosing_volume")
+  (return-type "none")
+  (parameters
+    '("GMountOperation*" "mount_operation")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method mount_enclosing_volume_finish
+  (of-object "GFile")
+  (c-name "g_file_mount_enclosing_volume_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method mount_mountable
+  (docstring
+"F.mount_mountable(mount_operation, callback, [flags, cancellable,\n"
+"                  user_data])\n"
+"Mounts a file of type gio.FILE_TYPE_MOUNTABLE. Using mount_operation,\n"
+"you can request callbacks when, for instance, passwords are needed\n"
+"during authentication.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled by\n"
+" triggering the cancellable object from another thread. If the\n"
+"operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
+"\n"
+"When the operation is finished, callback will be called. You can then\n"
+"call g_file_mount_mountable_finish() to get the result of the operation.\n")
+  (of-object "GFile")
+  (c-name "g_file_mount_mountable")
+  (return-type "none")
+  (parameters
+    '("GMountOperation*" "mount_operation")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method mount_mountable_finish
+  (of-object "GFile")
+  (c-name "g_file_mount_mountable_finish")
+  (return-type "GFile*")
+  (caller-owns-return #t)
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method unmount_mountable
+  (docstring
+"F.unmount_mountable(callback, [flags, cancellable, user_data])\n"
+"Unmounts a file of type gio.FILE_TYPE_MOUNTABLE.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled by\n"
+"triggering the cancellable object from another thread. If the\n"
+"operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
+"\n"
+"When the operation is finished, callback will be called. You can\n"
+"then call gio.File.unmount_mountable_finish() to get the\n"
+"result of the operation.\n")
+  (of-object "GFile")
+  (c-name "g_file_unmount_mountable")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method unmount_mountable_finish
+  (of-object "GFile")
+  (c-name "g_file_unmount_mountable_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method eject_mountable
+  (of-object "GFile")
+  (c-name "g_file_eject_mountable")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method eject_mountable_finish
+  (of-object "GFile")
+  (c-name "g_file_eject_mountable_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+
+(define-method copy_attributes
+  (of-object "GFile")
+  (c-name "g_file_copy_attributes")
+  (return-type "gboolean")
+  (parameters
+    '("GFile*" "destination")
+    '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method monitor_directory
+  (of-object "GFile")
+  (c-name "g_file_monitor_directory")
+  (return-type "GFileMonitor*")
+  (caller-owns-return #t)
+  (parameters
+    '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method monitor_file
+  (of-object "GFile")
+  (c-name "g_file_monitor_file")
+  (return-type "GFileMonitor*")
+  (caller-owns-return #t)
+  (parameters
+    '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method monitor
+  (of-object "GFile")
+  (c-name "g_file_monitor")
+  (return-type "GFileMonitor*")
+  (parameters
+    '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method query_default_handler
+  (of-object "GFile")
+  (c-name "g_file_query_default_handler")
+  (return-type "GAppInfo*")
+  (caller-owns-return #t)
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method load_contents
+  (docstring
+  "F.load_contents([cancellable]) -> contents, length, etag_out\n\n"
+  "Loads the content of the file into memory, returning the size of the\n"
+  "data. The data is always zero terminated, but this is not included\n"
+  "in the resultant length.\n"
+  "If cancellable is not None, then the operation can be cancelled by\n"
+  "triggering the cancellable object from another thread. If the operation\n"
+  "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
+  )
+  (of-object "GFile")
+  (c-name "g_file_load_contents")
+  (return-type "gboolean")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("char**" "contents")
+    '("gsize*" "length")
+    '("char**" "etag_out")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method load_contents_async
+  (docstring
+  "F.load_contents_async(callback, [cancellable, [user_data]])->start loading\n\n"
+  "Starts an asynchronous load of the file's contents.\n\n"
+  "For more details, see F.load_contents() which is the synchronous\n"
+  "version of this call.\n\n"
+  "When the load operation has completed, callback will be called with\n"
+  "user data. To finish the operation, call F.load_contents_finish() with\n"
+  "the parameter 'res' returned by the callback.\n\n"
+  "If cancellable is not None, then the operation can be cancelled by\n"
+  "triggering the cancellable object from another thread. If the operation\n"
+  "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
+  )
+  (of-object "GFile")
+  (c-name "g_file_load_contents_async")
+  (return-type "none")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method load_contents_finish
+  (docstring
+  "F.load_contents_finish(res) -> contents, length, etag_out\n\n"
+  "Finishes an asynchronous load of the file's contents. The contents are\n"
+  "placed in contents, and length is set to the size of the contents\n"
+  "string. If etag_out is present, it will be set to the new entity\n"
+  "tag for the file.\n"
+  )
+  (of-object "GFile")
+  (c-name "g_file_load_contents_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "res")
+    '("char**" "contents")
+    '("gsize*" "length")
+    '("char**" "etag_out")
+    '("GError**" "error")
+  )
+)
+
+(define-method load_partial_contents_async
+  (of-object "GFile")
+  (c-name "g_file_load_partial_contents_async")
+  (return-type "none")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GFileReadMoreCallback" "read_more_callback")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method load_partial_contents_finish
+  (of-object "GFile")
+  (c-name "g_file_load_partial_contents_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "res")
+    '("char**" "contents")
+    '("gsize*" "length")
+    '("char**" "etag_out")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method replace_contents
+  (docstring
+  "F.replace_contents(contents, [etag, [make_backup, [flags, [cancellable]]]])\n"
+  "-> etag_out\n"
+  "\n"
+  "Replaces the content of the file, returning the new etag value for the\n"
+  "file. If an etag is specified, any existing file must have that etag, or\n"
+  "the error gio.IO_ERROR_WRONG_ETAG will be returned.\n"
+  "If make_backup is True, this method will attempt to make a backup of the\n"
+  "file. If cancellable is not None, then the operation can be cancelled by\n"
+  "triggering the cancellable object from another thread. If the operation\n"
+  "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
+  )
+  (of-object "GFile")
+  (c-name "g_file_replace_contents")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "contents")
+    '("gsize" "length")
+    '("const-char*" "etag")
+    '("gboolean" "make_backup")
+    '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+    '("char**" "new_etag")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method replace_contents_async
+  (docstring
+  "F.replace_contents_async(contents, callback, [etag, [make_backup, [flags,\n"
+  "                         [cancellable]]]]) -> etag_out\n"
+  "\n"
+  "Starts an asynchronous replacement of the file with the given contents.\n"
+  "For more details, see F.replace_contents() which is the synchronous\n"
+  "version of this call.\n\n"
+  "When the load operation has completed, callback will be called with\n"
+  "user data. To finish the operation, call F.replace_contents_finish() with\n"
+  "the parameter 'res' returned by the callback.\n\n"
+  "If cancellable is not None, then the operation can be cancelled by\n"
+  "triggering the cancellable object from another thread. If the operation\n"
+  "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
+  )
+  (of-object "GFile")
+  (c-name "g_file_replace_contents_async")
+  (return-type "none")
+  (parameters
+    '("const-char*" "contents")
+    '("gsize" "length")
+    '("const-char*" "etag")
+    '("gboolean" "make_backup")
+    '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method replace_contents_finish
+  (docstring
+  "F.replace_contents_finish(res) -> etag_out\n\n"
+  "Finishes an asynchronous replacement of the file's contents.\n"
+  "The new entity tag for the file is returned.\n"
+  )
+  (of-object "GFile")
+  (c-name "g_file_replace_contents_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "res")
+    '("char**" "new_etag")
+    '("GError**" "error")
+  )
+)
+
+(define-method create_readwrite
+  (of-object "GFile")
+  (c-name "g_file_create_readwrite")
+  (return-type "GFileIOStream*")
+  (parameters
+    '("GFileCreateFlags" "flags")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method create_readwrite_async
+  (of-object "GFile")
+  (c-name "g_file_create_readwrite_async")
+  (return-type "none")
+  (parameters
+    '("GFileCreateFlags" "flags")
+    '("int" "io_priority")
+    '("GCancellable*" "cancellable")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method create_readwrite_finish
+  (of-object "GFile")
+  (c-name "g_file_create_readwrite_finish")
+  (return-type "GFileIOStream*")
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+(define-method eject_mountable_with_operation
+  (of-object "GFile")
+  (c-name "g_file_eject_mountable_with_operation")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags")
+    '("GMountOperation*" "mount_operation")
+    '("GCancellable*" "cancellable")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method eject_mountable_with_operation_finish
+  (of-object "GFile")
+  (c-name "g_file_eject_mountable_with_operation_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method open_readwrite
+  (of-object "GFile")
+  (c-name "g_file_open_readwrite")
+  (return-type "GFileIOStream*")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method open_readwrite_async
+  (of-object "GFile")
+  (c-name "g_file_open_readwrite_async")
+  (return-type "none")
+  (parameters
+    '("int" "io_priority")
+    '("GCancellable*" "cancellable")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method open_readwrite_finish
+  (of-object "GFile")
+  (c-name "g_file_open_readwrite_finish")
+  (return-type "GFileIOStream*")
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+(define-method poll_mountable
+  (of-object "GFile")
+  (c-name "g_file_poll_mountable")
+  (return-type "none")
+  (parameters
+    '("GCancellable*" "cancellable")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method poll_mountable_finish
+  (of-object "GFile")
+  (c-name "g_file_poll_mountable_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method replace_readwrite
+  (of-object "GFile")
+  (c-name "g_file_replace_readwrite")
+  (return-type "GFileIOStream*")
+  (parameters
+    '("const-char*" "etag")
+    '("gboolean" "make_backup")
+    '("GFileCreateFlags" "flags")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method replace_readwrite_async
+  (of-object "GFile")
+  (c-name "g_file_replace_readwrite_async")
+  (return-type "none")
+  (parameters
+    '("const-char*" "etag")
+    '("gboolean" "make_backup")
+    '("GFileCreateFlags" "flags")
+    '("int" "io_priority")
+    '("GCancellable*" "cancellable")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method replace_readwrite_finish
+  (of-object "GFile")
+  (c-name "g_file_replace_readwrite_finish")
+  (return-type "GFileIOStream*")
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
+(define-method start_mountable
+  (of-object "GFile")
+  (c-name "g_file_start_mountable")
+  (return-type "none")
+  (parameters
+    '("GDriveStartFlags" "flags")
+    '("GMountOperation*" "start_operation")
+    '("GCancellable*" "cancellable")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method start_mountable_finish
+  (of-object "GFile")
+  (c-name "g_file_start_mountable_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method stop_mountable
+  (of-object "GFile")
+  (c-name "g_file_stop_mountable")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags")
+    '("GMountOperation*" "mount_operation")
+    '("GCancellable*" "cancellable")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method stop_mountable_finish
+  (of-object "GFile")
+  (c-name "g_file_stop_mountable_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method supports_thread_contexts
+  (of-object "GFile")
+  (c-name "g_file_supports_thread_contexts")
+  (return-type "gboolean")
+)
+
+(define-method unmount_mountable_with_operation
+  (of-object "GFile")
+  (c-name "g_file_unmount_mountable_with_operation")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags")
+    '("GMountOperation*" "mount_operation")
+    '("GCancellable*" "cancellable")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method unmount_mountable_with_operation_finish
+  (of-object "GFile")
+  (c-name "g_file_unmount_mountable_with_operation_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From gfileicon.h
+
+(define-function file_icon_get_type
+  (c-name "g_file_icon_get_type")
+  (return-type "GType")
+)
+
+(define-function file_icon_new
+  (c-name "g_file_icon_new")
+  (is-constructor-of "GFileIcon")
+  (return-type "GIcon*")
+  ;; Note: starting with GLib 2.18 we could use (properties ...)
+  ;; instead, but I don't know if it is possible to branch on version
+  ;; in codegen.
+  (parameters
+    '("GFile*" "file")
+  )
+)
+
+(define-method get_file
+  (of-object "GFileIcon")
+  (c-name "g_file_icon_get_file")
+  (return-type "GFile*")
+)
+
+
+
+;; From gfileinfo.h
+
+(define-function file_info_get_type
+  (c-name "g_file_info_get_type")
+  (return-type "GType")
+)
+
+(define-function file_info_new
+  (c-name "g_file_info_new")
+  (is-constructor-of "GFileInfo")
+  (return-type "GFileInfo*")
+)
+
+(define-method dup
+  (of-object "GFileInfo")
+  (c-name "g_file_info_dup")
+  (return-type "GFileInfo*")
+  (caller-owns-return #t)
+)
+
+(define-method copy_into
+  (of-object "GFileInfo")
+  (c-name "g_file_info_copy_into")
+  (return-type "none")
+  (parameters
+    '("GFileInfo*" "dest_info")
+  )
+)
+
+(define-method has_attribute
+  (of-object "GFileInfo")
+  (c-name "g_file_info_has_attribute")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method has_namespace
+  (of-object "GFileInfo")
+  (c-name "g_file_info_has_namespace")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "name_space")
+  )
+)
+
+;;
+;; wrapped in  gfileinfo.override
+(define-method list_attributes
+  (docstring
+  "INFO.list_attributes(name_space) -> Attribute list\n\n"
+  "Lists the file info structure's attributes."
+  )
+  (of-object "GFileInfo")
+  (c-name "g_file_info_list_attributes")
+  (return-type "char**")
+  (parameters
+    '("const-char*" "name_space")
+  )
+)
+
+(define-method get_attribute_data
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_attribute_data")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "attribute")
+    '("GFileAttributeType*" "type")
+    '("gpointer*" "value_pp")
+    '("GFileAttributeStatus*" "status")
+  )
+)
+
+(define-method get_attribute_type
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_attribute_type")
+  (return-type "GFileAttributeType")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method remove_attribute
+  (of-object "GFileInfo")
+  (c-name "g_file_info_remove_attribute")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method get_attribute_status
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_attribute_status")
+  (return-type "GFileAttributeStatus")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method set_attribute_status
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_attribute_status")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "attribute")
+    '("GFileAttributeStatus" "status")
+  )
+)
+
+(define-method get_attribute_as_string
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_attribute_as_string")
+  (return-type "char*")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method get_attribute_string
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_attribute_string")
+  (return-type "const-char*")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method get_attribute_byte_string
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_attribute_byte_string")
+  (return-type "const-char*")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method get_attribute_boolean
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_attribute_boolean")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method get_attribute_uint32
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_attribute_uint32")
+  (return-type "guint32")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method get_attribute_int32
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_attribute_int32")
+  (return-type "gint32")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method get_attribute_uint64
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_attribute_uint64")
+  (return-type "guint64")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method get_attribute_int64
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_attribute_int64")
+  (return-type "gint64")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method get_attribute_object
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_attribute_object")
+  (return-type "GObject*")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method get_attribute_stringv
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_attribute_stringv")
+  (return-type "char**")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method set_attribute
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_attribute")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attribute")
+    '("GFileAttributeType" "type")
+    '("gpointer" "value_p")
+  )
+)
+
+(define-method set_attribute_string
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_attribute_string")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attribute")
+    '("const-char*" "attr_value")
+  )
+)
+
+(define-method set_attribute_byte_string
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_attribute_byte_string")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attribute")
+    '("const-char*" "attr_value")
+  )
+)
+
+(define-method set_attribute_boolean
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_attribute_boolean")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attribute")
+    '("gboolean" "attr_value")
+  )
+)
+
+(define-method set_attribute_uint32
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_attribute_uint32")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attribute")
+    '("guint32" "attr_value")
+  )
+)
+
+(define-method set_attribute_int32
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_attribute_int32")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attribute")
+    '("gint32" "attr_value")
+  )
+)
+
+(define-method set_attribute_uint64
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_attribute_uint64")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attribute")
+    '("guint64" "attr_value")
+  )
+)
+
+(define-method set_attribute_int64
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_attribute_int64")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attribute")
+    '("gint64" "attr_value")
+  )
+)
+
+(define-method set_attribute_object
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_attribute_object")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attribute")
+    '("GObject*" "attr_value")
+  )
+)
+
+(define-method clear_status
+  (of-object "GFileInfo")
+  (c-name "g_file_info_clear_status")
+  (return-type "none")
+)
+
+(define-method get_file_type
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_file_type")
+  (return-type "GFileType")
+)
+
+(define-method get_is_hidden
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_is_hidden")
+  (return-type "gboolean")
+)
+
+(define-method get_is_backup
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_is_backup")
+  (return-type "gboolean")
+)
+
+(define-method get_is_symlink
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_is_symlink")
+  (return-type "gboolean")
+)
+
+(define-method get_name
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_name")
+  (return-type "const-char*")
+)
+
+(define-method get_display_name
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_display_name")
+  (return-type "const-char*")
+)
+
+(define-method get_edit_name
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_edit_name")
+  (return-type "const-char*")
+)
+
+(define-method get_icon
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_icon")
+  (return-type "GIcon*")
+)
+
+(define-method get_content_type
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_content_type")
+  (return-type "const-char*")
+)
+
+(define-method get_size
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_size")
+  (return-type "goffset")
+)
+
+;;
+;; wrapped in gfileinfo.override
+;;
+(define-method get_modification_time
+  (docstring
+"INFO.get_modification_time() -> modification time\n"
+"Returns the modification time, in UNIX time format\n")
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_modification_time")
+  (return-type "none")
+  (parameters
+    '("GTimeVal*" "result")
+  )
+)
+
+(define-method get_symlink_target
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_symlink_target")
+  (return-type "const-char*")
+)
+
+(define-method get_etag
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_etag")
+  (return-type "const-char*")
+)
+
+(define-method get_sort_order
+  (of-object "GFileInfo")
+  (c-name "g_file_info_get_sort_order")
+  (return-type "gint32")
+)
+
+(define-method set_attribute_mask
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_attribute_mask")
+  (return-type "none")
+  (parameters
+    '("GFileAttributeMatcher*" "mask")
+  )
+)
+
+(define-method unset_attribute_mask
+  (of-object "GFileInfo")
+  (c-name "g_file_info_unset_attribute_mask")
+  (return-type "none")
+)
+
+(define-method set_file_type
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_file_type")
+  (return-type "none")
+  (parameters
+    '("GFileType" "type")
+  )
+)
+
+(define-method set_is_hidden
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_is_hidden")
+  (return-type "none")
+  (parameters
+    '("gboolean" "is_hidden")
+  )
+)
+
+(define-method set_is_symlink
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_is_symlink")
+  (return-type "none")
+  (parameters
+    '("gboolean" "is_symlink")
+  )
+)
+
+(define-method set_name
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_name")
+  (return-type "none")
+  (parameters
+    '("const-char*" "name")
+  )
+)
+
+(define-method set_display_name
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_display_name")
+  (return-type "none")
+  (parameters
+    '("const-char*" "display_name")
+  )
+)
+
+(define-method set_edit_name
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_edit_name")
+  (return-type "none")
+  (parameters
+    '("const-char*" "edit_name")
+  )
+)
+
+(define-method set_icon
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_icon")
+  (return-type "none")
+  (parameters
+    '("GIcon*" "icon")
+  )
+)
+
+(define-method set_content_type
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_content_type")
+  (return-type "none")
+  (parameters
+    '("const-char*" "content_type")
+  )
+)
+
+(define-method set_size
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_size")
+  (return-type "none")
+  (parameters
+    '("goffset" "size")
+  )
+)
+
+(define-method set_modification_time
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_modification_time")
+  (return-type "none")
+  (parameters
+    '("GTimeVal*" "mtime")
+  )
+)
+
+(define-method set_symlink_target
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_symlink_target")
+  (return-type "none")
+  (parameters
+    '("const-char*" "symlink_target")
+  )
+)
+
+(define-method set_sort_order
+  (of-object "GFileInfo")
+  (c-name "g_file_info_set_sort_order")
+  (return-type "none")
+  (parameters
+    '("gint32" "sort_order")
+  )
+)
+
+(define-function file_attribute_matcher_new
+  (c-name "g_file_attribute_matcher_new")
+  (is-constructor-of "GFileAttributeMatcher")
+  (return-type "GFileAttributeMatcher*")
+  (parameters
+    '("const-char*" "attributes")
+  )
+)
+
+(define-method ref
+  (of-object "GFileAttributeMatcher")
+  (c-name "g_file_attribute_matcher_ref")
+  (return-type "GFileAttributeMatcher*")
+)
+
+(define-method unref
+  (of-object "GFileAttributeMatcher")
+  (c-name "g_file_attribute_matcher_unref")
+  (return-type "none")
+)
+
+(define-method matches
+  (of-object "GFileAttributeMatcher")
+  (c-name "g_file_attribute_matcher_matches")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method matches_only
+  (of-object "GFileAttributeMatcher")
+  (c-name "g_file_attribute_matcher_matches_only")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "attribute")
+  )
+)
+
+(define-method enumerate_namespace
+  (of-object "GFileAttributeMatcher")
+  (c-name "g_file_attribute_matcher_enumerate_namespace")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "ns")
+  )
+)
+
+(define-method enumerate_next
+  (of-object "GFileAttributeMatcher")
+  (c-name "g_file_attribute_matcher_enumerate_next")
+  (return-type "const-char*")
+)
+
+
+
+;; From gfileinputstream.h
+
+(define-function file_input_stream_get_type
+  (c-name "g_file_input_stream_get_type")
+  (return-type "GType")
+)
+
+(define-method query_info
+  (of-object "GFileInputStream")
+  (c-name "g_file_input_stream_query_info")
+  (return-type "GFileInfo*")
+  (parameters
+    '("char*" "attributes")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method query_info_async
+  (of-object "GFileInputStream")
+  (c-name "g_file_input_stream_query_info_async")
+  (return-type "none")
+  (parameters
+    '("char*" "attributes")
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method query_info_finish
+  (of-object "GFileInputStream")
+  (c-name "g_file_input_stream_query_info_finish")
+  (return-type "GFileInfo*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From gfileiostream.h
+
+(define-function file_io_stream_get_type
+  (c-name "g_file_io_stream_get_type")
+  (return-type "GType")
+)
+
+(define-method query_info
+  (of-object "GFileIOStream")
+  (c-name "g_file_io_stream_query_info")
+  (return-type "GFileInfo*")
+  (parameters
+    '("const-char*" "attributes")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method query_info_async
+  (of-object "GFileIOStream")
+  (c-name "g_file_io_stream_query_info_async")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attributes")
+    '("int" "io_priority")
+    '("GCancellable*" "cancellable")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method query_info_finish
+  (of-object "GFileIOStream")
+  (c-name "g_file_io_stream_query_info_finish")
+  (return-type "GFileInfo*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method get_etag
+  (of-object "GFileIOStream")
+  (c-name "g_file_io_stream_get_etag")
+  (return-type "char*")
+)
+
+
+
+
+;; From gfilemonitor.h
+
+(define-function file_monitor_get_type
+  (c-name "g_file_monitor_get_type")
+  (return-type "GType")
+)
+
+(define-method cancel
+  (of-object "GFileMonitor")
+  (c-name "g_file_monitor_cancel")
+  (return-type "gboolean")
+)
+
+(define-method is_cancelled
+  (of-object "GFileMonitor")
+  (c-name "g_file_monitor_is_cancelled")
+  (return-type "gboolean")
+)
+
+(define-method set_rate_limit
+  (of-object "GFileMonitor")
+  (c-name "g_file_monitor_set_rate_limit")
+  (return-type "none")
+  (parameters
+    '("int" "limit_msecs")
+  )
+)
+
+(define-method emit_event
+  (of-object "GFileMonitor")
+  (c-name "g_file_monitor_emit_event")
+  (return-type "none")
+  (parameters
+    '("GFile*" "file")
+    '("GFile*" "other_file")
+    '("GFileMonitorEvent" "event_type")
+  )
+)
+
+
+
+;; From gfilenamecompleter.h
+
+(define-function filename_completer_get_type
+  (c-name "g_filename_completer_get_type")
+  (return-type "GType")
+)
+
+(define-function filename_completer_new
+  (c-name "g_filename_completer_new")
+  (is-constructor-of "GFilenameCompleter")
+  (return-type "GFilenameCompleter*")
+)
+
+(define-method get_completion_suffix
+  (of-object "GFilenameCompleter")
+  (c-name "g_filename_completer_get_completion_suffix")
+  (return-type "char*")
+  (parameters
+    '("const-char*" "initial_text")
+  )
+)
+
+(define-method get_completions
+  (of-object "GFilenameCompleter")
+  (c-name "g_filename_completer_get_completions")
+  (return-type "char**")
+  (parameters
+    '("const-char*" "initial_text")
+  )
+)
+
+(define-method set_dirs_only
+  (of-object "GFilenameCompleter")
+  (c-name "g_filename_completer_set_dirs_only")
+  (return-type "none")
+  (parameters
+    '("gboolean" "dirs_only")
+  )
+)
+
+
+
+;; From gfileoutputstream.h
+
+(define-function file_output_stream_get_type
+  (c-name "g_file_output_stream_get_type")
+  (return-type "GType")
+)
+
+(define-method query_info
+  (of-object "GFileOutputStream")
+  (c-name "g_file_output_stream_query_info")
+  (return-type "GFileInfo*")
+  (parameters
+    '("char*" "attributes")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method query_info_async
+  (of-object "GFileOutputStream")
+  (c-name "g_file_output_stream_query_info_async")
+  (return-type "none")
+  (parameters
+    '("char*" "attributes")
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method query_info_finish
+  (of-object "GFileOutputStream")
+  (c-name "g_file_output_stream_query_info_finish")
+  (return-type "GFileInfo*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method get_etag
+  (of-object "GFileOutputStream")
+  (c-name "g_file_output_stream_get_etag")
+  (return-type "char*")
+)
+
+
+;; From gfilterinputstream.h
+
+(define-function filter_input_stream_get_type
+  (c-name "g_filter_input_stream_get_type")
+  (return-type "GType")
+)
+
+(define-method get_base_stream
+  (of-object "GFilterInputStream")
+  (c-name "g_filter_input_stream_get_base_stream")
+  (return-type "GInputStream*")
+)
+
+(define-method get_close_base_stream
+  (of-object "GFilterInputStream")
+  (c-name "g_filter_input_stream_get_close_base_stream")
+  (return-type "gboolean")
+)
+
+(define-method set_close_base_stream
+  (of-object "GFilterInputStream")
+  (c-name "g_filter_input_stream_set_close_base_stream")
+  (return-type "none")
+  (parameters
+    '("gboolean" "close_base")
+  )
+)
+
+
+
+;; From gfilteroutputstream.h
+
+(define-function filter_output_stream_get_type
+  (c-name "g_filter_output_stream_get_type")
+  (return-type "GType")
+)
+
+(define-method get_base_stream
+  (of-object "GFilterOutputStream")
+  (c-name "g_filter_output_stream_get_base_stream")
+  (return-type "GOutputStream*")
+)
+
+(define-method get_close_base_stream
+  (of-object "GFilterOutputStream")
+  (c-name "g_filter_output_stream_get_close_base_stream")
+  (return-type "gboolean")
+)
+
+(define-method set_close_base_stream
+  (of-object "GFilterOutputStream")
+  (c-name "g_filter_output_stream_set_close_base_stream")
+  (return-type "none")
+  (parameters
+    '("gboolean" "close_base")
+  )
+)
+
+
+
+;; From gicon.h
+
+(define-function icon_get_type
+  (c-name "g_icon_get_type")
+  (return-type "GType")
+)
+
+(define-function icon_hash
+  (c-name "g_icon_hash")
+  (return-type "guint")
+  (parameters
+    '("gconstpointer" "icon")
+  )
+)
+
+(define-method equal
+  (of-object "GIcon")
+  (c-name "g_icon_equal")
+  (return-type "gboolean")
+  (parameters
+    '("GIcon*" "icon2")
+  )
+)
+
+(define-method to_string
+  (of-object "GIcon")
+  (c-name "g_icon_to_string")
+  (return-type "gchar*")
+)
+
+(define-function icon_new_for_string
+  (c-name "g_icon_new_for_string")
+  (return-type "GIcon*")
+  (parameters
+    '("const-gchar*" "str")
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From ginetsocketaddress.h
+
+(define-function inet_socket_address_get_type
+  (c-name "g_inet_socket_address_get_type")
+  (return-type "GType")
+)
+
+(define-function inet_socket_address_new
+  (c-name "g_inet_socket_address_new")
+  (is-constructor-of "GInetSocketAddress")
+  (return-type "GSocketAddress*")
+  (parameters
+    '("GInetAddress*" "address")
+    '("guint16" "port")
+  )
+)
+
+(define-method get_address
+  (of-object "GInetSocketAddress")
+  (c-name "g_inet_socket_address_get_address")
+  (return-type "GInetAddress*")
+)
+
+(define-method get_port
+  (of-object "GInetSocketAddress")
+  (c-name "g_inet_socket_address_get_port")
+  (return-type "guint16")
+)
+
+
+
+;; From ginputstream.h
+
+(define-function input_stream_get_type
+  (c-name "g_input_stream_get_type")
+  (return-type "GType")
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+;; Note: the following two methods are renamed for consistency with
+;; Python file objects' read().  I.e. g_input_stream_read_all() is
+;; more like Python file.read(), so it is renamed read().  Since now
+;; there is a name clash, g_input_stream_read() is renamed
+;; read_part().
+(define-method read_part
+  (of-object "GInputStream")
+  (docstring
+   "STREAM.read_part([count, [cancellable]]) -> string\n"
+   "\n"
+   "Read 'count' bytes from the stream. If 'count' is not specified or is\n"
+   "omitted, read until the end of the stream. This method is allowed to\n"
+   "stop at any time after reading at least 1 byte from the stream. E.g.\n"
+   "when reading over a (relatively slow) HTTP connection, it will often\n"
+   "stop after receiving one packet. Therefore, to reliably read requested\n"
+   "number of bytes, you need to use a loop. See also gio.InputStream.read\n"
+   "for easier to use (though less efficient) method.\n"
+   "\n"
+   "Note: this method roughly corresponds to C GIO g_input_stream_read."
+  )
+  (c-name "g_input_stream_read")
+  (return-type "gssize")
+  (parameters
+    '("void*" "buffer")
+    '("gsize" "count")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+;; See comments before the previous method definition.
+(define-method read
+  (of-object "GInputStream")
+  (docstring
+   "STREAM.read([count, [cancellable]]) -> string\n"
+   "\n"
+   "Read 'count' bytes from the stream. If 'count' is not specified or is\n"
+   "omitted, read until the end of the stream. This method will stop only\n"
+   "after reading requested number of bytes, reaching end of stream or\n"
+   "triggering an I/O error. See also gio.InputStream.read_part for more\n"
+   "efficient, but more cumbersome to use method.\n"
+   "\n"
+   "Note: this method roughly corresponds to C GIO g_input_stream_read_all.\n"
+   "It was renamed for consistency with Python standard file.read."
+  )
+  (c-name "g_input_stream_read_all")
+  (return-type "gboolean")
+  (parameters
+    '("void*" "buffer")
+    '("gsize" "count")
+    '("gsize*" "bytes_read")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method skip
+  (of-object "GInputStream")
+  (c-name "g_input_stream_skip")
+  (return-type "gssize")
+  (parameters
+    '("gsize" "count")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method close
+  (of-object "GInputStream")
+  (c-name "g_input_stream_close")
+  (return-type "gboolean")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+(define-method read_async
+  (of-object "GInputStream")
+  (c-name "g_input_stream_read_async")
+  (return-type "none")
+  (parameters
+    '("void*" "buffer")
+    '("gsize" "count")
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+(define-method read_finish
+  (of-object "GInputStream")
+  (c-name "g_input_stream_read_finish")
+  (return-type "gssize")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method skip_async
+  (of-object "GInputStream")
+  (c-name "g_input_stream_skip_async")
+  (return-type "none")
+  (parameters
+    '("gsize" "count")
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method skip_finish
+  (of-object "GInputStream")
+  (c-name "g_input_stream_skip_finish")
+  (return-type "gssize")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+(define-method close_async
+  (of-object "GInputStream")
+  (c-name "g_input_stream_close_async")
+  (return-type "none")
+  (parameters
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method close_finish
+  (of-object "GInputStream")
+  (c-name "g_input_stream_close_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method is_closed
+  (of-object "GInputStream")
+  (c-name "g_input_stream_is_closed")
+  (return-type "gboolean")
+)
+
+(define-method has_pending
+  (of-object "GInputStream")
+  (c-name "g_input_stream_has_pending")
+  (return-type "gboolean")
+)
+
+(define-method set_pending
+  (of-object "GInputStream")
+  (c-name "g_input_stream_set_pending")
+  (return-type "gboolean")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-method clear_pending
+  (of-object "GInputStream")
+  (c-name "g_input_stream_clear_pending")
+  (return-type "none")
+)
+
+
+
+;; From gioalias.h
+
+
+
+;; From gioenumtypes.h
+
+(define-function app_info_create_flags_get_type
+  (c-name "g_app_info_create_flags_get_type")
+  (return-type "GType")
+)
+
+(define-function data_stream_byte_order_get_type
+  (c-name "g_data_stream_byte_order_get_type")
+  (return-type "GType")
+)
+
+(define-function data_stream_newline_type_get_type
+  (c-name "g_data_stream_newline_type_get_type")
+  (return-type "GType")
+)
+
+(define-function file_query_info_flags_get_type
+  (c-name "g_file_query_info_flags_get_type")
+  (return-type "GType")
+)
+
+(define-function file_create_flags_get_type
+  (c-name "g_file_create_flags_get_type")
+  (return-type "GType")
+)
+
+(define-function file_copy_flags_get_type
+  (c-name "g_file_copy_flags_get_type")
+  (return-type "GType")
+)
+
+(define-function file_monitor_flags_get_type
+  (c-name "g_file_monitor_flags_get_type")
+  (return-type "GType")
+)
+
+(define-function file_attribute_type_get_type
+  (c-name "g_file_attribute_type_get_type")
+  (return-type "GType")
+)
+
+(define-function file_attribute_info_flags_get_type
+  (c-name "g_file_attribute_info_flags_get_type")
+  (return-type "GType")
+)
+
+(define-function file_attribute_status_get_type
+  (c-name "g_file_attribute_status_get_type")
+  (return-type "GType")
+)
+
+(define-function file_type_get_type
+  (c-name "g_file_type_get_type")
+  (return-type "GType")
+)
+
+(define-function file_monitor_event_get_type
+  (c-name "g_file_monitor_event_get_type")
+  (return-type "GType")
+)
+
+(define-function io_error_enum_get_type
+  (c-name "g_io_error_enum_get_type")
+  (return-type "GType")
+)
+
+(define-function ask_password_flags_get_type
+  (c-name "g_ask_password_flags_get_type")
+  (return-type "GType")
+)
+
+(define-function password_save_get_type
+  (c-name "g_password_save_get_type")
+  (return-type "GType")
+)
+
+(define-function output_stream_splice_flags_get_type
+  (c-name "g_output_stream_splice_flags_get_type")
+  (return-type "GType")
+)
+
+
+
+;; From gioerror.h
+
+(define-function io_error_quark
+  (c-name "g_io_error_quark")
+  (return-type "GQuark")
+)
+
+(define-function io_error_from_errno
+  (c-name "g_io_error_from_errno")
+  (return-type "GIOErrorEnum")
+  (parameters
+    '("gint" "err_no")
+  )
+)
+
+
+
+;; From gio.h
+
+
+
+;; From gio-marshal.h
+
+
+
+;; From giomodule.h
+
+(define-function io_module_get_type
+  (c-name "g_io_module_get_type")
+  (return-type "GType")
+)
+
+(define-function io_module_new
+  (c-name "g_io_module_new")
+  (is-constructor-of "GIoModule")
+  (return-type "GIOModule*")
+  (parameters
+    '("const-gchar*" "filename")
+  )
+)
+
+(define-function io_modules_load_all_in_directory
+  (c-name "g_io_modules_load_all_in_directory")
+  (return-type "GList*")
+  (parameters
+    '("const-char*" "dirname")
+  )
+)
+
+(define-method load
+  (of-object "GIOModule")
+  (c-name "g_io_module_load")
+  (return-type "none")
+)
+
+(define-method unload
+  (of-object "GIOModule")
+  (c-name "g_io_module_unload")
+  (return-type "none")
+)
+
+
+
+;; From gioscheduler.h
+
+(define-function io_scheduler_push_job
+  (c-name "g_io_scheduler_push_job")
+  (return-type "none")
+  (parameters
+    '("GIOSchedulerJobFunc" "job_func")
+    '("gpointer" "user_data")
+    '("GDestroyNotify" "notify")
+    '("gint" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+  )
+)
+
+(define-function io_scheduler_cancel_all_jobs
+  (c-name "g_io_scheduler_cancel_all_jobs")
+  (return-type "none")
+)
+
+(define-method send_to_mainloop
+  (of-object "GIOSchedulerJob")
+  (c-name "g_io_scheduler_job_send_to_mainloop")
+  (return-type "gboolean")
+  (parameters
+    '("GSourceFunc" "func")
+    '("gpointer" "user_data")
+    '("GDestroyNotify" "notify")
+  )
+)
+
+(define-method send_to_mainloop_async
+  (of-object "GIOSchedulerJob")
+  (c-name "g_io_scheduler_job_send_to_mainloop_async")
+  (return-type "none")
+  (parameters
+    '("GSourceFunc" "func")
+    '("gpointer" "user_data")
+    '("GDestroyNotify" "notify")
+  )
+)
+
+
+
+;; From gloadableicon.h
+
+(define-function loadable_icon_get_type
+  (c-name "g_loadable_icon_get_type")
+  (return-type "GType")
+)
+
+;;
+;; wrapped in gicon.override
+;;
+(define-method load
+  (of-object "GLoadableIcon")
+  (docstring
+  "ICON.load([size, [cancellable]]) -> input stream, type\n"
+  "\n"
+  "Opens a stream of icon data for reading. The result is a tuple of\n"
+  "gio.InputStream and type (either a string or None). The stream can\n"
+  "be read to retrieve icon data.\n"
+  "\n"
+  ;; Note: this is just a guess, GIO docs say nothing at the moment.
+  "Optional size is a hint at desired icon size. Not all implementations\n"
+  "support it and the hint will be just ignored in such cases.\n"
+  "If cancellable is specified, then the operation can be cancelled\n"
+  "by triggering the cancellable object from another thread. See\n"
+  "gio.File.read for details."
+  )
+  (c-name "g_loadable_icon_load")
+  (return-type "GInputStream*")
+  (parameters
+    '("int" "size")
+    '("char**" "type")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gicon.override
+;;
+(define-method load_async
+  (of-object "GLoadableIcon")
+  (docstring
+  "ICON.load_async(callback, [size, [cancellable, [user_data]]])\n"
+  "-> start loading\n"
+  "\n"
+  "For more information, see gio.LoadableIcon.load() which is the\n"
+  "synchronous version of this call. Asynchronously opens icon data for\n"
+  "reading. When the operation is finished, callback will be called.\n"
+  "You can then call gio.LoadableIcon.load_finish() to get the result of\n"
+  "the operation.\n"
+  )
+  (c-name "g_loadable_icon_load_async")
+  (return-type "none")
+  (parameters
+    '("int" "size")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+;;
+;; wrapped in gicon.override
+;;
+(define-method load_finish
+  (docstring
+  "F.load_finish(res) -> start loading\n"
+  "\n"
+  "Finish asynchronous icon loading operation. Must be called from callback\n"
+  "as specified to gio.LoadableIcon.load_async. Returns a tuple of\n"
+  "gio.InputStream and type, just as gio.LoadableIcon.load."
+  )
+  (of-object "GLoadableIcon")
+  (c-name "g_loadable_icon_load_finish")
+  (return-type "GInputStream*")
+  (parameters
+    '("GAsyncResult*" "res")
+    '("char**" "type")
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From ginetaddress.h
+
+(define-function inet_address_get_type
+  (c-name "g_inet_address_get_type")
+  (return-type "GType")
+)
+
+(define-function inet_address_new_from_string
+  (c-name "g_inet_address_new_from_string")
+  (return-type "GInetAddress*")
+  (parameters
+    '("const-gchar*" "string")
+  )
+)
+
+(define-function inet_address_new_from_bytes
+  (c-name "g_inet_address_new_from_bytes")
+  (return-type "GInetAddress*")
+  (parameters
+    '("const-guint8*" "bytes")
+    '("GSocketFamily" "family")
+  )
+)
+
+(define-function inet_address_new_loopback
+  (c-name "g_inet_address_new_loopback")
+  (return-type "GInetAddress*")
+  (parameters
+    '("GSocketFamily" "family")
+  )
+)
+
+(define-function inet_address_new_any
+  (c-name "g_inet_address_new_any")
+  (return-type "GInetAddress*")
+  (parameters
+    '("GSocketFamily" "family")
+  )
+)
+
+(define-method to_string
+  (of-object "GInetAddress")
+  (c-name "g_inet_address_to_string")
+  (return-type "gchar*")
+)
+
+
+;; FIXME codegen barfs on this one
+;;
+;;(define-method to_bytes
+;;  (of-object "GInetAddress")
+;;  (c-name "g_inet_address_to_bytes")
+;;  (return-type "const-guint8*")
+;;)
+
+(define-method get_native_size
+  (of-object "GInetAddress")
+  (c-name "g_inet_address_get_native_size")
+  (return-type "gsize")
+)
+
+(define-method get_family
+  (of-object "GInetAddress")
+  (c-name "g_inet_address_get_family")
+  (return-type "GSocketFamily")
+)
+
+(define-method get_is_any
+  (of-object "GInetAddress")
+  (c-name "g_inet_address_get_is_any")
+  (return-type "gboolean")
+)
+
+(define-method get_is_loopback
+  (of-object "GInetAddress")
+  (c-name "g_inet_address_get_is_loopback")
+  (return-type "gboolean")
+)
+
+(define-method get_is_link_local
+  (of-object "GInetAddress")
+  (c-name "g_inet_address_get_is_link_local")
+  (return-type "gboolean")
+)
+
+(define-method get_is_site_local
+  (of-object "GInetAddress")
+  (c-name "g_inet_address_get_is_site_local")
+  (return-type "gboolean")
+)
+
+(define-method get_is_multicast
+  (of-object "GInetAddress")
+  (c-name "g_inet_address_get_is_multicast")
+  (return-type "gboolean")
+)
+
+(define-method get_is_mc_global
+  (of-object "GInetAddress")
+  (c-name "g_inet_address_get_is_mc_global")
+  (return-type "gboolean")
+)
+
+(define-method get_is_mc_link_local
+  (of-object "GInetAddress")
+  (c-name "g_inet_address_get_is_mc_link_local")
+  (return-type "gboolean")
+)
+
+(define-method get_is_mc_node_local
+  (of-object "GInetAddress")
+  (c-name "g_inet_address_get_is_mc_node_local")
+  (return-type "gboolean")
+)
+
+(define-method get_is_mc_org_local
+  (of-object "GInetAddress")
+  (c-name "g_inet_address_get_is_mc_org_local")
+  (return-type "gboolean")
+)
+
+(define-method get_is_mc_site_local
+  (of-object "GInetAddress")
+  (c-name "g_inet_address_get_is_mc_site_local")
+  (return-type "gboolean")
+)
+
+
+
+;; From ginitable.h
+
+(define-function initable_get_type
+  (c-name "g_initable_get_type")
+  (return-type "GType")
+)
+
+(define-method init
+  (of-object "GInitable")
+  (c-name "g_initable_init")
+  (return-type "gboolean")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-function initable_new
+  (c-name "g_initable_new")
+  (return-type "gpointer")
+  (parameters
+    '("GType" "object_type")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+    '("const-gchar*" "first_property_name")
+  )
+  (varargs #t)
+)
+
+(define-function initable_newv
+  (c-name "g_initable_newv")
+  (return-type "gpointer")
+  (parameters
+    '("GType" "object_type")
+    '("guint" "n_parameters")
+    '("GParameter*" "parameters")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-function initable_new_valist
+  (c-name "g_initable_new_valist")
+  (return-type "GObject*")
+  (parameters
+    '("GType" "object_type")
+    '("const-gchar*" "first_property_name")
+    '("va_list" "var_args")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From giostream.h
+
+(define-function io_stream_get_type
+  (c-name "g_io_stream_get_type")
+  (return-type "GType")
+)
+
+(define-method get_input_stream
+  (of-object "GIOStream")
+  (c-name "g_io_stream_get_input_stream")
+  (return-type "GInputStream*")
+)
+
+(define-method get_output_stream
+  (of-object "GIOStream")
+  (c-name "g_io_stream_get_output_stream")
+  (return-type "GOutputStream*")
+)
+
+(define-method close
+  (of-object "GIOStream")
+  (c-name "g_io_stream_close")
+  (return-type "gboolean")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method close_async
+  (of-object "GIOStream")
+  (c-name "g_io_stream_close_async")
+  (return-type "none")
+  (parameters
+    '("int" "io_priority")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method close_finish
+  (of-object "GIOStream")
+  (c-name "g_io_stream_close_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method is_closed
+  (of-object "GIOStream")
+  (c-name "g_io_stream_is_closed")
+  (return-type "gboolean")
+)
+
+(define-method has_pending
+  (of-object "GIOStream")
+  (c-name "g_io_stream_has_pending")
+  (return-type "gboolean")
+)
+
+(define-method set_pending
+  (of-object "GIOStream")
+  (c-name "g_io_stream_set_pending")
+  (return-type "gboolean")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-method clear_pending
+  (of-object "GIOStream")
+  (c-name "g_io_stream_clear_pending")
+  (return-type "none")
+)
+
+
+
+;; From glocaldirectorymonitor.h
+
+(define-function local_directory_monitor_get_type
+  (c-name "g_local_directory_monitor_get_type")
+  (return-type "GType")
+)
+
+
+
+;; From glocalfileenumerator.h
+
+
+
+;; From glocalfile.h
+
+
+
+;; From glocalfileinfo.h
+
+
+
+;; From glocalfileinputstream.h
+
+
+
+;; From glocalfilemonitor.h
+
+(define-function local_file_monitor_get_type
+  (c-name "g_local_file_monitor_get_type")
+  (return-type "GType")
+)
+
+
+
+;; From glocalfileoutputstream.h
+
+
+
+;; From glocalvfs.h
+
+
+
+;; From gmemoryinputstream.h
+
+(define-function memory_input_stream_get_type
+  (c-name "g_memory_input_stream_get_type")
+  (return-type "GType")
+)
+
+(define-function memory_input_stream_new
+  (c-name "g_memory_input_stream_new")
+  (is-constructor-of "GMemoryInputStream")
+  (return-type "GInputStream*")
+)
+
+(define-function memory_input_stream_new_from_data
+  (c-name "g_memory_input_stream_new_from_data")
+  (return-type "GInputStream*")
+  (parameters
+    '("const-void*" "data")
+    '("gssize" "len")
+    '("GDestroyNotify" "destroy")
+  )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+(define-method add_data
+  (of-object "GMemoryInputStream")
+  (c-name "g_memory_input_stream_add_data")
+  (return-type "none")
+  (parameters
+    '("const-void*" "data")
+    '("gssize" "len")
+    '("GDestroyNotify" "destroy")
+  )
+)
+
+
+
+;; From gmemoryoutputstream.h
+
+(define-function memory_output_stream_get_type
+  (c-name "g_memory_output_stream_get_type")
+  (return-type "GType")
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+(define-function memory_output_stream_new
+  (c-name "g_memory_output_stream_new")
+  (is-constructor-of "GMemoryOutputStream")
+  (return-type "GOutputStream*")
+  (parameters
+    '("gpointer" "data")
+    '("gsize" "len")
+    '("GReallocFunc" "realloc_fn")
+    '("GDestroyNotify" "destroy")
+  )
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+;; Note: name clash with gobject.GObject.get_data; renamed.
+(define-method get_contents
+  (of-object "GMemoryOutputStream")
+  (c-name "g_memory_output_stream_get_data")
+  (return-type "gpointer")
+)
+
+(define-method get_size
+  (of-object "GMemoryOutputStream")
+  (c-name "g_memory_output_stream_get_size")
+  (return-type "gsize")
+)
+
+(define-method get_data_size
+  (of-object "GMemoryOutputStream")
+  (c-name "g_memory_output_stream_get_data_size")
+  (return-type "gsize")
+)
+
+
+
+;; From gmount.h
+
+(define-function mount_get_type
+  (c-name "g_mount_get_type")
+  (return-type "GType")
+)
+
+(define-method get_root
+  (of-object "GMount")
+  (c-name "g_mount_get_root")
+  (return-type "GFile*")
+  (caller-owns-return #t)
+)
+
+(define-method get_name
+  (of-object "GMount")
+  (c-name "g_mount_get_name")
+  (return-type "char*")
+)
+
+(define-method get_icon
+  (of-object "GMount")
+  (c-name "g_mount_get_icon")
+  (return-type "GIcon*")
+  (caller-owns-return #t)
+)
+
+(define-method get_uuid
+  (of-object "GMount")
+  (c-name "g_mount_get_uuid")
+  (return-type "char*")
+)
+
+(define-method get_volume
+  (of-object "GMount")
+  (c-name "g_mount_get_volume")
+  (return-type "GVolume*")
+  (caller-owns-return #t)
+)
+
+(define-method get_drive
+  (of-object "GMount")
+  (c-name "g_mount_get_drive")
+  (return-type "GDrive*")
+  (caller-owns-return #t)
+)
+
+(define-method can_unmount
+  (of-object "GMount")
+  (c-name "g_mount_can_unmount")
+  (return-type "gboolean")
+)
+
+(define-method can_eject
+  (of-object "GMount")
+  (c-name "g_mount_can_eject")
+  (return-type "gboolean")
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-method unmount
+  (docstring
+"M.unmount(callback, [flags, cancellable, user_data])\n"
+"Unmounts a mount. This is an asynchronous operation, and is finished\n"
+"by calling gio.Mount.unmount_finish() with the mount and gio.AsyncResults\n"
+"data returned in the callback."
+)
+  (of-object "GMount")
+  (c-name "g_mount_unmount")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method unmount_finish
+  (of-object "GMount")
+  (c-name "g_mount_unmount_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-method eject
+  (docstring
+"F.eject(callback, [flags, cancellable, user_data])\n"
+"Ejects a volume.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled by\n"
+"triggering the cancellable object from another thread. If the\n"
+"operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
+"\n"
+"When the operation is finished, callback will be called. You can\n"
+"then call gio.Volume.eject_finish() to get the result of the operation.\n")
+  (of-object "GMount")
+  (c-name "g_mount_eject")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method eject_finish
+  (of-object "GMount")
+  (c-name "g_mount_eject_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-method remount
+  (of-object "GMount")
+  (docstring
+   "M.remount(callback, [flags, [mount_operation, [cancellable, [user_data]]]])\n"
+   "Remounts a mount. This is an asynchronous operation, and is finished by\n"
+   "calling gio.Mount.remount_finish with the mount and gio.AsyncResults data\n"
+   "returned in the callback.")
+  (c-name "g_mount_remount")
+  (return-type "none")
+  (parameters
+    '("GMountOperation*" "mount_operation")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method remount_finish
+  (of-object "GMount")
+  (c-name "g_mount_remount_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method guess_content_type
+  (of-object "GMount")
+  (c-name "g_mount_guess_content_type")
+  (return-type "none")
+  (parameters
+    '("gboolean" "force_rescan")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method guess_content_type_finish
+  (of-object "GMount")
+  (c-name "g_mount_guess_content_type_finish")
+  (return-type "gchar**")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method guess_content_type_sync
+  (of-object "GMount")
+  (c-name "g_mount_guess_content_type_sync")
+  (return-type "gchar**")
+  (parameters
+    '("gboolean" "force_rescan")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method is_shadowed
+  (of-object "GMount")
+  (c-name "g_mount_is_shadowed")
+  (return-type "gboolean")
+)
+
+(define-method shadow
+  (of-object "GMount")
+  (c-name "g_mount_shadow")
+  (return-type "none")
+)
+
+(define-method unshadow
+  (of-object "GMount")
+  (c-name "g_mount_unshadow")
+  (return-type "none")
+)
+
+(define-method unmount_with_operation
+  (of-object "GMount")
+  (c-name "g_mount_unmount_with_operation")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags")
+    '("GMountOperation*" "mount_operation")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method unmount_with_operation_finish
+  (of-object "GMount")
+  (c-name "g_mount_unmount_with_operation_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method eject_with_operation
+  (of-object "GMount")
+  (c-name "g_mount_eject_with_operation")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags")
+    '("GMountOperation*" "mount_operation")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method eject_with_operation_finish
+  (of-object "GMount")
+  (c-name "g_mount_eject_with_operation_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From gmountoperation.h
+
+(define-function mount_operation_get_type
+  (c-name "g_mount_operation_get_type")
+  (return-type "GType")
+)
+
+(define-function mount_operation_new
+  (c-name "g_mount_operation_new")
+  (is-constructor-of "GMountOperation")
+  (return-type "GMountOperation*")
+)
+
+(define-method get_username
+  (of-object "GMountOperation")
+  (c-name "g_mount_operation_get_username")
+  (return-type "const-char*")
+)
+
+(define-method set_username
+  (of-object "GMountOperation")
+  (c-name "g_mount_operation_set_username")
+  (return-type "none")
+  (parameters
+    '("const-char*" "username")
+  )
+)
+
+(define-method get_password
+  (of-object "GMountOperation")
+  (c-name "g_mount_operation_get_password")
+  (return-type "const-char*")
+)
+
+(define-method set_password
+  (of-object "GMountOperation")
+  (c-name "g_mount_operation_set_password")
+  (return-type "none")
+  (parameters
+    '("const-char*" "password")
+  )
+)
+
+(define-method get_anonymous
+  (of-object "GMountOperation")
+  (c-name "g_mount_operation_get_anonymous")
+  (return-type "gboolean")
+)
+
+(define-method set_anonymous
+  (of-object "GMountOperation")
+  (c-name "g_mount_operation_set_anonymous")
+  (return-type "none")
+  (parameters
+    '("gboolean" "anonymous")
+  )
+)
+
+(define-method get_domain
+  (of-object "GMountOperation")
+  (c-name "g_mount_operation_get_domain")
+  (return-type "const-char*")
+)
+
+(define-method set_domain
+  (of-object "GMountOperation")
+  (c-name "g_mount_operation_set_domain")
+  (return-type "none")
+  (parameters
+    '("const-char*" "domain")
+  )
+)
+
+(define-method get_password_save
+  (of-object "GMountOperation")
+  (c-name "g_mount_operation_get_password_save")
+  (return-type "GPasswordSave")
+)
+
+(define-method set_password_save
+  (of-object "GMountOperation")
+  (c-name "g_mount_operation_set_password_save")
+  (return-type "none")
+  (parameters
+    '("GPasswordSave" "save")
+  )
+)
+
+(define-method get_choice
+  (of-object "GMountOperation")
+  (c-name "g_mount_operation_get_choice")
+  (return-type "int")
+)
+
+(define-method set_choice
+  (of-object "GMountOperation")
+  (c-name "g_mount_operation_set_choice")
+  (return-type "none")
+  (parameters
+    '("int" "choice")
+  )
+)
+
+(define-method reply
+  (of-object "GMountOperation")
+  (c-name "g_mount_operation_reply")
+  (return-type "none")
+  (parameters
+    '("GMountOperationResult" "result")
+  )
+)
+
+
+
+;; From gnativevolumemonitor.h
+
+(define-function native_volume_monitor_get_type
+  (c-name "g_native_volume_monitor_get_type")
+  (return-type "GType")
+)
+
+
+
+;; From gnetworkaddress.h
+
+(define-function network_address_get_type
+  (c-name "g_network_address_get_type")
+  (return-type "GType")
+)
+
+(define-function network_address_new
+  (c-name "g_network_address_new")
+  (is-constructor-of "GNetworkAddress")
+  (return-type "GSocketConnectable*")
+  (parameters
+    '("const-gchar*" "hostname")
+    '("guint16" "port")
+  )
+)
+
+(define-function network_address_parse
+  (c-name "g_network_address_parse")
+  (return-type "GSocketConnectable*")
+  (parameters
+    '("const-gchar*" "host_and_port")
+    '("guint16" "default_port")
+    '("GError**" "error")
+  )
+)
+
+(define-method get_hostname
+  (of-object "GNetworkAddress")
+  (c-name "g_network_address_get_hostname")
+  (return-type "const-gchar*")
+)
+
+(define-method get_port
+  (of-object "GNetworkAddress")
+  (c-name "g_network_address_get_port")
+  (return-type "guint16")
+)
+
+
+
+;; From gnetworkservice.h
+
+(define-function network_service_get_type
+  (c-name "g_network_service_get_type")
+  (return-type "GType")
+)
+
+(define-function network_service_new
+  (c-name "g_network_service_new")
+  (is-constructor-of "GNetworkService")
+  (return-type "GSocketConnectable*")
+  (parameters
+    '("const-gchar*" "service")
+    '("const-gchar*" "protocol")
+    '("const-gchar*" "domain")
+  )
+)
+
+(define-method get_service
+  (of-object "GNetworkService")
+  (c-name "g_network_service_get_service")
+  (return-type "const-gchar*")
+)
+
+(define-method get_protocol
+  (of-object "GNetworkService")
+  (c-name "g_network_service_get_protocol")
+  (return-type "const-gchar*")
+)
+
+(define-method get_domain
+  (of-object "GNetworkService")
+  (c-name "g_network_service_get_domain")
+  (return-type "const-gchar*")
+)
+
+
+
+;; From goutputstream.h
+
+(define-function output_stream_get_type
+  (c-name "g_output_stream_get_type")
+  (return-type "GType")
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+;; Note: the following two methods are renamed for consistency with
+;; Python file objects' write().  I.e. g_output_stream_write_all() is
+;; more like Python file.write(), so it is renamed write().  Since now
+;; there is a name clash, g_output_stream_write() is renamed
+;; write_part().
+(define-method write_part
+  (of-object "GOutputStream")
+  (docstring
+   "STREAM.write_part(buffer, [cancellable]) -> int\n"
+   "\n"
+   "Write the bytes in 'buffer' to the stream. Return the number of bytes\n"
+   "successfully written. This method is allowed to stop at any time after\n"
+   "writing at least 1 byte. Therefore, to reliably write the whole buffer,\n"
+   "you need to use a loop. See also gio.OutputStream.write for easier to\n"
+   "use (though less efficient) method.\n"
+   "\n"
+   "Note: this method roughly corresponds to C GIO g_output_stream_write."
+  )
+  (c-name "g_output_stream_write")
+  (return-type "gssize")
+  (parameters
+    '("const-void*" "buffer")
+    '("gsize" "count")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+;; See comments before the previous method definition.
+(define-method write
+  (of-object "GOutputStream")
+   "STREAM.write(buffer, [cancellable]) -> int\n"
+   "\n"
+   "Write the bytes in 'buffer' to the stream. Return the number of bytes\n"
+   "successfully written. This method will stop only after writing the whole\n"
+   "buffer or triggering an I/O error. See also gio.OutputStream.write_part\n"
+   "for more efficient, but more cumbersome to use method.\n"
+   "\n"
+   "Note: this method roughly corresponds to C GIO g_output_stream_write_all.\n"
+   "It was renamed for consistency with Python standard file.write."
+  (c-name "g_output_stream_write_all")
+  (return-type "gboolean")
+  (parameters
+    '("const-void*" "buffer")
+    '("gsize" "count")
+    '("gsize*" "bytes_written")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method splice
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_splice")
+  (return-type "gssize")
+  (parameters
+    '("GInputStream*" "source")
+    '("GOutputStreamSpliceFlags" "flags" (default "G_OUTPUT_STREAM_SPLICE_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method flush
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_flush")
+  (return-type "gboolean")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method close
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_close")
+  (return-type "gboolean")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+(define-method write_async
+  (of-object "GOutputStream")
+  (docstring
+"S.write_async(buffer, callback [,io_priority] [,cancellable] [,user_data])\n"
+"\n"
+"Request an asynchronous write of count bytes from buffer into the stream.\n"
+"When the operation is finished callback will be called. You can then call\n"
+"gio.OutputStream.write_finish() to get the result of the operation.\n"
+"On success, the number of bytes written will be passed to the callback.\n"
+"It is not an error if this is not the same as the requested size, as it can\n"
+"happen e.g. on a partial I/O error, but generally tries to write as many \n"
+"bytes as requested.\n"
+"For the synchronous, blocking version of this function, see\n"
+"gio.OutputStream.write().\n")
+  (c-name "g_output_stream_write_async")
+  (return-type "none")
+  (parameters
+    '("const-void*" "buffer")
+    '("gsize" "count")
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method write_finish
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_write_finish")
+  (return-type "gssize")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method splice_async
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_splice_async")
+  (return-type "none")
+  (parameters
+    '("GInputStream*" "source")
+    '("GOutputStreamSpliceFlags" "flags" (default "G_OUTPUT_STREAM_SPLICE_NONE"))
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method splice_finish
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_splice_finish")
+  (return-type "gssize")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method flush_async
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_flush_async")
+  (return-type "none")
+  (parameters
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method flush_finish
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_flush_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+(define-method close_async
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_close_async")
+  (return-type "none")
+  (parameters
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method close_finish
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_close_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method is_closed
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_is_closed")
+  (return-type "gboolean")
+)
+
+(define-method has_pending
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_has_pending")
+  (return-type "gboolean")
+)
+
+(define-method set_pending
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_set_pending")
+  (return-type "gboolean")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-method clear_pending
+  (of-object "GOutputStream")
+  (c-name "g_output_stream_clear_pending")
+  (return-type "none")
+)
+
+
+
+;; From gresolver.h
+
+(define-function resolver_get_type
+  (c-name "g_resolver_get_type")
+  (return-type "GType")
+)
+
+(define-function resolver_get_default
+  (c-name "g_resolver_get_default")
+  (return-type "GResolver*")
+)
+
+(define-method set_default
+  (of-object "GResolver")
+  (c-name "g_resolver_set_default")
+  (return-type "none")
+)
+
+(define-method lookup_by_name
+  (of-object "GResolver")
+  (c-name "g_resolver_lookup_by_name")
+  (return-type "GList*")
+  (parameters
+    '("const-gchar*" "hostname")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method lookup_by_name_async
+  (of-object "GResolver")
+  (c-name "g_resolver_lookup_by_name_async")
+  (return-type "none")
+  (parameters
+    '("const-gchar*" "hostname")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method lookup_by_name_finish
+  (of-object "GResolver")
+  (c-name "g_resolver_lookup_by_name_finish")
+  (return-type "GList*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-function resolver_free_addresses
+  (c-name "g_resolver_free_addresses")
+  (return-type "none")
+  (parameters
+    '("GList*" "addresses")
+  )
+)
+
+(define-method lookup_by_address
+  (of-object "GResolver")
+  (c-name "g_resolver_lookup_by_address")
+  (return-type "gchar*")
+  (parameters
+    '("GInetAddress*" "address")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method lookup_by_address_async
+  (of-object "GResolver")
+  (c-name "g_resolver_lookup_by_address_async")
+  (return-type "none")
+  (parameters
+    '("GInetAddress*" "address")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method lookup_by_address_finish
+  (of-object "GResolver")
+  (c-name "g_resolver_lookup_by_address_finish")
+  (return-type "gchar*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method lookup_service
+  (of-object "GResolver")
+  (c-name "g_resolver_lookup_service")
+  (return-type "GList*")
+  (parameters
+    '("const-gchar*" "service")
+    '("const-gchar*" "protocol")
+    '("const-gchar*" "domain")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method lookup_service_async
+  (of-object "GResolver")
+  (c-name "g_resolver_lookup_service_async")
+  (return-type "none")
+  (parameters
+    '("const-gchar*" "service")
+    '("const-gchar*" "protocol")
+    '("const-gchar*" "domain")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method lookup_service_finish
+  (of-object "GResolver")
+  (c-name "g_resolver_lookup_service_finish")
+  (return-type "GList*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-function resolver_free_targets
+  (c-name "g_resolver_free_targets")
+  (return-type "none")
+  (parameters
+    '("GList*" "targets")
+  )
+)
+
+(define-function resolver_error_quark
+  (c-name "g_resolver_error_quark")
+  (return-type "GQuark")
+)
+
+
+
+;; From gseekable.h
+
+(define-function seekable_get_type
+  (c-name "g_seekable_get_type")
+  (return-type "GType")
+)
+
+(define-method tell
+  (of-object "GSeekable")
+  (c-name "g_seekable_tell")
+  (return-type "goffset")
+)
+
+(define-method can_seek
+  (of-object "GSeekable")
+  (c-name "g_seekable_can_seek")
+  (return-type "gboolean")
+)
+
+(define-method seek
+  (of-object "GSeekable")
+  (c-name "g_seekable_seek")
+  (return-type "gboolean")
+  (parameters
+    '("goffset" "offset")
+    '("GSeekType" "type" (default "G_SEEK_SET"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method can_truncate
+  (of-object "GSeekable")
+  (c-name "g_seekable_can_truncate")
+  (return-type "gboolean")
+)
+
+(define-method truncate
+  (of-object "GSeekable")
+  (c-name "g_seekable_truncate")
+  (return-type "gboolean")
+  (parameters
+    '("goffset" "offset")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From gsimpleasyncresult.h
+
+(define-function simple_async_result_get_type
+  (c-name "g_simple_async_result_get_type")
+  (return-type "GType")
+)
+
+(define-function simple_async_result_new
+  (c-name "g_simple_async_result_new")
+  (is-constructor-of "GSimpleAsyncResult")
+  (return-type "GSimpleAsyncResult*")
+  (parameters
+    '("GObject*" "source_object")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+    '("gpointer" "source_tag")
+  )
+)
+
+(define-function simple_async_result_new_error
+  (c-name "g_simple_async_result_new_error")
+  (return-type "GSimpleAsyncResult*")
+  (parameters
+    '("GObject*" "source_object")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+    '("GQuark" "domain")
+    '("gint" "code")
+    '("const-char*" "format")
+  )
+  (varargs #t)
+)
+
+(define-function simple_async_result_new_from_error
+  (c-name "g_simple_async_result_new_from_error")
+  (return-type "GSimpleAsyncResult*")
+  (parameters
+    '("GObject*" "source_object")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+    '("GError*" "error")
+  )
+)
+
+(define-method set_op_res_gpointer
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_set_op_res_gpointer")
+  (return-type "none")
+  (parameters
+    '("gpointer" "op_res")
+    '("GDestroyNotify" "destroy_op_res")
+  )
+)
+
+(define-method get_op_res_gpointer
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_get_op_res_gpointer")
+  (return-type "gpointer")
+)
+
+(define-method set_op_res_gssize
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_set_op_res_gssize")
+  (return-type "none")
+  (parameters
+    '("gssize" "op_res")
+  )
+)
+
+(define-method get_op_res_gssize
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_get_op_res_gssize")
+  (return-type "gssize")
+)
+
+(define-method set_op_res_gboolean
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_set_op_res_gboolean")
+  (return-type "none")
+  (parameters
+    '("gboolean" "op_res")
+  )
+)
+
+(define-method get_op_res_gboolean
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_get_op_res_gboolean")
+  (return-type "gboolean")
+)
+
+(define-method get_source_tag
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_get_source_tag")
+  (return-type "gpointer")
+)
+
+(define-method set_handle_cancellation
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_set_handle_cancellation")
+  (return-type "none")
+  (parameters
+    '("gboolean" "handle_cancellation")
+  )
+)
+
+(define-method complete
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_complete")
+  (return-type "none")
+)
+
+(define-method complete_in_idle
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_complete_in_idle")
+  (return-type "none")
+)
+
+(define-method run_in_thread
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_run_in_thread")
+  (return-type "none")
+  (parameters
+    '("GSimpleAsyncThreadFunc" "func")
+    '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+  )
+)
+
+(define-method set_from_error
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_set_from_error")
+  (return-type "none")
+  (parameters
+    '("GError*" "error")
+  )
+)
+
+(define-method propagate_error
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_propagate_error")
+  (return-type "gboolean")
+  (parameters
+    '("GError**" "dest")
+  )
+)
+
+(define-method set_error
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_set_error")
+  (return-type "none")
+  (parameters
+    '("GQuark" "domain")
+    '("gint" "code")
+    '("const-char*" "format")
+  )
+  (varargs #t)
+)
+
+(define-method set_error_va
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_set_error_va")
+  (return-type "none")
+  (parameters
+    '("GQuark" "domain")
+    '("gint" "code")
+    '("const-char*" "format")
+    '("va_list" "args")
+  )
+)
+
+(define-function simple_async_report_error_in_idle
+  (c-name "g_simple_async_report_error_in_idle")
+  (return-type "none")
+  (parameters
+    '("GObject*" "object")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+    '("GQuark" "domain")
+    '("gint" "code")
+    '("const-char*" "format")
+  )
+  (varargs #t)
+)
+
+(define-function simple_async_report_gerror_in_idle
+  (c-name "g_simple_async_report_gerror_in_idle")
+  (return-type "none")
+  (parameters
+    '("GObject*" "object")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+    '("GError*" "error")
+  )
+)
+
+
+
+;; From gsocketaddressenumerator.h
+
+(define-function socket_address_enumerator_get_type
+  (c-name "g_socket_address_enumerator_get_type")
+  (return-type "GType")
+)
+
+(define-method next
+  (of-object "GSocketAddressEnumerator")
+  (c-name "g_socket_address_enumerator_next")
+  (return-type "GSocketAddress*")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method next_async
+  (of-object "GSocketAddressEnumerator")
+  (c-name "g_socket_address_enumerator_next_async")
+  (return-type "none")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method next_finish
+  (of-object "GSocketAddressEnumerator")
+  (c-name "g_socket_address_enumerator_next_finish")
+  (return-type "GSocketAddress*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From gsocketaddress.h
+
+(define-function socket_address_get_type
+  (c-name "g_socket_address_get_type")
+  (return-type "GType")
+)
+
+(define-method get_family
+  (of-object "GSocketAddress")
+  (c-name "g_socket_address_get_family")
+  (return-type "GSocketFamily")
+)
+
+(define-function socket_address_new_from_native
+  (c-name "g_socket_address_new_from_native")
+  (return-type "GSocketAddress*")
+  (parameters
+    '("gpointer" "native")
+    '("gsize" "len")
+  )
+)
+
+(define-method to_native
+  (of-object "GSocketAddress")
+  (c-name "g_socket_address_to_native")
+  (return-type "gboolean")
+  (parameters
+    '("gpointer" "dest")
+    '("gsize" "destlen")
+    '("GError**" "error")
+  )
+)
+
+(define-method get_native_size
+  (of-object "GSocketAddress")
+  (c-name "g_socket_address_get_native_size")
+  (return-type "gssize")
+)
+
+
+
+;; From gsocketclient.h
+
+(define-function socket_client_get_type
+  (c-name "g_socket_client_get_type")
+  (return-type "GType")
+)
+
+(define-function socket_client_new
+  (c-name "g_socket_client_new")
+  (is-constructor-of "GSocketClient")
+  (return-type "GSocketClient*")
+)
+
+(define-method get_family
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_get_family")
+  (return-type "GSocketFamily")
+)
+
+(define-method set_family
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_set_family")
+  (return-type "none")
+  (parameters
+    '("GSocketFamily" "family")
+  )
+)
+
+(define-method get_socket_type
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_get_socket_type")
+  (return-type "GSocketType")
+)
+
+(define-method set_socket_type
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_set_socket_type")
+  (return-type "none")
+  (parameters
+    '("GSocketType" "type")
+  )
+)
+
+(define-method get_protocol
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_get_protocol")
+  (return-type "GSocketProtocol")
+)
+
+(define-method set_protocol
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_set_protocol")
+  (return-type "none")
+  (parameters
+    '("GSocketProtocol" "protocol")
+  )
+)
+
+(define-method get_local_address
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_get_local_address")
+  (return-type "GSocketAddress*")
+)
+
+(define-method set_local_address
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_set_local_address")
+  (return-type "none")
+  (parameters
+    '("GSocketAddress*" "address")
+  )
+)
+
+(define-method connect
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_connect")
+  (return-type "GSocketConnection*")
+  (parameters
+    '("GSocketConnectable*" "connectable")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method connect_to_host
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_connect_to_host")
+  (return-type "GSocketConnection*")
+  (parameters
+    '("const-gchar*" "host_and_port")
+    '("guint16" "default_port")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method connect_to_service
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_connect_to_service")
+  (return-type "GSocketConnection*")
+  (parameters
+    '("const-gchar*" "domain")
+    '("const-gchar*" "service")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method connect_async
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_connect_async")
+  (return-type "none")
+  (parameters
+    '("GSocketConnectable*" "connectable")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method connect_finish
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_connect_finish")
+  (return-type "GSocketConnection*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method connect_to_host_async
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_connect_to_host_async")
+  (return-type "none")
+  (parameters
+    '("const-gchar*" "host_and_port")
+    '("guint16" "default_port")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method connect_to_host_finish
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_connect_to_host_finish")
+  (return-type "GSocketConnection*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+(define-method connect_to_service_async
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_connect_to_service_async")
+  (return-type "none")
+  (parameters
+    '("const-gchar*" "domain")
+    '("const-gchar*" "service")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method connect_to_service_finish
+  (of-object "GSocketClient")
+  (c-name "g_socket_client_connect_to_service_finish")
+  (return-type "GSocketConnection*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From gsocketconnectable.h
+
+(define-function socket_connectable_get_type
+  (c-name "g_socket_connectable_get_type")
+  (return-type "GType")
+)
+
+(define-method enumerate
+  (of-object "GSocketConnectable")
+  (c-name "g_socket_connectable_enumerate")
+  (return-type "GSocketAddressEnumerator*")
+)
+
+
+
+;; From gsocketconnection.h
+
+(define-function socket_connection_get_type
+  (c-name "g_socket_connection_get_type")
+  (return-type "GType")
+)
+
+(define-method get_socket
+  (of-object "GSocketConnection")
+  (c-name "g_socket_connection_get_socket")
+  (return-type "GSocket*")
+)
+
+(define-method get_local_address
+  (of-object "GSocketConnection")
+  (c-name "g_socket_connection_get_local_address")
+  (return-type "GSocketAddress*")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-method get_remote_address
+  (of-object "GSocketConnection")
+  (c-name "g_socket_connection_get_remote_address")
+  (return-type "GSocketAddress*")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-function socket_connection_factory_register_type
+  (c-name "g_socket_connection_factory_register_type")
+  (return-type "none")
+  (parameters
+    '("GType" "g_type")
+    '("GSocketFamily" "family")
+    '("GSocketType" "type")
+    '("gint" "protocol")
+  )
+)
+
+(define-function socket_connection_factory_lookup_type
+  (c-name "g_socket_connection_factory_lookup_type")
+  (return-type "GType")
+  (parameters
+    '("GSocketFamily" "family")
+    '("GSocketType" "type")
+    '("gint" "protocol_id")
+  )
+)
+
+(define-method connection_factory_create_connection
+  (of-object "GSocket")
+  (c-name "g_socket_connection_factory_create_connection")
+  (return-type "GSocketConnection*")
+)
+
+
+
+;; From gsocketcontrolmessage.h
+
+(define-function socket_control_message_get_type
+  (c-name "g_socket_control_message_get_type")
+  (return-type "GType")
+)
+
+(define-method get_size
+  (of-object "GSocketControlMessage")
+  (c-name "g_socket_control_message_get_size")
+  (return-type "gsize")
+)
+
+(define-method get_level
+  (of-object "GSocketControlMessage")
+  (c-name "g_socket_control_message_get_level")
+  (return-type "int")
+)
+
+(define-method get_msg_type
+  (of-object "GSocketControlMessage")
+  (c-name "g_socket_control_message_get_msg_type")
+  (return-type "int")
+)
+
+(define-method serialize
+  (of-object "GSocketControlMessage")
+  (c-name "g_socket_control_message_serialize")
+  (return-type "none")
+  (parameters
+    '("gpointer" "data")
+  )
+)
+
+(define-function socket_control_message_deserialize
+  (c-name "g_socket_control_message_deserialize")
+  (return-type "GSocketControlMessage*")
+  (parameters
+    '("int" "level")
+    '("int" "type")
+    '("gsize" "size")
+    '("gpointer" "data")
+  )
+)
+
+
+
+;; From gsocket.h
+
+(define-function socket_get_type
+  (c-name "g_socket_get_type")
+  (return-type "GType")
+)
+
+(define-function socket_new
+  (c-name "g_socket_new")
+  (is-constructor-of "GSocket")
+  (return-type "GSocket*")
+  (parameters
+    '("GSocketFamily" "family")
+    '("GSocketType" "type")
+    '("GSocketProtocol" "protocol")
+    '("GError**" "error")
+  )
+)
+
+(define-function socket_new_from_fd
+  (c-name "g_socket_new_from_fd")
+  (return-type "GSocket*")
+  (parameters
+    '("gint" "fd")
+    '("GError**" "error")
+  )
+)
+
+(define-method get_fd
+  (of-object "GSocket")
+  (c-name "g_socket_get_fd")
+  (return-type "int")
+)
+
+(define-method get_family
+  (of-object "GSocket")
+  (c-name "g_socket_get_family")
+  (return-type "GSocketFamily")
+)
+
+(define-method get_socket_type
+  (of-object "GSocket")
+  (c-name "g_socket_get_socket_type")
+  (return-type "GSocketType")
+)
+
+(define-method get_protocol
+  (of-object "GSocket")
+  (c-name "g_socket_get_protocol")
+  (return-type "GSocketProtocol")
+)
+
+(define-method get_local_address
+  (of-object "GSocket")
+  (c-name "g_socket_get_local_address")
+  (return-type "GSocketAddress*")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-method get_remote_address
+  (of-object "GSocket")
+  (c-name "g_socket_get_remote_address")
+  (return-type "GSocketAddress*")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-method set_blocking
+  (of-object "GSocket")
+  (c-name "g_socket_set_blocking")
+  (return-type "none")
+  (parameters
+    '("gboolean" "blocking")
+  )
+)
+
+(define-method get_blocking
+  (of-object "GSocket")
+  (c-name "g_socket_get_blocking")
+  (return-type "gboolean")
+)
+
+(define-method set_keepalive
+  (of-object "GSocket")
+  (c-name "g_socket_set_keepalive")
+  (return-type "none")
+  (parameters
+    '("gboolean" "keepalive")
+  )
+)
+
+(define-method get_keepalive
+  (of-object "GSocket")
+  (c-name "g_socket_get_keepalive")
+  (return-type "gboolean")
+)
+
+(define-method get_listen_backlog
+  (of-object "GSocket")
+  (c-name "g_socket_get_listen_backlog")
+  (return-type "gint")
+)
+
+(define-method set_listen_backlog
+  (of-object "GSocket")
+  (c-name "g_socket_set_listen_backlog")
+  (return-type "none")
+  (parameters
+    '("gint" "backlog")
+  )
+)
+
+(define-method is_connected
+  (of-object "GSocket")
+  (c-name "g_socket_is_connected")
+  (return-type "gboolean")
+)
+
+(define-method bind
+  (of-object "GSocket")
+  (c-name "g_socket_bind")
+  (return-type "gboolean")
+  (parameters
+    '("GSocketAddress*" "address")
+    '("gboolean" "allow_reuse")
+    '("GError**" "error")
+  )
+)
+
+(define-method connect
+  (of-object "GSocket")
+  (c-name "g_socket_connect")
+  (return-type "gboolean")
+  (parameters
+    '("GSocketAddress*" "address")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method check_connect_result
+  (of-object "GSocket")
+  (c-name "g_socket_check_connect_result")
+  (return-type "gboolean")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-method condition_check
+  (of-object "GSocket")
+  (c-name "g_socket_condition_check")
+  (return-type "GIOCondition")
+  (parameters
+    '("GIOCondition" "condition")
+  )
+)
+
+(define-method condition_wait
+  (of-object "GSocket")
+  (c-name "g_socket_condition_wait")
+  (return-type "gboolean")
+  (parameters
+    '("GIOCondition" "condition")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method accept
+  (of-object "GSocket")
+  (c-name "g_socket_accept")
+  (return-type "GSocket*")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method listen
+  (of-object "GSocket")
+  (c-name "g_socket_listen")
+  (return-type "gboolean")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-method receive
+  (of-object "GSocket")
+  (c-name "g_socket_receive")
+  (return-type "gssize")
+  (parameters
+    '("gchar*" "buffer")
+    '("gsize" "size")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method receive_from
+  (of-object "GSocket")
+  (c-name "g_socket_receive_from")
+  (return-type "gssize")
+  (parameters
+    '("GSocketAddress**" "address")
+    '("gchar*" "buffer")
+    '("gsize" "size")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method send
+  (of-object "GSocket")
+  (c-name "g_socket_send")
+  (return-type "gssize")
+  (parameters
+    '("const-gchar*" "buffer")
+    '("gsize" "size")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method send_to
+  (of-object "GSocket")
+  (c-name "g_socket_send_to")
+  (return-type "gssize")
+  (parameters
+    '("GSocketAddress*" "address")
+    '("const-gchar*" "buffer")
+    '("gsize" "size")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method receive_message
+  (of-object "GSocket")
+  (c-name "g_socket_receive_message")
+  (return-type "gssize")
+  (parameters
+    '("GSocketAddress**" "address")
+    '("GInputVector*" "vectors")
+    '("gint" "num_vectors")
+    '("GSocketControlMessage***" "messages")
+    '("gint*" "num_messages")
+    '("gint*" "flags")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method send_message
+  (of-object "GSocket")
+  (c-name "g_socket_send_message")
+  (return-type "gssize")
+  (parameters
+    '("GSocketAddress*" "address")
+    '("GOutputVector*" "vectors")
+    '("gint" "num_vectors")
+    '("GSocketControlMessage**" "messages")
+    '("gint" "num_messages")
+    '("gint" "flags")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method close
+  (of-object "GSocket")
+  (c-name "g_socket_close")
+  (return-type "gboolean")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-method shutdown
+  (of-object "GSocket")
+  (c-name "g_socket_shutdown")
+  (return-type "gboolean")
+  (parameters
+    '("gboolean" "shutdown_read")
+    '("gboolean" "shutdown_write")
+    '("GError**" "error")
+  )
+)
+
+(define-method is_closed
+  (of-object "GSocket")
+  (c-name "g_socket_is_closed")
+  (return-type "gboolean")
+)
+
+(define-method create_source
+  (of-object "GSocket")
+  (c-name "g_socket_create_source")
+  (return-type "GSource*")
+  (parameters
+    '("GIOCondition" "condition")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+  )
+)
+
+(define-method speaks_ipv4
+  (of-object "GSocket")
+  (c-name "g_socket_speaks_ipv4")
+  (return-type "gboolean")
+)
+
+
+
+;; From gsocketlistener.h
+
+(define-function socket_listener_get_type
+  (c-name "g_socket_listener_get_type")
+  (return-type "GType")
+)
+
+(define-function socket_listener_new
+  (c-name "g_socket_listener_new")
+  (is-constructor-of "GSocketListener")
+  (return-type "GSocketListener*")
+)
+
+(define-method set_backlog
+  (of-object "GSocketListener")
+  (c-name "g_socket_listener_set_backlog")
+  (return-type "none")
+  (parameters
+    '("int" "listen_backlog")
+  )
+)
+
+(define-method add_socket
+  (of-object "GSocketListener")
+  (c-name "g_socket_listener_add_socket")
+  (return-type "gboolean")
+  (parameters
+    '("GSocket*" "socket")
+    '("GObject*" "source_object")
+    '("GError**" "error")
+  )
+)
+
+(define-method add_address
+  (of-object "GSocketListener")
+  (c-name "g_socket_listener_add_address")
+  (return-type "gboolean")
+  (parameters
+    '("GSocketAddress*" "address")
+    '("GSocketType" "type")
+    '("GSocketProtocol" "protocol")
+    '("GObject*" "source_object")
+    '("GSocketAddress**" "effective_address")
+    '("GError**" "error")
+  )
+)
+
+(define-method add_inet_port
+  (of-object "GSocketListener")
+  (c-name "g_socket_listener_add_inet_port")
+  (return-type "gboolean")
+  (parameters
+    '("guint16" "port")
+    '("GObject*" "source_object")
+    '("GError**" "error")
+  )
+)
+
+(define-method accept_socket
+  (of-object "GSocketListener")
+  (c-name "g_socket_listener_accept_socket")
+  (return-type "GSocket*")
+  (parameters
+    '("GObject**" "source_object")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method accept_socket_async
+  (of-object "GSocketListener")
+  (c-name "g_socket_listener_accept_socket_async")
+  (return-type "none")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method accept_socket_finish
+  (of-object "GSocketListener")
+  (c-name "g_socket_listener_accept_socket_finish")
+  (return-type "GSocket*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GObject**" "source_object")
+    '("GError**" "error")
+  )
+)
+
+(define-method accept
+  (of-object "GSocketListener")
+  (c-name "g_socket_listener_accept")
+  (return-type "GSocketConnection*")
+  (parameters
+    '("GObject**" "source_object")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GError**" "error")
+  )
+)
+
+(define-method accept_async
+  (of-object "GSocketListener")
+  (c-name "g_socket_listener_accept_async")
+  (return-type "none")
+  (parameters
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method accept_finish
+  (of-object "GSocketListener")
+  (c-name "g_socket_listener_accept_finish")
+  (return-type "GSocketConnection*")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GObject**" "source_object")
+    '("GError**" "error")
+  )
+)
+
+(define-method close
+  (of-object "GSocketListener")
+  (c-name "g_socket_listener_close")
+  (return-type "none")
+)
+
+
+
+;; From gsocketservice.h
+
+(define-function socket_service_get_type
+  (c-name "g_socket_service_get_type")
+  (return-type "GType")
+)
+
+(define-function socket_service_new
+  (c-name "g_socket_service_new")
+  (is-constructor-of "GSocketService")
+  (return-type "GSocketService*")
+)
+
+(define-method start
+  (of-object "GSocketService")
+  (c-name "g_socket_service_start")
+  (return-type "none")
+)
+
+(define-method stop
+  (of-object "GSocketService")
+  (c-name "g_socket_service_stop")
+  (return-type "none")
+)
+
+(define-method is_active
+  (of-object "GSocketService")
+  (c-name "g_socket_service_is_active")
+  (return-type "gboolean")
+)
+
+
+
+;; From gsrvtarget.h
+
+(define-function srv_target_get_type
+  (c-name "g_srv_target_get_type")
+  (return-type "GType")
+)
+
+(define-function srv_target_new
+  (c-name "g_srv_target_new")
+  (is-constructor-of "GSrvTarget")
+  (return-type "GSrvTarget*")
+  (parameters
+    '("const-gchar*" "hostname")
+    '("guint16" "port")
+    '("guint16" "priority")
+    '("guint16" "weight")
+  )
+)
+
+(define-method copy
+  (of-object "GSrvTarget")
+  (c-name "g_srv_target_copy")
+  (return-type "GSrvTarget*")
+)
+
+(define-method free
+  (of-object "GSrvTarget")
+  (c-name "g_srv_target_free")
+  (return-type "none")
+)
+
+(define-method get_hostname
+  (of-object "GSrvTarget")
+  (c-name "g_srv_target_get_hostname")
+  (return-type "const-gchar*")
+)
+
+(define-method get_port
+  (of-object "GSrvTarget")
+  (c-name "g_srv_target_get_port")
+  (return-type "guint16")
+)
+
+(define-method get_priority
+  (of-object "GSrvTarget")
+  (c-name "g_srv_target_get_priority")
+  (return-type "guint16")
+)
+
+(define-method get_weight
+  (of-object "GSrvTarget")
+  (c-name "g_srv_target_get_weight")
+  (return-type "guint16")
+)
+
+(define-function srv_target_list_sort
+  (c-name "g_srv_target_list_sort")
+  (return-type "GList*")
+  (parameters
+    '("GList*" "targets")
+  )
+)
+
+
+
+;; From gthemedicon.h
+
+(define-function themed_icon_get_type
+  (c-name "g_themed_icon_get_type")
+  (return-type "GType")
+)
+
+(define-function themed_icon_new
+  (c-name "g_themed_icon_new")
+  (is-constructor-of "GThemedIcon")
+  (return-type "GIcon*")
+  (properties
+    '("name" (argname "iconname"))
+  )
+)
+
+(define-function themed_icon_new_with_default_fallbacks
+  (c-name "g_themed_icon_new_with_default_fallbacks")
+  (return-type "GIcon*")
+  (parameters
+    '("const-char*" "iconname")
+  )
+)
+
+(define-function themed_icon_new_from_names
+  (c-name "g_themed_icon_new_from_names")
+  (return-type "GIcon*")
+  (parameters
+    '("char**" "iconnames")
+    '("int" "len")
+  )
+)
+
+(define-method prepend_name
+  (of-object "GThemedIcon")
+  (c-name "g_themed_icon_prepend_name")
+  (return-type "none")
+  (parameters
+    '("const-char*" "iconname")
+  )
+)
+
+;;
+;; wrapped in gicon.override
+;;
+(define-method get_names
+  (c-name "g_themed_icon_get_names")
+  (of-object "GThemedIcon")
+  (return-type "const-gchar*-const*")
+)
+
+(define-method append_name
+  (c-name "g_themed_icon_append_name")
+  (of-object "GThemedIcon")
+  (return-type "none")
+  (parameters
+    '("char*" "iconname")
+  )
+)
+
+
+
+;; From gthreadedsocketservice.h
+
+(define-function threaded_socket_service_get_type
+  (c-name "g_threaded_socket_service_get_type")
+  (return-type "GType")
+)
+
+(define-function threaded_socket_service_new
+  (c-name "g_threaded_socket_service_new")
+  (is-constructor-of "GThreadedSocketService")
+  (return-type "GSocketService*")
+  (parameters
+    '("int" "max_threads")
+  )
+)
+
+
+
+;; From gunixinputstream.h
+
+(define-function unix_input_stream_get_type
+  (c-name "g_unix_input_stream_get_type")
+  (return-type "GType")
+)
+
+(define-function unix_input_stream_new
+  (c-name "g_unix_input_stream_new")
+  (is-constructor-of "GUnixInputStream")
+  (return-type "GInputStream*")
+  (parameters
+    '("int" "fd")
+    '("gboolean" "close_fd_at_close")
+  )
+)
+
+
+
+;; From gvfs.h
+
+(define-function vfs_get_type
+  (c-name "g_vfs_get_type")
+  (return-type "GType")
+)
+
+(define-method is_active
+  (of-object "GVfs")
+  (c-name "g_vfs_is_active")
+  (return-type "gboolean")
+)
+
+(define-method get_file_for_path
+  (of-object "GVfs")
+  (c-name "g_vfs_get_file_for_path")
+  (return-type "GFile*")
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "path")
+  )
+)
+
+(define-method get_file_for_uri
+  (of-object "GVfs")
+  (c-name "g_vfs_get_file_for_uri")
+  (return-type "GFile*")
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "uri")
+  )
+)
+
+(define-method parse_name
+  (of-object "GVfs")
+  (c-name "g_vfs_parse_name")
+  (return-type "GFile*")
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "parse_name")
+  )
+)
+
+(define-function vfs_get_default
+  (c-name "g_vfs_get_default")
+  (return-type "GVfs*")
+)
+
+(define-function vfs_get_local
+  (c-name "g_vfs_get_local")
+  (return-type "GVfs*")
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-method get_supported_uri_schemes
+  (docstring
+"VFS.get_supported_uri_schemes() -> [uri, ..]\n"
+"Gets a list of URI schemes supported by vfs.")
+  (of-object "GVfs")
+  (c-name "g_vfs_get_supported_uri_schemes")
+  (return-type "const-char*-const*")
+)
+
+
+
+;; From gwin32appinfo.h
+
+(define-function win32_app_info_get_type
+  (c-name "g_win32_app_info_get_type")
+  (return-type "GType")
+)
+
+
+
+;; From gvolume.h
+
+(define-function volume_get_type
+  (c-name "g_volume_get_type")
+  (return-type "GType")
+)
+
+(define-method get_name
+  (of-object "GVolume")
+  (c-name "g_volume_get_name")
+  (return-type "char*")
+)
+
+(define-method get_icon
+  (of-object "GVolume")
+  (c-name "g_volume_get_icon")
+  (return-type "GIcon*")
+  (caller-owns-return #t)
+)
+
+(define-method get_uuid
+  (of-object "GVolume")
+  (c-name "g_volume_get_uuid")
+  (return-type "char*")
+)
+
+(define-method get_drive
+  (of-object "GVolume")
+  (c-name "g_volume_get_drive")
+  (return-type "GDrive*")
+  (caller-owns-return #t)
+)
+
+(define-method get_mount
+  (of-object "GVolume")
+  (c-name "g_volume_get_mount")
+  (return-type "GMount*")
+  (caller-owns-return #t)
+)
+
+(define-method can_mount
+  (of-object "GVolume")
+  (c-name "g_volume_can_mount")
+  (return-type "gboolean")
+)
+
+(define-method can_eject
+  (of-object "GVolume")
+  (c-name "g_volume_can_eject")
+  (return-type "gboolean")
+)
+
+(define-method should_automount
+  (of-object "GVolume")
+  (c-name "g_volume_should_automount")
+  (return-type "gboolean")
+)
+
+;;
+;; wrapped in gvolume.override
+;;
+(define-method mount
+  (of-object "GVolume")
+  (c-name "g_volume_mount")
+  (return-type "none")
+  (parameters
+    '("GMountOperation*" "mount_operation")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method mount_finish
+  (of-object "GVolume")
+  (c-name "g_volume_mount_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+;;
+;; wrapped in gvolume.override
+;;
+(define-method eject
+  (of-object "GVolume")
+  (c-name "g_volume_eject")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method eject_finish
+  (of-object "GVolume")
+  (c-name "g_volume_eject_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+  (deprecated "use gio.Drive.eject_with_operation_finish instead.")
+)
+
+(define-method get_identifier
+  (of-object "GVolume")
+  (c-name "g_volume_get_identifier")
+  (return-type "char*")
+  (parameters
+    '("const-char*" "kind")
+  )
+)
+
+;;
+;; wrapped in gvolume.override
+;;
+(define-method enumerate_identifiers
+  (of-object "GVolume")
+  (c-name "g_volume_enumerate_identifiers")
+  (return-type "char**")
+)
+
+(define-method get_activation_root
+  (of-object "GVolume")
+  (c-name "g_volume_get_activation_root")
+  (return-type "GFile*")
+)
+
+(define-method eject_with_operation
+  (of-object "GVolume")
+  (c-name "g_volume_eject_with_operation")
+  (return-type "none")
+  (parameters
+    '("GMountUnmountFlags" "flags")
+    '("GMountOperation*" "mount_operation")
+    '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method eject_with_operation_finish
+  (of-object "GVolume")
+  (c-name "g_volume_eject_with_operation_finish")
+  (return-type "gboolean")
+  (parameters
+    '("GAsyncResult*" "result")
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From gvolumemonitor.h
+
+(define-function volume_monitor_get_type
+  (c-name "g_volume_monitor_get_type")
+  (return-type "GType")
+)
+
+(define-function volume_monitor_get
+  (c-name "g_volume_monitor_get")
+  (return-type "GVolumeMonitor*")
+)
+
+;;
+;; wrapped in gvolumemonitor.override
+;;
+(define-method get_connected_drives
+  (of-object "GVolumeMonitor")
+  (c-name "g_volume_monitor_get_connected_drives")
+  (return-type "GList*")
+)
+
+;;
+;; wrapped in gvolumemonitor.override
+;;
+(define-method get_volumes
+  (of-object "GVolumeMonitor")
+  (c-name "g_volume_monitor_get_volumes")
+  (return-type "GList*")
+)
+
+;;
+;; wrapped in gvolumemonitor.override
+;;
+(define-method get_mounts
+  (of-object "GVolumeMonitor")
+  (c-name "g_volume_monitor_get_mounts")
+  (return-type "GList*")
+)
+
+(define-method get_volume_for_uuid
+  (of-object "GVolumeMonitor")
+  (c-name "g_volume_monitor_get_volume_for_uuid")
+  (return-type "GVolume*")
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "uuid")
+  )
+)
+
+(define-method get_mount_for_uuid
+  (of-object "GVolumeMonitor")
+  (c-name "g_volume_monitor_get_mount_for_uuid")
+  (return-type "GMount*")
+  (caller-owns-return #t)
+  (parameters
+    '("const-char*" "uuid")
+  )
+)
+
+(define-function volume_monitor_adopt_orphan_mount
+  (c-name "g_volume_monitor_adopt_orphan_mount")
+  (return-type "GVolume*")
+  (parameters
+    '("GMount*" "mount")
+  )
+)
+
diff --git a/gio/gio.override b/gio/gio.override
new file mode 100644 (file)
index 0000000..7fdcb1c
--- /dev/null
@@ -0,0 +1,409 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   gio.override: module wrapping the GIO 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+modulename gio
+%%
+import gobject.GObject as PyGObject_Type
+import glib.PollFD as PyGPollFD_Type
+%%
+headers
+#define NO_IMPORT_PYGOBJECT
+#include <pygobject.h>
+#include <gio/gio.h>
+#include "pygio-utils.h"
+#include "pyglib.h"
+#include "pygsource.h"
+
+#define BUFSIZE 8192
+
+typedef struct _PyGIONotify PyGIONotify;
+
+struct _PyGIONotify {
+    gboolean  referenced;
+    PyObject *callback;
+    PyObject *data;
+    gboolean  attach_self;
+    gpointer  buffer;
+    gsize     buffer_size;
+
+    /* If a structure has any 'slaves', those will reference their
+     * callbacks and be freed together with the 'master'. */
+    PyGIONotify *slaves;
+};
+
+static GQuark
+pygio_notify_get_internal_quark(void)
+{
+    static GQuark quark = 0;
+    if (!quark)
+        quark = g_quark_from_string("pygio::notify");
+    return quark;
+}
+
+static PyGIONotify *
+pygio_notify_new(void)
+{
+    return g_slice_new0(PyGIONotify);
+}
+
+static PyGIONotify *
+pygio_notify_new_slave(PyGIONotify* master)
+{
+    PyGIONotify *slave = pygio_notify_new();
+
+    while (master->slaves)
+        master = master->slaves;
+    master->slaves = slave;
+
+    return slave;
+}
+
+static gboolean
+pygio_notify_using_optional_callback(PyGIONotify *notify)
+{
+    if (notify->callback)
+        return TRUE;
+    else {
+        notify->data = NULL;
+        return FALSE;
+    }
+}
+
+static gboolean
+pygio_notify_callback_is_valid_full(PyGIONotify *notify, const gchar *name)
+{
+    if (!notify->callback) {
+        PyErr_SetString(PyExc_RuntimeError, "internal error: callback is not set");
+        return FALSE;
+    }
+
+    if (!PyCallable_Check(notify->callback)) {
+        gchar *error_message = g_strdup_printf("%s argument not callable", name);
+
+       PyErr_SetString(PyExc_TypeError, error_message);
+        g_free(error_message);
+       return FALSE;
+    }
+
+    return TRUE;
+}
+
+static gboolean
+pygio_notify_callback_is_valid(PyGIONotify *notify)
+{
+    return pygio_notify_callback_is_valid_full(notify, "callback");
+}
+
+static void
+pygio_notify_reference_callback(PyGIONotify *notify)
+{
+    if (!notify->referenced) {
+        notify->referenced = TRUE;
+        Py_XINCREF(notify->callback);
+        Py_XINCREF(notify->data);
+
+        if (notify->slaves)
+            pygio_notify_reference_callback(notify->slaves);
+    }
+}
+
+static void
+pygio_notify_copy_buffer(PyGIONotify *notify, gpointer buffer, gsize buffer_size)
+{
+    if (buffer_size > 0) {
+       notify->buffer = g_slice_copy(buffer_size, buffer);
+       notify->buffer_size = buffer_size;
+    }
+}
+
+static gboolean
+pygio_notify_allocate_buffer(PyGIONotify *notify, gsize buffer_size)
+{
+    if (buffer_size > 0) {
+        notify->buffer = g_slice_alloc(buffer_size);
+        if (!notify->buffer) {
+            PyErr_Format(PyExc_MemoryError, "failed to allocate %" G_GSIZE_FORMAT " bytes", buffer_size);
+            return FALSE;
+        }
+
+        notify->buffer_size = buffer_size;
+    }
+
+    return TRUE;
+}
+
+static void
+pygio_notify_attach_to_result(PyGIONotify *notify)
+{
+    notify->attach_self = TRUE;
+}
+
+static PyGIONotify *
+pygio_notify_get_attached(PyGObject *result)
+{
+    return g_object_get_qdata(G_OBJECT(result->obj), pygio_notify_get_internal_quark());
+}
+
+static void
+pygio_notify_free(PyGIONotify *notify)
+{
+    if (notify) {
+        if (notify->slaves)
+            pygio_notify_free(notify->slaves);
+
+        if (notify->referenced) {
+            PyGILState_STATE state;
+
+            state = pyg_gil_state_ensure();
+            Py_XDECREF(notify->callback);
+            Py_XDECREF(notify->data);
+            pyg_gil_state_release(state);
+        }
+
+        if (notify->buffer)
+            g_slice_free1(notify->buffer_size, notify->buffer);
+
+        g_slice_free(PyGIONotify, notify);
+    }
+}
+
+static void
+async_result_callback_marshal(GObject *source_object,
+                             GAsyncResult *result,
+                             PyGIONotify *notify)
+{
+    PyObject *ret;
+    PyGILState_STATE state;
+
+    state = pyg_gil_state_ensure();
+
+    if (!notify->referenced)
+        g_warning("pygio_notify_reference_callback() hasn't been called before using the structure");
+
+    if (notify->attach_self) {
+        g_object_set_qdata_full(G_OBJECT(result), pygio_notify_get_internal_quark(),
+                                notify, (GDestroyNotify) pygio_notify_free);
+    }
+
+    if (notify->data)
+       ret = PyEval_CallFunction(notify->callback, "NNO",
+                                 pygobject_new(source_object),
+                                 pygobject_new((GObject *)result),
+                                 notify->data);
+    else
+       ret = PyObject_CallFunction(notify->callback, "NN",
+                                   pygobject_new(source_object),
+                                   pygobject_new((GObject *)result));
+
+    if (ret == NULL) {
+       PyErr_Print();
+       PyErr_Clear();
+    }
+
+    Py_XDECREF(ret);
+
+    /* Otherwise the structure is attached to 'result' and will be
+     * freed when that object dies. */
+    if (!notify->attach_self)
+        pygio_notify_free(notify);
+
+    pyg_gil_state_release(state);
+}
+%%
+include
+  gappinfo.override
+  gapplaunchcontext.override
+  gbufferedinputstream.override
+  gcancellable.override
+  gdatainputstream.override
+  gdrive.override
+  gfile.override
+  gfileattribute.override
+  gfileenumerator.override
+  gfileinfo.override
+  gfileinputstream.override
+  gfileiostream.override
+  gfileoutputstream.override
+  gicon.override
+  giostream.override
+  gmemoryinputstream.override
+  gmemoryoutputstream.override
+  gmount.override
+  ginputstream.override
+  goutputstream.override
+  gresolver.override
+  gsocket.override
+  gvolume.override
+  gvolumemonitor.override
+%%
+ignore-glob
+  *_get_type
+  *free
+  *_ref
+  *_unref
+  g_async_result_get_user_data
+  g_file_new_from_commandline_arg
+  g_file_new_from_path
+  g_file_new_from_uri
+  g_file_hash
+  g_io_error_quark
+  g_simple_async_result_new_error
+  g_simple_async_report_error_in_idle
+  g_simple_async_result_set_op_res_gpointer
+  g_simple_async_result_get_op_res_gpointer
+  g_simple_async_result_get_source_tag
+  g_simple_async_result_run_in_thread
+  g_simple_async_result_set_from_error
+  g_simple_async_result_set_error
+  g_simple_async_result_set_error_va
+  g_io_module*
+  g_io_scheduler_*
+%%
+override g_app_info_get_all noargs
+static PyObject *
+_wrap_g_app_info_get_all (PyGObject *self)
+{
+  GList *list, *l;
+  PyObject *ret;
+
+  list = g_app_info_get_all ();
+
+  ret = PyList_New(0);
+  for (l = list; l; l = l->next) {
+    GObject *obj = l->data;
+    PyObject *item = pygobject_new(obj);
+    PyList_Append(ret, item);
+    Py_DECREF(item);
+  }
+  g_list_free(list);
+
+  return ret;
+}
+%%
+override g_app_info_get_all_for_type args
+static PyObject *
+_wrap_g_app_info_get_all_for_type (PyGObject *self, PyObject *args)
+{
+  GList *list, *l;
+  PyObject *ret;
+  gchar *type;
+
+  if (!PyArg_ParseTuple (args, "s:app_info_get_all_for_type", &type))
+    return NULL;
+
+  list = g_app_info_get_all_for_type (type);
+
+  ret = PyList_New(0);
+  for (l = list; l; l = l->next) {
+    GObject *obj = l->data;
+    PyObject *item = pygobject_new(obj);
+    PyList_Append(ret, item);
+    Py_DECREF(item);
+  }
+  g_list_free(list);
+
+  return ret;
+}
+%%
+override g_content_type_guess kwargs
+static PyObject *
+_wrap_g_content_type_guess(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    char *kwlist[] = {"filename", "data", "want_uncertain", NULL};
+    char *filename = NULL, *data = NULL, *type;
+#ifdef PY_SSIZE_T_CLEAN
+    Py_ssize_t data_size = 0;
+#else
+    int data_size = 0;
+#endif
+
+    gboolean result_uncertain, want_uncertain = FALSE;
+    PyObject *ret;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+                                     "|zz#i:g_content_type_guess",
+                                     kwlist,
+                                     &filename, &data, &data_size,
+                                     &want_uncertain))
+      return NULL;
+
+    if (!filename && !data) {
+      PyErr_SetString(PyExc_TypeError, "need at least one argument");
+      return NULL;
+    }
+
+    type = g_content_type_guess(filename, (guchar *) data,
+                               data_size, &result_uncertain);
+
+    if (want_uncertain) {
+       ret = Py_BuildValue("zN", type, PyBool_FromLong(result_uncertain));
+    
+    } else {
+        ret = PyString_FromString(type);
+    }
+
+    g_free(type);
+    return ret;
+}
+%%
+override g_vfs_get_supported_uri_schemes noargs
+static PyObject *
+_wrap_g_vfs_get_supported_uri_schemes(PyGObject *self)
+{
+    const char * const *names;
+    PyObject *ret;
+
+    names = g_vfs_get_supported_uri_schemes(G_VFS(self->obj));
+
+    ret = PyList_New(0);
+    while (names && *names) {
+        PyObject *item = PyString_FromString(names[0]);
+        PyList_Append(ret, item);
+        Py_DECREF(item);
+
+        names++;
+    }
+
+    return ret;
+}
+%%
+override g_content_types_get_registered noargs
+static PyObject *
+_wrap_g_content_types_get_registered(PyObject *self)
+{
+    GList *list, *l;
+    PyObject *ret;
+
+    list = g_content_types_get_registered();
+
+    ret = PyList_New(0);
+    for (l = list; l; l = l->next) {
+       char *content_type = l->data;
+       PyObject *string = PyString_FromString(content_type);
+       PyList_Append(ret, string);
+       Py_DECREF(string);
+       g_free(content_type);
+    }
+    g_list_free(list);
+
+    return ret;
+}
diff --git a/gio/giomodule.c b/gio/giomodule.c
new file mode 100644 (file)
index 0000000..a9ddd38
--- /dev/null
@@ -0,0 +1,208 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   giomodule.c: module wrapping the GIO 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+#include <Python.h>
+#include <pyglib.h>
+#include <pygobject.h>
+#include <pyglib-python-compat.h>
+
+#include <gio/gio.h>
+
+#define PYGIO_MAJOR_VERSION PYGOBJECT_MAJOR_VERSION
+#define PYGIO_MINOR_VERSION PYGOBJECT_MINOR_VERSION
+#define PYGIO_MICRO_VERSION PYGOBJECT_MICRO_VERSION
+
+/* include any extra headers needed here */
+
+void pygio_register_classes(PyObject *d);
+void pygio_add_constants(PyObject *module, const gchar *strip_prefix);
+
+extern PyMethodDef pygio_functions[];
+
+PYGLIB_INIT_FUNCTION(_gio, "gio._gio", pygio_functions)
+{
+    PyObject *d;
+    PyObject *tuple;
+    PyObject *e;
+
+    /* perform any initialisation required by the library here */
+
+    d = PyModule_GetDict(module);
+
+    g_type_init();
+    pyglib_init();
+
+    if (pygobject_init(2, 15, 2) == NULL)
+        return -1;
+
+    pygio_register_classes(d);
+    pygio_add_constants(module, "G_IO_");
+
+    PyModule_AddStringConstant(module, "ERROR", g_quark_to_string(G_IO_ERROR));
+    e = pyglib_register_exception_for_domain("gio.Error", G_IO_ERROR);
+    PyDict_SetItemString(d, "Error", e);
+    Py_DECREF(e);
+
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_TYPE",
+                              G_FILE_ATTRIBUTE_STANDARD_TYPE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_IS_HIDDEN",
+                              G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_IS_BACKUP",
+                              G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_IS_SYMLINK",
+                              G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL",
+                              G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_NAME",
+                              G_FILE_ATTRIBUTE_STANDARD_NAME);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME",
+                              G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_EDIT_NAME",
+                              G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_COPY_NAME",
+                              G_FILE_ATTRIBUTE_STANDARD_COPY_NAME);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_DESCRIPTION",
+                              G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_ICON",
+                              G_FILE_ATTRIBUTE_STANDARD_ICON);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE",
+                              G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE",
+                              G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_SIZE",
+                              G_FILE_ATTRIBUTE_STANDARD_SIZE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET",
+                              G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_TARGET_URI",
+                              G_FILE_ATTRIBUTE_STANDARD_TARGET_URI);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_STANDARD_SORT_ORDER",
+                              G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ETAG_VALUE",
+                              G_FILE_ATTRIBUTE_ETAG_VALUE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ID_FILE",
+                              G_FILE_ATTRIBUTE_ID_FILE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ID_FILESYSTEM",
+                              G_FILE_ATTRIBUTE_ID_FILESYSTEM);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_READ",
+                              G_FILE_ATTRIBUTE_ACCESS_CAN_READ);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_WRITE",
+                              G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE",
+                              G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_DELETE",
+                              G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_TRASH",
+                              G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_ACCESS_CAN_RENAME",
+                              G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT",
+                              G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT",
+                              G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT",
+                              G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE",
+                              G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI",
+                              G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_MODIFIED",
+                              G_FILE_ATTRIBUTE_TIME_MODIFIED);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_MODIFIED_USEC",
+                              G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_ACCESS",
+                              G_FILE_ATTRIBUTE_TIME_ACCESS);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_ACCESS_USEC",
+                              G_FILE_ATTRIBUTE_TIME_ACCESS_USEC);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_CHANGED",
+                              G_FILE_ATTRIBUTE_TIME_CHANGED);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_CHANGED_USEC",
+                              G_FILE_ATTRIBUTE_TIME_CHANGED_USEC);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_CREATED",
+                              G_FILE_ATTRIBUTE_TIME_CREATED);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TIME_CREATED_USEC",
+                              G_FILE_ATTRIBUTE_TIME_CREATED_USEC);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_DEVICE",
+                              G_FILE_ATTRIBUTE_UNIX_DEVICE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_INODE",
+                              G_FILE_ATTRIBUTE_UNIX_INODE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_MODE",
+                              G_FILE_ATTRIBUTE_UNIX_MODE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_NLINK",
+                              G_FILE_ATTRIBUTE_UNIX_NLINK);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_UID",
+                              G_FILE_ATTRIBUTE_UNIX_UID);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_GID",
+                              G_FILE_ATTRIBUTE_UNIX_GID);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_RDEV",
+                              G_FILE_ATTRIBUTE_UNIX_RDEV);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_BLOCK_SIZE",
+                              G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_BLOCKS",
+                              G_FILE_ATTRIBUTE_UNIX_BLOCKS);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT",
+                              G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_DOS_IS_ARCHIVE",
+                              G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_DOS_IS_SYSTEM",
+                              G_FILE_ATTRIBUTE_DOS_IS_SYSTEM);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_OWNER_USER",
+                              G_FILE_ATTRIBUTE_OWNER_USER);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_OWNER_USER_REAL",
+                              G_FILE_ATTRIBUTE_OWNER_USER_REAL);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_OWNER_GROUP",
+                              G_FILE_ATTRIBUTE_OWNER_GROUP);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_THUMBNAIL_PATH",
+                              G_FILE_ATTRIBUTE_THUMBNAIL_PATH);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_THUMBNAILING_FAILED",
+                              G_FILE_ATTRIBUTE_THUMBNAILING_FAILED);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_SIZE",
+                              G_FILE_ATTRIBUTE_FILESYSTEM_SIZE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_FREE",
+                              G_FILE_ATTRIBUTE_FILESYSTEM_FREE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_TYPE",
+                              G_FILE_ATTRIBUTE_FILESYSTEM_TYPE);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_READONLY",
+                              G_FILE_ATTRIBUTE_FILESYSTEM_READONLY);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW",
+                              G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_GVFS_BACKEND",
+                              G_FILE_ATTRIBUTE_GVFS_BACKEND);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_SELINUX_CONTEXT",
+                              G_FILE_ATTRIBUTE_SELINUX_CONTEXT);
+    PyModule_AddStringConstant(module, "FILE_ATTRIBUTE_TRASH_ITEM_COUNT",
+                              G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT);
+
+    PyModule_AddStringConstant(module, "ERROR", g_quark_to_string(G_IO_ERROR));
+
+    /* pygio version */
+    tuple = Py_BuildValue ("(iii)",
+                          PYGIO_MAJOR_VERSION,
+                          PYGIO_MINOR_VERSION,
+                          PYGIO_MICRO_VERSION);
+    PyDict_SetItemString(d, "pygio_version", tuple);
+    Py_DECREF(tuple);
+
+    return 0;
+}
+
diff --git a/gio/giostream.override b/gio/giostream.override
new file mode 100644 (file)
index 0000000..29ec801
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009  Gian Mario Tagliaretti
+ *
+ *   giostream.override: module overrides for GIOStream
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_io_stream_close_async kwargs
+static PyObject *
+_wrap_g_io_stream_close_async(PyGObject *self,
+                              PyObject *args,
+                              PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "io_priority", "cancellable",
+                              "user_data", NULL };
+    int io_priority = G_PRIORITY_DEFAULT;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    PyGIONotify *notify;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|iOO:IOStream.close_async",
+                                     kwlist,
+                                     &notify->callback,
+                                     &io_priority,
+                                     &pycancellable,
+                                     &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_io_stream_close_async(G_IO_STREAM(self->obj),
+                            io_priority,
+                            cancellable,
+                            (GAsyncReadyCallback)async_result_callback_marshal,
+                            notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
diff --git a/gio/gmemoryinputstream.override b/gio/gmemoryinputstream.override
new file mode 100644 (file)
index 0000000..0495338
--- /dev/null
@@ -0,0 +1,91 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ * Copyright (C) 2009  Gian Mario Tagliaretti
+ *
+ *   gmemoryinputstream.override: module overrides for GMemoryInputStream
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_memory_input_stream_add_data kwargs
+static PyObject *
+_wrap_g_memory_input_stream_add_data(PyGObject *self,
+                                     PyObject *args,
+                                     PyObject *kwargs)
+{
+    static char *kwlist[] = { "data", NULL };
+    PyObject *data;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:gio.MemoryInputStream.add_data",
+                                     kwlist, &data))
+        return NULL;
+
+    if (data != Py_None) {
+        char *copy;
+        int length;
+
+        if (!PyString_Check(data)) {
+            PyErr_SetString(PyExc_TypeError, "data must be a string or None");
+            return NULL;
+        }
+
+        length = PyString_Size(data);
+        copy = g_malloc(length);
+        memcpy(copy, PyString_AsString(data), length);
+
+        g_memory_input_stream_add_data(G_MEMORY_INPUT_STREAM(self->obj),
+                                       copy, length, (GDestroyNotify) g_free);
+    }
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+%%
+override g_memory_input_stream_new_from_data kwargs
+static PyObject *
+_wrap_g_memory_input_stream_new_from_data(PyGObject *self,
+                                          PyObject *args,
+                                          PyObject *kwargs)
+{
+    static char *kwlist[] = { "data", NULL };
+    PyObject *data;
+    GInputStream *stream = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O:gio.memory_input_stream_new_from_data",
+                                     kwlist, &data))
+        return NULL;
+
+    if (data != Py_None) {
+        char *copy;
+        int length;
+
+        if (!PyString_Check(data)) {
+            PyErr_SetString(PyExc_TypeError, "data must be a string or None");
+            return NULL;
+        }
+
+        length = PyString_Size(data);
+        copy = g_malloc(length);
+        memcpy(copy, PyString_AsString(data), length);
+
+        stream = g_memory_input_stream_new_from_data(copy, length,
+                                                      (GDestroyNotify) g_free);
+    }
+
+    return pygobject_new((GObject *)stream);
+}
diff --git a/gio/gmemoryoutputstream.override b/gio/gmemoryoutputstream.override
new file mode 100644 (file)
index 0000000..7614045
--- /dev/null
@@ -0,0 +1,45 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   gmemoryoutputstream.override: module overrides for GMemoryOutputStream
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_memory_output_stream_new noargs
+static int
+_wrap_g_memory_output_stream_new(PyGObject *self)
+{
+    self->obj = (GObject *)g_memory_output_stream_new(NULL, 0, g_realloc, g_free);
+
+    if (!self->obj) {
+        PyErr_SetString(PyExc_RuntimeError, "could not create gio.MemoryOutputStream object");
+        return -1;
+    }
+
+    pygobject_register_wrapper((PyObject *)self);
+    return 0;
+}
+%%
+override g_memory_output_stream_get_data noargs
+static PyObject *
+_wrap_g_memory_output_stream_get_data(PyGObject *self)
+{
+    GMemoryOutputStream *stream = G_MEMORY_OUTPUT_STREAM(self->obj);
+    return PyString_FromStringAndSize(g_memory_output_stream_get_data(stream),
+                                     g_seekable_tell(G_SEEKABLE(stream)));
+}
diff --git a/gio/gmount.override b/gio/gmount.override
new file mode 100644 (file)
index 0000000..9fb0828
--- /dev/null
@@ -0,0 +1,454 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009  Gian Mario Tagliaretti
+ *
+ *   gmount.override: module overrides for GMount
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_mount_guess_content_type kwargs
+static PyObject *
+_wrap_g_mount_guess_content_type(PyGObject *self,
+                                 PyObject *args,
+                                 PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "force_rescan",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+    gboolean force_rescan;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "Oi|OO:Mount.guess_content_type",
+                                     kwlist,
+                                     &notify->callback,
+                                     &force_rescan,
+                                     &py_cancellable,
+                                     &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_mount_guess_content_type(G_MOUNT(self->obj),
+                            force_rescan,
+                            cancellable,
+                            (GAsyncReadyCallback)async_result_callback_marshal,
+                            notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+    error:
+       pygio_notify_free(notify);
+       return NULL;
+}
+%%
+override g_mount_guess_content_type_finish kwargs
+static PyObject *
+_wrap_g_mount_guess_content_type_finish(PyGObject *self,
+                                        PyObject *args,
+                                        PyObject *kwargs)
+{
+    static char *kwlist[] = { "result", NULL };
+    PyGObject *result;
+    GError *error = NULL;
+    char **ret;
+    PyObject *py_ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!:Mount.guess_content_type_finish",
+                                      kwlist,
+                                      &PyGAsyncResult_Type,
+                                      &result))
+        return NULL;
+
+    ret = g_mount_guess_content_type_finish(G_MOUNT(self->obj),
+                                         G_ASYNC_RESULT(result->obj), &error);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (ret && ret[0] != NULL) {
+        py_ret = strv_to_pylist(ret);
+        g_strfreev (ret);
+    } else {
+        py_ret = Py_None;
+        Py_INCREF(py_ret);
+    }
+    return py_ret;
+}
+%%
+override g_mount_guess_content_type_sync kwargs
+static PyObject *
+_wrap_g_mount_guess_content_type_sync(PyGObject *self,
+                                      PyObject *args,
+                                      PyObject *kwargs)
+{
+    static char *kwlist[] = { "force_rescan", "cancellable", NULL };
+    gboolean force_rescan;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+    GError *error = NULL;
+    char **ret;
+    PyObject *py_ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "i|O:Mount.guess_content_type_sync",
+                                      kwlist,
+                                      &force_rescan,
+                                      &py_cancellable))
+        return NULL;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        return NULL;
+
+    ret = g_mount_guess_content_type_sync(G_MOUNT(self->obj), force_rescan,
+                                          cancellable, &error);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (ret && ret[0] != NULL) {
+        py_ret = strv_to_pylist(ret);
+        g_strfreev (ret);
+    } else {
+        py_ret = Py_None;
+        Py_INCREF(py_ret);
+    }
+    return py_ret;
+}
+%%
+override g_mount_remount kwargs
+static PyObject *
+_wrap_g_mount_remount(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "mount_operation",
+                             "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    PyObject *py_mount_operation = Py_None;
+    GMountOperation *mount_operation = NULL;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OOOO:gio.Mount.remount",
+                                    kwlist,
+                                    &notify->callback,
+                                    &py_flags,
+                                    &py_mount_operation,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_mount_operation != Py_None) {
+       if (!pygobject_check(py_mount_operation, &PyGMountOperation_Type)) {
+           PyErr_SetString(PyExc_TypeError,
+                           "mount_operation must be a gio.MountOperation or None");
+            goto error;
+       }
+
+       mount_operation = G_MOUNT_OPERATION(pygobject_get(py_mount_operation));
+    }
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                       py_flags, (gpointer) &flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    pyg_begin_allow_threads;
+
+    g_mount_remount(G_MOUNT(self->obj),
+                   flags,
+                   mount_operation,
+                   cancellable,
+                   (GAsyncReadyCallback) async_result_callback_marshal,
+                   notify);
+
+    pyg_end_allow_threads;
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_mount_unmount kwargs
+static PyObject *
+_wrap_g_mount_unmount(PyGObject *self,
+                     PyObject *args,
+                     PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags",
+                             "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *py_cancellable = NULL;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OOO:gio.Mount.unmount",
+                                    kwlist,
+                                    &notify->callback,
+                                    &py_flags,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                       py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    pyg_begin_allow_threads;
+
+    g_mount_unmount(G_MOUNT(self->obj),
+                   flags,
+                   cancellable,
+                   (GAsyncReadyCallback)async_result_callback_marshal,
+                   notify);
+
+    pyg_end_allow_threads;
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_mount_eject kwargs
+static PyObject *
+_wrap_g_mount_eject(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OOO:gio.Mount.eject",
+                                    kwlist,
+                                    &notify->callback,
+                                    &py_flags,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                       py_flags, (gpointer) &flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    pyg_begin_allow_threads;
+
+    g_mount_eject(G_MOUNT(self->obj),
+                 flags,
+                 cancellable,
+                 (GAsyncReadyCallback) async_result_callback_marshal,
+                 notify);
+
+    pyg_end_allow_threads;
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override-slot GMount.tp_repr
+static PyObject *
+_wrap_g_mount_tp_repr(PyGObject *self)
+{
+    char *name = g_mount_get_name(G_MOUNT(self->obj));
+    char *uuid = g_mount_get_uuid(G_MOUNT(self->obj));
+    gchar *representation;
+    PyObject *result;
+
+    if (name) {
+       if (uuid) {
+           representation = g_strdup_printf("<%s at %p: %s (%s)>",
+                                            self->ob_type->tp_name, self, name, uuid);
+       }
+       else {
+           representation = g_strdup_printf("<%s at %p: %s>",
+                                            self->ob_type->tp_name, self, name);
+       }
+    }
+    else
+       representation = g_strdup_printf("<%s at %p: UNKNOWN NAME>", self->ob_type->tp_name, self);
+
+    g_free(name);
+    g_free(uuid);
+
+    result = PyString_FromString(representation);
+    g_free(representation);
+    return result;
+}
+%%
+override g_mount_unmount_with_operation kwargs
+static PyObject *
+_wrap_g_mount_unmount_with_operation(PyGObject *self,
+                                     PyObject *args,
+                                     PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "mount_operation",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *mount_operation;
+    PyGObject *py_cancellable = NULL;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                "O|OOOO:gio.Mount.unmount_with_operation",
+                                kwlist,
+                                &notify->callback,
+                                &py_flags,
+                               &mount_operation,
+                                &py_cancellable,
+                                &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_mount_unmount_with_operation(G_MOUNT(self->obj),
+                             flags,
+                            G_MOUNT_OPERATION(mount_operation->obj),
+                             cancellable,
+                             (GAsyncReadyCallback)async_result_callback_marshal,
+                             notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_mount_eject_with_operation kwargs
+static PyObject *
+_wrap_g_mount_eject_with_operation(PyGObject *self,
+                                     PyObject *args,
+                                     PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "mount_operation",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *mount_operation;
+    PyGObject *py_cancellable = NULL;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                "O|OOOO:gio.Mount.eject_with_operation",
+                                kwlist,
+                                &notify->callback,
+                                &py_flags,
+                                &mount_operation,
+                                &py_cancellable,
+                                &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_mount_eject_with_operation(G_MOUNT(self->obj),
+                            flags,
+                            G_MOUNT_OPERATION(mount_operation->obj),
+                            cancellable,
+                            (GAsyncReadyCallback)async_result_callback_marshal,
+                            notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
diff --git a/gio/goutputstream.override b/gio/goutputstream.override
new file mode 100644 (file)
index 0000000..337a84c
--- /dev/null
@@ -0,0 +1,292 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   goutputstream.override: module overrides for GOutputStream
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_output_stream_write kwargs
+static PyObject *
+_wrap_g_output_stream_write(PyGObject *self,
+                           PyObject *args,
+                           PyObject *kwargs)
+{
+  static char *kwlist[] = { "buffer", "cancellable", NULL };
+  PyGObject *pycancellable = NULL;
+  gchar *buffer;
+  long count = 0; 
+  GCancellable *cancellable;
+  GError *error = NULL;
+  gssize written;
+  
+  if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                  "s#|O!:OutputStream.write",
+                                  kwlist, &buffer, &count,
+                                  &PyGCancellable_Type, &pycancellable))
+    return NULL;
+  
+  if (!pygio_check_cancellable(pycancellable, &cancellable))
+      return NULL;
+
+  pyg_begin_allow_threads;
+  written = g_output_stream_write(G_OUTPUT_STREAM(self->obj),
+                                 buffer, count, cancellable, &error);
+  pyg_end_allow_threads;
+
+  if (pyg_error_check(&error))
+    return NULL;
+      
+  return PyInt_FromLong(written);
+}
+%%
+override g_output_stream_write_all kwargs
+static PyObject *
+_wrap_g_output_stream_write_all(PyGObject *self,
+                               PyObject *args,
+                               PyObject *kwargs)
+{
+  static char *kwlist[] = { "buffer", "cancellable", NULL };
+  PyGObject *pycancellable = NULL;
+  gchar *buffer;
+  long count = 0; 
+  GCancellable *cancellable;
+  GError *error = NULL;
+  gsize written;
+
+  if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                  "s#|O!:OutputStream.write",
+                                  kwlist, &buffer, &count,
+                                  &PyGCancellable_Type, &pycancellable))
+    return NULL;
+
+  if (!pygio_check_cancellable(pycancellable, &cancellable))
+      return NULL;
+
+  pyg_begin_allow_threads;
+  g_output_stream_write_all(G_OUTPUT_STREAM(self->obj),
+                           buffer, count, &written, cancellable, &error);
+  pyg_end_allow_threads;
+
+  if (pyg_error_check(&error))
+    return NULL;
+      
+  return PyInt_FromLong(written);
+}
+%%
+override g_output_stream_write_async kwargs
+static PyObject *
+_wrap_g_output_stream_write_async(PyGObject *self,
+                                 PyObject *args,
+                                 PyObject *kwargs)
+{
+  static char *kwlist[] = { "buffer", "callback", "io_priority", "cancellable",
+                           "user_data", NULL };
+  gchar *buffer;
+  long count = -1;
+  int io_priority = G_PRIORITY_DEFAULT;
+  PyGObject *pycancellable = NULL;
+  GCancellable *cancellable;
+  PyGIONotify *notify;
+
+  notify = pygio_notify_new();
+
+  if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                  "s#O|iOO:OutputStream.write_async",
+                                  kwlist, &buffer,
+                                  &count,
+                                  &notify->callback,
+                                  &io_priority,
+                                  &pycancellable,
+                                  &notify->data))
+      goto error;
+
+  if (!pygio_notify_callback_is_valid(notify))
+      goto error;
+  
+  if (!pygio_check_cancellable(pycancellable, &cancellable))
+      goto error;
+
+  pygio_notify_reference_callback(notify);
+  pygio_notify_copy_buffer(notify, buffer, count);
+
+  g_output_stream_write_async(G_OUTPUT_STREAM(self->obj),
+                             notify->buffer,
+                             notify->buffer_size,
+                             io_priority,
+                             cancellable,
+                             (GAsyncReadyCallback)async_result_callback_marshal,
+                             notify);
+  
+  Py_INCREF(Py_None);
+  return Py_None;
+
+ error:
+  pygio_notify_free(notify);
+  return NULL;
+}
+%%
+override g_output_stream_close_async kwargs
+static PyObject *
+_wrap_g_output_stream_close_async(PyGObject *self,
+                                 PyObject *args,
+                                 PyObject *kwargs)
+{
+  static char *kwlist[] = { "callback", "io_priority",
+                           "cancellable", "user_data", NULL };
+  int io_priority = G_PRIORITY_DEFAULT;
+  PyGObject *pycancellable = NULL;
+  GCancellable *cancellable;
+  PyGIONotify *notify;
+
+  notify = pygio_notify_new();
+
+  if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                  "O|iOO:OutputStream.close_async",
+                                  kwlist,
+                                  &notify->callback,
+                                  &io_priority,
+                                  &pycancellable,
+                                  &notify->data))
+      goto error;
+
+  if (!pygio_notify_callback_is_valid(notify))
+      goto error;
+
+  if (!pygio_check_cancellable(pycancellable, &cancellable))
+      goto error;
+
+  pygio_notify_reference_callback(notify);
+  
+  g_output_stream_close_async(G_OUTPUT_STREAM(self->obj),
+                             io_priority,
+                             cancellable,
+                             (GAsyncReadyCallback)async_result_callback_marshal,
+                             notify);
+  
+  Py_INCREF(Py_None);
+  return Py_None;
+
+ error:
+  pygio_notify_free(notify);
+  return NULL;
+}
+%%
+override g_output_stream_flush_async kwargs
+static PyObject *
+_wrap_g_output_stream_flush_async(PyGObject *self,
+                                 PyObject *args,
+                                 PyObject *kwargs)
+{
+  static char *kwlist[] = { "callback", "io_priority",
+                           "cancellable", "user_data", NULL };
+  int io_priority = G_PRIORITY_DEFAULT;
+  PyGObject *pycancellable = NULL;
+  GCancellable *cancellable;
+  PyGIONotify *notify;
+
+  notify = pygio_notify_new();
+
+  if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                  "O|iOO:OutputStream.flush_async",
+                                  kwlist,
+                                  &notify->callback,
+                                  &io_priority,
+                                  &pycancellable,
+                                  &notify->data))
+      goto error;
+
+  if (!pygio_notify_callback_is_valid(notify))
+      goto error;
+
+  if (!pygio_check_cancellable(pycancellable, &cancellable))
+      goto error;
+
+  pygio_notify_reference_callback(notify);
+  
+  g_output_stream_flush_async(G_OUTPUT_STREAM(self->obj),
+                             io_priority,
+                             cancellable,
+                             (GAsyncReadyCallback)async_result_callback_marshal,
+                             notify);
+  
+  Py_INCREF(Py_None);
+  return Py_None;
+
+ error:
+  pygio_notify_free(notify);
+  return NULL;
+}
+%%
+override g_output_stream_splice_async kwargs
+static PyObject *
+_wrap_g_output_stream_splice_async(PyGObject *self,
+                                   PyObject *args,
+                                   PyObject *kwargs)
+{
+    static char *kwlist[] = { "source", "callback", "flags", "io_priority",
+                              "cancellable", "user_data", NULL };
+    
+    int io_priority = G_PRIORITY_DEFAULT;
+    GOutputStreamSpliceFlags flags = G_OUTPUT_STREAM_SPLICE_NONE;
+    PyObject *py_flags = NULL;
+    PyGObject *source;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    PyGIONotify *notify;
+  
+    notify = pygio_notify_new();
+  
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!O|OiOO:OutputStream.splice_async",
+                                     kwlist,
+                                     &PyGInputStream_Type,
+                                     &source,
+                                     &notify->callback,
+                                     &py_flags,
+                                     &io_priority,
+                                     &pycancellable,
+                                     &notify->data))
+        goto error;
+  
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+  
+    if (py_flags && pyg_flags_get_value(G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        goto error;
+    
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+        goto error;
+  
+    pygio_notify_reference_callback(notify);
+    
+    g_output_stream_splice_async(G_OUTPUT_STREAM(self->obj),
+                            G_INPUT_STREAM(source->obj), flags, io_priority,
+                            cancellable,
+                            (GAsyncReadyCallback)async_result_callback_marshal,
+                            notify);
+    
+    Py_INCREF(Py_None);
+        return Py_None;
+  
+    error:
+        pygio_notify_free(notify);
+        return NULL;
+}
+
+/* GOutputStream.write_all: No ArgType for const-void* */
diff --git a/gio/gresolver.override b/gio/gresolver.override
new file mode 100644 (file)
index 0000000..ddde73b
--- /dev/null
@@ -0,0 +1,312 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009  Gian Mario Tagliaretti
+ *
+ *   gresolver.override: module overrides for GResolver
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_resolver_lookup_by_name kwargs
+static PyObject *
+_wrap_g_resolver_lookup_by_name(PyGObject *self,
+                                PyObject *args,
+                                PyObject *kwargs)
+{
+    static char *kwlist[] = { "hostname", "cancellable", NULL };
+    gchar *hostname;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    GList *addr;
+    GError *error = NULL;
+    PyObject *ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "s|O:gio.Resolver.lookup_by_name",
+                                    kwlist,
+                                    &hostname,
+                                    &pycancellable))
+        return NULL;
+    
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+       return NULL;
+    
+    addr = g_resolver_lookup_by_name(G_RESOLVER(self->obj),
+                                     hostname, cancellable, &error);
+    
+    if (addr) {
+        PYLIST_FROMGLIST(ret, addr, pygobject_new(list_item), g_resolver_free_addresses, NULL);
+        return ret;
+    } else {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+%%
+override g_resolver_lookup_by_name_async kwargs
+static PyObject *
+_wrap_g_resolver_lookup_by_name_async(PyGObject *self,
+                                      PyObject *args,
+                                      PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "hostname",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    gchar *hostname;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "Os|OO:gio.Resolver.lookup_by_name_async",
+                                     kwlist,
+                                     &notify->callback,
+                                     &hostname,
+                                     &py_cancellable,
+                                     &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_resolver_lookup_by_name_async(G_RESOLVER(self->obj),
+                          hostname,
+                          cancellable,
+                          (GAsyncReadyCallback) async_result_callback_marshal,
+                          notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_resolver_lookup_by_name_finish kwargs
+static PyObject *
+_wrap_g_resolver_lookup_by_name_finish(PyGObject *self,
+                                       PyObject *args,
+                                       PyObject *kwargs)
+{
+    static char *kwlist[] = { "result", NULL };
+    PyGObject *result;
+    GList *addr;
+    PyObject *ret;
+    GError *error = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!:gio.Resolver.lookup_by_name_finish",
+                                     kwlist,
+                                     &PyGAsyncResult_Type,
+                                     &result))
+        return NULL;
+    
+    addr = g_resolver_lookup_by_name_finish(G_RESOLVER(self->obj),
+                                            G_ASYNC_RESULT(result->obj),
+                                            &error);
+    
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (addr) {
+        PYLIST_FROMGLIST(ret, addr, pygobject_new(list_item),
+                         g_resolver_free_addresses, NULL);
+        return ret;
+    } else {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+%%
+override g_resolver_lookup_by_address_async kwargs
+static PyObject *
+_wrap_g_resolver_lookup_by_address_async(PyGObject *self,
+                                         PyObject *args,
+                                         PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "address",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyGObject *address;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "OO|OO:gio.Resolver.lookup_by_address_async",
+                                     kwlist,
+                                     &notify->callback,
+                                     &address,
+                                     &py_cancellable,
+                                     &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_resolver_lookup_by_address_async(G_RESOLVER(self->obj),
+                          G_INET_ADDRESS(address->obj),
+                          cancellable,
+                          (GAsyncReadyCallback) async_result_callback_marshal,
+                          notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_resolver_lookup_service kwargs
+static PyObject *
+_wrap_g_resolver_lookup_service(PyGObject *self,
+                                PyObject *args,
+                                PyObject *kwargs)
+{
+    static char *kwlist[] = { "service", "protocol",
+                              "domain", "cancellable", NULL };
+    gchar *service, *protocol, *domain;
+    PyGObject *pycancellable = NULL;
+    GCancellable *cancellable;
+    GList *targets;
+    GError *error = NULL;
+    PyObject *ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "sss|O:gio.Resolver.lookup_service",
+                                    kwlist,
+                                    &service,
+                                    &protocol,
+                                    &domain,
+                                    &pycancellable))
+        return NULL;
+    
+    if (!pygio_check_cancellable(pycancellable, &cancellable))
+       return NULL;
+    
+    targets = g_resolver_lookup_service(G_RESOLVER(self->obj),
+                                        service, protocol, domain,
+                                        cancellable, &error);
+    
+    if (targets) {
+        PYLIST_FROMGLIST(ret, targets,
+                        pyg_boxed_new(G_TYPE_SRV_TARGET, list_item, TRUE, TRUE),
+                        g_resolver_free_targets, NULL);
+        return ret;
+    } else {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+%%
+override g_resolver_lookup_service_async kwargs
+static PyObject *
+_wrap_g_resolver_lookup_service_async(PyGObject *self,
+                                      PyObject *args,
+                                      PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "service", "protocol", "domain",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    gchar *service, *protocol, *domain;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "Osss|OO:gio.Resolver.lookup_service_async",
+                                    kwlist,
+                                    &notify->callback,
+                                    &service,
+                                    &protocol,
+                                    &domain,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_resolver_lookup_service_async(G_RESOLVER(self->obj),
+                          service, protocol, domain,
+                          cancellable,
+                          (GAsyncReadyCallback) async_result_callback_marshal,
+                          notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_resolver_lookup_service_finish kwargs
+static PyObject *
+_wrap_g_resolver_lookup_service_finish(PyGObject *self,
+                                       PyObject *args,
+                                       PyObject *kwargs)
+{
+    static char *kwlist[] = { "result", NULL };
+    PyGObject *result;
+    GList *targets;
+    PyObject *ret;
+    GError *error = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!:gio.Resolver.lookup_service_finish",
+                                     kwlist,
+                                     &PyGAsyncResult_Type,
+                                     &result))
+        return NULL;
+    
+    targets = g_resolver_lookup_service_finish(G_RESOLVER(self->obj),
+                                               G_ASYNC_RESULT(result->obj),
+                                               &error);
+    
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (targets) {
+        PYLIST_FROMGLIST(ret, targets,
+                        pyg_boxed_new(G_TYPE_SRV_TARGET, list_item, TRUE, TRUE),
+                        g_resolver_free_targets, NULL);
+        return ret;
+    } else {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
diff --git a/gio/gsocket.override b/gio/gsocket.override
new file mode 100644 (file)
index 0000000..8f66653
--- /dev/null
@@ -0,0 +1,575 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009  Gian Mario Tagliaretti
+ *
+ *   gsocket.override: module overrides for GSocket and related types
+ *
+ * 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
+ */
+
+%%
+override g_socket_condition_check kwargs
+static PyObject *
+_wrap_g_socket_condition_check(PyGObject *self,
+                               PyObject *args,
+                               PyObject *kwargs)
+{
+    static char *kwlist[] = { "condition", NULL };
+    gint condition, ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "i:gio.Socket.condition_check",
+                                     kwlist, &condition))
+        return NULL;
+    
+    ret = g_socket_condition_check(G_SOCKET(self->obj), condition);
+    
+    return pyg_flags_from_gtype(G_TYPE_IO_CONDITION, ret);
+}
+%%
+override g_socket_condition_wait kwargs
+static PyObject *
+_wrap_g_socket_condition_wait(PyGObject *self,
+                              PyObject *args,
+                              PyObject *kwargs)
+{
+    static char *kwlist[] = { "condition", "cancellable", NULL };
+    gboolean ret;
+    gint condition;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+    GError *error;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "i|O:gio.Socket.condition_wait",
+                                     kwlist, &condition, &cancellable))
+        return NULL;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        return NULL;
+    
+    ret = g_socket_condition_wait(G_SOCKET(self->obj), condition,
+                                  cancellable, &error);
+    
+    return PyBool_FromLong(ret);
+}
+%%
+override g_socket_address_enumerator_next_async kwargs
+static PyObject *
+_wrap_g_socket_address_enumerator_next_async(PyGObject *self,
+                                             PyObject *args,
+                                             PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "O|OO:gio.SocketAddressEnumerator.next_async",
+                                    kwlist,
+                                    &notify->callback,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_socket_address_enumerator_next_async(G_SOCKET_ADDRESS_ENUMERATOR(self->obj),
+                          cancellable,
+                          (GAsyncReadyCallback) async_result_callback_marshal,
+                          notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_socket_client_connect_async kwargs
+static PyObject *
+_wrap_g_socket_client_connect_async(PyGObject *self,
+                                    PyObject *args,
+                                    PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "connectable", "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+    PyGObject *py_connectable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "OO|OO:gio.SocketClient.connect_async",
+                                    kwlist,
+                                    &notify->callback,
+                                    &py_connectable,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_socket_client_connect_async(G_SOCKET_CLIENT(self->obj),
+                          G_SOCKET_CONNECTABLE(py_connectable->obj),
+                          cancellable,
+                          (GAsyncReadyCallback) async_result_callback_marshal,
+                          notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_socket_client_connect_to_host_async kwargs
+static PyObject *
+_wrap_g_socket_client_connect_to_host_async(PyGObject *self,
+                                            PyObject *args,
+                                            PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "host_and_port", "default_port",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+    gchar *host_and_port;
+    guint16 default_port;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                "OsH|OO:gio.SocketClient.connect_to_host_async",
+                                kwlist,
+                                &notify->callback,
+                                &host_and_port,
+                                &default_port,
+                                &py_cancellable,
+                                &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_socket_client_connect_to_host_async(G_SOCKET_CLIENT(self->obj),
+                          host_and_port, default_port,
+                          cancellable,
+                          (GAsyncReadyCallback) async_result_callback_marshal,
+                          notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_socket_client_connect_to_service_async kwargs
+static PyObject *
+_wrap_g_socket_client_connect_to_service_async(PyGObject *self,
+                                               PyObject *args,
+                                               PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "domain", "service",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+    gchar *domain, *service;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                            "Oss|OO:gio.SocketClient.connect_to_service_async",
+                            kwlist,
+                            &notify->callback,
+                            &domain,
+                            &service,
+                            &py_cancellable,
+                            &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_socket_client_connect_to_service_async(G_SOCKET_CLIENT(self->obj),
+                          domain, service,
+                          cancellable,
+                          (GAsyncReadyCallback) async_result_callback_marshal,
+                          notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_socket_listener_add_address kwargs
+static PyObject *
+_wrap_g_socket_listener_add_address(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "address", "type", "protocol",
+                              "source_object", NULL };
+    GSocketProtocol protocol;
+    PyObject *py_type = NULL, *py_protocol = NULL;
+    GError *error = NULL;
+    gboolean ret;
+    GSocketType type;
+    GSocketAddress *effective_address;
+    PyGObject *address, *py_source_object = NULL;
+    GObject *source_object;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!OO|O!:gio.SocketListener.add_address",
+                                     kwlist,
+                                     &PyGSocketAddress_Type, &address,
+                                     &py_type, &py_protocol,
+                                     &PyGObject_Type, &source_object,
+                                     &PyGSocketAddress_Type, &effective_address))
+        return NULL;
+
+    if (pyg_enum_get_value(G_TYPE_SOCKET_TYPE, py_type, (gpointer)&type))
+        return NULL;
+
+    if (pyg_enum_get_value(G_TYPE_SOCKET_PROTOCOL, py_protocol, (gpointer)&protocol))
+        return NULL;
+    
+    if (py_source_object == NULL || (PyObject*)py_source_object == Py_None)
+        source_object = NULL;
+    else if (pygobject_check(py_source_object, &PyGObject_Type))
+        source_object = G_OBJECT(py_source_object->obj);
+    else {
+      PyErr_SetString(PyExc_TypeError, "source_object should be a gobject.GObject or None");
+      return NULL;
+    }
+    
+    ret = g_socket_listener_add_address(G_SOCKET_LISTENER(self->obj),
+                                        G_SOCKET_ADDRESS(address->obj),
+                                        type, protocol,
+                                        source_object,
+                                        &effective_address,
+                                        &error);
+    
+    if (pyg_error_check(&error))
+        return NULL;
+    
+    if (ret)
+        return pygobject_new((GObject *)effective_address);
+    else {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+%%
+override g_socket_listener_accept kwargs
+static PyObject *
+_wrap_g_socket_listener_accept(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "cancellable", NULL };
+    GError *error = NULL;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+    PyObject *py_connection, *py_source_object;
+    GObject *source_object;
+    GSocketConnection *connection;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"|O:gio.SocketListener.accept",
+                                     kwlist,
+                                     &py_cancellable))
+        return NULL;
+
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        return NULL;
+
+    connection = g_socket_listener_accept(G_SOCKET_LISTENER(self->obj),
+                                          &source_object,
+                                          cancellable,
+                                          &error);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (connection)
+        py_connection = pygobject_new((GObject *)connection);
+    else {
+        py_connection = Py_None;
+        Py_INCREF(py_connection);
+    }
+
+    if (source_object)
+        py_source_object = pygobject_new((GObject *)source_object);
+    else {
+        py_source_object= Py_None;
+        Py_INCREF(py_source_object);
+    }
+    return Py_BuildValue("(NN)", py_connection, py_source_object);
+}
+%%
+override g_socket_listener_accept_async kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_async(PyGObject *self,
+                                     PyObject *args,
+                                     PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                            "O|OO:gio.SocketListener.accept_async",
+                            kwlist,
+                            &notify->callback,
+                            &py_cancellable,
+                            &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_socket_listener_accept_async(G_SOCKET_LISTENER(self->obj),
+                          cancellable,
+                          (GAsyncReadyCallback) async_result_callback_marshal,
+                          notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_socket_listener_accept_finish kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_finish(PyGObject *self,
+                                      PyObject *args,
+                                      PyObject *kwargs)
+{
+    static char *kwlist[] = { "result", NULL };
+    GError *error = NULL;
+    PyGObject *result;
+    PyObject *py_connection, *py_source_object;
+    GObject *source_object;
+    GSocketConnection *connection;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:gio.SocketListener.accept_finish",
+                                     kwlist,
+                                     &PyGAsyncResult_Type, &result))
+        return NULL;
+
+    connection = g_socket_listener_accept_finish(G_SOCKET_LISTENER(self->obj),
+                                                 G_ASYNC_RESULT(result->obj),
+                                                 &source_object,
+                                                 &error);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (connection)
+        py_connection = pygobject_new((GObject *)connection);
+    else {
+        py_connection = Py_None;
+        Py_INCREF(py_connection);
+    }
+
+    if (source_object)
+        py_source_object = pygobject_new((GObject *)source_object);
+    else {
+        py_source_object= Py_None;
+        Py_INCREF(py_source_object);
+    }
+    return Py_BuildValue("(NN)", py_connection, py_source_object);
+}
+%%
+override g_socket_listener_accept_socket kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_socket(PyGObject *self,
+                                      PyObject *args,
+                                      PyObject *kwargs)
+{
+    static char *kwlist[] = { "cancellable", NULL };
+    GError *error = NULL;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+    PyObject *py_socket, *py_source_object;
+    GObject *source_object;
+    GSocket *socket;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"|O:gio.SocketListener.accept_socket",
+                                     kwlist,
+                                     &py_cancellable))
+        return NULL;
+
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        return NULL;
+
+    socket = g_socket_listener_accept_socket(G_SOCKET_LISTENER(self->obj),
+                                             &source_object,
+                                             cancellable,
+                                             &error);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (socket)
+        py_socket = pygobject_new((GObject *)socket);
+    else {
+        py_socket = Py_None;
+        Py_INCREF(py_socket);
+    }
+
+    if (source_object)
+        py_source_object = pygobject_new((GObject *)source_object);
+    else {
+        py_source_object= Py_None;
+        Py_INCREF(py_source_object);
+    }
+    return Py_BuildValue("(NN)", py_socket, py_source_object);
+}
+%%
+override g_socket_listener_accept_socket_async kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_socket_async(PyGObject *self,
+                                            PyObject *args,
+                                            PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                            "O|OO:gio.SocketListener.accept_socket_async",
+                            kwlist,
+                            &notify->callback,
+                            &py_cancellable,
+                            &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_socket_listener_accept_socket_async(G_SOCKET_LISTENER(self->obj),
+                          cancellable,
+                          (GAsyncReadyCallback) async_result_callback_marshal,
+                          notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_socket_listener_accept_socket_finish kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_socket_finish(PyGObject *self,
+                                            PyObject *args,
+                                            PyObject *kwargs)
+{
+    static char *kwlist[] = { "result", NULL };
+    GError *error = NULL;
+    PyGObject *result;
+    PyObject *py_socket, *py_source_object;
+    GObject *source_object;
+    GSocket *socket;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:gio.SocketListener.accept_socket_finish",
+                                     kwlist,
+                                     &PyGAsyncResult_Type, &result))
+        return NULL;
+
+    socket = g_socket_listener_accept_socket_finish(G_SOCKET_LISTENER(self->obj),
+                                                    G_ASYNC_RESULT(result->obj),
+                                                    &source_object,
+                                                    &error);
+
+    if (pyg_error_check(&error))
+        return NULL;
+
+    if (socket)
+        py_socket = pygobject_new((GObject *)socket);
+    else {
+        py_socket= Py_None;
+        Py_INCREF(py_socket);
+    }
+
+    if (source_object)
+        py_source_object = pygobject_new((GObject *)source_object);
+    else {
+        py_source_object= Py_None;
+        Py_INCREF(py_source_object);
+    }
+    return Py_BuildValue("(NN)", py_socket, py_source_object);
+}
+
+/* Could not write method GSocketAddress.to_native: No ArgType for gpointer */
+/* Could not write method GSocket.receive_from: No ArgType for GSocketAddress** */
+/* Could not write method GSocket.receive_message: No ArgType for GSocketAddress** */
+/* Could not write method GSocket.send_message: No ArgType for GOutputVector* */
+/* Could not write method GSocket.create_source: No ArgType for GIOCondition */
+/* Could not write method GSocketControlMessage.serialize: No ArgType for gpointer */
+/* Could not write function socket_address_new_from_native: No ArgType for gpointer */
+/* Could not write function socket_control_message_deserialize: No ArgType for gpointer */
diff --git a/gio/gvolume.override b/gio/gvolume.override
new file mode 100644 (file)
index 0000000..89c27e4
--- /dev/null
@@ -0,0 +1,237 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   gvolume.override: module overrides for GVolume
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_volume_mount kwargs
+static PyObject *
+_wrap_g_volume_mount(PyGObject *self,
+                    PyObject *args,
+                    PyObject *kwargs)
+{
+    static char *kwlist[] = { "mount_operation", "callback", "flags",
+                             "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *py_mount_operation = NULL;
+    GMountOperation *mount_operation = NULL;
+    PyGObject *py_cancellable = NULL;
+    GMountMountFlags flags = G_MOUNT_MOUNT_NONE;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "OO|OOO:Volume.mount",
+                                    kwlist,
+                                    &py_mount_operation,
+                                    &notify->callback,
+                                    &py_flags,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+    
+    if ((PyObject *)py_mount_operation == Py_None)
+        mount_operation = NULL;
+    
+    else if (py_mount_operation && pygobject_check(py_mount_operation,
+                                                  &PyGMountOperation_Type))
+        mount_operation = G_MOUNT_OPERATION(py_mount_operation->obj);
+    
+    else if (py_mount_operation) {
+        PyErr_SetString(PyExc_TypeError,
+                       "mount_operation should be a GMountOperation or None");
+        return NULL;
+    }
+    
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_MOUNT_FLAGS,
+                                       py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_volume_mount(G_VOLUME(self->obj),
+                  flags,
+                  mount_operation,
+                  cancellable,
+                  (GAsyncReadyCallback)async_result_callback_marshal,
+                  notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override g_volume_eject kwargs
+static PyObject *
+_wrap_g_volume_eject(PyGObject *self,
+                    PyObject *args,
+                    PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags",
+                             "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *py_cancellable = NULL;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O|OOO:Volume.eject",
+                                    kwlist,
+                                    &notify->callback,
+                                    &py_flags,
+                                    &py_cancellable,
+                                    &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                       py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_volume_eject(G_VOLUME(self->obj),
+                  flags,
+                  cancellable,
+                  (GAsyncReadyCallback)async_result_callback_marshal,
+                  notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
+%%
+override-slot GVolume.tp_repr
+static PyObject *
+_wrap_g_volume_tp_repr(PyGObject *self)
+{
+    char *name = g_volume_get_name(G_VOLUME(self->obj));
+    gchar *representation;
+    PyObject *result;
+
+    if (name) {
+       representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, name);
+       g_free(name);
+    }
+    else
+       representation = g_strdup_printf("<%s at %p: UNKNOWN NAME>", self->ob_type->tp_name, self);
+
+    result = PyString_FromString(representation);
+    g_free(representation);
+    return result;
+}
+%%
+override g_volume_enumerate_identifiers noargs
+static PyObject *
+_wrap_g_volume_enumerate_identifiers (PyGObject *self)
+{
+    char **ids;
+    PyObject *ret;
+  
+    pyg_begin_allow_threads;
+  
+    ids = g_volume_enumerate_identifiers(G_VOLUME (self->obj));
+  
+    pyg_end_allow_threads;
+  
+    if (ids && ids[0] != NULL) {
+       ret = strv_to_pylist(ids);
+       g_strfreev (ids);
+    } else {
+       ret = Py_None;
+       Py_INCREF(ret);
+    }
+    return ret;
+}
+%%
+override g_volume_eject_with_operation kwargs
+static PyObject *
+_wrap_g_volume_eject_with_operation(PyGObject *self,
+                                     PyObject *args,
+                                     PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "mount_operation",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *mount_operation;
+    PyGObject *py_cancellable = NULL;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                "O|OOOO:gio.Volume.eject_with_operation",
+                                kwlist,
+                                &notify->callback,
+                                &py_flags,
+                                &mount_operation,
+                                &py_cancellable,
+                                &notify->data))
+        goto error;
+
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                        py_flags, (gpointer)&flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_volume_eject_with_operation(G_VOLUME(self->obj),
+                            flags,
+                            G_MOUNT_OPERATION(mount_operation->obj),
+                            cancellable,
+                            (GAsyncReadyCallback)async_result_callback_marshal,
+                            notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+
+ error:
+    pygio_notify_free(notify);
+    return NULL;
+}
diff --git a/gio/gvolumemonitor.override b/gio/gvolumemonitor.override
new file mode 100644 (file)
index 0000000..4ffedf3
--- /dev/null
@@ -0,0 +1,94 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   gvolumemonitor.override: module overrides for GVolumeMonitor
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override-slot GVolumeMonitor.tp_new
+static PyObject *
+_wrap_g_volume_monitor_tp_new(PyObject *type, PyObject *args, PyObject *kwargs)
+{
+    return pygobject_new(G_OBJECT(g_volume_monitor_get()));
+}
+%%
+override g_volume_monitor_get_connected_drives noargs
+static PyObject *
+_wrap_g_volume_monitor_get_connected_drives (PyGObject *self)
+{
+  GList *list, *l;
+  PyObject *ret;
+  
+  list = g_volume_monitor_get_connected_drives (G_VOLUME_MONITOR (self->obj));
+
+  ret = PyList_New(0);
+  for (l = list; l; l = l->next) {
+    GDrive *drive = l->data;
+    PyObject *item = pygobject_new((GObject *)drive);
+    PyList_Append(ret, item);
+    Py_DECREF(item);
+    g_object_unref(drive);
+  }
+  g_list_free(list);
+  
+  return ret;
+}
+%%
+override g_volume_monitor_get_volumes noargs
+static PyObject *
+_wrap_g_volume_monitor_get_volumes (PyGObject *self)
+{
+  GList *list, *l;
+  PyObject *ret;
+  
+  list = g_volume_monitor_get_volumes (G_VOLUME_MONITOR (self->obj));
+
+  ret = PyList_New(0);
+  for (l = list; l; l = l->next) {
+    GVolume *volume = l->data;
+    PyObject *item = pygobject_new((GObject *)volume);
+    PyList_Append(ret, item);
+    Py_DECREF(item);
+    g_object_unref(volume);
+  }
+  g_list_free(list);
+  
+  return ret;
+}
+%%
+override g_volume_monitor_get_mounts noargs
+static PyObject *
+_wrap_g_volume_monitor_get_mounts (PyGObject *self)
+{
+  GList *list, *l;
+  PyObject *ret;
+  
+  list = g_volume_monitor_get_mounts (G_VOLUME_MONITOR (self->obj));
+
+  ret = PyList_New(0);
+  for (l = list; l; l = l->next) {
+    GMount *mount = l->data;
+    PyObject *item = pygobject_new((GObject *)mount);
+    PyList_Append(ret, item);
+    Py_DECREF(item);
+    g_object_unref(mount);
+  }
+  g_list_free(list);
+  
+  return ret;
+}
diff --git a/gio/pygio-utils.c b/gio/pygio-utils.c
new file mode 100644 (file)
index 0000000..f89c4b9
--- /dev/null
@@ -0,0 +1,236 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2008  Johan Dahlin
+ * Copyright (C) 2008  Gian Mario Tagliaretti
+ *
+ *   giomodule.c: module wrapping the GIO 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygio-utils.h"
+#include <pyglib-python-compat.h>
+
+/**
+ * pygio_check_cancellable:
+ * @pycancellable:
+ * @cancellable:
+ *
+ * Returns:
+ */
+gboolean
+pygio_check_cancellable(PyGObject *pycancellable,
+                       GCancellable **cancellable)
+{
+  if (pycancellable == NULL || (PyObject*)pycancellable == Py_None)
+      *cancellable = NULL;
+  else if (pygobject_check(pycancellable, &PyGCancellable_Type))
+      *cancellable = G_CANCELLABLE(pycancellable->obj);
+  else
+    {
+      PyErr_SetString(PyExc_TypeError,
+                     "cancellable should be a gio.Cancellable");
+      return FALSE;
+    }
+  return TRUE;
+}
+
+/**
+ * pygio_check_launch_context:
+ * @pycontext:
+ * @context:
+ *
+ * Returns:
+ */
+gboolean
+pygio_check_launch_context(PyGObject *pycontext,
+                           GAppLaunchContext **context)
+{
+  if (pycontext == NULL || (PyObject*)pycontext == Py_None)
+      *context = NULL;
+  else if (pygobject_check(pycontext, &PyGAppLaunchContext_Type))
+      *context = G_APP_LAUNCH_CONTEXT(pycontext->obj);
+  else
+    {
+      PyErr_SetString(PyExc_TypeError,
+                     "launch_context should be a GAppLaunchContext or None");
+      return FALSE;
+    }
+  return TRUE;
+}
+
+/**
+ * pygio_pylist_to_gfile_glist:
+ * @pyfile_list:
+ *
+ * Returns:
+ */
+GList *
+pygio_pylist_to_gfile_glist(PyObject *pyfile_list)
+{
+    GList *file_list = NULL;
+    PyObject *item;
+    int len, i;
+
+    len = PySequence_Size(pyfile_list);
+    for (i = 0; i < len; i++) {
+        item = PySequence_GetItem(pyfile_list, i);
+        if (!PyObject_TypeCheck(item, &PyGFile_Type)) {
+            PyErr_SetString(PyExc_TypeError,
+                            "files must be a list or tuple of GFile");
+            g_list_free(file_list);
+            return NULL;
+        }
+        file_list = g_list_prepend(file_list, ((PyGObject *)item)->obj);
+    }
+    file_list = g_list_reverse(file_list);
+
+    return file_list;
+}
+
+/**
+ * pygio_pylist_to_uri_glist:
+ * @pyfile_list:
+ *
+ * Returns:
+ */
+GList *
+pygio_pylist_to_uri_glist(PyObject *pyfile_list)
+{
+    GList *file_list = NULL;
+    PyObject *item;
+    int len, i;
+
+    len = PySequence_Size(pyfile_list);
+    for (i = 0; i < len; i++) {
+        item = PySequence_GetItem(pyfile_list, i);
+        if (!PYGLIB_PyUnicode_Check(item)) {
+            PyErr_SetString(PyExc_TypeError,
+                            "files must be strings");
+            g_list_free(file_list);
+            return NULL;
+        }
+
+#if PY_VERSION_HEX < 0x03000000
+        file_list = g_list_prepend(file_list, g_strdup(PyString_AsString(item)));
+#else
+       {
+            PyObject *utf8_bytes_obj = PyUnicode_AsUTF8String (item);
+            if (!utf8_bytes_obj) {
+                g_list_free(file_list);
+                return NULL;
+            }
+            file_list = g_list_prepend(file_list, g_strdup(PyBytes_AsString(utf8_bytes_obj)));
+            Py_DECREF (utf8_bytes_obj);
+        }
+#endif
+
+    }
+    file_list = g_list_reverse(file_list);
+
+    return file_list;
+}
+
+/**
+ * strv_to_pylist:
+ * @strv: array of strings
+ *
+ * Returns: A python list of strings
+ */
+PyObject *
+strv_to_pylist (char **strv)
+{
+    gsize len, i;
+    PyObject *list;
+
+    len = strv ? g_strv_length (strv) : 0;
+    list = PyList_New (len);
+
+    for (i = 0; i < len; i++) {
+        PyList_SetItem (list, i, PYGLIB_PyUnicode_FromString (strv[i]));
+    }
+    return list;
+}
+
+/**
+ * pylist_to_strv:
+ * @strvp: a pointer to an array where return strings.
+ *
+ * Returns: TRUE if the list of strings could be converted, FALSE otherwise.
+ */
+gboolean
+pylist_to_strv (PyObject *list,
+                char   ***strvp)
+{
+    int i, len;
+    char **ret;
+
+    *strvp = NULL;
+
+    if (list == Py_None)
+        return TRUE;
+
+    if (!PySequence_Check (list))
+    {
+        PyErr_Format (PyExc_TypeError, "argument must be a list or tuple of strings");
+        return FALSE;
+    }
+
+    if ((len = PySequence_Size (list)) < 0)
+        return FALSE;
+
+    ret = g_new (char*, len + 1);
+    for (i = 0; i <= len; ++i)
+        ret[i] = NULL;
+
+    for (i = 0; i < len; ++i)
+    {
+        PyObject *item = PySequence_GetItem (list, i);
+
+        if (!item)
+        {
+            g_strfreev (ret);
+            return FALSE;
+        }
+
+        if (!PYGLIB_PyUnicode_Check (item))
+        {
+            Py_DECREF (item);
+            g_strfreev (ret);
+            PyErr_Format (PyExc_TypeError, "argument must be a list of strings");
+            return FALSE;
+        }
+
+#if PY_VERSION_HEX < 0x03000000
+        ret[i] = g_strdup (PyString_AsString (item));
+#else
+       {
+            PyObject *utf8_bytes_obj = PyUnicode_AsUTF8String (item);
+            if (!utf8_bytes_obj) {
+                Py_DECREF (item);
+                g_strfreev (ret);
+                return FALSE;
+            }
+            ret[i] = g_strdup (PyBytes_AsString(utf8_bytes_obj));
+            Py_DECREF (utf8_bytes_obj);
+        }
+#endif
+        Py_DECREF (item);
+    }
+
+    *strvp = ret;
+    return TRUE;
+}
diff --git a/gio/pygio-utils.h b/gio/pygio-utils.h
new file mode 100644 (file)
index 0000000..76bfde3
--- /dev/null
@@ -0,0 +1,49 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   giomodule.c: module wrapping the GIO 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGIO_UTILS_H__
+#define __PYGIO_UTILS_H__
+
+#define NO_IMPORT_PYGOBJECT
+#include <Python.h>
+#include <pygobject.h>
+#include <gio/gio.h>
+
+extern PyTypeObject PyGCancellable_Type;
+extern PyTypeObject PyGAppLaunchContext_Type;
+extern PyTypeObject PyGFile_Type;
+
+gboolean pygio_check_cancellable(PyGObject *pycancellable,
+                                GCancellable **cancellable);
+
+gboolean pygio_check_launch_context(PyGObject *pycontext,
+                                   GAppLaunchContext **context);
+
+GList* pygio_pylist_to_gfile_glist(PyObject *pycontext);
+
+GList* pygio_pylist_to_uri_glist(PyObject *pycontext);
+
+PyObject* strv_to_pylist (char **strv);
+
+gboolean pylist_to_strv (PyObject *list, char ***strvp);
+
+#endif /* __PYGIO_UTILS_H__ */
diff --git a/gio/unix-types.defs b/gio/unix-types.defs
new file mode 100644 (file)
index 0000000..ed1ed9f
--- /dev/null
@@ -0,0 +1,55 @@
+;; -*- scheme -*-
+
+(define-object Connection
+  (in-module "giounix")
+  (parent "GSocketConnection")
+  (c-name "GUnixConnection")
+  (gtype-id "G_TYPE_UNIX_CONNECTION")
+)
+
+(define-object DesktopAppInfo
+  (docstring
+  "DesktopAppInfo(desktop_id) -> gio.unix.DesktopAppInfo\n\n"
+  "gio.Unix.DesktopAppInfo is an implementation of gio.AppInfo\n"
+  "based on desktop files."
+  )
+  (in-module "giounix")
+  (parent "GObject")
+  (c-name "GDesktopAppInfo")
+  (gtype-id "G_TYPE_DESKTOP_APP_INFO")
+)
+
+(define-object FDMessage
+  (in-module "giounix")
+  (parent "GSocketControlMessage")
+  (c-name "GUnixFDMessage")
+  (gtype-id "G_TYPE_UNIX_FD_MESSAGE")
+)
+
+(define-object InputStream
+  (in-module "giounix")
+  (parent "GInputStream")
+  (c-name "GUnixInputStream")
+  (gtype-id "G_TYPE_UNIX_INPUT_STREAM")
+)
+
+(define-object OutputStream
+  (in-module "giounix")
+  (parent "GOutputStream")
+  (c-name "GUnixOutputStream")
+  (gtype-id "G_TYPE_UNIX_OUTPUT_STREAM")
+)
+
+(define-pointer MountEntry
+  (in-module "giounix")
+  (c-name "GUnixMountEntry")
+  (gtype-id "GIO_UNIX_MOUNT_ENTRY_TYPE")
+)
+
+(define-object SocketAddress
+  (in-module "giounix")
+  (parent "GSocketAddress")
+  (c-name "GUnixSocketAddress")
+  (gtype-id "G_TYPE_UNIX_SOCKET_ADDRESS")
+)
+
diff --git a/gio/unix.defs b/gio/unix.defs
new file mode 100644 (file)
index 0000000..ff43ed6
--- /dev/null
@@ -0,0 +1,475 @@
+;; -*- scheme -*-
+
+(include "unix-types.defs")
+
+;; From gunixconnection.h
+
+(define-function g_unix_connection_get_type
+  (c-name "g_unix_connection_get_type")
+  (return-type "GType")
+)
+
+(define-method send_fd
+  (of-object "GUnixConnection")
+  (c-name "g_unix_connection_send_fd")
+  (return-type "gboolean")
+  (parameters
+    '("gint" "fd")
+    '("GCancellable*" "cancellable")
+    '("GError**" "error")
+  )
+)
+
+(define-method receive_fd
+  (of-object "GUnixConnection")
+  (c-name "g_unix_connection_receive_fd")
+  (return-type "gint")
+  (parameters
+    '("GCancellable*" "cancellable")
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From gdesktopappinfo.h
+
+(define-function desktop_app_info_get_type
+  (c-name "g_desktop_app_info_get_type")
+  (return-type "GType")
+)
+
+(define-function desktop_app_info_new_from_filename
+  (c-name "g_desktop_app_info_new_from_filename")
+  (return-type "GDesktopAppInfo*")
+  (parameters
+    '("const-char*" "filename")
+  )
+)
+
+(define-function g_desktop_app_info_new_from_keyfile
+  (c-name "g_desktop_app_info_new_from_keyfile")
+  (return-type "GDesktopAppInfo*")
+  (parameters
+    '("GKeyFile*" "key_file")
+  )
+)
+
+(define-function desktop_app_info_new
+  (c-name "g_desktop_app_info_new")
+  (is-constructor-of "GDesktopAppInfo")
+  (return-type "GDesktopAppInfo*")
+  (parameters
+    '("const-char*" "desktop_id")
+  )
+)
+
+(define-method get_is_hidden
+  (of-object "GDesktopAppInfo")
+  (c-name "g_desktop_app_info_get_is_hidden")
+  (return-type "gboolean")
+)
+
+(define-function desktop_app_info_set_desktop_env
+  (c-name "g_desktop_app_info_set_desktop_env")
+  (return-type "none")
+  (parameters
+    '("const-char*" "desktop_env")
+  )
+)
+
+
+
+;; From gunixfdmessage.h
+
+(define-function g_unix_fd_message_get_type
+  (c-name "g_unix_fd_message_get_type")
+  (return-type "GType")
+)
+
+(define-function g_unix_fd_message_new
+  (c-name "g_unix_fd_message_new")
+  (is-constructor-of "GUnixFdMessage")
+  (return-type "GSocketControlMessage*")
+)
+
+(define-method steal_fds
+  (of-object "GUnixFDMessage")
+  (c-name "g_unix_fd_message_steal_fds")
+  (return-type "gint*")
+  (parameters
+    '("gint*" "length")
+  )
+)
+
+(define-method append_fd
+  (of-object "GUnixFDMessage")
+  (c-name "g_unix_fd_message_append_fd")
+  (return-type "gboolean")
+  (parameters
+    '("gint" "fd")
+    '("GError**" "error")
+  )
+)
+
+
+
+;; From gunixmounts.h
+
+(define-function unix_mount_free
+  (c-name "g_unix_mount_free")
+  (return-type "none")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-method free
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_free")
+  (return-type "none")
+)
+
+(define-function unix_mount_compare
+  (c-name "g_unix_mount_compare")
+  (return-type "gint")
+  (parameters
+    '("GUnixMountEntry*" "mount1")
+    '("GUnixMountEntry*" "mount2")
+  )
+)
+
+(define-function unix_mount_get_mount_path
+  (c-name "g_unix_mount_get_mount_path")
+  (return-type "const-char*")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function unix_mount_get_device_path
+  (c-name "g_unix_mount_get_device_path")
+  (return-type "const-char*")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function unix_mount_get_fs_type
+  (c-name "g_unix_mount_get_fs_type")
+  (return-type "const-char*")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function unix_mount_is_readonly
+  (c-name "g_unix_mount_is_readonly")
+  (return-type "gboolean")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function unix_mount_is_system_internal
+  (c-name "g_unix_mount_is_system_internal")
+  (return-type "gboolean")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function unix_mount_guess_can_eject
+  (c-name "g_unix_mount_guess_can_eject")
+  (return-type "gboolean")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function unix_mount_guess_should_display
+  (c-name "g_unix_mount_guess_should_display")
+  (return-type "gboolean")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function unix_mount_guess_name
+  (c-name "g_unix_mount_guess_name")
+  (return-type "char*")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-function unix_mount_guess_icon
+  (c-name "g_unix_mount_guess_icon")
+  (return-type "GIcon*")
+  (parameters
+    '("GUnixMountEntry*" "mount_entry")
+  )
+)
+
+(define-method compare
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_compare")
+  (return-type "gint")
+  (parameters
+    '("GUnixMountPoint*" "mount2")
+  )
+)
+
+(define-method get_mount_path
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_get_mount_path")
+  (return-type "const-char*")
+)
+
+(define-method get_device_path
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_get_device_path")
+  (return-type "const-char*")
+)
+
+(define-method get_fs_type
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_get_fs_type")
+  (return-type "const-char*")
+)
+
+(define-method is_readonly
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_is_readonly")
+  (return-type "gboolean")
+)
+
+(define-method is_user_mountable
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_is_user_mountable")
+  (return-type "gboolean")
+)
+
+(define-method is_loopback
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_is_loopback")
+  (return-type "gboolean")
+)
+
+(define-method guess_can_eject
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_guess_can_eject")
+  (return-type "gboolean")
+)
+
+(define-method guess_name
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_guess_name")
+  (return-type "char*")
+)
+
+(define-method guess_icon
+  (of-object "GUnixMountPoint")
+  (c-name "g_unix_mount_point_guess_icon")
+  (return-type "GIcon*")
+)
+
+(define-function unix_mount_points_get
+  (c-name "g_unix_mount_points_get")
+  (return-type "GList*")
+  (parameters
+    '("guint64*" "time_read")
+  )
+)
+
+(define-function unix_mounts_get
+  (c-name "g_unix_mounts_get")
+  (return-type "GList*")
+  (parameters
+    '("guint64*" "time_read")
+  )
+)
+
+(define-function unix_mount_at
+  (c-name "g_unix_mount_at")
+  (return-type "GUnixMountEntry*")
+  (parameters
+    '("const-char*" "mount_path")
+    '("guint64*" "time_read")
+  )
+)
+
+(define-function unix_mounts_changed_since
+  (c-name "g_unix_mounts_changed_since")
+  (return-type "gboolean")
+  (parameters
+    '("guint64" "time")
+  )
+)
+
+(define-function unix_mount_points_changed_since
+  (c-name "g_unix_mount_points_changed_since")
+  (return-type "gboolean")
+  (parameters
+    '("guint64" "time")
+  )
+)
+
+(define-function unix_mount_monitor_get_type
+  (c-name "g_unix_mount_monitor_get_type")
+  (return-type "GType")
+)
+
+(define-function unix_mount_monitor_new
+  (c-name "g_unix_mount_monitor_new")
+  (is-constructor-of "GUnixMountMonitor")
+  (return-type "GUnixMountMonitor*")
+)
+
+(define-method set_rate_limit
+  (of-object "GUnixMountMonitor")
+  (c-name "g_unix_mount_monitor_set_rate_limit")
+  (return-type "none")
+  (parameters
+    '("int" "limit_msec")
+  )
+)
+
+(define-function unix_is_mount_path_system_internal
+  (c-name "g_unix_is_mount_path_system_internal")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "mount_path")
+  )
+)
+
+
+
+;; From gunixinputstream.h
+
+(define-function unix_input_stream_get_type
+  (c-name "g_unix_input_stream_get_type")
+  (return-type "GType")
+)
+
+(define-function unix_input_stream_new
+  (c-name "g_unix_input_stream_new")
+  (is-constructor-of "GUnixInputStream")
+  (return-type "GInputStream*")
+  (parameters
+    '("int" "fd")
+    '("gboolean" "close_fd_at_close")
+  )
+)
+
+(define-method set_close_fd
+  (of-object "GUnixInputStream")
+  (c-name "g_unix_input_stream_set_close_fd")
+  (return-type "none")
+  (parameters
+    '("gboolean" "close_fd")
+  )
+)
+
+(define-method get_close_fd
+  (of-object "GUnixInputStream")
+  (c-name "g_unix_input_stream_get_close_fd")
+  (return-type "gboolean")
+)
+
+(define-method get_fd
+  (of-object "GUnixInputStream")
+  (c-name "g_unix_input_stream_get_fd")
+  (return-type "gint")
+)
+
+
+
+;; From gunixoutputstream.h
+
+(define-function unix_output_stream_get_type
+  (c-name "g_unix_output_stream_get_type")
+  (return-type "GType")
+)
+
+(define-function unix_output_stream_new
+  (c-name "g_unix_output_stream_new")
+  (is-constructor-of "GUnixOutputStream")
+  (return-type "GOutputStream*")
+  (parameters
+    '("int" "fd")
+    '("gboolean" "close_fd_at_close")
+  )
+)
+
+(define-method set_close_fd
+  (of-object "GUnixOutputStream")
+  (c-name "g_unix_output_stream_set_close_fd")
+  (return-type "none")
+  (parameters
+    '("gboolean" "close_fd")
+  )
+)
+
+(define-method get_close_fd
+  (of-object "GUnixOutputStream")
+  (c-name "g_unix_output_stream_get_close_fd")
+  (return-type "gboolean")
+)
+
+(define-method get_fd
+  (of-object "GUnixOutputStream")
+  (c-name "g_unix_output_stream_get_fd")
+  (return-type "gint")
+)
+
+
+
+;; From gunixsocketaddress.h
+
+(define-function g_unix_socket_address_get_type
+  (c-name "g_unix_socket_address_get_type")
+  (return-type "GType")
+)
+
+(define-function g_unix_socket_address_new
+  (c-name "g_unix_socket_address_new")
+  (is-constructor-of "GUnixSocketAddress")
+  (return-type "GSocketAddress*")
+  (parameters
+    '("const-gchar*" "path")
+  )
+)
+
+(define-function g_unix_socket_address_new_abstract
+  (c-name "g_unix_socket_address_new_abstract")
+  (return-type "GSocketAddress*")
+  (parameters
+    '("const-gchar*" "path")
+    '("int" "path_len")
+  )
+)
+
+(define-method get_path
+  (of-object "GUnixSocketAddress")
+  (c-name "g_unix_socket_address_get_path")
+  (return-type "const-char*")
+)
+
+(define-method get_path_len
+  (of-object "GUnixSocketAddress")
+  (c-name "g_unix_socket_address_get_path_len")
+  (return-type "gsize")
+)
+
+(define-method get_is_abstract
+  (of-object "GUnixSocketAddress")
+  (c-name "g_unix_socket_address_get_is_abstract")
+  (return-type "gboolean")
+)
+
+(define-function g_unix_socket_address_abstract_names_supported
+  (c-name "g_unix_socket_address_abstract_names_supported")
+  (return-type "gboolean")
+)
+
diff --git a/gio/unix.override b/gio/unix.override
new file mode 100644 (file)
index 0000000..aebc6fc
--- /dev/null
@@ -0,0 +1,62 @@
+/* -*- Mode: C; c-basic-offset: 4 -*- 
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   unixmodule.c: module wrapping the GIO UNIX 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+headers
+#define NO_IMPORT_PYGOBJECT
+#include <pygobject.h>
+#include <gio/gio.h>
+#include <gio/gdesktopappinfo.h>
+#include <gio/gunixinputstream.h>
+#include <gio/gunixmounts.h>
+#include <gio/gunixoutputstream.h>
+#define GIO_COMPILATION
+#include <gio/gunixconnection.h>
+#undef GIO_COMPILATION
+#include <gio/gunixfdmessage.h>
+#include <gio/gunixsocketaddress.h>
+
+#define GIO_UNIX_MOUNT_ENTRY_TYPE (_gio_unix_mount_entry_get_type ())
+
+static GType _gio_unix_mount_entry_get_type (void)
+{
+  static GType our_type = 0;
+  
+  if (our_type == 0)
+    our_type = g_pointer_type_register_static ("GUnixMountEntry");
+
+  return our_type;
+}
+
+%%
+modulename gio.unix
+%%
+import gobject.GObject as PyGObject_Type
+import gio.InputStream as PyGInputStream_Type
+import gio.OutputStream as PyGOutputStream_Type
+import gio.SocketAddress as PyGSocketAddress_Type
+import gio.Cancellable as PyGCancellable_Type
+import gio.SocketConnection as PyGSocketConnection_Type
+import gio.SocketControlMessage as PyGSocketControlMessage_Type
+%%
+ignore-glob
+  *_get_type
+%%
diff --git a/gio/unixmodule.c b/gio/unixmodule.c
new file mode 100644 (file)
index 0000000..7a49856
--- /dev/null
@@ -0,0 +1,52 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ *   unixmodule.c: module wrapping the GIO UNIX 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+#include <Python.h>
+#include <pygobject.h>
+
+#include <gio/gio.h>
+
+/* include any extra headers needed here */
+
+void pyunix_register_classes(PyObject *d);
+void pyunix_add_constants(PyObject *module, const gchar *strip_prefix);
+
+extern PyMethodDef pyunix_functions[];
+
+DL_EXPORT(void)
+initunix(void)
+{
+    PyObject *m, *d;
+
+    /* perform any initialisation required by the library here */
+
+    m = Py_InitModule("gio.unix", pyunix_functions);
+    d = PyModule_GetDict(m);
+
+    init_pygobject();
+
+    pyunix_register_classes(d);
+
+}
+
diff --git a/glib/Makefile.am b/glib/Makefile.am
new file mode 100644 (file)
index 0000000..e210318
--- /dev/null
@@ -0,0 +1,61 @@
+AUTOMAKE_OPTIONS = 1.7
+INCLUDES = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) -DPY_SSIZE_T_CLEAN
+
+pkgincludedir = $(includedir)/pygtk-2.0
+pkginclude_HEADERS = pyglib.h
+
+lib_LTLIBRARIES = libpyglib-2.0-@PYTHON_BASENAME@.la
+
+pkgpyexecdir = $(pyexecdir)
+
+pyglibdir = $(pkgpyexecdir)/glib
+pyglib_PYTHON =        \
+       __init__.py     \
+       option.py
+pyglib_LTLIBRARIES = _glib.la
+
+common_ldflags = -module -avoid-version
+if PLATFORM_WIN32
+common_ldflags += -no-undefined
+endif
+
+libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS = $(GLIB_CFLAGS)
+libpyglib_2_0_@PYTHON_BASENAME@_la_LIBADD = $(GLIB_LIBS) $(FFI_LIBS)
+libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES =   \
+       pyglib.c                \
+       pyglib.h                \
+       pyglib-private.h        \
+       pyglib-python-compat.h
+
+_glib_la_CFLAGS = $(GLIB_CFLAGS)
+_glib_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_glib|PyInit__glib"
+_glib_la_LIBADD = $(GLIB_LIBS) libpyglib-2.0-@PYTHON_BASENAME@.la
+_glib_la_SOURCES =             \
+       glibmodule.c            \
+       pygiochannel.c          \
+       pygiochannel.h          \
+       pygoptioncontext.c      \
+       pygoptioncontext.h      \
+       pygoptiongroup.c        \
+       pygoptiongroup.h        \
+       pygmaincontext.c        \
+       pygmaincontext.h        \
+       pygmainloop.c           \
+       pygmainloop.h           \
+       pygsource.c             \
+       pygsource.h             \
+       pygspawn.c              \
+       pygspawn.h
+
+if PLATFORM_WIN32
+_glib_la_CFLAGS += -DPLATFORM_WIN32
+endif
+
+all: $(pyglib_LTLIBRARIES:.la=.so)
+check-local: $(pyglib_LTLIBRARIES:.la=.so)
+clean-local:
+       rm -f $(pyglib_LTLIBRARIES:.la=.so)
+.la.so:
+       $(LN_S) .libs/$@ $@ || true
+
+-include $(top_srcdir)/git.mk
diff --git a/glib/Makefile.in b/glib/Makefile.in
new file mode 100644 (file)
index 0000000..e23bffc
--- /dev/null
@@ -0,0 +1,832 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+@PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined
+@PLATFORM_WIN32_TRUE@am__append_2 = -DPLATFORM_WIN32
+subdir = glib
+DIST_COMMON = $(pkginclude_HEADERS) $(pyglib_PYTHON) \
+       $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+       $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pyglibdir)" \
+       "$(DESTDIR)$(pyglibdir)" "$(DESTDIR)$(pkgincludedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES) $(pyglib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+_glib_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+       libpyglib-2.0-@PYTHON_BASENAME@.la
+am__glib_la_OBJECTS = _glib_la-glibmodule.lo _glib_la-pygiochannel.lo \
+       _glib_la-pygoptioncontext.lo _glib_la-pygoptiongroup.lo \
+       _glib_la-pygmaincontext.lo _glib_la-pygmainloop.lo \
+       _glib_la-pygsource.lo _glib_la-pygspawn.lo
+_glib_la_OBJECTS = $(am__glib_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+_glib_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(_glib_la_CFLAGS) \
+       $(CFLAGS) $(_glib_la_LDFLAGS) $(LDFLAGS) -o $@
+libpyglib_2_0_@PYTHON_BASENAME@_la_DEPENDENCIES =  \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS =  \
+       libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo
+libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS =  \
+       $(am_libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS)
+libpyglib_2_0_@PYTHON_BASENAME@_la_LINK = $(LIBTOOL) $(AM_V_lt) \
+       --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+       $(CCLD) $(libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(_glib_la_SOURCES) \
+       $(libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES)
+DIST_SOURCES = $(_glib_la_SOURCES) \
+       $(libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES)
+py_compile = $(top_srcdir)/py-compile
+HEADERS = $(pkginclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgincludedir = $(includedir)/pygtk-2.0
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
+GI_LIBS = @GI_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PLATFORM = @PLATFORM@
+PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
+PYCAIRO_LIBS = @PYCAIRO_LIBS@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = $(pyexecdir)
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.7
+INCLUDES = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) -DPY_SSIZE_T_CLEAN
+pkginclude_HEADERS = pyglib.h
+lib_LTLIBRARIES = libpyglib-2.0-@PYTHON_BASENAME@.la
+pyglibdir = $(pkgpyexecdir)/glib
+pyglib_PYTHON = \
+       __init__.py     \
+       option.py
+
+pyglib_LTLIBRARIES = _glib.la
+common_ldflags = -module -avoid-version $(am__append_1)
+libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS = $(GLIB_CFLAGS)
+libpyglib_2_0_@PYTHON_BASENAME@_la_LIBADD = $(GLIB_LIBS) $(FFI_LIBS)
+libpyglib_2_0_@PYTHON_BASENAME@_la_SOURCES = \
+       pyglib.c                \
+       pyglib.h                \
+       pyglib-private.h        \
+       pyglib-python-compat.h
+
+_glib_la_CFLAGS = $(GLIB_CFLAGS) $(am__append_2)
+_glib_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_glib|PyInit__glib"
+_glib_la_LIBADD = $(GLIB_LIBS) libpyglib-2.0-@PYTHON_BASENAME@.la
+_glib_la_SOURCES = \
+       glibmodule.c            \
+       pygiochannel.c          \
+       pygiochannel.h          \
+       pygoptioncontext.c      \
+       pygoptioncontext.h      \
+       pygoptiongroup.c        \
+       pygoptiongroup.h        \
+       pygmaincontext.c        \
+       pygmaincontext.h        \
+       pygmainloop.c           \
+       pygmainloop.h           \
+       pygsource.c             \
+       pygsource.h             \
+       pygspawn.c              \
+       pygspawn.h
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .la .lo .o .obj .so
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign glib/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign glib/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+       @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+       list2=; for p in $$list; do \
+         if test -f $$p; then \
+           list2="$$list2 $$p"; \
+         else :; fi; \
+       done; \
+       test -z "$$list2" || { \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+       }
+
+uninstall-libLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+       done
+
+clean-libLTLIBRARIES:
+       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+install-pyglibLTLIBRARIES: $(pyglib_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(pyglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pyglibdir)"
+       @list='$(pyglib_LTLIBRARIES)'; test -n "$(pyglibdir)" || list=; \
+       list2=; for p in $$list; do \
+         if test -f $$p; then \
+           list2="$$list2 $$p"; \
+         else :; fi; \
+       done; \
+       test -z "$$list2" || { \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyglibdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyglibdir)"; \
+       }
+
+uninstall-pyglibLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pyglib_LTLIBRARIES)'; test -n "$(pyglibdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyglibdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyglibdir)/$$f"; \
+       done
+
+clean-pyglibLTLIBRARIES:
+       -test -z "$(pyglib_LTLIBRARIES)" || rm -f $(pyglib_LTLIBRARIES)
+       @list='$(pyglib_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+_glib.la: $(_glib_la_OBJECTS) $(_glib_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(_glib_la_LINK) -rpath $(pyglibdir) $(_glib_la_OBJECTS) $(_glib_la_LIBADD) $(LIBS)
+libpyglib-2.0-@PYTHON_BASENAME@.la: $(libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS) $(libpyglib_2_0_@PYTHON_BASENAME@_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libpyglib_2_0_@PYTHON_BASENAME@_la_LINK) -rpath $(libdir) $(libpyglib_2_0_@PYTHON_BASENAME@_la_OBJECTS) $(libpyglib_2_0_@PYTHON_BASENAME@_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-glibmodule.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygiochannel.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygmaincontext.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygmainloop.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygoptioncontext.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygoptiongroup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygsource.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glib_la-pygspawn.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+
+_glib_la-glibmodule.lo: glibmodule.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-glibmodule.lo -MD -MP -MF $(DEPDIR)/_glib_la-glibmodule.Tpo -c -o _glib_la-glibmodule.lo `test -f 'glibmodule.c' || echo '$(srcdir)/'`glibmodule.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_glib_la-glibmodule.Tpo $(DEPDIR)/_glib_la-glibmodule.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='glibmodule.c' object='_glib_la-glibmodule.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-glibmodule.lo `test -f 'glibmodule.c' || echo '$(srcdir)/'`glibmodule.c
+
+_glib_la-pygiochannel.lo: pygiochannel.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygiochannel.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygiochannel.Tpo -c -o _glib_la-pygiochannel.lo `test -f 'pygiochannel.c' || echo '$(srcdir)/'`pygiochannel.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_glib_la-pygiochannel.Tpo $(DEPDIR)/_glib_la-pygiochannel.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygiochannel.c' object='_glib_la-pygiochannel.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygiochannel.lo `test -f 'pygiochannel.c' || echo '$(srcdir)/'`pygiochannel.c
+
+_glib_la-pygoptioncontext.lo: pygoptioncontext.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygoptioncontext.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygoptioncontext.Tpo -c -o _glib_la-pygoptioncontext.lo `test -f 'pygoptioncontext.c' || echo '$(srcdir)/'`pygoptioncontext.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_glib_la-pygoptioncontext.Tpo $(DEPDIR)/_glib_la-pygoptioncontext.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygoptioncontext.c' object='_glib_la-pygoptioncontext.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygoptioncontext.lo `test -f 'pygoptioncontext.c' || echo '$(srcdir)/'`pygoptioncontext.c
+
+_glib_la-pygoptiongroup.lo: pygoptiongroup.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygoptiongroup.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygoptiongroup.Tpo -c -o _glib_la-pygoptiongroup.lo `test -f 'pygoptiongroup.c' || echo '$(srcdir)/'`pygoptiongroup.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_glib_la-pygoptiongroup.Tpo $(DEPDIR)/_glib_la-pygoptiongroup.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygoptiongroup.c' object='_glib_la-pygoptiongroup.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygoptiongroup.lo `test -f 'pygoptiongroup.c' || echo '$(srcdir)/'`pygoptiongroup.c
+
+_glib_la-pygmaincontext.lo: pygmaincontext.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygmaincontext.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygmaincontext.Tpo -c -o _glib_la-pygmaincontext.lo `test -f 'pygmaincontext.c' || echo '$(srcdir)/'`pygmaincontext.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_glib_la-pygmaincontext.Tpo $(DEPDIR)/_glib_la-pygmaincontext.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygmaincontext.c' object='_glib_la-pygmaincontext.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygmaincontext.lo `test -f 'pygmaincontext.c' || echo '$(srcdir)/'`pygmaincontext.c
+
+_glib_la-pygmainloop.lo: pygmainloop.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygmainloop.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygmainloop.Tpo -c -o _glib_la-pygmainloop.lo `test -f 'pygmainloop.c' || echo '$(srcdir)/'`pygmainloop.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_glib_la-pygmainloop.Tpo $(DEPDIR)/_glib_la-pygmainloop.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygmainloop.c' object='_glib_la-pygmainloop.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygmainloop.lo `test -f 'pygmainloop.c' || echo '$(srcdir)/'`pygmainloop.c
+
+_glib_la-pygsource.lo: pygsource.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygsource.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygsource.Tpo -c -o _glib_la-pygsource.lo `test -f 'pygsource.c' || echo '$(srcdir)/'`pygsource.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_glib_la-pygsource.Tpo $(DEPDIR)/_glib_la-pygsource.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygsource.c' object='_glib_la-pygsource.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygsource.lo `test -f 'pygsource.c' || echo '$(srcdir)/'`pygsource.c
+
+_glib_la-pygspawn.lo: pygspawn.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -MT _glib_la-pygspawn.lo -MD -MP -MF $(DEPDIR)/_glib_la-pygspawn.Tpo -c -o _glib_la-pygspawn.lo `test -f 'pygspawn.c' || echo '$(srcdir)/'`pygspawn.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_glib_la-pygspawn.Tpo $(DEPDIR)/_glib_la-pygspawn.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygspawn.c' object='_glib_la-pygspawn.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_glib_la_CFLAGS) $(CFLAGS) -c -o _glib_la-pygspawn.lo `test -f 'pygspawn.c' || echo '$(srcdir)/'`pygspawn.c
+
+libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo: pyglib.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS) $(CFLAGS) -MT libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo -MD -MP -MF $(DEPDIR)/libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.Tpo -c -o libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo `test -f 'pyglib.c' || echo '$(srcdir)/'`pyglib.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.Tpo $(DEPDIR)/libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pyglib.c' object='libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpyglib_2_0_@PYTHON_BASENAME@_la_CFLAGS) $(CFLAGS) -c -o libpyglib_2_0_@PYTHON_BASENAME@_la-pyglib.lo `test -f 'pyglib.c' || echo '$(srcdir)/'`pyglib.c
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-pyglibPYTHON: $(pyglib_PYTHON)
+       @$(NORMAL_INSTALL)
+       test -z "$(pyglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pyglibdir)"
+       @list='$(pyglib_PYTHON)'; dlist=; list2=; test -n "$(pyglibdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+         if test -f $$b$$p; then \
+           $(am__strip_dir) \
+           dlist="$$dlist $$f"; \
+           list2="$$list2 $$b$$p"; \
+         else :; fi; \
+       done; \
+       for file in $$list2; do echo $$file; done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pyglibdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pyglibdir)" || exit $$?; \
+       done || exit $$?; \
+       if test -n "$$dlist"; then \
+         if test -z "$(DESTDIR)"; then \
+           PYTHON=$(PYTHON) $(py_compile) --basedir "$(pyglibdir)" $$dlist; \
+         else \
+           PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pyglibdir)" $$dlist; \
+         fi; \
+       else :; fi
+
+uninstall-pyglibPYTHON:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pyglib_PYTHON)'; test -n "$(pyglibdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       filesc=`echo "$$files" | sed 's|$$|c|'`; \
+       fileso=`echo "$$files" | sed 's|$$|o|'`; \
+       echo " ( cd '$(DESTDIR)$(pyglibdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pyglibdir)" && rm -f $$files || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pyglibdir)' && rm -f" $$filesc ")"; \
+       cd "$(DESTDIR)$(pyglibdir)" && rm -f $$filesc || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pyglibdir)' && rm -f" $$fileso ")"; \
+       cd "$(DESTDIR)$(pyglibdir)" && rm -f $$fileso
+install-pkgincludeHEADERS: $(pkginclude_HEADERS)
+       @$(NORMAL_INSTALL)
+       test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
+       @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
+         $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
+       done
+
+uninstall-pkgincludeHEADERS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$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
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pyglibdir)" "$(DESTDIR)$(pyglibdir)" "$(DESTDIR)$(pkgincludedir)"; 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:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libLTLIBRARIES clean-libtool clean-local \
+       clean-pyglibLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgincludeHEADERS install-pyglibLTLIBRARIES \
+       install-pyglibPYTHON
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS \
+       uninstall-pyglibLTLIBRARIES uninstall-pyglibPYTHON
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+       clean-generic clean-libLTLIBRARIES clean-libtool clean-local \
+       clean-pyglibLTLIBRARIES ctags distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-libLTLIBRARIES \
+       install-man install-pdf install-pdf-am \
+       install-pkgincludeHEADERS install-ps install-ps-am \
+       install-pyglibLTLIBRARIES install-pyglibPYTHON install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags uninstall uninstall-am uninstall-libLTLIBRARIES \
+       uninstall-pkgincludeHEADERS uninstall-pyglibLTLIBRARIES \
+       uninstall-pyglibPYTHON
+
+
+all: $(pyglib_LTLIBRARIES:.la=.so)
+check-local: $(pyglib_LTLIBRARIES:.la=.so)
+clean-local:
+       rm -f $(pyglib_LTLIBRARIES:.la=.so)
+.la.so:
+       $(LN_S) .libs/$@ $@ || true
+
+-include $(top_srcdir)/git.mk
+
+# 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:
diff --git a/glib/__init__.py b/glib/__init__.py
new file mode 100644 (file)
index 0000000..b114cb9
--- /dev/null
@@ -0,0 +1,25 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2006-2008 Johan Dahlin
+#
+#   glib/__init__.py: initialisation file for glib module
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+from glib._glib import *
+_PyGLib_API = _glib._PyGLib_API
+
+del _glib
diff --git a/glib/glibmodule.c b/glib/glibmodule.c
new file mode 100644 (file)
index 0000000..963e5ea
--- /dev/null
@@ -0,0 +1,969 @@
+/* -*- Mode: C; c-set-style: python; c-basic-offset: 4  -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ *   glibmodule.c: wrapper for the glib 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <Python.h>
+#include <glib.h>
+#include "pyglib.h"
+#include "pyglib-private.h"
+#include "pygiochannel.h"
+#include "pygmaincontext.h"
+#include "pygmainloop.h"
+#include "pygoptioncontext.h"
+#include "pygoptiongroup.h"
+#include "pygsource.h"
+#include "pygspawn.h"
+
+#define PYGLIB_MAJOR_VERSION PYGOBJECT_MAJOR_VERSION
+#define PYGLIB_MINOR_VERSION PYGOBJECT_MINOR_VERSION
+#define PYGLIB_MICRO_VERSION PYGOBJECT_MICRO_VERSION
+
+
+/* ---------------- glib module functions -------------------- */
+
+struct _PyGChildData {
+    PyObject *func;
+    PyObject *data;
+};
+
+static gint
+get_handler_priority(gint *priority, PyObject *kwargs)
+{
+    Py_ssize_t len, pos;
+    PyObject *key, *val;
+
+    /* no keyword args? leave as default */
+    if (kwargs == NULL)        return 0;
+
+    len = PyDict_Size(kwargs);
+    if (len == 0) return 0;
+
+    if (len != 1) {
+       PyErr_SetString(PyExc_TypeError,
+                       "expecting at most one keyword argument");
+       return -1;
+    }
+    pos = 0;
+    PyDict_Next(kwargs, &pos, &key, &val);
+    if (!PYGLIB_PyUnicode_Check(key)) {
+       PyErr_SetString(PyExc_TypeError,
+                       "keyword argument name is not a string");
+       return -1;
+    }
+
+    if (strcmp(PYGLIB_PyUnicode_AsString(key), "priority") != 0) {
+       PyErr_SetString(PyExc_TypeError,
+                       "only 'priority' keyword argument accepted");
+       return -1;
+    }
+
+    *priority = PYGLIB_PyLong_AsLong(val);
+    if (PyErr_Occurred()) {
+       PyErr_Clear();
+       PyErr_SetString(PyExc_ValueError, "could not get priority value");
+       return -1;
+    }
+    return 0;
+}
+
+static PyObject *
+pyglib_threads_init(PyObject *unused, PyObject *args, PyObject *kwargs)
+{
+    if (!pyglib_enable_threads())
+        return NULL;
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pyglib_idle_add(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    PyObject *first, *callback, *cbargs = NULL, *data;
+    gint len, priority = G_PRIORITY_DEFAULT_IDLE;
+    guint handler_id;
+
+    len = PyTuple_Size(args);
+    if (len < 1) {
+       PyErr_SetString(PyExc_TypeError,
+                       "idle_add requires at least 1 argument");
+       return NULL;
+    }
+    first = PySequence_GetSlice(args, 0, 1);
+    if (!PyArg_ParseTuple(first, "O:idle_add", &callback)) {
+       Py_DECREF(first);
+        return NULL;
+    }
+    Py_DECREF(first);
+    if (!PyCallable_Check(callback)) {
+        PyErr_SetString(PyExc_TypeError, "first argument not callable");
+        return NULL;
+    }
+    if (get_handler_priority(&priority, kwargs) < 0)
+       return NULL;
+
+    cbargs = PySequence_GetSlice(args, 1, len);
+    if (cbargs == NULL)
+       return NULL;
+
+    data = Py_BuildValue("(ON)", callback, cbargs);
+    if (data == NULL)
+       return NULL;
+    handler_id = g_idle_add_full(priority,
+                                _pyglib_handler_marshal, data,
+                                _pyglib_destroy_notify);
+    return PYGLIB_PyLong_FromLong(handler_id);
+}
+
+
+static PyObject *
+pyglib_timeout_add(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    PyObject *first, *callback, *cbargs = NULL, *data;
+    gint len, priority = G_PRIORITY_DEFAULT;
+    guint interval, handler_id;
+
+    len = PyTuple_Size(args);
+    if (len < 2) {
+       PyErr_SetString(PyExc_TypeError,
+                       "timeout_add requires at least 2 args");
+       return NULL;
+    }
+    first = PySequence_GetSlice(args, 0, 2);
+    if (!PyArg_ParseTuple(first, "IO:timeout_add", &interval, &callback)) {
+       Py_DECREF(first);
+        return NULL;
+    }
+    Py_DECREF(first);
+    if (!PyCallable_Check(callback)) {
+        PyErr_SetString(PyExc_TypeError, "second argument not callable");
+        return NULL;
+    }
+    if (get_handler_priority(&priority, kwargs) < 0)
+       return NULL;
+
+    cbargs = PySequence_GetSlice(args, 2, len);
+    if (cbargs == NULL)
+       return NULL;
+
+    data = Py_BuildValue("(ON)", callback, cbargs);
+    if (data == NULL)
+       return NULL;
+    handler_id = g_timeout_add_full(priority, interval,
+                                   _pyglib_handler_marshal, data,
+                                   _pyglib_destroy_notify);
+    return PYGLIB_PyLong_FromLong(handler_id);
+}
+
+static PyObject *
+pyglib_timeout_add_seconds(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    PyObject *first, *callback, *cbargs = NULL, *data;
+    gint len, priority = G_PRIORITY_DEFAULT;
+    guint interval, handler_id;
+
+    len = PyTuple_Size(args);
+    if (len < 2) {
+       PyErr_SetString(PyExc_TypeError,
+                       "timeout_add_seconds requires at least 2 args");
+       return NULL;
+    }
+    first = PySequence_GetSlice(args, 0, 2);
+    if (!PyArg_ParseTuple(first, "IO:timeout_add_seconds", &interval, &callback)) {
+       Py_DECREF(first);
+        return NULL;
+    }
+    Py_DECREF(first);
+    if (!PyCallable_Check(callback)) {
+        PyErr_SetString(PyExc_TypeError, "second argument not callable");
+        return NULL;
+    }
+    if (get_handler_priority(&priority, kwargs) < 0)
+       return NULL;
+
+    cbargs = PySequence_GetSlice(args, 2, len);
+    if (cbargs == NULL)
+       return NULL;
+
+    data = Py_BuildValue("(ON)", callback, cbargs);
+    if (data == NULL)
+       return NULL;
+    handler_id = g_timeout_add_seconds_full(priority, interval,
+                                            _pyglib_handler_marshal, data,
+                                            _pyglib_destroy_notify);
+    return PYGLIB_PyLong_FromLong(handler_id);
+}
+
+static gboolean
+iowatch_marshal(GIOChannel *source,
+               GIOCondition condition,
+               gpointer user_data)
+{
+    PyGILState_STATE state;
+    PyObject *tuple, *func, *firstargs, *args, *ret;
+    gboolean res;
+
+    g_return_val_if_fail(user_data != NULL, FALSE);
+
+    state = pyglib_gil_state_ensure();
+
+    tuple = (PyObject *)user_data;
+    func = PyTuple_GetItem(tuple, 0);
+
+    /* arg vector is (fd, condtion, *args) */
+    firstargs = Py_BuildValue("(Oi)", PyTuple_GetItem(tuple, 1), condition);
+    args = PySequence_Concat(firstargs, PyTuple_GetItem(tuple, 2));
+    Py_DECREF(firstargs);
+
+    ret = PyObject_CallObject(func, args);
+    Py_DECREF(args);
+    if (!ret) {
+       PyErr_Print();
+       res = FALSE;
+    } else {
+        if (ret == Py_None) {
+            if (PyErr_Warn(PyExc_Warning,
+                          "glib.io_add_watch callback returned None; "
+                           "should return True/False")) {
+                PyErr_Print();
+            }
+        }
+       res = PyObject_IsTrue(ret);
+       Py_DECREF(ret);
+    }
+
+    pyglib_gil_state_release(state);
+
+    return res;
+}
+
+static PyObject *
+pyglib_io_add_watch(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    PyObject *first, *pyfd, *callback, *cbargs = NULL, *data;
+    gint fd, priority = G_PRIORITY_DEFAULT, condition;
+    Py_ssize_t len;
+    GIOChannel *iochannel;
+    guint handler_id;
+
+    len = PyTuple_Size(args);
+    if (len < 3) {
+       PyErr_SetString(PyExc_TypeError,
+                       "io_add_watch requires at least 3 args");
+       return NULL;
+    }
+    first = PySequence_GetSlice(args, 0, 3);
+    if (!PyArg_ParseTuple(first, "OiO:io_add_watch", &pyfd, &condition,
+                         &callback)) {
+       Py_DECREF(first);
+        return NULL;
+    }
+    Py_DECREF(first);
+    fd = PyObject_AsFileDescriptor(pyfd);
+    if (fd < 0) {
+       return NULL;
+    }
+    if (!PyCallable_Check(callback)) {
+        PyErr_SetString(PyExc_TypeError, "third argument not callable");
+        return NULL;
+    }
+    if (get_handler_priority(&priority, kwargs) < 0)
+       return NULL;
+
+    cbargs = PySequence_GetSlice(args, 3, len);
+    if (cbargs == NULL)
+      return NULL;
+    data = Py_BuildValue("(OON)", callback, pyfd, cbargs);
+    if (data == NULL)
+      return NULL;
+    iochannel = g_io_channel_unix_new(fd);
+    handler_id = g_io_add_watch_full(iochannel, priority, condition,
+                                    iowatch_marshal, data,
+                                    (GDestroyNotify)_pyglib_destroy_notify);
+    g_io_channel_unref(iochannel);
+    
+    return PYGLIB_PyLong_FromLong(handler_id);
+}
+
+static PyObject *
+pyglib_source_remove(PyObject *self, PyObject *args)
+{
+    guint tag;
+
+    if (!PyArg_ParseTuple(args, "i:source_remove", &tag))
+       return NULL;
+
+    return PyBool_FromLong(g_source_remove(tag));
+}
+
+static PyObject *
+pyglib_main_context_default(PyObject *unused)
+{
+    return pyglib_main_context_new(g_main_context_default());
+}
+
+static void
+child_watch_func(GPid pid, gint status, gpointer data)
+{
+    struct _PyGChildData *child_data = (struct _PyGChildData *) data;
+    PyObject *retval;
+    PyGILState_STATE gil;
+
+    gil = pyglib_gil_state_ensure();
+    if (child_data->data)
+        retval = PyObject_CallFunction(child_data->func, "iiO", pid, status,
+                                       child_data->data);
+    else
+        retval = PyObject_CallFunction(child_data->func, "ii", pid, status);
+
+    if (retval)
+       Py_DECREF(retval);
+    else
+       PyErr_Print();
+
+    pyglib_gil_state_release(gil);
+}
+
+static void
+child_watch_dnotify(gpointer data)
+{
+    struct _PyGChildData *child_data = (struct _PyGChildData *) data;
+    Py_DECREF(child_data->func);
+    Py_XDECREF(child_data->data);
+    g_slice_free(struct _PyGChildData, child_data);
+}
+
+
+static PyObject *
+pyglib_child_watch_add(PyObject *unused, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "pid", "function", "data", "priority", NULL };
+    guint id;
+    gint priority = G_PRIORITY_DEFAULT;
+    int pid;
+    PyObject *func, *user_data = NULL;
+    struct _PyGChildData *child_data;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "iO|Oi:glib.child_watch_add", kwlist,
+                                     &pid, &func, &user_data, &priority))
+        return NULL;
+    if (!PyCallable_Check(func)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "glib.child_watch_add: second argument must be callable");
+        return NULL;
+    }
+
+    child_data = g_slice_new(struct _PyGChildData);
+    child_data->func = func;
+    child_data->data = user_data;
+    Py_INCREF(child_data->func);
+    if (child_data->data)
+        Py_INCREF(child_data->data);
+    id = g_child_watch_add_full(priority, pid, child_watch_func,
+                                child_data, child_watch_dnotify);
+    return PYGLIB_PyLong_FromLong(id);
+}
+
+static PyObject *
+pyglib_markup_escape_text(PyObject *unused, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "text", NULL };
+    char *text_in, *text_out;
+    Py_ssize_t text_size;
+    PyObject *retval;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "s#:glib.markup_escape_text", kwlist,
+                                     &text_in, &text_size))
+        return NULL;
+
+    text_out = g_markup_escape_text(text_in, text_size);
+    retval = PYGLIB_PyUnicode_FromString(text_out);
+    g_free(text_out);
+    return retval;
+}
+
+static PyObject *
+pyglib_get_current_time(PyObject *unused)
+{
+    GTimeVal timeval;
+
+    g_get_current_time(&timeval);
+    return pyglib_float_from_timeval(timeval);
+}
+
+static PyObject*
+get_user_dir(const char *path)
+{
+    if (path)
+        return PYGLIB_PyUnicode_FromString(path);
+    else {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+
+static PyObject*
+pyglib_get_user_config_dir(PyObject *self)
+{
+    return get_user_dir(g_get_user_config_dir());
+}
+
+static PyObject*
+pyglib_get_user_cache_dir(PyObject *self)
+{
+    return get_user_dir(g_get_user_cache_dir());
+}
+
+static PyObject*
+pyglib_get_user_data_dir(PyObject *self)
+{
+    return get_user_dir(g_get_user_data_dir());
+}
+
+static PyObject *
+pyglib_get_user_special_dir(PyObject *unused, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "directory", NULL };
+    guint directory;
+    const char *path;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "i:glib.get_user_special_dir", kwlist,
+                                     &directory))
+        return NULL;
+
+    path = g_get_user_special_dir(directory);
+    if (path)
+        return PYGLIB_PyUnicode_FromString(path);
+    else {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+
+static PyObject *
+pyglib_main_depth(PyObject *unused)
+{
+    return PYGLIB_PyLong_FromLong(g_main_depth());
+}
+
+static PyObject *
+pyglib_filename_display_name(PyObject *self, PyObject *args)
+{
+    PyObject *py_display_name;
+    char *filename, *display_name;
+    
+    if (!PyArg_ParseTuple(args, "s:glib.filename_display_name",
+                         &filename))
+       return NULL;
+
+    display_name = g_filename_display_name(filename);
+    py_display_name = PyUnicode_DecodeUTF8(display_name,
+                                          strlen(display_name), NULL);
+    g_free(display_name);
+    return py_display_name;
+}
+
+static PyObject *
+pyglib_filename_display_basename(PyObject *self, PyObject *args)
+{
+    PyObject *py_display_basename;
+    char *filename, *display_basename;
+    
+    if (!PyArg_ParseTuple(args, "s:glib.filename_display_basename",
+                         &filename))
+       return NULL;
+
+    display_basename = g_filename_display_basename(filename);
+    py_display_basename = PyUnicode_DecodeUTF8(display_basename,
+                                              strlen(display_basename), NULL);
+    g_free(display_basename);
+    return py_display_basename;
+}
+
+static PyObject *
+pyglib_filename_from_utf8(PyObject *self, PyObject *args)
+{
+    char *filename, *utf8string;
+    Py_ssize_t utf8string_len;
+    gsize bytes_written;
+    GError *error = NULL;
+    PyObject *py_filename;
+    
+    if (!PyArg_ParseTuple(args, "s#:glib.filename_from_utf8",
+                         &utf8string, &utf8string_len))
+       return NULL;
+
+    filename = g_filename_from_utf8(utf8string, utf8string_len,
+                                   NULL, &bytes_written, &error);
+    if (pyglib_error_check(&error)) {
+        g_free(filename);
+        return NULL;
+    }
+    py_filename = PYGLIB_PyUnicode_FromStringAndSize(filename, bytes_written);
+    g_free(filename);
+    return py_filename;
+}
+
+
+static PyObject*
+pyglib_get_application_name(PyObject *self)
+{
+    const char *name;
+
+    name = g_get_application_name();
+    if (!name) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+    return PYGLIB_PyUnicode_FromString(name);
+}
+
+static PyObject*
+pyglib_set_application_name(PyObject *self, PyObject *arg)
+{
+    if (!PYGLIB_PyUnicode_Check(arg)) {
+       PyErr_Format(PyExc_TypeError,
+                    "first argument must be a string, not '%s'",
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr(arg)));
+       return NULL;
+    }
+    g_set_application_name(PYGLIB_PyUnicode_AsString(arg));
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject*
+pyglib_get_prgname(PyObject *self)
+{
+    char *name;
+
+    name = g_get_prgname();
+    if (!name) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+    return PYGLIB_PyUnicode_FromString(name);
+}
+
+static PyObject*
+pyglib_set_prgname(PyObject *self, PyObject *arg)
+{
+    if (!PYGLIB_PyUnicode_Check(arg)) {
+       PyErr_Format(PyExc_TypeError,
+                    "first argument must be a string, not '%s'",
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr(arg)));
+       return NULL;
+    }
+    g_set_prgname(PYGLIB_PyUnicode_AsString(arg));
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pyglib_find_program_in_path(PyObject *unused, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "program", NULL };
+    char *program, *ret;
+    PyObject *retval;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "s:glib.find_program_in_path", kwlist,
+                                     &program))
+        return NULL;
+
+    ret = g_find_program_in_path(program);
+    retval = PYGLIB_PyUnicode_FromString(ret);
+    g_free(ret);
+    return retval;
+}
+
+static PyObject *
+pyglib_uri_list_extract_uris(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "uri_list", NULL };
+    char *uri_list;
+    char **uris, **tmp;
+    int i = 0, j;
+    PyObject *ret;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:uri_list_extract_uris", kwlist, &uri_list))
+        return NULL;
+
+    uris = (char **)g_uri_list_extract_uris(uri_list);
+    if (!uris) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+
+    tmp = uris;
+    while (*tmp)
+        tmp++, i++;
+
+    ret = PyTuple_New(i);
+    for (j = 0; j < i; j++)
+        PyTuple_SetItem(ret, j, PYGLIB_PyUnicode_FromString(uris[j]));
+
+    g_strfreev(uris);
+
+    return ret;
+}
+
+/* FIXME: we should use strv_to_pylist (in pygio-utils.h) here, but that
+ * function should be moved into pyglib first. See
+ * https://bugzilla.gnome.org/show_bug.cgi?id=630508
+ */
+static PyObject *
+tuple_of_strings_from_dirs(const gchar* const *dirs)
+{
+    char **tmp;
+    int i = 0, j;
+    PyObject *ret;
+
+    if (!dirs) {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+
+    tmp = (char **)dirs;
+    while (*tmp)
+        tmp++, i++;
+
+    ret = PyTuple_New(i);
+    for (j = 0; j < i; j++)
+        PyTuple_SetItem(ret, j, PYGLIB_PyUnicode_FromString(dirs[j]));
+
+    return ret;
+}
+
+static PyObject*
+pyglib_get_system_config_dirs(PyObject *self)
+{
+    return tuple_of_strings_from_dirs(g_get_system_config_dirs());
+}
+
+static PyObject*
+pyglib_get_system_data_dirs(PyObject *self)
+{
+    return tuple_of_strings_from_dirs(g_get_system_data_dirs());
+}
+
+static PyMethodDef _glib_functions[] = {
+    { "threads_init",
+      (PyCFunction) pyglib_threads_init, METH_NOARGS,
+      "threads_init()\n"
+      "Initialize GLib for use from multiple threads. If you also use GTK+\n"
+      "itself (i.e. GUI, not just PyGObject), use gtk.gdk.threads_init()\n"
+      "instead." },
+    { "idle_add",
+      (PyCFunction)pyglib_idle_add, METH_VARARGS|METH_KEYWORDS,
+      "idle_add(callable, user_data=None, priority=None) -> source id\n"
+      "  callable receives (user_data)\n"
+      "Adds a callable to be called whenever there are no higher priority\n"
+      "events pending to the default main loop." },
+    { "timeout_add",
+      (PyCFunction)pyglib_timeout_add, METH_VARARGS|METH_KEYWORDS,
+      "timeout_add(interval, callable, user_data=None,\n"
+      "            priority=None) -> source id\n"
+      "  callable receives (user_data)\n"
+      "Sets a callable be called repeatedly until it returns False." },
+    { "timeout_add_seconds",
+      (PyCFunction)pyglib_timeout_add_seconds, METH_VARARGS|METH_KEYWORDS,
+      "timeout_add(interval, callable, user_data=None,\n"
+      "            priority=None) -> source_id\n"
+      "  callable receives (user_data)\n"
+      "Sets a callable be called repeatedly until it returns False.\n"
+      "Use this if you want to have a timer in the \"seconds\" range\n"
+      "and do not care about the exact time of the first call of the\n"
+      "timer, use this for more efficient system power usage." },
+    { "io_add_watch",
+      (PyCFunction)pyglib_io_add_watch, METH_VARARGS|METH_KEYWORDS,
+      "io_add_watch(fd, condition, callback, user_data=None) -> source id\n"
+      "  callable receives (fd, condition, user_data)\n"
+      "Arranges for the fd to be monitored by the main loop for the\n"
+      "specified condition. Condition is a combination of glib.IO_IN,\n"
+      "glib.IO_OUT, glib.IO_PRI, gio.IO_ERR and gio.IO_HUB.\n" },
+    { "child_watch_add",
+      (PyCFunction)pyglib_child_watch_add, METH_VARARGS|METH_KEYWORDS,
+      "child_watch_add(pid, callable, user_data=None,\n"
+                       "priority=None) -> source id\n"
+      "  callable receives (pid, condition, user_data)\n"
+      "Sets the function specified by function to be called with the user\n"
+      "data specified by data when the child indicated by pid exits.\n"
+      "Condition is a combination of glib.IO_IN, glib.IO_OUT, glib.IO_PRI,\n"
+      "gio.IO_ERR and gio.IO_HUB." },
+    { "source_remove",
+      (PyCFunction)pyglib_source_remove, METH_VARARGS,
+      "source_remove(source_id) -> True if removed\n"
+      "Removes the event source specified by source id as returned by the\n"
+      "glib.idle_add(), glib.timeout_add() or glib.io_add_watch()\n"
+      "functions." },
+    { "spawn_async",
+      (PyCFunction)pyglib_spawn_async, METH_VARARGS|METH_KEYWORDS,
+      "spawn_async(argv, envp=None, working_directory=None,\n"
+      "            flags=0, child_setup=None, user_data=None,\n"
+      "            standard_input=None, standard_output=None,\n"
+      "            standard_error=None) -> (pid, stdin, stdout, stderr)\n"
+      "Execute a child program asynchronously within a glib.MainLoop()\n"
+      "See the reference manual for a complete reference." },
+    { "main_context_default",
+      (PyCFunction)pyglib_main_context_default, METH_NOARGS,
+      "main_context_default() -> a main context\n"
+      "Returns the default main context. This is the main context used\n"
+      "for main loop functions when a main loop is not explicitly specified." },
+    { "main_depth",
+      (PyCFunction)pyglib_main_depth, METH_NOARGS,
+      "main_depth() -> stack depth\n"
+      "Returns the depth of the stack of calls in the main context." },
+    { "filename_display_name",
+      (PyCFunction)pyglib_filename_display_name, METH_VARARGS },
+    { "filename_display_basename",
+      (PyCFunction)pyglib_filename_display_basename, METH_VARARGS },
+    { "filename_from_utf8",
+      (PyCFunction)pyglib_filename_from_utf8, METH_VARARGS },
+    { "get_application_name",
+      (PyCFunction)pyglib_get_application_name, METH_NOARGS },
+    { "set_application_name",
+      (PyCFunction)pyglib_set_application_name, METH_O },
+    { "get_prgname",
+      (PyCFunction)pyglib_get_prgname, METH_NOARGS },
+    { "set_prgname",
+      (PyCFunction)pyglib_set_prgname, METH_O },
+    { "get_current_time",
+      (PyCFunction)pyglib_get_current_time, METH_NOARGS },
+    { "get_user_cache_dir",
+      (PyCFunction)pyglib_get_user_cache_dir, METH_NOARGS },
+    { "get_user_config_dir",
+      (PyCFunction)pyglib_get_user_config_dir, METH_NOARGS },
+    { "get_user_data_dir",
+      (PyCFunction)pyglib_get_user_data_dir, METH_NOARGS },
+    { "get_user_special_dir",
+      (PyCFunction)pyglib_get_user_special_dir, METH_VARARGS|METH_KEYWORDS },
+    { "markup_escape_text",
+      (PyCFunction)pyglib_markup_escape_text, METH_VARARGS|METH_KEYWORDS },
+    { "find_program_in_path",
+      (PyCFunction)pyglib_find_program_in_path, METH_VARARGS|METH_KEYWORDS },
+    { "uri_list_extract_uris",
+      (PyCFunction)pyglib_uri_list_extract_uris, METH_VARARGS|METH_KEYWORDS,
+      "uri_list_extract_uris(uri_list) -> tuple of strings holding URIs\n"
+      "Splits an string containing an URI list conforming to the \n"
+      "text/uri-list mime type defined in RFC 2483 into individual URIs, \n"
+      "discarding any comments. The URIs are not validated." },
+    { "get_system_config_dirs",
+      (PyCFunction)pyglib_get_system_config_dirs, METH_NOARGS },
+    { "get_system_data_dirs",
+      (PyCFunction)pyglib_get_system_data_dirs, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+/* ----------------- glib module initialisation -------------- */
+
+static struct _PyGLib_Functions pyglib_api = {
+    FALSE, /* threads_enabled */
+    NULL,  /* gerror_exception */
+    NULL,  /* block_threads */
+    NULL,  /* unblock_threads */
+    pyg_main_context_new,
+    pyg_option_context_new,
+    pyg_option_group_new,
+};
+
+static void
+pyglib_register_api(PyObject *d)
+{
+    PyObject *o;
+
+    /* for addon libraries ... */
+    PyDict_SetItemString(d, "_PyGLib_API",
+                        o=PYGLIB_CPointer_WrapPointer(&pyglib_api,"glib._PyGLib_API"));
+    Py_DECREF(o);
+    
+    pyglib_init_internal(o);
+}
+
+static void
+pyglib_register_error(PyObject *d)
+{
+    PyObject *dict;
+    PyObject *gerror_class;
+    dict = PyDict_New();
+    /* This is a hack to work around the deprecation warning of
+     * BaseException.message in Python 2.6+.
+     * GError has also an "message" attribute.
+     */
+    PyDict_SetItemString(dict, "message", Py_None);
+    gerror_class = PyErr_NewException("glib.GError", PyExc_RuntimeError, dict);
+    Py_DECREF(dict);
+
+    PyDict_SetItemString(d, "GError", gerror_class);
+    pyglib_api.gerror_exception = gerror_class;
+}
+
+static void
+pyglib_register_version_tuples(PyObject *d)
+{
+    PyObject *o;
+
+    /* glib version */
+    o = Py_BuildValue("(iii)", glib_major_version, glib_minor_version,
+                     glib_micro_version);
+    PyDict_SetItemString(d, "glib_version", o);
+    Py_DECREF(o);
+
+    /* pyglib version */
+    o = Py_BuildValue("(iii)",
+                     PYGLIB_MAJOR_VERSION,
+                     PYGLIB_MINOR_VERSION,
+                     PYGLIB_MICRO_VERSION);
+    PyDict_SetItemString(d, "pyglib_version", o);
+    Py_DECREF(o);
+}
+
+static void
+pyglib_register_constants(PyObject *m)
+{
+    PyModule_AddIntConstant(m, "SPAWN_LEAVE_DESCRIPTORS_OPEN",
+                           G_SPAWN_LEAVE_DESCRIPTORS_OPEN);
+    PyModule_AddIntConstant(m, "SPAWN_DO_NOT_REAP_CHILD",
+                           G_SPAWN_DO_NOT_REAP_CHILD);
+    PyModule_AddIntConstant(m, "SPAWN_SEARCH_PATH",
+                           G_SPAWN_SEARCH_PATH);
+    PyModule_AddIntConstant(m, "SPAWN_STDOUT_TO_DEV_NULL",
+                           G_SPAWN_STDOUT_TO_DEV_NULL);
+    PyModule_AddIntConstant(m, "SPAWN_STDERR_TO_DEV_NULL",
+                           G_SPAWN_STDERR_TO_DEV_NULL);
+    PyModule_AddIntConstant(m, "SPAWN_CHILD_INHERITS_STDIN",
+                           G_SPAWN_CHILD_INHERITS_STDIN);
+    PyModule_AddIntConstant(m, "SPAWN_FILE_AND_ARGV_ZERO",
+                           G_SPAWN_FILE_AND_ARGV_ZERO);
+
+    PyModule_AddIntConstant(m, "PRIORITY_HIGH",
+                           G_PRIORITY_HIGH);
+    PyModule_AddIntConstant(m, "PRIORITY_DEFAULT",
+                           G_PRIORITY_DEFAULT);
+    PyModule_AddIntConstant(m, "PRIORITY_HIGH_IDLE",
+                           G_PRIORITY_HIGH_IDLE);
+    PyModule_AddIntConstant(m, "PRIORITY_DEFAULT_IDLE",
+                           G_PRIORITY_DEFAULT_IDLE);
+    PyModule_AddIntConstant(m, "PRIORITY_LOW",
+                           G_PRIORITY_LOW);
+
+    PyModule_AddIntConstant(m, "IO_IN",   G_IO_IN);
+    PyModule_AddIntConstant(m, "IO_OUT",  G_IO_OUT);
+    PyModule_AddIntConstant(m, "IO_PRI",  G_IO_PRI);
+    PyModule_AddIntConstant(m, "IO_ERR",  G_IO_ERR);
+    PyModule_AddIntConstant(m, "IO_HUP",  G_IO_HUP);
+    PyModule_AddIntConstant(m, "IO_NVAL", G_IO_NVAL);
+
+    PyModule_AddIntConstant(m, "IO_STATUS_ERROR",
+                           G_IO_STATUS_ERROR);
+    PyModule_AddIntConstant(m, "IO_STATUS_NORMAL",
+                           G_IO_STATUS_NORMAL);
+    PyModule_AddIntConstant(m, "IO_STATUS_EOF",
+                           G_IO_STATUS_EOF);
+    PyModule_AddIntConstant(m, "IO_STATUS_AGAIN",
+                           G_IO_STATUS_AGAIN);
+    PyModule_AddIntConstant(m, "IO_FLAG_APPEND",
+                           G_IO_FLAG_APPEND);
+    PyModule_AddIntConstant(m, "IO_FLAG_NONBLOCK",
+                           G_IO_FLAG_NONBLOCK);
+    PyModule_AddIntConstant(m, "IO_FLAG_IS_READABLE",
+                           G_IO_FLAG_IS_READABLE);
+    PyModule_AddIntConstant(m, "IO_FLAG_IS_WRITEABLE",
+                           G_IO_FLAG_IS_WRITEABLE);
+    PyModule_AddIntConstant(m, "IO_FLAG_IS_SEEKABLE",
+                           G_IO_FLAG_IS_SEEKABLE);
+    PyModule_AddIntConstant(m, "IO_FLAG_MASK",
+                           G_IO_FLAG_MASK);
+    PyModule_AddIntConstant(m, "IO_FLAG_GET_MASK",
+                           G_IO_FLAG_GET_MASK);
+    PyModule_AddIntConstant(m, "IO_FLAG_SET_MASK",
+                           G_IO_FLAG_SET_MASK);
+
+    PyModule_AddIntConstant(m, "OPTION_FLAG_HIDDEN",
+                           G_OPTION_FLAG_HIDDEN);
+    PyModule_AddIntConstant(m, "OPTION_FLAG_IN_MAIN",
+                           G_OPTION_FLAG_IN_MAIN);
+    PyModule_AddIntConstant(m, "OPTION_FLAG_REVERSE",
+                           G_OPTION_FLAG_REVERSE);
+    PyModule_AddIntConstant(m, "OPTION_FLAG_NO_ARG",
+                           G_OPTION_FLAG_NO_ARG);
+    PyModule_AddIntConstant(m, "OPTION_FLAG_FILENAME",
+                           G_OPTION_FLAG_FILENAME);
+    PyModule_AddIntConstant(m, "OPTION_FLAG_OPTIONAL_ARG",
+                           G_OPTION_FLAG_OPTIONAL_ARG);
+    PyModule_AddIntConstant(m, "OPTION_FLAG_NOALIAS",
+                           G_OPTION_FLAG_NOALIAS); 
+
+    PyModule_AddIntConstant(m, "OPTION_ERROR_UNKNOWN_OPTION",
+                           G_OPTION_ERROR_UNKNOWN_OPTION);
+    PyModule_AddIntConstant(m, "OPTION_ERROR_BAD_VALUE",
+                           G_OPTION_ERROR_BAD_VALUE);
+    PyModule_AddIntConstant(m, "OPTION_ERROR_FAILED",
+                           G_OPTION_ERROR_FAILED);
+    PyModule_AddIntConstant(m, "USER_DIRECTORY_DESKTOP",
+                            G_USER_DIRECTORY_DESKTOP);
+    PyModule_AddIntConstant(m, "USER_DIRECTORY_DOCUMENTS",
+                            G_USER_DIRECTORY_DOCUMENTS);
+    PyModule_AddIntConstant(m, "USER_DIRECTORY_DOWNLOAD",
+                            G_USER_DIRECTORY_DOWNLOAD);
+    PyModule_AddIntConstant(m, "USER_DIRECTORY_MUSIC",
+                            G_USER_DIRECTORY_MUSIC);
+    PyModule_AddIntConstant(m, "USER_DIRECTORY_PICTURES",
+                            G_USER_DIRECTORY_PICTURES);
+    PyModule_AddIntConstant(m, "USER_DIRECTORY_PUBLIC_SHARE",
+                            G_USER_DIRECTORY_PUBLIC_SHARE);
+    PyModule_AddIntConstant(m, "USER_DIRECTORY_TEMPLATES",
+                            G_USER_DIRECTORY_TEMPLATES);
+    PyModule_AddIntConstant(m, "USER_DIRECTORY_VIDEOS",
+                            G_USER_DIRECTORY_VIDEOS);
+
+    PyModule_AddStringConstant(m, "OPTION_REMAINING",
+                              G_OPTION_REMAINING);
+    PyModule_AddStringConstant(m, "OPTION_ERROR",
+                              (char*) g_quark_to_string(G_OPTION_ERROR));
+}
+
+PYGLIB_MODULE_START(_glib, "glib._glib")
+{
+    PyObject *d = PyModule_GetDict(module);
+
+    pyglib_register_constants(module);
+    pyglib_register_api(d);
+    pyglib_register_error(d);
+    pyglib_register_version_tuples(d);
+    pyglib_iochannel_register_types(d);
+    pyglib_mainloop_register_types(d);
+    pyglib_maincontext_register_types(d);
+    pyglib_source_register_types(d);
+    pyglib_spawn_register_types(d);
+    pyglib_option_context_register_types(d);
+    pyglib_option_group_register_types(d);
+}
+PYGLIB_MODULE_END
diff --git a/glib/option.py b/glib/option.py
new file mode 100644 (file)
index 0000000..bdfbe1d
--- /dev/null
@@ -0,0 +1,358 @@
+# -*- Mode: Python -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2006  Johannes Hoelzl
+#
+#   glib/option.py: GOption command line parser
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+"""GOption command line parser
+
+Extends optparse to use the GOptionGroup, GOptionEntry and GOptionContext
+objects. So it is possible to use the gtk, gnome_program and gstreamer command
+line groups and contexts.
+
+Use this interface instead of the raw wrappers of GOptionContext and
+GOptionGroup in glib.
+"""
+
+import sys
+import optparse
+from optparse import OptParseError, OptionError, OptionValueError, \
+                     BadOptionError, OptionConflictError
+
+if sys.version_info >= (3, 0):
+    _basestring = str
+    _bytes = lambda s: s.encode()
+else:
+    _basestring = basestring
+    _bytes = str
+
+import glib
+_glib = sys.modules['glib._glib']
+
+__all__ = [
+    "OptParseError",
+    "OptionError",
+    "OptionValueError",
+    "BadOptionError",
+    "OptionConflictError",
+    "Option",
+    "OptionGroup",
+    "OptionParser",
+    "make_option",
+]
+
+class Option(optparse.Option):
+    """Represents a command line option
+
+    To use the extended possibilities of the GOption API Option
+    (and make_option) are extended with new types and attributes.
+
+    Types:
+        filename   The supplied arguments are read as filename, GOption
+                   parses this type in with the GLib filename encoding.
+
+    Attributes:
+        optional_arg  This does not need a arguement, but it can be supplied.
+        hidden        The help list does not show this option
+        in_main       This option apears in the main group, this should only
+                      be used for backwards compatibility.
+
+    Use Option.REMAINING as option name to get all positional arguments.
+
+    NOTE: Every argument to an option is passed as utf-8 coded string, the only
+          exception are options which use the 'filename' type, its arguments
+          are passed as strings in the GLib filename encoding.
+
+    For further help, see optparse.Option.
+    """
+    TYPES = optparse.Option.TYPES + (
+        'filename',
+    )
+
+    ATTRS = optparse.Option.ATTRS + [
+        'hidden',
+        'in_main',
+        'optional_arg',
+    ]
+
+    REMAINING = '--' + _glib.OPTION_REMAINING
+
+    def __init__(self, *args, **kwargs):
+        optparse.Option.__init__(self, *args, **kwargs)
+        if not self._long_opts:
+            raise ValueError("%s at least one long option name.")
+
+        if len(self._long_opts) < len(self._short_opts):
+            raise ValueError(
+                "%s at least more long option names than short option names.")
+
+        if not self.help:
+            raise ValueError("%s needs a help message.", self._long_opts[0])
+
+
+    def _set_opt_string(self, opts):
+        if self.REMAINING in opts:
+            self._long_opts.append(self.REMAINING)
+        optparse.Option._set_opt_string(self, opts)
+        if len(self._short_opts) > len(self._long_opts):
+            raise OptionError("goption.Option needs more long option names "
+                              "than short option names")
+
+    def _to_goptionentries(self):
+        flags = 0
+
+        if self.hidden:
+            flags |= _glib.OPTION_FLAG_HIDDEN
+
+        if self.in_main:
+            flags |= _glib.OPTION_FLAG_IN_MAIN
+
+        if self.takes_value():
+            if self.optional_arg:
+                flags |= _glib.OPTION_FLAG_OPTIONAL_ARG
+        else:
+            flags |= _glib.OPTION_FLAG_NO_ARG
+
+        if self.type == 'filename':
+            flags |= _glib.OPTION_FLAG_FILENAME
+
+        for (long_name, short_name) in zip(self._long_opts, self._short_opts):
+            yield (long_name[2:], _bytes(short_name[1]), flags, self.help, self.metavar)
+
+        for long_name in self._long_opts[len(self._short_opts):]:
+            yield (long_name[2:], _bytes('\0'), flags, self.help, self.metavar)
+
+class OptionGroup(optparse.OptionGroup):
+    """A group of command line options.
+
+    Arguements:
+       name:             The groups name, used to create the
+                         --help-{name} option
+       description:      Shown as title of the groups help view
+       help_description: Shown as help to the --help-{name} option
+       option_list:      The options used in this group, must be option.Option()
+       defaults:         A dicitionary of default values
+       translation_domain: Sets the translation domain for gettext().
+
+    NOTE: This OptionGroup does not exactly map the optparse.OptionGroup
+          interface. There is no parser object to supply, but it is possible
+          to set default values and option_lists. Also the default values and
+          values are not shared with the OptionParser.
+
+    To pass a OptionGroup into a function which expects a GOptionGroup (e.g.
+    gnome_program_init() ). OptionGroup.get_option_group() can be used.
+
+    For further help, see optparse.OptionGroup.
+    """
+    def __init__(self, name, description, help_description="",
+                 option_list=None, defaults=None,
+                 translation_domain=None):
+        optparse.OptionContainer.__init__(self, Option, 'error', description)
+        self.name = name
+        self.parser = None
+        self.help_description = help_description
+        if defaults:
+            self.defaults = defaults
+
+        self.values = None
+
+        self.translation_domain = translation_domain
+
+        if option_list:
+            for option in option_list:
+                self.add_option(option)
+
+    def _create_option_list(self):
+        self.option_list = []
+        self._create_option_mappings()
+
+    def _to_goptiongroup(self, parser):
+        def callback(option_name, option_value, group):
+            if option_name.startswith('--'):
+                opt = self._long_opt[option_name]
+            else:
+                opt = self._short_opt[option_name]
+
+            try:
+                opt.process(option_name, option_value, self.values, parser)
+            except OptionValueError:
+                error = sys.exc_info()[1]
+                gerror = _glib.GError(str(error))
+                gerror.domain = _glib.OPTION_ERROR
+                gerror.code = _glib.OPTION_ERROR_BAD_VALUE
+                gerror.message = str(error)
+                raise gerror
+
+        group = _glib.OptionGroup(self.name, self.description,
+                                    self.help_description, callback)
+        if self.translation_domain:
+            group.set_translation_domain(self.translation_domain)
+
+        entries = []
+        for option in self.option_list:
+            entries.extend(option._to_goptionentries())
+        group.add_entries(entries)
+
+        return group
+
+    def get_option_group(self, parser = None):
+        """ Returns the corresponding GOptionGroup object.
+
+        Can be used as parameter for gnome_program_init(), gtk_init().
+        """
+        self.set_values_to_defaults()
+        return self._to_goptiongroup(parser)
+
+    def set_values_to_defaults(self):
+        for option in self.option_list:
+            default = self.defaults.get(option.dest)
+            if isinstance(default, _basestring):
+                opt_str = option.get_opt_string()
+                self.defaults[option.dest] = option.check_value(
+                    opt_str, default)
+        self.values = optparse.Values(self.defaults)
+
+class OptionParser(optparse.OptionParser):
+    """Command line parser with GOption support.
+
+    NOTE: The OptionParser interface is not the exactly the same as the
+          optparse.OptionParser interface. Especially the usage parameter
+          is only used to show the metavar of the arguements.
+
+    Attribues:
+        help_enabled:           The --help, --help-all and --help-{group}
+                                options are enabled (default).
+        ignore_unknown_options: Do not throw a exception when a option is not
+                                knwon, the option will be in the result list.
+
+    OptionParser.add_option_group() does not only accept OptionGroup instances
+    but also glib.OptionGroup, which is returned by gtk_get_option_group().
+
+    Only glib.option.OptionGroup and glib.option.Option instances should
+    be passed as groups and options.
+
+    For further help, see optparse.OptionParser.
+    """
+
+    def __init__(self, *args, **kwargs):
+        if 'option_class' not in kwargs:
+            kwargs['option_class'] = Option
+        self.help_enabled = kwargs.pop('help_enabled', True)
+        self.ignore_unknown_options = kwargs.pop('ignore_unknown_options',
+                                                 False)
+        optparse.OptionParser.__init__(self, add_help_option=False,
+                                       *args, **kwargs)
+
+    def set_usage(self, usage):
+        if usage is None:
+            self.usage = ''
+        elif usage.startswith("%prog"):
+            self.usage = usage[len("%prog"):]
+        else:
+            self.usage = usage
+
+    def _to_goptioncontext(self, values):
+        if self.description:
+            parameter_string = self.usage + " - " + self.description
+        else:
+            parameter_string = self.usage
+        context = _glib.OptionContext(parameter_string)
+        context.set_help_enabled(self.help_enabled)
+        context.set_ignore_unknown_options(self.ignore_unknown_options)
+
+        for option_group in self.option_groups:
+            if isinstance(option_group, _glib.OptionGroup):
+                g_group = option_group
+            else:
+                g_group = option_group.get_option_group(self)
+            context.add_group(g_group)
+
+        def callback(option_name, option_value, group):
+            if option_name.startswith('--'):
+                opt = self._long_opt[option_name]
+            else:
+                opt = self._short_opt[option_name]
+            opt.process(option_name, option_value, values, self)
+
+        main_group = _glib.OptionGroup(None, None, None, callback)
+        main_entries = []
+        for option in self.option_list:
+            main_entries.extend(option._to_goptionentries())
+        main_group.add_entries(main_entries)
+        context.set_main_group(main_group)
+
+        return context
+
+    def add_option_group(self, *args, **kwargs):
+        if isinstance(args[0], _basestring):
+            optparse.OptionParser.add_option_group(self,
+                OptionGroup(self, *args, **kwargs))
+            return
+        elif len(args) == 1 and not kwargs:
+            if isinstance(args[0], OptionGroup):
+                if not args[0].parser:
+                    args[0].parser = self
+                if args[0].parser is not self:
+                    raise ValueError("invalid OptionGroup (wrong parser)")
+            if isinstance(args[0], _glib.OptionGroup):
+                self.option_groups.append(args[0])
+                return
+        optparse.OptionParser.add_option_group(self, *args, **kwargs)
+
+    def _get_all_options(self):
+        options = self.option_list[:]
+        for group in self.option_groups:
+            if isinstance(group, optparse.OptionGroup):
+                options.extend(group.option_list)
+        return options
+
+    def _process_args(self, largs, rargs, values):
+        context = self._to_goptioncontext(values)
+
+        # _process_args() returns the remaining parameters in rargs.
+        # The prepended program name is used to all g_set_prgname()
+        # The program name is cut away so it doesn't appear in the result.
+        rargs[:] = context.parse([sys.argv[0]] + rargs)[1:]
+
+    def parse_args(self, args=None, values=None):
+        old_args = args or []
+        try:
+            options, args = optparse.OptionParser.parse_args(
+                self, args, values)
+        except _glib.GError:
+            error = sys.exc_info()[1]
+            if error.domain != _glib.OPTION_ERROR:
+                raise
+            if error.code == _glib.OPTION_ERROR_BAD_VALUE:
+                raise OptionValueError(error.message)
+            elif error.code == _glib.OPTION_ERROR_UNKNOWN_OPTION:
+                raise BadOptionError(error.message)
+            elif error.code == _glib.OPTION_ERROR_FAILED:
+                raise OptParseError(error.message)
+            else:
+                raise
+
+        for group in self.option_groups:
+            for key, value in group.values.__dict__.items():
+                options.ensure_value(key, value)
+
+        args = args[2:-len(old_args)]
+        return options, args
+
+make_option = Option
diff --git a/glib/pygiochannel.c b/glib/pygiochannel.c
new file mode 100644 (file)
index 0000000..f7e2bc4
--- /dev/null
@@ -0,0 +1,764 @@
+/* -*- Mode: C; c-basic-offset: 4 -*- */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <Python.h>
+#include <pythread.h>
+#include <structmember.h> /* for PyMemberDef */
+
+#include "pyglib.h"
+#include "pyglib-private.h"
+#include "pygsource.h"
+
+typedef struct {
+    PyObject_HEAD
+    GIOChannel *channel;
+    int softspace;         /* to make print >> chan, "foo" ... work */
+} PyGIOChannel;
+
+PYGLIB_DEFINE_TYPE("glib.IOChannel", PyGIOChannel_Type, PyGIOChannel)
+
+static PyObject*
+py_io_channel_next(PyGIOChannel *self)
+{
+    PyObject* ret_obj = NULL;
+    gsize length = 0, terminator_pos;
+    gchar *str_return = NULL;
+    GError *error = NULL;
+    GIOStatus status;
+
+    status = g_io_channel_read_line(self->channel, &str_return, &length,
+                                    &terminator_pos, &error);
+    if (pyglib_error_check(&error))
+        return NULL;
+
+    if (status == G_IO_STATUS_EOF) {
+        PyErr_SetString(PyExc_StopIteration, "EOF");
+        return NULL;
+    }
+
+    ret_obj = PYGLIB_PyUnicode_FromStringAndSize(str_return, length);
+    g_free(str_return);
+    return ret_obj;
+}
+
+static PyObject*
+py_io_channel_richcompare(PyObject *self, PyObject *other, int op)
+{
+    if (Py_TYPE(self) == Py_TYPE(other) && 
+          Py_TYPE(self) == &PyGIOChannel_Type) {
+        return _pyglib_generic_ptr_richcompare(((PyGIOChannel*)self)->channel,
+                                               ((PyGIOChannel*)other)->channel,
+                                               op);
+    } else {
+       Py_INCREF(Py_NotImplemented);
+       return Py_NotImplemented;
+    }
+}
+
+static PyObject*
+py_io_channel_get_iter(PyObject *self)
+{
+    Py_INCREF(self);
+    return self;
+}
+
+static long
+py_io_channel_hash(PyGIOChannel *self)
+{
+    return (long) self->channel;
+}
+
+static void
+py_io_channel_dealloc(PyGIOChannel *self)
+{
+    if (self->channel)
+        g_io_channel_unref(self->channel);
+    PyObject_DEL(self);
+}
+
+static PyObject*
+py_io_channel_shutdown(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "flush", NULL };
+    GIOStatus ret;
+    PyObject* flush = Py_True;
+    GError* error = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:glib.IOChannel.shutdown", kwlist, &flush))
+        return NULL;
+       
+    ret = g_io_channel_shutdown(self->channel, PyObject_IsTrue(flush), &error);
+    if (pyglib_error_check(&error))
+       return NULL;
+       
+    return PYGLIB_PyLong_FromLong(ret);
+}
+
+/* character encoding conversion involved functions.
+ */
+static PyObject*
+py_io_channel_set_buffer_size(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "size", NULL };
+    int size;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:glib.IOChannel.set_buffer_size", kwlist, &size))
+        return NULL;
+       
+    g_io_channel_set_buffer_size(self->channel, size);
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject*
+py_io_channel_get_buffer_size(PyGIOChannel* self)
+{
+    return PYGLIB_PyLong_FromLong(g_io_channel_get_buffer_size(self->channel));
+}
+
+static PyObject*
+py_io_channel_set_buffered(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "buffered", NULL };
+    int buffered;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:glib.IOChannel.set_buffered", kwlist, &buffered))
+        return NULL;
+       
+    g_io_channel_set_buffered(self->channel, buffered);
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject*
+py_io_channel_get_buffered(PyGIOChannel* self)
+{
+    return PYGLIB_PyLong_FromLong(g_io_channel_get_buffered(self->channel));
+}
+
+static PyObject*
+py_io_channel_set_encoding(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "encoding", NULL };
+    const char* encoding;
+    GError* error = NULL;
+    
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "z:glib.IOChannel.set_encoding", kwlist, &encoding))
+        return NULL;
+    
+    g_io_channel_set_encoding(self->channel, encoding, &error);
+    if (pyglib_error_check(&error))
+       return NULL;
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject*
+py_io_channel_get_encoding(PyGIOChannel* self)
+{
+    const char* encoding = g_io_channel_get_encoding(self->channel);
+    
+    if (encoding == NULL) {
+       Py_INCREF(Py_None);
+       return Py_None;
+    }
+
+    return PYGLIB_PyUnicode_FromString(encoding);
+}
+
+#define CHUNK_SIZE (8 * 1024)
+
+static PyObject*
+py_io_channel_read_chars(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "max_count", NULL };
+    int max_count = -1;
+    PyObject* ret_obj = NULL;
+    gsize total_read = 0;
+    GError* error = NULL;
+    GIOStatus status = G_IO_STATUS_NORMAL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:glib.IOChannel.read", kwlist, &max_count))
+        return NULL;
+       
+    if (max_count == 0)
+       return PYGLIB_PyUnicode_FromString("");
+    
+    while (status == G_IO_STATUS_NORMAL
+          && (max_count == -1 || total_read < max_count)) {
+       gsize single_read;
+       char* buf;
+       gsize buf_size;
+       
+       if (max_count == -1) 
+           buf_size = CHUNK_SIZE;
+       else {
+           buf_size = max_count - total_read;
+           if (buf_size > CHUNK_SIZE)
+               buf_size = CHUNK_SIZE;
+        }
+       
+       if ( ret_obj == NULL ) {
+           ret_obj = PYGLIB_PyBytes_FromStringAndSize((char *)NULL, buf_size);
+           if (ret_obj == NULL)
+               goto failure;
+       }
+       else if (buf_size + total_read > PYGLIB_PyBytes_Size(ret_obj)) {
+           if (PYGLIB_PyBytes_Resize(&ret_obj, buf_size + total_read) == -1)
+               goto failure;
+       }
+       
+        buf = PYGLIB_PyBytes_AsString(ret_obj) + total_read;
+
+        pyglib_unblock_threads();
+        status = g_io_channel_read_chars(self->channel, buf, buf_size, 
+                                         &single_read, &error);
+        pyglib_block_threads();
+       if (pyglib_error_check(&error))
+           goto failure;
+       
+       total_read += single_read;
+    }
+       
+    if ( total_read != PYGLIB_PyBytes_Size(ret_obj) ) {
+       if (PYGLIB_PyBytes_Resize(&ret_obj, total_read) == -1)
+           goto failure;
+    }
+
+#if PY_VERSION_HEX >= 0x03000000
+    /* If this is not UTF8 encoded channel return the raw bytes */
+    if (g_io_channel_get_encoding(self->channel) != NULL)
+        return ret_obj;
+
+    /* convert to Unicode string */
+    {
+       PyObject *unicode_obj;
+
+       unicode_obj = PyUnicode_FromString(PyBytes_AS_STRING(ret_obj));
+       if (unicode_obj == NULL)
+           goto failure;
+       Py_DECREF(ret_obj);
+       ret_obj = unicode_obj;
+    }
+#endif
+
+    return ret_obj;
+
+  failure:
+    Py_XDECREF(ret_obj);
+    return NULL;
+}
+
+static PyObject*
+py_io_channel_write_chars(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "buf", NULL };
+    const char* buf;
+    Py_ssize_t buf_len;
+    gsize count;
+    GError* error = NULL;
+    GIOStatus status;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#:glib.IOChannel.write",
+                                     kwlist, &buf, &buf_len))
+        return NULL;
+       
+    pyglib_unblock_threads();
+    status = g_io_channel_write_chars(self->channel, buf, buf_len, &count, &error);
+    pyglib_block_threads();
+    if (pyglib_error_check(&error))
+       return NULL;
+       
+    return PYGLIB_PyLong_FromLong(count);
+}
+
+static PyObject*
+py_io_channel_write_lines(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "lines", NULL };
+    char *buf;
+    Py_ssize_t buf_len;
+    gsize count;
+    GError* error = NULL;
+    GIOStatus status;
+    PyObject *iter, *value, *pylines;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:glib.IOChannel.writelines",
+                                     kwlist, &pylines))
+        return NULL;
+
+    iter = PyObject_GetIter(pylines);
+    
+    while (1) {
+        value = PyIter_Next(iter);
+        if (PyErr_ExceptionMatches(PyExc_StopIteration)) {
+            PyErr_Clear();
+            goto normal_exit;
+        }
+        if (!PYGLIB_PyUnicode_Check(value)) {
+            PyErr_SetString(PyExc_TypeError, "glib.IOChannel.writelines must"
+                            " be sequence/iterator of strings");
+            Py_DECREF(iter);
+            return NULL;
+        }
+        PYGLIB_PyUnicode_AsStringAndSize(value, &buf, &buf_len);
+        pyglib_unblock_threads();
+        status = g_io_channel_write_chars(self->channel, buf, buf_len, &count, &error);
+        pyglib_unblock_threads();
+        Py_DECREF(value);
+        if (pyglib_error_check(&error)) {
+            Py_DECREF(iter);
+            return NULL;
+        }
+    }
+normal_exit:
+    Py_DECREF(iter);
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject*
+py_io_channel_flush(PyGIOChannel* self)
+{
+    GError* error = NULL;
+    GIOStatus status;
+       
+    pyglib_unblock_threads();
+    status = g_io_channel_flush(self->channel, &error);
+    pyglib_block_threads();
+    if (pyglib_error_check(&error))
+       return NULL;
+       
+    return PYGLIB_PyLong_FromLong(status);
+}
+
+static PyObject*
+py_io_channel_set_flags(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "flags", NULL };
+    GIOFlags flags;
+    GIOStatus status;
+    GError* error = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:glib.IOChannel.set_flags",
+                                     kwlist, &flags))
+        return NULL;
+       
+    status = g_io_channel_set_flags(self->channel, flags, &error);
+    if (pyglib_error_check(&error))
+       return NULL;
+       
+    return PYGLIB_PyLong_FromLong(status);
+}
+
+static PyObject*
+py_io_channel_get_flags(PyGIOChannel* self)
+{
+    return PYGLIB_PyLong_FromLong(g_io_channel_get_flags(self->channel));
+}
+
+static PyObject*
+py_io_channel_get_buffer_condition(PyGIOChannel* self)
+{
+    return PYGLIB_PyLong_FromLong(g_io_channel_get_buffer_condition(self->channel));
+}
+
+static PyObject*
+py_io_channel_set_close_on_unref(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "do_close", NULL };
+    PyObject *do_close;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:glib.IOChannel.set_close_on_unref",
+                                     kwlist, &do_close))
+        return NULL;
+       
+    g_io_channel_set_close_on_unref(self->channel, PyObject_IsTrue(do_close));
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject*
+py_io_channel_get_close_on_unref(PyGIOChannel* self)
+{
+    if (g_io_channel_get_close_on_unref(self->channel)) {
+        Py_INCREF(Py_True);
+        return Py_True;
+    } else {
+        Py_INCREF(Py_False);
+        return Py_False;
+    }
+}
+
+typedef struct {
+    PyObject *callback;
+    PyObject *iochannel;
+    PyObject *user_data;
+} PyGIOWatchData;
+
+static void
+pyg_iowatch_data_free(PyGIOWatchData *data)
+{
+    Py_DECREF(data->callback);
+    Py_XDECREF(data->user_data);
+    Py_DECREF(data->iochannel);
+    g_slice_free(PyGIOWatchData, data);
+}
+
+static gboolean
+pyg_iowatch_marshal(GIOChannel *source,
+                    GIOCondition condition,
+                    gpointer user_data)
+{
+    PyObject *ret;
+    gboolean res;
+    PyGIOWatchData *data = (PyGIOWatchData *) user_data;
+    PyGILState_STATE state;
+
+    g_return_val_if_fail(user_data != NULL, FALSE);
+    g_return_val_if_fail(((PyGIOChannel *) data->iochannel)->channel == source,
+                         FALSE);
+
+    state = pyglib_gil_state_ensure();
+
+    if (data->user_data)
+        ret = PyObject_CallFunction(data->callback, "OiO", data->iochannel,
+                                    condition, data->user_data);
+    else
+        ret = PyObject_CallFunction(data->callback, "Oi", data->iochannel,
+                                    condition);
+
+    if (!ret) {
+       PyErr_Print();
+       res = FALSE;
+    } else {
+       res = PyObject_IsTrue(ret);
+       Py_DECREF(ret);
+    }
+    pyglib_gil_state_release(state);
+
+    return res;
+}
+
+
+
+static PyObject *
+py_io_channel_add_watch(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "condition", "callback", "user_data", "priority", NULL };
+    PyObject *callback, *user_data = NULL;
+    int priority = G_PRIORITY_DEFAULT, condition;
+    GIOChannel *iochannel = NULL;
+    guint handler_id;
+    PyGIOWatchData *data;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "iO|Oi:glib.IOChannel.add_watch",
+                                     kwlist, &condition, &callback,
+                                     &user_data, &priority))
+        return NULL;
+
+    iochannel = ((PyGIOChannel *) self)->channel;
+
+    if (!PyCallable_Check(callback)) {
+        PyErr_SetString(PyExc_TypeError, "second must be callable");
+        return NULL;
+    }
+
+    data = g_slice_new(PyGIOWatchData);
+    data->callback = callback; Py_INCREF(callback);
+    data->user_data = user_data; Py_XINCREF(user_data);
+    data->iochannel = self; Py_INCREF(self);
+
+    handler_id = g_io_add_watch_full(((PyGIOChannel *) self)->channel,
+                                     priority, condition,
+                                    pyg_iowatch_marshal, data,
+                                    (GDestroyNotify) pyg_iowatch_data_free);
+    return PyLong_FromUnsignedLong(handler_id);
+}
+
+
+#ifdef G_OS_WIN32
+
+static PyObject *
+py_io_channel_win32_poll(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "fds", "timeout", NULL };
+    GPollFD *pollfd;
+    PyObject *pyfds, *pyfd;
+    guint len, i;
+    gint timeout = -1;
+    gint result;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O!|i:glib.IOChannel.win32_poll",
+                                     kwlist, &PyList_Type, &pyfds, &timeout))
+        return NULL;
+
+    len = PyList_Size(pyfds);
+    pollfd = g_newa(GPollFD, len);
+    for (i = 0; i < len; ++i) {
+        pyfd = PyList_GET_ITEM(pyfds, i);
+        if (!PyObject_TypeCheck(pyfd, &PyGPollFD_Type)) {
+            PyErr_SetString(PyExc_TypeError, "'fds' must be a list of glib.PollFD objects");
+            return NULL;
+        }
+        pollfd[i] = ((PyGPollFD *) pyfd)->pollfd;
+    }
+
+    result = g_io_channel_win32_poll(pollfd, len, timeout);
+    for (i = 0; i < len; ++i) {
+        pyfd = PyList_GET_ITEM(pyfds, i);
+        ((PyGPollFD *) pyfd)->pollfd = pollfd[i];
+    }
+    return PYGLIB_PyLong_FromLong(result);
+}
+
+static PyObject *
+py_io_channel_win32_make_pollfd(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "condition", NULL };
+    int condition;
+    GPollFD pollfd;
+    PyGPollFD *pypollfd;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "i:glib.IOChannel.win32_make_pollfd",
+                                     kwlist, &condition))
+        return NULL;
+
+    g_io_channel_win32_make_pollfd(((PyGIOChannel *) self)->channel,
+                                   condition, &pollfd);
+    pypollfd = PyObject_NEW(PyGPollFD, &PyGPollFD_Type);
+    pypollfd->pollfd = pollfd;
+    return (PyObject *) pypollfd;
+}
+#endif /* def G_OS_WIN32 */
+
+
+static PyObject*
+py_io_channel_read_line(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "size", NULL };
+    PyObject* ret_obj = NULL;
+    gsize length = 0, terminator_pos;
+    gchar *str_return = NULL;
+    GError *error = NULL;
+    gint size_hint = -1;
+    GIOStatus status;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:glib.IOChannel.readline", kwlist,
+                                     &size_hint))
+        return NULL;
+
+    status = g_io_channel_read_line(self->channel, &str_return, &length,
+                                    &terminator_pos, &error);
+    if (pyglib_error_check(&error))
+        return NULL;
+    ret_obj = PYGLIB_PyUnicode_FromStringAndSize(str_return, length);
+    g_free(str_return);
+    return ret_obj;
+}
+
+static PyObject*
+py_io_channel_read_lines(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "size", NULL };
+    PyObject *line = NULL;
+    gsize length = 0, terminator_pos;
+    gchar *str_return = NULL;
+    GError *error = NULL;
+    gint size_hint = -1;
+    GIOStatus status = G_IO_STATUS_NORMAL;
+    PyObject *list;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:glib.IOChannel.readlines", kwlist,
+                                     &size_hint))
+        return NULL;
+
+    list = PyList_New(0);
+    while (status == G_IO_STATUS_NORMAL) {
+        status = g_io_channel_read_line(self->channel, &str_return, &length,
+                                        &terminator_pos, &error);
+        if (pyglib_error_check(&error)) {
+            Py_DECREF(line);
+            return NULL;
+        }
+        line = PYGLIB_PyUnicode_FromStringAndSize(str_return, length);
+        g_free(str_return);
+        if (PyList_Append(list, line)) {
+            Py_DECREF(line);
+            Py_DECREF(list);
+            return NULL;
+        }
+    }
+    return list;
+}
+
+
+static PyObject*
+py_io_channel_seek(PyGIOChannel* self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "offset", "whence", NULL };
+    gint64 offset;
+    int whence = 0;
+    GIOStatus status;
+    GSeekType seek_type;
+    GError* error = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "L|i:glib.IOChannel.seek",
+                                     kwlist, &offset, &whence))
+        return NULL;
+
+    switch (whence)
+    {
+    case 0: seek_type = G_SEEK_SET; break;
+    case 1: seek_type = G_SEEK_CUR; break;
+    case 2: seek_type = G_SEEK_END; break;
+    default:
+        PyErr_SetString(PyExc_ValueError, "invalid 'whence' value");
+        return NULL;
+    }
+       
+    status = g_io_channel_seek_position(self->channel, offset,
+                                        seek_type, &error);
+    if (pyglib_error_check(&error))
+       return NULL;
+       
+    return PYGLIB_PyLong_FromLong(status);
+}
+
+#if 0 // Not wrapped
+void                  g_io_channel_set_line_term        (GIOChannel   *channel,
+                                                        const gchar  *line_term,
+                                                        gint          length);
+
+G_CONST_RETURN gchar* g_io_channel_get_line_term        (GIOChannel   *channel,
+                                                        gint         *length);
+
+
+
+GIOStatus   g_io_channel_read_line_string (GIOChannel   *channel,
+                                          GString      *buffer,
+                                          gsize        *terminator_pos,
+                                          GError      **error);
+GIOStatus   g_io_channel_read_to_end      (GIOChannel   *channel,
+                                          gchar       **str_return,
+                                          gsize        *length,
+                                          GError      **error);
+GIOStatus   g_io_channel_read_unichar     (GIOChannel   *channel,
+                                          gunichar     *thechar,
+                                          GError      **error);
+GIOStatus   g_io_channel_write_unichar    (GIOChannel   *channel,
+                                          gunichar      thechar,
+                                          GError      **error);
+#endif // Not wrapped
+
+static PyMemberDef py_io_channel_members[] = {
+    { "softspace", T_INT, offsetof(PyGIOChannel, softspace), 0, NULL },
+    { NULL, 0, 0, 0, NULL }
+};
+
+static PyMethodDef py_io_channel_methods[] = {
+    { "close", (PyCFunction)py_io_channel_shutdown, METH_VARARGS|METH_KEYWORDS },
+    { "flush", (PyCFunction)py_io_channel_flush, METH_NOARGS },
+    { "set_encoding", (PyCFunction)py_io_channel_set_encoding, METH_VARARGS|METH_KEYWORDS },
+    { "get_encoding", (PyCFunction)py_io_channel_get_encoding, METH_NOARGS },
+    { "set_buffered", (PyCFunction)py_io_channel_set_buffered, METH_VARARGS|METH_KEYWORDS },
+    { "get_buffered", (PyCFunction)py_io_channel_get_buffered, METH_NOARGS },
+    { "set_buffer_size", (PyCFunction)py_io_channel_set_buffer_size, METH_VARARGS|METH_KEYWORDS },
+    { "get_buffer_size", (PyCFunction)py_io_channel_get_buffer_size, METH_NOARGS },
+    { "read", (PyCFunction)py_io_channel_read_chars, METH_VARARGS|METH_KEYWORDS },
+    { "readline", (PyCFunction)py_io_channel_read_line, METH_VARARGS|METH_KEYWORDS },
+    { "readlines", (PyCFunction)py_io_channel_read_lines, METH_VARARGS|METH_KEYWORDS },
+    { "write", (PyCFunction)py_io_channel_write_chars, METH_VARARGS|METH_KEYWORDS },
+    { "writelines", (PyCFunction)py_io_channel_write_lines, METH_VARARGS|METH_KEYWORDS },
+    { "set_flags", (PyCFunction)py_io_channel_set_flags, METH_VARARGS|METH_KEYWORDS },
+    { "get_flags", (PyCFunction)py_io_channel_get_flags, METH_NOARGS },
+    { "get_buffer_condition", (PyCFunction)py_io_channel_get_buffer_condition, METH_NOARGS },
+    { "set_close_on_unref", (PyCFunction)py_io_channel_set_close_on_unref, METH_VARARGS | METH_KEYWORDS },
+    { "get_close_on_unref", (PyCFunction)py_io_channel_get_close_on_unref, METH_NOARGS },
+    { "add_watch", (PyCFunction)py_io_channel_add_watch, METH_VARARGS|METH_KEYWORDS },
+    { "seek", (PyCFunction)py_io_channel_seek, METH_VARARGS|METH_KEYWORDS },
+#ifdef G_OS_WIN32
+    { "win32_make_pollfd", (PyCFunction)py_io_channel_win32_make_pollfd, METH_VARARGS | METH_KEYWORDS },
+    { "win32_poll", (PyCFunction)py_io_channel_win32_poll, METH_VARARGS|METH_KEYWORDS|METH_STATIC },
+#endif
+    { NULL, NULL, 0 }
+};
+
+
+static int
+py_io_channel_init(PyGIOChannel *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "filedes", "filename", "mode",
+#ifdef G_OS_WIN32
+                              "hwnd",
+#endif
+                              NULL };
+    int fd = -1;
+    char *mode = "r", *filename = NULL;
+    GError *error = NULL;
+#ifdef G_OS_WIN32
+    guint hwnd = 0;
+#endif
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iss"
+#ifdef G_OS_WIN32
+                                     "I"
+#endif
+                                     ":glib.IOChannel.__init__",
+                                     kwlist, &fd, &filename, &mode
+#ifdef G_OS_WIN32
+                                     , &hwnd
+#endif
+            ))
+        return -1;
+
+    if (fd != -1)
+        self->channel = g_io_channel_unix_new(fd);
+    else if (filename != NULL) {
+        self->channel = g_io_channel_new_file(filename, mode, &error);
+        if (pyglib_error_check(&error))
+            return -1;
+    }
+#ifdef G_OS_WIN32
+    else if (hwnd != 0) {
+        self->channel = g_io_channel_win32_new_messages(hwnd);
+    }
+#endif
+    else {
+#ifdef G_OS_WIN32
+        PyErr_SetString(PyExc_TypeError, "either a valid file descriptor, "
+                        "file name, or window handle must be supplied");
+#else
+        PyErr_SetString(PyExc_TypeError, "either a valid file descriptor "
+                        "or file name must be supplied");
+#endif
+        return -1;
+    }
+    return 0;
+}
+
+void
+pyglib_iochannel_register_types(PyObject *d)
+{
+    PyGIOChannel_Type.tp_init = (initproc)py_io_channel_init;
+    PyGIOChannel_Type.tp_dealloc = (destructor)py_io_channel_dealloc;
+    PyGIOChannel_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+    PyGIOChannel_Type.tp_members = py_io_channel_members;
+    PyGIOChannel_Type.tp_methods = py_io_channel_methods;
+    PyGIOChannel_Type.tp_hash = (hashfunc)py_io_channel_hash;
+    PyGIOChannel_Type.tp_richcompare = (richcmpfunc)py_io_channel_richcompare;
+    PyGIOChannel_Type.tp_iter = (getiterfunc)py_io_channel_get_iter;
+    PyGIOChannel_Type.tp_iternext = (iternextfunc)py_io_channel_next;
+
+    PYGLIB_REGISTER_TYPE(d, PyGIOChannel_Type, "IOChannel");
+}
diff --git a/glib/pygiochannel.h b/glib/pygiochannel.h
new file mode 100644 (file)
index 0000000..9b03edd
--- /dev/null
@@ -0,0 +1,29 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_IOCHANNEL_H__
+#define __PYG_IOCHANNEL_H__
+
+extern PyTypeObject PyGIOChannel_Type;
+
+void pyglib_iochannel_register_types(PyObject *d);
+
+#endif /* __PYG_IOCHANNEL_H__ */
diff --git a/glib/pyglib-private.h b/glib/pyglib-private.h
new file mode 100644 (file)
index 0000000..183184f
--- /dev/null
@@ -0,0 +1,49 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGLIB_PRIVATE_H__
+#define __PYGLIB_PRIVATE_H__
+
+#include <Python.h>
+#include <glib.h>
+
+#include <pyglib-python-compat.h>
+
+G_BEGIN_DECLS
+
+struct _PyGLib_Functions {
+    gboolean threads_enabled;
+    PyObject *gerror_exception;
+    PyGLibThreadBlockFunc block_threads;
+    PyGLibThreadBlockFunc unblock_threads;
+    PyObject* (*main_context_new)(GMainContext *context);
+    PyObject* (*option_context_new)(GOptionContext *context);
+    PyObject* (*option_group_new)(GOptionGroup *group);
+};
+
+gboolean _pyglib_handler_marshal(gpointer user_data);
+void _pyglib_destroy_notify(gpointer user_data);
+
+G_END_DECLS
+
+#endif /* __PYGLIB_PRIVATE_H__ */
+
+
diff --git a/glib/pyglib-python-compat.h b/glib/pyglib-python-compat.h
new file mode 100644 (file)
index 0000000..8c1dd51
--- /dev/null
@@ -0,0 +1,245 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGLIB_PYTHON_COMPAT_H__
+#define __PYGLIB_PYTHON_COMPAT_H__
+
+/* Python 2.3 does not define Py_CLEAR */
+#ifndef Py_CLEAR
+#define Py_CLEAR(op)                \
+        do {                                \
+                if (op) {           \
+                        PyObject *tmp = (PyObject *)(op);   \
+                        (op) = NULL;        \
+                        Py_DECREF(tmp);     \
+                }               \
+        } while (0)
+#endif
+
+/* Compilation on Python 2.4 */
+#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;
+#endif
+
+/* PyCObject superceded by PyCapsule on Python >= 2.7
+ * However since this effects header files used by
+ * static bindings we are only applying the change to
+ * Python 3.x where we don't support the static bindings.
+ * 3.2 removed PyCObject so we don't have any choice here.
+ *
+ * There is talk upstream of undeprecating PyCObject
+ * (at least where the 2.x branch is concerned)
+ * and there is no danger of it being remove from 2.7.
+ **/
+#if PY_VERSION_HEX >= 0x03000000
+# define PYGLIB_CPointer_Check PyCapsule_CheckExact
+# define PYGLIB_CPointer_WrapPointer(ptr, typename) \
+    PyCapsule_New(ptr, typename, NULL)
+# define PYGLIB_CPointer_GetPointer(obj, typename) \
+    PyCapsule_GetPointer(obj, typename)
+# define PYGLIB_CPointer_Import(module, symbol) \
+    PyCapsule_Import(##module##.##symbol##, FALSE)
+#else
+# define PYGLIB_CPointer_Check PyCObject_Check
+# define PYGLIB_CPointer_WrapPointer(ptr, typename) \
+    PyCObject_FromVoidPtr(ptr, NULL)
+# define PYGLIB_CPointer_GetPointer(obj, typename) \
+  PyCObject_AsVoidPtr(obj)
+# define PYGLIB_CPointer_Import(module, symbol) \
+    PyCObject_Import(module, symbol)
+#endif
+
+#if PY_VERSION_HEX < 0x03000000
+
+#define PYGLIB_INIT_FUNCTION(modname, fullpkgname, functions) \
+static int _pyglib_init_##modname(PyObject *module); \
+void init##modname(void) \
+{ \
+    PyObject *module = Py_InitModule(fullpkgname, functions); \
+    _pyglib_init_##modname(module); \
+} \
+static int _pyglib_init_##modname(PyObject *module)
+
+#else
+
+#define PYGLIB_INIT_FUNCTION(modname, fullpkgname, functions) \
+static struct PyModuleDef _##modname##module = {     \
+    PyModuleDef_HEAD_INIT,                              \
+    fullpkgname,                                        \
+    NULL,                                               \
+    -1,                                                 \
+    functions,                                          \
+    NULL,                                               \
+    NULL,                                               \
+    NULL,                                               \
+    NULL                                                \
+};                                                      \
+static int _pyglib_init_##modname(PyObject *module); \
+PyObject *PyInit_##modname(void) \
+{ \
+    PyObject *module = PyModule_Create(&_##modname##module);  \
+    if (module == NULL) \
+       return NULL; \
+    if (_pyglib_init_##modname(module) != 0 ) {\
+       Py_DECREF(module); \
+       return NULL; \
+    } \
+    return module; \
+} \
+static int _pyglib_init_##modname(PyObject *module)
+
+#endif
+
+/* Compilation on Python 2.x */
+#if PY_VERSION_HEX < 0x03000000
+#define PYGLIB_MODULE_ERROR_RETURN
+
+#define RO READONLY
+
+#define PYGLIB_PyBaseString_Check(ob) (PyString_Check(ob) || PyUnicode_Check(ob))
+
+#define PYGLIB_PyUnicode_Check PyString_Check
+#define PYGLIB_PyUnicode_AsString PyString_AsString
+#define PYGLIB_PyUnicode_AsStringAndSize PyString_AsStringAndSize
+#define PYGLIB_PyUnicode_FromString PyString_FromString
+#define PYGLIB_PyUnicode_FromStringAndSize PyString_FromStringAndSize
+#define PYGLIB_PyUnicode_FromFormat PyString_FromFormat
+#define PYGLIB_PyUnicode_AS_STRING PyString_AS_STRING
+#define PYGLIB_PyUnicode_GET_SIZE PyString_GET_SIZE
+#define PYGLIB_PyUnicode_Type PyString_Type
+
+#define PYGLIB_PyBytes_FromString PyString_FromString
+#define PYGLIB_PyBytes_FromStringAndSize PyString_FromStringAndSize
+#define PYGLIB_PyBytes_Resize _PyString_Resize
+#define PYGLIB_PyBytes_AsString PyString_AsString
+#define PYGLIB_PyBytes_Size PyString_Size
+#define PYGLIB_PyBytes_Check PyString_Check
+
+#define PYGLIB_PyLong_Check PyInt_Check
+#define PYGLIB_PyLong_FromLong PyInt_FromLong
+#define PYGLIB_PyLong_FromSsize_t PyInt_FromSsize_t
+#define PYGLIB_PyLong_FromSize_t PyInt_FromSize_t
+#define PYGLIB_PyLong_AsLong  PyInt_AsLong
+#define PYGLIB_PyLongObject PyIntObject
+#define PYGLIB_PyLong_Type PyInt_Type
+#define PYGLIB_PyLong_AS_LONG PyInt_AS_LONG
+#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
+
+#define PYGLIB_PyNumber_Long PyNumber_Int
+
+#ifndef PyVarObject_HEAD_INIT
+#define PyVarObject_HEAD_INIT(base, size) \
+  PyObject_HEAD_INIT(base) \
+  size,
+#endif
+
+#define PYGLIB_MODULE_START(symbol, modname)           \
+DL_EXPORT(void) init##symbol(void)                     \
+{                                                       \
+    PyObject *module;                                   \
+    module = Py_InitModule(modname, symbol##_functions);
+#define PYGLIB_MODULE_END }
+#define PYGLIB_DEFINE_TYPE(typename, symbol, csymbol)  \
+PyTypeObject symbol = {                                 \
+    PyObject_HEAD_INIT(NULL)                            \
+    0,                                                  \
+    typename,                                          \
+    sizeof(csymbol),                                    \
+    0,                                                  \
+};
+#define PYGLIB_REGISTER_TYPE(d, type, name)            \
+    if (!type.tp_alloc)                                 \
+       type.tp_alloc = PyType_GenericAlloc;            \
+    if (!type.tp_new)                                   \
+       type.tp_new = PyType_GenericNew;                \
+    if (PyType_Ready(&type))                            \
+       return;                                         \
+    PyDict_SetItemString(d, name, (PyObject *)&type);
+
+#else
+
+#define PYGLIB_MODULE_ERROR_RETURN 0
+
+#define PYGLIB_MODULE_START(symbol, modname)           \
+    static struct PyModuleDef _##symbol##module = {     \
+    PyModuleDef_HEAD_INIT,                              \
+    modname,                                            \
+    NULL,                                               \
+    -1,                                                 \
+    symbol##_functions,                                 \
+    NULL,                                               \
+    NULL,                                               \
+    NULL,                                               \
+    NULL                                                \
+};                                                      \
+PyMODINIT_FUNC PyInit_##symbol(void)                    \
+{                                                       \
+    PyObject *module;                                   \
+    module = PyModule_Create(&_##symbol##module);
+#define PYGLIB_MODULE_END return module; }
+#define PYGLIB_DEFINE_TYPE(typename, symbol, csymbol)  \
+PyTypeObject symbol = {                                 \
+    PyVarObject_HEAD_INIT(NULL, 0)                      \
+    typename,                                           \
+    sizeof(csymbol)                                     \
+};
+#define PYGLIB_REGISTER_TYPE(d, type, name)                \
+    if (!type.tp_alloc)                                 \
+           type.tp_alloc = PyType_GenericAlloc;            \
+    if (!type.tp_new)                                   \
+           type.tp_new = PyType_GenericNew;                \
+    if (PyType_Ready(&type))                            \
+           return;                                         \
+    PyDict_SetItemString(d, name, (PyObject *)&type);
+
+#define PYGLIB_PyBaseString_Check PyUnicode_Check
+
+#define PYGLIB_PyUnicode_Check PyUnicode_Check
+#define PYGLIB_PyUnicode_AsString _PyUnicode_AsString
+#define PYGLIB_PyUnicode_AsStringAndSize(obj, buf, size) \
+    (((*(buf) = _PyUnicode_AsStringAndSize(obj, size)) != NULL) ? 0 : -1) 
+#define PYGLIB_PyUnicode_FromString PyUnicode_FromString
+#define PYGLIB_PyUnicode_FromStringAndSize PyUnicode_FromStringAndSize
+#define PYGLIB_PyUnicode_FromFormat PyUnicode_FromFormat
+#define PYGLIB_PyUnicode_GET_SIZE PyUnicode_GET_SIZE
+#define PYGLIB_PyUnicode_Resize PyUnicode_Resize
+#define PYGLIB_PyUnicode_Type PyUnicode_Type
+#define PYGLIB_PyLong_Check PyLong_Check
+#define PYGLIB_PyLong_FromLong PyLong_FromLong
+#define PYGLIB_PyLong_AsLong PyLong_AsLong
+#define PYGLIB_PyLong_AS_LONG(o) PyLong_AS_LONG((PyObject*)(o))
+#define PYGLIB_PyLongObject PyLongObject
+#define PYGLIB_PyLong_Type PyLong_Type
+
+#define PYGLIB_PyBytes_FromString PyBytes_FromString
+#define PYGLIB_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+#define PYGLIB_PyBytes_Resize(o, len) _PyBytes_Resize(o, len)
+#define PYGLIB_PyBytes_AsString PyBytes_AsString
+#define PYGLIB_PyBytes_Size PyBytes_Size
+#define PYGLIB_PyBytes_Check PyBytes_Check
+
+#define PYGLIB_PyNumber_Long PyNumber_Long
+
+#endif
+
+#endif /* __PYGLIB_PYTHON_COMPAT_H__ */
diff --git a/glib/pyglib.c b/glib/pyglib.c
new file mode 100644 (file)
index 0000000..1e024c2
--- /dev/null
@@ -0,0 +1,633 @@
+/* -*- Mode: C; c-set-style: python; c-basic-offset: 4  -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <Python.h>
+#include <pythread.h>
+#include "pyglib.h"
+#include "pyglib-private.h"
+#include "pygmaincontext.h"
+#include "pygoptioncontext.h"
+#include "pygoptiongroup.h"
+
+static struct _PyGLib_Functions *_PyGLib_API;
+static int pyglib_thread_state_tls_key;
+static PyObject *exception_table = NULL;
+
+void
+pyglib_init(void)
+{
+    PyObject *glib, *cobject;
+    
+    glib = PyImport_ImportModule("glib");
+    if (!glib) {
+       if (PyErr_Occurred()) {
+           PyObject *type, *value, *traceback;
+           PyObject *py_orig_exc;
+           PyErr_Fetch(&type, &value, &traceback);
+           py_orig_exc = PyObject_Repr(value);
+           Py_XDECREF(type);
+           Py_XDECREF(value);
+           Py_XDECREF(traceback);
+           PyErr_Format(PyExc_ImportError,
+                        "could not import glib (error was: %s)",
+                        PYGLIB_PyUnicode_AsString(py_orig_exc));
+           Py_DECREF(py_orig_exc);
+        } else {
+           PyErr_SetString(PyExc_ImportError,
+                           "could not import glib (no error given)");
+       }
+       return;
+    }
+    
+    cobject = PyObject_GetAttrString(glib, "_PyGLib_API");
+    if (cobject && PYGLIB_CPointer_Check(cobject))
+       _PyGLib_API = (struct _PyGLib_Functions *) PYGLIB_CPointer_GetPointer(cobject, "glib._PyGLib_API");
+    else {
+       PyErr_SetString(PyExc_ImportError,
+                       "could not import glib (could not find _PyGLib_API object)");
+       Py_DECREF(glib);
+       return;
+    }
+}
+
+void
+pyglib_init_internal(PyObject *api)
+{
+    _PyGLib_API = (struct _PyGLib_Functions *) PYGLIB_CPointer_GetPointer(api, "glib._PyGLib_API");
+}
+
+gboolean
+pyglib_threads_enabled(void)
+{
+    g_return_val_if_fail (_PyGLib_API != NULL, FALSE);
+
+    return _PyGLib_API->threads_enabled;
+}
+
+PyGILState_STATE
+pyglib_gil_state_ensure(void)
+{
+    g_return_val_if_fail (_PyGLib_API != NULL, PyGILState_LOCKED);
+
+    if (!_PyGLib_API->threads_enabled)
+       return PyGILState_LOCKED;
+
+#ifdef DISABLE_THREADING
+    return PyGILState_LOCKED;
+#else
+    return PyGILState_Ensure();
+#endif
+}
+
+void
+pyglib_gil_state_release(PyGILState_STATE state)
+{
+    g_return_if_fail (_PyGLib_API != NULL);
+
+    if (!_PyGLib_API->threads_enabled)
+       return;
+
+#ifndef DISABLE_THREADING
+    PyGILState_Release(state);
+#endif
+}
+
+/**
+ * pyglib_enable_threads:
+ *
+ * Returns: TRUE if threading is enabled, FALSE otherwise.
+ *
+ */
+#ifdef DISABLE_THREADING
+gboolean
+pyglib_enable_threads(void)
+{
+    PyErr_SetString(PyExc_RuntimeError,
+                   "pyglib threading disabled at compile time");
+    return FALSE;
+}
+
+void
+_pyglib_notify_on_enabling_threads(PyGLibThreadsEnabledFunc callback)
+{
+    /* Ignore, threads cannot be enabled. */
+}
+
+#else
+
+static GSList *thread_enabling_callbacks = NULL;
+
+/* Enable threading; note that the GIL must be held by the current
+ * thread when this function is called
+ */
+gboolean
+pyglib_enable_threads(void)
+{
+    GSList *callback;
+
+    g_return_val_if_fail (_PyGLib_API != NULL, FALSE);
+
+    if (_PyGLib_API->threads_enabled)
+       return TRUE;
+  
+    PyEval_InitThreads();
+    if (!g_threads_got_initialized)
+       g_thread_init(NULL);
+    
+    _PyGLib_API->threads_enabled = TRUE;
+    pyglib_thread_state_tls_key = PyThread_create_key();
+
+    for (callback = thread_enabling_callbacks; callback; callback = callback->next)
+       ((PyGLibThreadsEnabledFunc) callback->data) ();
+
+    g_slist_free(thread_enabling_callbacks);
+    return TRUE;
+}
+
+void
+_pyglib_notify_on_enabling_threads(PyGLibThreadsEnabledFunc callback)
+{
+    if (callback && !pyglib_threads_enabled())
+       thread_enabling_callbacks = g_slist_append(thread_enabling_callbacks, callback);
+}
+#endif
+
+int
+pyglib_gil_state_ensure_py23 (void)
+{
+#ifdef DISABLE_THREADING
+    return 0;
+#else
+    return PyGILState_Ensure();
+#endif
+}
+
+void
+pyglib_gil_state_release_py23 (int flag)
+{
+#ifndef DISABLE_THREADING
+    PyGILState_Release(flag);
+#endif
+}
+
+/**
+ * pyglib_block_threads:
+ *
+ */
+void
+pyglib_block_threads(void)
+{
+    g_return_if_fail (_PyGLib_API != NULL);
+
+    if (_PyGLib_API->block_threads != NULL)
+       (* _PyGLib_API->block_threads)();
+}
+
+/**
+ * pyglib_unblock_threads:
+ *
+ */
+void
+pyglib_unblock_threads(void)
+{
+    g_return_if_fail (_PyGLib_API != NULL);
+    if (_PyGLib_API->unblock_threads != NULL)
+       (* _PyGLib_API->unblock_threads)();
+}
+
+/**
+ * pyglib_set_thread_block_funcs:
+ *
+ * hooks to register handlers for getting GDK threads to cooperate
+ * with python threading
+ */
+void
+pyglib_set_thread_block_funcs (PyGLibThreadBlockFunc block_threads_func,
+                              PyGLibThreadBlockFunc unblock_threads_func)
+{
+    g_return_if_fail (_PyGLib_API != NULL);
+
+    _PyGLib_API->block_threads = block_threads_func;
+    _PyGLib_API->unblock_threads = unblock_threads_func;
+}
+
+
+/**
+ * pyglib_error_check:
+ * @error: a pointer to the GError.
+ *
+ * Checks to see if the GError has been set.  If the error has been
+ * set, then the glib.GError Python exception will be raised, and
+ * the GError cleared.
+ *
+ * Returns: True if an error was set.
+ */
+gboolean
+pyglib_error_check(GError **error)
+{
+    PyGILState_STATE state;
+    PyObject *exc_type;
+    PyObject *exc_instance;
+    PyObject *d;
+
+    g_return_val_if_fail(error != NULL, FALSE);
+
+    if (*error == NULL)
+       return FALSE;
+    
+    state = pyglib_gil_state_ensure();
+
+    exc_type = _PyGLib_API->gerror_exception;
+    if (exception_table != NULL)
+    {
+       PyObject *item;
+       item = PyDict_GetItem(exception_table, PYGLIB_PyLong_FromLong((*error)->domain));
+       if (item != NULL)
+           exc_type = item;
+    }
+
+    exc_instance = PyObject_CallFunction(exc_type, "z", (*error)->message);
+
+    if ((*error)->domain) {
+       PyObject_SetAttrString(exc_instance, "domain",
+                              d=PYGLIB_PyUnicode_FromString(g_quark_to_string((*error)->domain)));
+       Py_DECREF(d);
+    }
+    else
+       PyObject_SetAttrString(exc_instance, "domain", Py_None);
+
+    PyObject_SetAttrString(exc_instance, "code",
+                          d=PYGLIB_PyLong_FromLong((*error)->code));
+    Py_DECREF(d);
+
+    if ((*error)->message) {
+       PyObject_SetAttrString(exc_instance, "message",
+                              d=PYGLIB_PyUnicode_FromString((*error)->message));
+       Py_DECREF(d);
+    } else {
+       PyObject_SetAttrString(exc_instance, "message", Py_None);
+    }
+    
+    PyErr_SetObject(_PyGLib_API->gerror_exception, exc_instance);
+    Py_DECREF(exc_instance);
+    g_clear_error(error);
+    
+    pyglib_gil_state_release(state);
+    
+    return TRUE;
+}
+
+/**
+ * pyglib_gerror_exception_check:
+ * @error: a standard GLib GError ** output parameter
+ *
+ * Checks to see if a GError exception has been raised, and if so
+ * translates the python exception to a standard GLib GError.  If the
+ * raised exception is not a GError then PyErr_Print() is called.
+ *
+ * Returns: 0 if no exception has been raised, -1 if it is a
+ * valid glib.GError, -2 otherwise.
+ */
+gboolean
+pyglib_gerror_exception_check(GError **error)
+{
+    PyObject *type, *value, *traceback;
+    PyObject *py_message, *py_domain, *py_code;
+    const char *bad_gerror_message;
+
+    PyErr_Fetch(&type, &value, &traceback);
+    if (type == NULL)
+        return 0;
+    PyErr_NormalizeException(&type, &value, &traceback);
+    if (value == NULL) {
+        PyErr_Restore(type, value, traceback);
+        PyErr_Print();
+        return -2;
+    }
+    if (!value ||
+       !PyErr_GivenExceptionMatches(type,
+                                    (PyObject *) _PyGLib_API->gerror_exception)) {
+        PyErr_Restore(type, value, traceback);
+        PyErr_Print();
+        return -2;
+    }
+    Py_DECREF(type);
+    Py_XDECREF(traceback);
+
+    py_message = PyObject_GetAttrString(value, "message");
+    if (!py_message || !PYGLIB_PyUnicode_Check(py_message)) {
+        bad_gerror_message = "glib.GError instances must have a 'message' string attribute";
+        goto bad_gerror;
+    }
+
+    py_domain = PyObject_GetAttrString(value, "domain");
+    if (!py_domain || !PYGLIB_PyUnicode_Check(py_domain)) {
+        bad_gerror_message = "glib.GError instances must have a 'domain' string attribute";
+        Py_DECREF(py_message);
+        goto bad_gerror;
+    }
+
+    py_code = PyObject_GetAttrString(value, "code");
+    if (!py_code || !PYGLIB_PyLong_Check(py_code)) {
+        bad_gerror_message = "glib.GError instances must have a 'code' int attribute";
+        Py_DECREF(py_message);
+        Py_DECREF(py_domain);
+        goto bad_gerror;
+    }
+
+    g_set_error(error, g_quark_from_string(PYGLIB_PyUnicode_AsString(py_domain)),
+                PYGLIB_PyLong_AsLong(py_code), "%s", PYGLIB_PyUnicode_AsString(py_message));
+
+    Py_DECREF(py_message);
+    Py_DECREF(py_code);
+    Py_DECREF(py_domain);
+    return -1;
+
+bad_gerror:
+    Py_DECREF(value);
+    g_set_error(error, g_quark_from_static_string("pyglib"), 0, "%s", bad_gerror_message);
+    PyErr_SetString(PyExc_ValueError, bad_gerror_message);
+    PyErr_Print();
+    return -2;
+}
+
+/**
+ * pyglib_register_exception_for_domain:
+ * @name: name of the exception
+ * @error_domain: error domain
+ *
+ * Registers a new glib.GError exception subclass called #name for
+ * a specific #domain. This exception will be raised when a GError
+ * of the same domain is passed in to pyglib_error_check().
+ *
+ * Returns: the new exception
+ */
+PyObject *
+pyglib_register_exception_for_domain(gchar *name,
+                                    gint error_domain)
+{
+    PyObject *exception;
+
+    exception = PyErr_NewException(name, _PyGLib_API->gerror_exception, NULL);
+
+    if (exception_table == NULL)
+       exception_table = PyDict_New();
+
+    PyDict_SetItem(exception_table,
+                  PYGLIB_PyLong_FromLong(error_domain),
+                  exception);
+    
+    return exception;
+}
+
+/**
+ * pyglib_main_context_new:
+ * @context: a GMainContext.
+ *
+ * Creates a wrapper for a GMainContext.
+ *
+ * Returns: the GMainContext wrapper.
+ */
+PyObject *
+pyglib_main_context_new(GMainContext *context)
+{
+    return _PyGLib_API->main_context_new(context);
+}
+
+/**
+ * pyg_option_group_transfer_group:
+ * @group: a GOptionGroup wrapper
+ *
+ * This is used to transfer the GOptionGroup to a GOptionContext. After this
+ * is called, the calle must handle the release of the GOptionGroup.
+ *
+ * When #NULL is returned, the GOptionGroup was already transfered.
+ *
+ * Returns: Either #NULL or the wrapped GOptionGroup.
+ */
+GOptionGroup *
+pyglib_option_group_transfer_group(PyObject *obj)
+{
+    PyGOptionGroup *self = (PyGOptionGroup*)obj;
+    
+    if (self->is_in_context)
+       return NULL;
+
+    self->is_in_context = TRUE;
+    
+    /* Here we increase the reference count of the PyGOptionGroup, because now
+     * the GOptionContext holds an reference to us (it is the userdata passed
+     * to g_option_group_new().
+     *
+     * The GOptionGroup is freed with the GOptionContext.
+     *
+     * We set it here because if we would do this in the init method we would
+     * hold two references and the PyGOptionGroup would never be freed.
+     */
+    Py_INCREF(self);
+    
+    return self->group;
+}
+
+/**
+ * pyglib_option_group_new:
+ * @group: a GOptionGroup
+ *
+ * The returned GOptionGroup can't be used to set any hooks, translation domains
+ * or add entries. It's only intend is, to use for GOptionContext.add_group().
+ *
+ * Returns: the GOptionGroup wrapper.
+ */
+PyObject * 
+pyglib_option_group_new (GOptionGroup *group)
+{
+    return _PyGLib_API->option_group_new(group);
+}
+
+/**
+ * pyglib_option_context_new:
+ * @context: a GOptionContext
+ *
+ * Returns: A new GOptionContext wrapper.
+ */
+PyObject * 
+pyglib_option_context_new (GOptionContext *context)
+{
+    return _PyGLib_API->option_context_new(context);
+}
+
+/**
+ * pyglib_option_context_new:
+ * @context: a GTimeVal struct
+ *
+ * Converts a GTimeVal struct to a python float
+ *
+ * Returns: a float representing the timeval
+ */
+PyObject *
+pyglib_float_from_timeval(GTimeVal timeval)
+{
+    double ret;
+    ret = (double)timeval.tv_sec + (double)timeval.tv_usec * 0.000001;
+    return PyFloat_FromDouble(ret);
+}
+
+
+/****** Private *****/
+
+/**
+ * _pyglib_destroy_notify:
+ * @user_data: a PyObject pointer.
+ *
+ * A function that can be used as a GDestroyNotify callback that will
+ * call Py_DECREF on the data.
+ */
+void
+_pyglib_destroy_notify(gpointer user_data)
+{
+    PyObject *obj = (PyObject *)user_data;
+    PyGILState_STATE state;
+
+    g_return_if_fail (_PyGLib_API != NULL);
+
+    state = pyglib_gil_state_ensure();
+    Py_DECREF(obj);
+    pyglib_gil_state_release(state);
+}
+
+gboolean
+_pyglib_handler_marshal(gpointer user_data)
+{
+    PyObject *tuple, *ret;
+    gboolean res;
+    PyGILState_STATE state;
+
+    g_return_val_if_fail(user_data != NULL, FALSE);
+
+    state = pyglib_gil_state_ensure();
+
+    tuple = (PyObject *)user_data;
+    ret = PyObject_CallObject(PyTuple_GetItem(tuple, 0),
+                             PyTuple_GetItem(tuple, 1));
+    if (!ret) {
+       PyErr_Print();
+       res = FALSE;
+    } else {
+       res = PyObject_IsTrue(ret);
+       Py_DECREF(ret);
+    }
+    
+    pyglib_gil_state_release(state);
+
+    return res;
+}
+
+PyObject*
+_pyglib_generic_ptr_richcompare(void* a, void *b, int op)
+{
+    PyObject *res;
+
+    switch (op) {
+
+      case Py_EQ:
+        res = (a == b) ? Py_True : Py_False;
+        break;
+
+      case Py_NE:
+        res = (a != b) ? Py_True : Py_False;
+        break;
+
+      case Py_LT:
+        res = (a < b) ? Py_True : Py_False;
+        break;
+
+      case Py_LE:
+        res = (a <= b) ? Py_True : Py_False;
+        break;
+
+      case Py_GT:
+        res = (a > b) ? Py_True : Py_False;
+        break;
+
+      case Py_GE:
+        res = (a >= b) ? Py_True : Py_False;
+        break;
+
+      default:
+        res = Py_NotImplemented;
+        break;
+    }
+
+    Py_INCREF(res);
+    return res;
+}
+
+PyObject*
+_pyglib_generic_long_richcompare(long a, long b, int op)
+{
+    PyObject *res;
+
+    switch (op) {
+
+      case Py_EQ:
+        res = (a == b) ? Py_True : Py_False;
+        Py_INCREF(res);
+        break;
+
+      case Py_NE:
+        res = (a != b) ? Py_True : Py_False;
+        Py_INCREF(res);
+        break;
+
+
+      case Py_LT:
+        res = (a < b) ? Py_True : Py_False;
+        Py_INCREF(res);
+        break;
+
+      case Py_LE:
+        res = (a <= b) ? Py_True : Py_False;
+        Py_INCREF(res);
+        break;
+
+      case Py_GT:
+        res = (a > b) ? Py_True : Py_False;
+        Py_INCREF(res);
+        break;
+
+      case Py_GE:
+        res = (a >= b) ? Py_True : Py_False;
+        Py_INCREF(res);
+        break;
+
+      default:
+        res = Py_NotImplemented;
+        Py_INCREF(res);
+        break;
+    }
+
+    return res;
+}
+
diff --git a/glib/pyglib.h b/glib/pyglib.h
new file mode 100644 (file)
index 0000000..44ead47
--- /dev/null
@@ -0,0 +1,83 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGLIB_H__
+#define __PYGLIB_H__
+
+#include <Python.h>
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+typedef void (*PyGLibThreadsEnabledFunc) (void);
+typedef void (*PyGLibThreadBlockFunc) (void);
+
+void pyglib_init(void);
+void pyglib_init_internal(PyObject *api);
+PyGILState_STATE pyglib_gil_state_ensure(void);
+void pyglib_gil_state_release(PyGILState_STATE state);
+int pyglib_enable_threads(void);
+gboolean pyglib_error_check(GError **error);
+gboolean pyglib_gerror_exception_check(GError **error);
+PyObject *pyglib_register_exception_for_domain(gchar *name,
+                                              gint error_domain);
+gboolean pyglib_threads_enabled(void);
+PyObject * pyglib_main_context_new(GMainContext *context);
+void pyglib_set_thread_block_funcs(PyGLibThreadBlockFunc block_threads_func,
+                                  PyGLibThreadBlockFunc unblock_threads_func);
+void pyglib_block_threads(void);
+void pyglib_unblock_threads(void);
+PyObject * pyglib_option_context_new(GOptionContext *context);
+PyObject * pyglib_option_group_new(GOptionGroup *group);
+GOptionGroup * pyglib_option_group_transfer_group(PyObject *self);
+PyObject * pyglib_float_from_timeval(GTimeVal timeval);
+
+/* Private: for gobject <-> glib interaction only. */
+void _pyglib_notify_on_enabling_threads(PyGLibThreadsEnabledFunc callback);
+PyObject* _pyglib_generic_ptr_richcompare(void* a, void *b, int op);
+PyObject* _pyglib_generic_long_richcompare(long a, long b, int op);
+
+#define pyglib_begin_allow_threads             \
+    G_STMT_START {                              \
+        PyThreadState *_save = NULL;            \
+        if (pyglib_threads_enabled())          \
+            _save = PyEval_SaveThread();
+
+#define pyglib_end_allow_threads                \
+        if (pyglib_threads_enabled())           \
+            PyEval_RestoreThread(_save);        \
+    } G_STMT_END
+
+#define PYGLIB_REGISTER_TYPE(d, type, name)            \
+    if (!type.tp_alloc)                                 \
+       type.tp_alloc = PyType_GenericAlloc;            \
+    if (!type.tp_new)                                   \
+       type.tp_new = PyType_GenericNew;                \
+    if (PyType_Ready(&type))                            \
+       return;                                         \
+    PyDict_SetItemString(d, name, (PyObject *)&type);
+
+
+G_END_DECLS
+
+#endif /* __PYGLIB_H__ */
+
diff --git a/glib/pygmaincontext.c b/glib/pygmaincontext.c
new file mode 100644 (file)
index 0000000..cfb7ddd
--- /dev/null
@@ -0,0 +1,126 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *
+ *   pygmaincontext.c: GMainContext wrapper
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <Python.h>
+#include <pythread.h>
+#include <glib.h>
+#include "pygmaincontext.h"
+#include "pyglib.h"
+#include "pyglib-private.h"
+
+PYGLIB_DEFINE_TYPE("glib.MainContext", PyGMainContext_Type, PyGMainContext)
+
+/**
+ * pyg_main_context_new:
+ * @context: a GMainContext.
+ *
+ * Creates a wrapper for a GMainContext.
+ *
+ * Returns: the GMainContext wrapper.
+ */
+PyObject *
+pyg_main_context_new(GMainContext *context)
+{
+    PyGMainContext *self;
+
+    self = (PyGMainContext *)PyObject_NEW(PyGMainContext, &PyGMainContext_Type);
+    if (self == NULL)
+        return NULL;
+
+    self->context = g_main_context_ref(context);
+
+    return (PyObject *)self;
+}
+
+static int
+pyg_main_context_init(PyGMainContext *self)
+{
+    self->context = g_main_context_new();
+    return 0;
+}
+
+static void
+pyg_main_context_dealloc(PyGMainContext *self)
+{
+    if (self->context != NULL) {
+       g_main_context_unref(self->context);
+       self->context = NULL;
+    }
+
+    PyObject_Del(self);
+}
+
+static PyObject*
+pyg_main_context_richcompare(PyObject *self, PyObject *other, int op)
+{
+    if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGMainContext_Type)
+        return _pyglib_generic_ptr_richcompare(((PyGMainContext*)self)->context,
+                                               ((PyGMainContext*)other)->context,
+                                               op);
+    else {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+}
+
+static PyObject *
+_wrap_g_main_context_iteration (PyGMainContext *self, PyObject *args)
+{
+    gboolean ret, may_block = TRUE;
+    
+    if (!PyArg_ParseTuple(args, "|i:GMainContext.iteration",
+                         &may_block))
+       return NULL;
+
+    pyglib_begin_allow_threads;
+    ret = g_main_context_iteration(self->context, may_block);
+    pyglib_end_allow_threads;
+    
+    return PyBool_FromLong(ret);
+}
+
+static PyObject *
+_wrap_g_main_context_pending (PyGMainContext *self)
+{
+    return PyBool_FromLong(g_main_context_pending(self->context));
+}
+
+static PyMethodDef _PyGMainContext_methods[] = {
+    { "iteration", (PyCFunction)_wrap_g_main_context_iteration, METH_VARARGS },
+    { "pending", (PyCFunction)_wrap_g_main_context_pending, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+void
+pyglib_maincontext_register_types(PyObject *d)
+{
+    PyGMainContext_Type.tp_dealloc = (destructor)pyg_main_context_dealloc;
+    PyGMainContext_Type.tp_richcompare = pyg_main_context_richcompare;
+    PyGMainContext_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+    PyGMainContext_Type.tp_methods = _PyGMainContext_methods;
+    PyGMainContext_Type.tp_init = (initproc)pyg_main_context_init;
+    PYGLIB_REGISTER_TYPE(d, PyGMainContext_Type, "MainContext"); 
+}
diff --git a/glib/pygmaincontext.h b/glib/pygmaincontext.h
new file mode 100644 (file)
index 0000000..4ffa3c9
--- /dev/null
@@ -0,0 +1,40 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_MAINCONTEXT_H__
+#define __PYG_MAINCONTEXT_H__
+
+#include <Python.h>
+#include <glib.h>
+
+typedef struct {
+    PyObject_HEAD
+    GMainContext *context;
+} PyGMainContext;
+
+extern PyTypeObject PyGMainContext_Type;
+
+PyObject* pyg_main_context_new(GMainContext *context);
+
+void pyglib_maincontext_register_types(PyObject *d);
+
+#endif /* __PYG_MAINCONTEXT_H__ */
+
diff --git a/glib/pygmainloop.c b/glib/pygmainloop.c
new file mode 100644 (file)
index 0000000..219b6a3
--- /dev/null
@@ -0,0 +1,360 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ * Copyright (C) 2004       Johan Dahlin
+ *
+ *   pygmainloop.c: GMainLoop wrapper
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+#include <fcntl.h>
+
+#include <Python.h>
+#include <pythread.h>
+#include <glib.h>
+
+#include "pygmainloop.h"
+#include "pygmaincontext.h"
+#include "pyglib.h"
+#include "pyglib-private.h"
+
+static int pipe_fds[2];
+
+typedef struct {
+    GSource source;
+    GPollFD fd;
+} PySignalWatchSource;
+
+#ifdef DISABLE_THREADING
+static GMainLoop *pyg_current_main_loop = NULL;;
+
+static inline GMainLoop *
+pyg_save_current_main_loop (GMainLoop *main_loop)
+{
+    GMainLoop *retval = pyg_current_main_loop;
+
+    g_return_val_if_fail(main_loop != NULL, NULL);
+
+    pyg_current_main_loop = g_main_loop_ref(main_loop);
+
+    return retval;
+}
+
+static inline void
+pyg_restore_current_main_loop (GMainLoop *main_loop)
+{
+    if (pyg_current_main_loop != NULL)
+       g_main_loop_unref(pyg_current_main_loop);
+    pyg_current_main_loop = main_loop;
+}
+
+static inline GMainLoop *
+pyg_get_current_main_loop (void)
+{
+    return pyg_current_main_loop;
+}
+#else /* !defined(#ifndef DISABLE_THREADING) */
+
+static int pyg_current_main_loop_key = -1;
+
+static inline GMainLoop *
+pyg_save_current_main_loop (GMainLoop *main_loop)
+{
+    GMainLoop *retval;
+
+    g_return_val_if_fail(main_loop != NULL, NULL);
+
+    if (pyg_current_main_loop_key == -1)
+       pyg_current_main_loop_key = PyThread_create_key();
+
+    retval = PyThread_get_key_value(pyg_current_main_loop_key);
+    PyThread_delete_key_value(pyg_current_main_loop_key);
+    PyThread_set_key_value(pyg_current_main_loop_key, 
+                          g_main_loop_ref(main_loop));
+
+    return retval;
+}
+
+static inline void
+pyg_restore_current_main_loop (GMainLoop *main_loop)
+{
+    GMainLoop *prev;
+
+    g_return_if_fail (pyg_current_main_loop_key != -1);
+
+    prev = PyThread_get_key_value(pyg_current_main_loop_key);
+    if (prev != NULL)
+       g_main_loop_unref(prev);
+    PyThread_delete_key_value(pyg_current_main_loop_key);
+    if (main_loop != NULL)
+       PyThread_set_key_value(pyg_current_main_loop_key, main_loop);
+}
+
+static inline GMainLoop *
+pyg_get_current_main_loop (void)
+{
+    if (pyg_current_main_loop_key == -1)
+       return NULL;
+    return PyThread_get_key_value(pyg_current_main_loop_key);
+}
+#endif /* DISABLE_THREADING */
+
+static gboolean
+pyg_signal_watch_prepare(GSource *source,
+                        int     *timeout)
+{
+    /* Python only invokes signal handlers from the main thread,
+     * so if a thread other than the main thread receives the signal
+     * from the kernel, PyErr_CheckSignals() from that thread will
+     * do nothing.
+     */
+
+#ifdef HAVE_PYSIGNAL_SETWAKEUPFD
+    return FALSE;
+#else /* !HAVE_PYSIGNAL_SETWAKEUPFD */
+    /* On Windows g_poll() won't be interrupted by a signal
+     * (AFAIK), so we need the timeout there too, even if there's
+     * only one thread.
+     */
+#ifndef PLATFORM_WIN32
+    if (!pyglib_threads_enabled())
+       return FALSE;
+#endif /* PLATFORM_WIN32 */
+
+    /* If we're using 2.5 or an earlier version of python we
+     * will default to a timeout every second, be aware,
+     * this will cause unnecessary wakeups, see
+     * http://bugzilla.gnome.org/show_bug.cgi?id=481569
+     */
+    *timeout = 1000;
+    return FALSE;
+#endif /* HAVE_PYSIGNAL_SETWAKEUPFD */
+}
+
+static gboolean
+pyg_signal_watch_check(GSource *source)
+{
+    PyGILState_STATE state;
+    GMainLoop *main_loop;
+
+#ifdef HAVE_PYSIGNAL_SETWAKEUPFD
+    PySignalWatchSource *real_source = (PySignalWatchSource *)source;
+    GPollFD *poll_fd = &real_source->fd;
+    unsigned char dummy;
+    gssize ret;
+    if (poll_fd->revents & G_IO_IN)
+       ret = read(poll_fd->fd, &dummy, 1);
+#endif
+
+    state = pyglib_gil_state_ensure();
+
+    main_loop = pyg_get_current_main_loop();
+
+    if (PyErr_CheckSignals() == -1 && main_loop != NULL) {
+       PyErr_SetNone(PyExc_KeyboardInterrupt);
+       g_main_loop_quit(main_loop);
+    }
+
+    pyglib_gil_state_release(state);
+
+    return FALSE;
+}
+
+static gboolean
+pyg_signal_watch_dispatch(GSource     *source,
+                         GSourceFunc  callback,
+                         gpointer     user_data)
+{
+    /* We should never be dispatched */
+    g_assert_not_reached();
+    return TRUE;
+}
+
+static GSourceFuncs pyg_signal_watch_funcs =
+{
+    pyg_signal_watch_prepare,
+    pyg_signal_watch_check,
+    pyg_signal_watch_dispatch
+};
+
+static GSource *
+pyg_signal_watch_new(void)
+{
+    GSource *source = g_source_new(&pyg_signal_watch_funcs,
+       sizeof(PySignalWatchSource));
+
+#ifdef HAVE_PYSIGNAL_SETWAKEUPFD
+    PySignalWatchSource *real_source = (PySignalWatchSource *)source;
+    int flag;
+
+    /* Unfortunately we need to create a new pipe here instead of
+     * reusing the pipe inside the GMainContext.
+     * Ideally an api should be added to GMainContext which allows us
+     * to reuse that pipe which would suit us perfectly fine.
+     * XXX More efficient than a pipe, we could use an eventfd on Linux
+     * kernels that support it.
+     */
+    gint already_piped = (pipe_fds[0] > 0);
+    if (!already_piped) {
+       if (pipe(pipe_fds) < 0)
+           g_error("Cannot create main loop pipe: %s\n",
+                   g_strerror(errno));
+
+        /* Make the write end of the fd non blocking */
+        flag = fcntl(pipe_fds[1], F_GETFL, 0);
+        flag |= O_NONBLOCK;
+        fcntl(pipe_fds[1], F_SETFL, flag);
+    }
+
+    real_source->fd.fd = pipe_fds[0];
+    real_source->fd.events = G_IO_IN | G_IO_HUP | G_IO_ERR;
+    g_source_add_poll(source, &real_source->fd);
+
+    if (!already_piped)
+      PySignal_SetWakeupFd(pipe_fds[1]);
+#endif
+    return source;
+}
+
+PYGLIB_DEFINE_TYPE("glib.MainLoop", PyGMainLoop_Type, PyGMainLoop)
+
+static int
+pyg_main_loop_init(PyGMainLoop *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "context", "is_running", NULL };
+    PyObject *py_context = Py_None;
+    int is_running = 0;
+    GMainContext *context;
+    
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "|Ob:GMainLoop.__init__",
+                                    kwlist, &py_context, &is_running))
+        return -1;
+
+    if (!PyObject_TypeCheck(py_context, &PyGMainContext_Type) &&
+       py_context != Py_None) {
+       PyErr_SetString(PyExc_TypeError,
+                       "context must be a glib.MainContext or None");
+       return -1;
+    }
+
+    if (py_context != Py_None) {
+       context = ((PyGMainContext*)py_context)->context;
+    } else {
+       context = NULL;
+    }
+
+    self->loop = g_main_loop_new(context, is_running);
+
+    self->signal_source = pyg_signal_watch_new();
+    g_source_attach(self->signal_source, context);
+    g_source_unref(self->signal_source);
+
+    return 0;
+}
+
+static void
+pyg_main_loop_dealloc(PyGMainLoop *self)
+{
+    if (self->signal_source != NULL) {
+       g_source_destroy(self->signal_source);
+       self->signal_source = NULL;
+    }
+
+    if (self->loop != NULL) {
+       g_main_loop_unref(self->loop);
+       self->loop = NULL;
+    }
+
+    PyObject_Del(self);
+}
+
+static PyObject*
+pyg_main_loop_richcompare(PyObject *self, PyObject *other, int op)
+{
+    if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGMainLoop_Type)
+        return _pyglib_generic_ptr_richcompare(((PyGMainLoop*)self)->loop,
+                                               ((PyGMainLoop*)other)->loop,
+                                               op);
+    else {
+       Py_INCREF(Py_NotImplemented);
+       return Py_NotImplemented;
+    }
+}
+
+static PyObject *
+_wrap_g_main_loop_get_context (PyGMainLoop *loop)
+{
+    return pyg_main_context_new(g_main_loop_get_context(loop->loop));
+}
+
+static PyObject *
+_wrap_g_main_loop_is_running (PyGMainLoop *self)
+{
+    return PyBool_FromLong(g_main_loop_is_running(self->loop));
+}
+
+static PyObject *
+_wrap_g_main_loop_quit (PyGMainLoop *self)
+{
+    g_main_loop_quit(self->loop);
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+_wrap_g_main_loop_run (PyGMainLoop *self)
+{
+    GMainLoop *prev_loop;
+
+    prev_loop = pyg_save_current_main_loop(self->loop);
+
+    pyglib_begin_allow_threads;
+    g_main_loop_run(self->loop);
+    pyglib_end_allow_threads;
+
+    pyg_restore_current_main_loop(prev_loop);
+   
+    if (PyErr_Occurred())
+        return NULL;
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyMethodDef _PyGMainLoop_methods[] = {
+    { "get_context", (PyCFunction)_wrap_g_main_loop_get_context, METH_NOARGS },
+    { "is_running", (PyCFunction)_wrap_g_main_loop_is_running, METH_NOARGS },
+    { "quit", (PyCFunction)_wrap_g_main_loop_quit, METH_NOARGS },
+    { "run", (PyCFunction)_wrap_g_main_loop_run, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+void
+pyglib_mainloop_register_types(PyObject *d)
+{
+    PyGMainLoop_Type.tp_dealloc = (destructor)pyg_main_loop_dealloc;
+    PyGMainLoop_Type.tp_richcompare = pyg_main_loop_richcompare;
+    PyGMainLoop_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+    PyGMainLoop_Type.tp_methods = _PyGMainLoop_methods;
+    PyGMainLoop_Type.tp_init = (initproc)pyg_main_loop_init;
+    PYGLIB_REGISTER_TYPE(d, PyGMainLoop_Type, "MainLoop"); 
+}
diff --git a/glib/pygmainloop.h b/glib/pygmainloop.h
new file mode 100644 (file)
index 0000000..dec82d8
--- /dev/null
@@ -0,0 +1,36 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_MAINLOOP_H__
+#define __PYG_MAINLOOP_H__
+
+typedef struct {
+    PyObject_HEAD
+    GMainLoop *loop;
+    GSource *signal_source;
+} PyGMainLoop;
+
+extern PyTypeObject PyGMainLoop_Type;
+
+void pyglib_mainloop_register_types(PyObject *d);
+
+#endif /* __PYG_MAINLOOP_H__ */
+
diff --git a/glib/pygoptioncontext.c b/glib/pygoptioncontext.c
new file mode 100644 (file)
index 0000000..444625c
--- /dev/null
@@ -0,0 +1,337 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2006  Johannes Hoelzl
+ *
+ *   pygoptioncontext.c: GOptionContext wrapper
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pyglib-private.h"
+#include "pygoptioncontext.h"
+
+PYGLIB_DEFINE_TYPE("glib.OptionContext", PyGOptionContext_Type, PyGOptionContext)
+
+/**
+ * pyg_option_context_new:
+ * @context: a GOptionContext
+ *
+ * Returns: A new GOptionContext wrapper.
+ */
+PyObject *
+pyg_option_context_new (GOptionContext *context)
+{
+    PyGOptionContext *self;
+
+    self = (PyGOptionContext *)PyObject_NEW(PyGOptionContext, &PyGOptionContext_Type);
+    if (self == NULL)
+        return NULL;
+
+    self->context = context;
+    self->main_group = NULL;
+
+    return (PyObject *)self;
+}
+
+static int
+pyg_option_context_init(PyGOptionContext *self,
+                        PyObject *args,
+                        PyObject *kwargs)
+{
+    char *parameter_string;
+
+    if (!PyArg_ParseTuple(args, "s:glib.GOptionContext.__init__",
+                          &parameter_string))
+        return -1;
+
+    self->context = g_option_context_new(parameter_string);
+    return 0;
+}
+
+static void
+pyg_option_context_dealloc(PyGOptionContext *self)
+{
+    Py_CLEAR(self->main_group);
+
+    if (self->context != NULL)
+    {
+        GOptionContext *tmp = self->context;
+        self->context = NULL;
+        g_option_context_free(tmp);
+    }
+
+    PyObject_Del(self);
+}
+
+static PyObject *
+pyg_option_context_parse(PyGOptionContext *self,
+                         PyObject *args,
+                         PyObject *kwargs)
+{
+    static char *kwlist[] = { "argv", NULL };
+    PyObject *arg;
+    PyObject *new_argv, *argv;
+    Py_ssize_t argv_length, pos;
+    gint argv_length_int;
+    char **argv_content, **original;
+    GError *error = NULL;
+    gboolean result;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GOptionContext.parse",
+                                     kwlist, &argv))
+        return NULL;
+
+    if (!PyList_Check(argv))
+    {
+        PyErr_SetString(PyExc_TypeError,
+                        "GOptionContext.parse expects a list of strings.");
+        return NULL;
+    }
+
+    argv_length = PyList_Size(argv);
+    if (argv_length == -1)
+    {
+        PyErr_SetString(PyExc_TypeError,
+                        "GOptionContext.parse expects a list of strings.");
+        return NULL;
+    }
+
+    argv_content = g_new(char*, argv_length + 1);
+    argv_content[argv_length] = NULL;
+    for (pos = 0; pos < argv_length; pos++)
+    {
+        arg = PyList_GetItem(argv, pos);
+        argv_content[pos] = g_strdup(PYGLIB_PyUnicode_AsString(arg));
+        if (argv_content[pos] == NULL)
+        {
+            g_strfreev(argv_content);
+            return NULL;
+        }
+    }
+    original = g_strdupv(argv_content);
+
+    g_assert(argv_length <= G_MAXINT);
+    argv_length_int = argv_length;
+    pyglib_begin_allow_threads;
+    result = g_option_context_parse(self->context, &argv_length_int, &argv_content,
+                                    &error);
+    pyglib_end_allow_threads;
+    argv_length = argv_length_int;
+
+    if (!result)
+    {
+        g_strfreev(argv_content);
+        g_strfreev(original);
+        pyglib_error_check(&error);
+        return NULL;
+    }
+
+    new_argv = PyList_New(g_strv_length(argv_content));
+    for (pos = 0; pos < argv_length; pos++)
+    {
+        arg = PYGLIB_PyUnicode_FromString(argv_content[pos]);
+        PyList_SetItem(new_argv, pos, arg);
+    }
+
+    g_strfreev(original);
+    g_strfreev(argv_content);
+    return new_argv;
+}
+
+static PyObject *
+pyg_option_context_set_help_enabled(PyGOptionContext *self,
+                                    PyObject *args,
+                                    PyObject *kwargs)
+{
+    static char *kwlist[] = { "help_enable", NULL };
+
+    PyObject *help_enabled;
+    if (! PyArg_ParseTupleAndKeywords(args, kwargs,
+                                      "O:GOptionContext.set_help_enabled",
+                                      kwlist, &help_enabled))
+        return NULL;
+
+    g_option_context_set_help_enabled(self->context, PyObject_IsTrue(help_enabled));
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pyg_option_context_get_help_enabled(PyGOptionContext *self)
+{
+    return PyBool_FromLong(g_option_context_get_help_enabled(self->context));
+}
+
+static PyObject *
+pyg_option_context_set_ignore_unknown_options(PyGOptionContext *self,
+                                              PyObject *args,
+                                              PyObject *kwargs)
+{
+    static char *kwlist[] = { "ignore_unknown_options", NULL };
+    PyObject *ignore_unknown_options;
+
+    if (! PyArg_ParseTupleAndKeywords(args, kwargs,
+                                "O:GOptionContext.set_ignore_unknown_options",
+                                kwlist, &ignore_unknown_options))
+        return NULL;
+
+    g_option_context_set_ignore_unknown_options(self->context,
+                                               PyObject_IsTrue(ignore_unknown_options));
+    
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pyg_option_context_get_ignore_unknown_options(PyGOptionContext *self)
+{
+    return PyBool_FromLong(
+        g_option_context_get_ignore_unknown_options(self->context));
+}
+
+static PyObject *
+pyg_option_context_set_main_group(PyGOptionContext *self,
+                                  PyObject *args,
+                                  PyObject *kwargs)
+{
+    static char *kwlist[] = { "group", NULL };
+    GOptionGroup *g_group;
+    PyObject *group;
+
+    if (! PyArg_ParseTupleAndKeywords(args, kwargs,
+                                      "O:GOptionContext.set_main_group",
+                                      kwlist, &group))
+        return NULL;
+
+    if (PyObject_IsInstance(group, (PyObject*) &PyGOptionGroup_Type) != 1) {
+        PyErr_SetString(PyExc_TypeError,
+                        "GOptionContext.set_main_group expects a GOptionGroup.");
+        return NULL;
+    }
+
+    g_group = pyglib_option_group_transfer_group(group);
+    if (g_group == NULL)
+    {
+        PyErr_SetString(PyExc_RuntimeError,
+                       "Group is already in a OptionContext.");
+        return NULL;
+    }
+
+    g_option_context_set_main_group(self->context, g_group);
+
+    Py_INCREF(group);
+    self->main_group = (PyGOptionGroup*) group;
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pyg_option_context_get_main_group(PyGOptionContext *self)
+{
+    if (self->main_group == NULL)
+    {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+    Py_INCREF(self->main_group);
+    return (PyObject*) self->main_group;
+}
+
+static PyObject *
+pyg_option_context_add_group(PyGOptionContext *self,
+                             PyObject *args,
+                             PyObject *kwargs)
+{
+    static char *kwlist[] = { "group", NULL };
+    GOptionGroup *g_group;
+    PyObject *group;
+
+    if (! PyArg_ParseTupleAndKeywords(args, kwargs,
+                                      "O:GOptionContext.add_group",
+                                      kwlist, &group))
+        return NULL;
+
+    if (PyObject_IsInstance(group, (PyObject*) &PyGOptionGroup_Type) != 1) {
+        PyErr_SetString(PyExc_TypeError,
+                        "GOptionContext.add_group expects a GOptionGroup.");
+        return NULL;
+    }
+
+    g_group = pyglib_option_group_transfer_group(group);
+    if (g_group == NULL)
+    {
+        PyErr_SetString(PyExc_RuntimeError,
+                        "Group is already in a OptionContext.");
+        return NULL;
+    }
+    Py_INCREF(group);
+
+    g_option_context_add_group(self->context, g_group);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject*
+pyg_option_context_richcompare(PyObject *self, PyObject *other, int op)
+{
+    if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGOptionContext_Type)
+        return _pyglib_generic_ptr_richcompare(((PyGOptionContext*)self)->context,
+                                               ((PyGOptionContext*)other)->context,
+                                               op);
+    else {
+       Py_INCREF(Py_NotImplemented);
+       return Py_NotImplemented;
+    }
+}
+
+static PyObject *
+pyg_option_get_context(PyGOptionContext *self)
+{
+    return PYGLIB_CPointer_WrapPointer(self->context, "goption.context");
+}
+
+static PyMethodDef pyg_option_context_methods[] = {
+    { "parse", (PyCFunction)pyg_option_context_parse, METH_VARARGS | METH_KEYWORDS },
+    { "set_help_enabled", (PyCFunction)pyg_option_context_set_help_enabled, METH_VARARGS | METH_KEYWORDS },
+    { "get_help_enabled", (PyCFunction)pyg_option_context_get_help_enabled, METH_NOARGS },
+    { "set_ignore_unknown_options", (PyCFunction)pyg_option_context_set_ignore_unknown_options, METH_VARARGS | METH_KEYWORDS },
+    { "get_ignore_unknown_options", (PyCFunction)pyg_option_context_get_ignore_unknown_options, METH_NOARGS },
+    { "set_main_group", (PyCFunction)pyg_option_context_set_main_group, METH_VARARGS | METH_KEYWORDS },
+    { "get_main_group", (PyCFunction)pyg_option_context_get_main_group, METH_NOARGS },
+    { "add_group", (PyCFunction)pyg_option_context_add_group, METH_VARARGS | METH_KEYWORDS },
+    { "_get_context", (PyCFunction)pyg_option_get_context, METH_NOARGS },
+    { NULL, NULL, 0 },
+};
+
+void
+pyglib_option_context_register_types(PyObject *d)
+{
+    PyGOptionContext_Type.tp_dealloc = (destructor)pyg_option_context_dealloc;
+    PyGOptionContext_Type.tp_richcompare = pyg_option_context_richcompare;
+    PyGOptionContext_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+    PyGOptionContext_Type.tp_methods = pyg_option_context_methods;
+    PyGOptionContext_Type.tp_init = (initproc)pyg_option_context_init;
+    PYGLIB_REGISTER_TYPE(d, PyGOptionContext_Type, "OptionContext");
+}
diff --git a/glib/pygoptioncontext.h b/glib/pygoptioncontext.h
new file mode 100644 (file)
index 0000000..efe5ffa
--- /dev/null
@@ -0,0 +1,39 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_OPTIONCONTEXT_H__
+#define __PYG_OPTIONCONTEXT_H__
+
+#include "pygoptiongroup.h"
+
+extern PyTypeObject PyGOptionContext_Type;
+
+typedef struct {
+    PyObject_HEAD
+    PyGOptionGroup *main_group;
+    GOptionContext *context;
+} PyGOptionContext;
+
+PyObject* pyg_option_context_new(GOptionContext *context);
+
+void pyglib_option_context_register_types(PyObject *d);
+
+#endif /* __PYG_OPTIONCONTEXT_H__ */
diff --git a/glib/pygoptiongroup.c b/glib/pygoptiongroup.c
new file mode 100644 (file)
index 0000000..2a69354
--- /dev/null
@@ -0,0 +1,298 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for the GLib, GObject and GIO
+ * Copyright (C) 2006  Johannes Hoelzl
+ *
+ *   pygoptiongroup.c: GOptionContext and GOptionGroup wrapper
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pyglib-private.h"
+#include "pygoptiongroup.h"
+
+PYGLIB_DEFINE_TYPE("glib.OptionGroup", PyGOptionGroup_Type, PyGOptionGroup)
+
+/**
+ * pyg_option_group_new:
+ * @group: a GOptionGroup
+ *
+ * The returned GOptionGroup can't be used to set any hooks, translation domains
+ * or add entries. It's only intend is, to use for GOptionContext.add_group().
+ *
+ * Returns: the GOptionGroup wrapper.
+ */
+PyObject *
+pyg_option_group_new (GOptionGroup *group)
+{
+    PyGOptionGroup *self;
+
+    self = (PyGOptionGroup *)PyObject_NEW(PyGOptionGroup,
+                      &PyGOptionGroup_Type);
+    if (self == NULL)
+        return NULL;
+
+    self->group = group;
+    self->other_owner = TRUE;
+    self->is_in_context = FALSE;
+
+    return (PyObject *)self;
+}
+
+static gboolean
+check_if_owned(PyGOptionGroup *self)
+{
+    if (self->other_owner)
+    {
+        PyErr_SetString(PyExc_ValueError, "The GOptionGroup was not created by "
+                        "glib.OptionGroup(), so operation is not possible.");
+        return TRUE;
+    }
+    return FALSE;
+}
+
+static void
+destroy_g_group(PyGOptionGroup *self)
+{
+    PyGILState_STATE state;
+    state = pyglib_gil_state_ensure();
+
+    self->group = NULL;
+    Py_CLEAR(self->callback);
+    g_slist_foreach(self->strings, (GFunc) g_free, NULL);
+    g_slist_free(self->strings);
+    self->strings = NULL;
+
+    if (self->is_in_context)
+    {
+        Py_DECREF(self);
+    }
+
+    pyglib_gil_state_release(state);
+}
+
+static int
+pyg_option_group_init(PyGOptionGroup *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "name", "description", "help_description",
+                              "callback", NULL };
+    char *name, *description, *help_description;
+    PyObject *callback;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "zzzO:GOptionGroup.__init__",
+                                     kwlist, &name, &description,
+                                     &help_description, &callback))
+        return -1;
+
+    self->group = g_option_group_new(name, description, help_description,
+                                     self, (GDestroyNotify) destroy_g_group);
+    self->other_owner = FALSE;
+    self->is_in_context = FALSE;
+
+    Py_INCREF(callback);
+    self->callback = callback;
+
+    return 0;
+}
+
+static void
+pyg_option_group_dealloc(PyGOptionGroup *self)
+{
+    if (!self->other_owner && !self->is_in_context)
+    {
+        GOptionGroup *tmp = self->group;
+        self->group = NULL;
+       if (tmp)
+           g_option_group_free(tmp);
+    }
+
+    PyObject_Del(self);
+}
+
+static gboolean
+arg_func(const gchar *option_name,
+         const gchar *value,
+         PyGOptionGroup *self,
+         GError **error)
+{
+    PyObject *ret;
+    PyGILState_STATE state;
+    gboolean no_error;
+
+    state = pyglib_gil_state_ensure();
+
+    if (value == NULL)
+        ret = PyObject_CallFunction(self->callback, "sOO",
+                                    option_name, Py_None, self);
+    else
+        ret = PyObject_CallFunction(self->callback, "ssO",
+                                    option_name, value, self);
+
+    if (ret != NULL)
+    {
+        Py_DECREF(ret);
+        no_error = TRUE;
+    } else
+       no_error = pyglib_gerror_exception_check(error) != -1;
+
+    pyglib_gil_state_release(state);
+    return no_error;
+}
+
+static PyObject *
+pyg_option_group_add_entries(PyGOptionGroup *self, PyObject *args,
+                             PyObject *kwargs)
+{
+    static char *kwlist[] = { "entries", NULL };
+    gssize entry_count, pos;
+    PyObject *entry_tuple, *list;
+    GOptionEntry *entries;
+
+    if (check_if_owned(self))
+       return NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GOptionGroup.add_entries",
+                                     kwlist, &list))
+        return NULL;
+
+    if (!PyList_Check(list))
+    {
+        PyErr_SetString(PyExc_TypeError,
+                        "GOptionGroup.add_entries expected a list of entries");
+        return NULL;
+    }
+
+    entry_count = PyList_Size(list);
+    if (entry_count == -1)
+    {
+        PyErr_SetString(PyExc_TypeError,
+                        "GOptionGroup.add_entries expected a list of entries");
+        return NULL;
+    }
+
+    entries = g_new0(GOptionEntry, entry_count + 1);
+    for (pos = 0; pos < entry_count; pos++)
+    {
+        gchar *long_name, *description, *arg_description;
+        entry_tuple = PyList_GetItem(list, pos);
+        if (!PyTuple_Check(entry_tuple))
+        {
+            PyErr_SetString(PyExc_TypeError, "GOptionGroup.add_entries "
+                                             "expected a list of entries");
+            g_free(entries);
+            return NULL;
+        }
+        if (!PyArg_ParseTuple(entry_tuple, "scisz",
+            &long_name,
+            &(entries[pos].short_name),
+            &(entries[pos].flags),
+            &description,
+            &arg_description))
+        {
+            PyErr_SetString(PyExc_TypeError, "GOptionGroup.add_entries "
+                                             "expected a list of entries");
+            g_free(entries);
+            return NULL;
+        }
+        long_name = g_strdup(long_name);
+        self->strings = g_slist_prepend(self->strings, long_name);
+        entries[pos].long_name = long_name;
+
+        description = g_strdup(description);
+        self->strings = g_slist_prepend(self->strings, description);
+        entries[pos].description = description;
+
+        arg_description = g_strdup(arg_description);
+        self->strings = g_slist_prepend(self->strings, arg_description);
+        entries[pos].arg_description = arg_description;
+
+        entries[pos].arg = G_OPTION_ARG_CALLBACK;
+        entries[pos].arg_data = arg_func;
+    }
+
+    g_option_group_add_entries(self->group, entries);
+
+    g_free(entries);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+
+static PyObject *
+pyg_option_group_set_translation_domain(PyGOptionGroup *self,
+                                        PyObject *args,
+                                        PyObject *kwargs)
+{
+    static char *kwlist[] = { "domain", NULL };
+    char *domain;
+
+    if (check_if_owned(self))
+       return NULL;
+
+    if (self->group == NULL)
+    {
+        PyErr_SetString(PyExc_RuntimeError,
+                        "The corresponding GOptionGroup was already freed, "
+                        "probably through the release of GOptionContext");
+        return NULL;
+    }
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "z:GOptionGroup.set_translate_domain",
+                                     kwlist, &domain))
+        return NULL;
+
+    g_option_group_set_translation_domain(self->group, domain);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject*
+pyg_option_group_richcompare(PyObject *self, PyObject *other, int op)
+{
+    if (Py_TYPE(self) == Py_TYPE(other) && 
+          Py_TYPE(self) == &PyGOptionGroup_Type) {
+        return _pyglib_generic_ptr_richcompare(((PyGOptionGroup*)self)->group,
+                                               ((PyGOptionGroup*)other)->group,
+                                               op);
+    } else {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+}
+
+static PyMethodDef pyg_option_group_methods[] = {
+    { "add_entries", (PyCFunction)pyg_option_group_add_entries, METH_VARARGS | METH_KEYWORDS },
+    { "set_translation_domain", (PyCFunction)pyg_option_group_set_translation_domain, METH_VARARGS | METH_KEYWORDS },
+    { NULL, NULL, 0 },
+};
+
+void
+pyglib_option_group_register_types(PyObject *d)
+{
+    PyGOptionGroup_Type.tp_dealloc = (destructor)pyg_option_group_dealloc;
+    PyGOptionGroup_Type.tp_richcompare = pyg_option_group_richcompare;
+    PyGOptionGroup_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+    PyGOptionGroup_Type.tp_methods = pyg_option_group_methods;
+    PyGOptionGroup_Type.tp_init = (initproc)pyg_option_group_init;
+    PYGLIB_REGISTER_TYPE(d, PyGOptionGroup_Type, "OptionGroup");
+}
diff --git a/glib/pygoptiongroup.h b/glib/pygoptiongroup.h
new file mode 100644 (file)
index 0000000..872b9c6
--- /dev/null
@@ -0,0 +1,42 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_OPTIONGROUP_H__
+#define __PYG_OPTIONGROUP_H__
+
+extern PyTypeObject PyGOptionGroup_Type;
+
+typedef struct {
+    PyObject_HEAD
+    GOptionGroup *group;
+    gboolean other_owner, is_in_context;
+    PyObject *callback;
+    GSList *strings; /* all strings added with the entries, are freed on 
+                        GOptionGroup.destroy() */
+} PyGOptionGroup;
+
+PyObject* pyg_option_group_new(GOptionGroup *group);
+
+void pyglib_option_group_register_types(PyObject *d);
+
+#endif /* __PYG_OPTIONGROUP_H__ */
+
+
diff --git a/glib/pygsource.c b/glib/pygsource.c
new file mode 100644 (file)
index 0000000..d0176ab
--- /dev/null
@@ -0,0 +1,725 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ * Copyright (C) 2005       Oracle
+ *
+ * Author: Manish Singh <manish.singh@oracle.com>
+ *
+ *   pygsource.c: GSource wrapper
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <Python.h>
+#include <pythread.h>
+#include <structmember.h> /* for PyMemberDef */
+#include "pyglib.h"
+#include "pyglib-private.h"
+#include "pygmaincontext.h"
+#include "pygsource.h"
+
+#define CHECK_DESTROYED(self, ret)                     G_STMT_START {  \
+    if ((self)->source == NULL) {                                      \
+       PyErr_SetString(PyExc_RuntimeError, "source is destroyed");     \
+       return (ret);                                                   \
+    }                                                                  \
+} G_STMT_END
+
+
+typedef struct {
+    PyObject_HEAD
+    GSource *source;
+    PyObject *inst_dict;
+    PyObject *weakreflist;
+    gboolean python_source;
+} PyGSource;
+
+typedef struct
+{
+    GSource source;
+    PyObject *obj;
+} PyGRealSource;
+
+/* glib.Source */
+
+PYGLIB_DEFINE_TYPE("glib.Source", PyGSource_Type, PyGSource)
+
+static PyObject *
+source_repr(PyGSource *self, const char *type)
+{
+    gchar buf[256], *desc;
+    if (self->source) {
+       if (g_source_get_context(self->source))
+           desc = "attached";
+       else
+           desc = "unattached";
+    } else {
+       desc = "destroyed";
+    }
+
+    if (type)
+       g_snprintf(buf, sizeof(buf), "<%s glib %s source at 0x%lx>",
+                  desc, type, (long) self);
+    else
+       g_snprintf(buf, sizeof(buf), "<%s glib source at 0x%lx>",
+                  desc, (long) self);
+
+    return PYGLIB_PyUnicode_FromString(buf);
+}
+
+static PyObject *
+pyg_source_attach(PyGSource *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "context", NULL };
+    PyGMainContext *py_context = NULL;
+    GMainContext *context = NULL;
+    guint id;
+
+    if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+                                     "|O!:attach", kwlist,
+                                     &PyGMainContext_Type, &py_context))
+       return NULL;
+
+    if (py_context)
+       context = py_context->context;
+
+    CHECK_DESTROYED(self, NULL);
+
+    if (self->python_source) {
+       PyGRealSource *pysource = (PyGRealSource *)self->source;
+       Py_INCREF(pysource->obj);
+    }
+
+    id = g_source_attach(self->source, context);
+    return PYGLIB_PyLong_FromLong(id);
+}
+
+static PyObject *
+pyg_source_destroy(PyGSource *self)
+{
+    CHECK_DESTROYED(self, NULL);
+
+    if (self->python_source && self->source->context) {
+       PyGRealSource *pysource = (PyGRealSource *)self->source;
+       Py_DECREF(pysource->obj);
+    }
+
+    g_source_destroy(self->source);
+    self->source = NULL;
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pyg_source_set_callback(PyGSource *self, PyObject *args)
+{
+    PyObject *first, *callback, *cbargs = NULL, *data;
+    gint len;
+
+    CHECK_DESTROYED(self, NULL);
+
+    len = PyTuple_Size (args);
+    if (len < 1) {
+       PyErr_SetString(PyExc_TypeError,
+                       "set_callback requires at least 1 argument");
+       return NULL;
+    }
+
+    first = PySequence_GetSlice(args, 0, 1);
+    if (!PyArg_ParseTuple(first, "O:set_callback", &callback)) {
+       Py_DECREF (first);
+       return NULL;
+    }
+    Py_DECREF(first);
+
+    if (!PyCallable_Check(callback)) {
+       PyErr_SetString(PyExc_TypeError, "first argument not callable");
+       return NULL;
+    }
+
+    cbargs = PySequence_GetSlice(args, 1, len);
+    if (cbargs == NULL)
+       return NULL;
+
+    data = Py_BuildValue("(ON)", callback, cbargs);
+    if (data == NULL)
+       return NULL;
+
+    g_source_set_callback(self->source,
+                         _pyglib_handler_marshal, data,
+                         _pyglib_destroy_notify);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pyg_source_get_context(PyGSource *self)
+{
+    GMainContext *context;
+
+    CHECK_DESTROYED(self, NULL);
+
+    context = g_source_get_context(self->source);
+
+    if (context) {
+       return pyg_main_context_new(context);
+    } else {
+       Py_INCREF(Py_None);
+       return Py_None;
+    }
+}
+
+static PyObject *
+pyg_source_add_poll(PyGSource *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "fd", NULL };
+    PyGPollFD *fd;
+
+    if (!self->python_source) {
+       PyErr_SetString(PyExc_TypeError,
+                       "add_poll can only be used with sources "
+                       "implemented in python");
+       return NULL;
+    }
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "O!:add_poll", kwlist,
+                                    &PyGPollFD_Type, &fd))
+       return NULL;
+
+    CHECK_DESTROYED(self, NULL);
+
+    g_source_add_poll(self->source, &fd->pollfd);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pyg_source_remove_poll(PyGSource *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "fd", NULL };
+    PyGPollFD *fd;
+
+    if (!self->python_source) {
+       PyErr_SetString(PyExc_TypeError,
+                       "remove_poll can only be used with sources "
+                       "implemented in python");
+       return NULL;
+    }
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "O!:remove_poll", kwlist,
+                                    &PyGPollFD_Type, &fd))
+       return NULL;
+
+    CHECK_DESTROYED(self, NULL);
+
+    g_source_remove_poll(self->source, &fd->pollfd);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pyg_source_get_current_time(PyGSource *self)
+{
+    GTimeVal timeval;
+    double   ret;
+
+    CHECK_DESTROYED(self, NULL);
+
+    g_source_get_current_time(self->source, &timeval);
+    ret = (double)timeval.tv_sec + (double)timeval.tv_usec * 0.000001;
+    return PyFloat_FromDouble(ret);
+}
+
+static PyMethodDef pyg_source_methods[] = {
+    { "attach", (PyCFunction)pyg_source_attach, METH_VARARGS|METH_KEYWORDS },
+    { "destroy", (PyCFunction)pyg_source_destroy, METH_NOARGS },
+    { "set_callback", (PyCFunction)pyg_source_set_callback, METH_VARARGS },
+    { "get_context", (PyCFunction)pyg_source_get_context, METH_NOARGS },
+    { "add_poll", (PyCFunction)pyg_source_add_poll, METH_KEYWORDS },
+    { "remove_poll", (PyCFunction)pyg_source_remove_poll, METH_VARARGS|METH_KEYWORDS },
+    { "get_current_time", (PyCFunction)pyg_source_get_current_time, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+static PyObject *
+pyg_source_get_dict(PyGSource *self, void *closure)
+{
+    if (self->inst_dict == NULL) {
+       self->inst_dict = PyDict_New();
+       if (self->inst_dict == NULL)
+           return NULL;
+    }
+
+    Py_INCREF(self->inst_dict);
+    return self->inst_dict;
+}
+
+static PyObject *
+pyg_source_get_priority(PyGSource *self, void *closure)
+{
+    CHECK_DESTROYED(self, NULL);
+
+    return PYGLIB_PyLong_FromLong(g_source_get_priority(self->source));
+}
+
+static int
+pyg_source_set_priority(PyGSource *self, PyObject *value, void *closure)
+{
+    CHECK_DESTROYED(self, -1);
+
+    if (value == NULL) {
+       PyErr_SetString(PyExc_TypeError, "cannot delete priority");
+       return -1;
+    }
+
+    if (!PYGLIB_PyLong_Check(value)) {
+       PyErr_SetString(PyExc_TypeError, "type mismatch");
+       return -1;
+    }
+
+    g_source_set_priority(self->source, PYGLIB_PyLong_AsLong(value));
+
+    return 0;
+}
+
+static PyObject *
+pyg_source_get_can_recurse(PyGSource *self, void *closure)
+{
+    CHECK_DESTROYED(self, NULL);
+
+    return PyBool_FromLong(g_source_get_can_recurse(self->source));
+}
+
+static int
+pyg_source_set_can_recurse(PyGSource *self, PyObject *value, void *closure)
+{
+    CHECK_DESTROYED(self, -1);
+
+    if (value == NULL) {
+       PyErr_SetString(PyExc_TypeError, "cannot delete can_recurse");
+       return -1;
+    }
+
+    g_source_set_can_recurse(self->source, PyObject_IsTrue(value));
+
+    return 0;
+}
+
+static PyObject *
+pyg_source_get_id(PyGSource *self, void *closure)
+{
+    CHECK_DESTROYED(self, NULL);
+
+    if (g_source_get_context(self->source) == NULL) {
+       PyErr_SetString(PyExc_RuntimeError, "source is not attached");
+       return NULL;
+    }
+
+    return PYGLIB_PyLong_FromLong(g_source_get_id(self->source));
+}
+
+static PyGetSetDef pyg_source_getsets[] = {
+    { "__dict__", (getter)pyg_source_get_dict,  (setter)0 },
+    {"priority", (getter)pyg_source_get_priority, (setter)pyg_source_set_priority },
+    {"can_recurse", (getter)pyg_source_get_can_recurse, (setter)pyg_source_set_can_recurse },
+    {"id", (getter)pyg_source_get_id, (setter)0 },
+    {NULL, 0, 0}
+};
+
+static PyObject *
+pyg_source_repr(PyGSource *self)
+{
+    return source_repr(self, NULL);
+}
+
+static int
+pyg_source_traverse(PyGSource *self, visitproc visit, void *arg)
+{
+    int ret = 0;
+
+    if (self->inst_dict) ret = visit(self->inst_dict, arg);
+    if (ret != 0) return ret;
+
+    return 0;
+}
+
+static int
+pyg_source_clear(PyGSource *self)
+{
+    PyObject *tmp;
+
+    tmp = self->inst_dict;
+    self->inst_dict = NULL;
+    Py_XDECREF(tmp);
+
+    if (self->source) {
+       g_source_unref(self->source);
+       self->source = NULL;
+    }
+
+    return 0;
+}
+
+static void
+pyg_source_dealloc(PyGSource *self)
+{
+    /* Must be done first, so that there is no chance of Python's GC being
+     * called while tracking this half-deallocated object */
+    PyObject_GC_UnTrack((PyObject *)self);
+
+    PyObject_ClearWeakRefs((PyObject *)self);
+
+    pyg_source_clear(self);
+
+    PyObject_GC_Del(self);
+}
+
+static gboolean
+pyg_source_prepare(GSource *source, gint *timeout)
+{
+    PyGRealSource *pysource = (PyGRealSource *)source;
+    PyObject *t;
+    gboolean ret = FALSE;
+    gboolean got_err = TRUE;
+    PyGILState_STATE state;
+
+    state = pyglib_gil_state_ensure();
+
+    t = PyObject_CallMethod(pysource->obj, "prepare", NULL);
+
+    if (t == NULL) {
+       goto bail;
+    } else if (!PyObject_IsTrue(t)) {
+       got_err = FALSE;
+       goto bail;
+    } else if (!PyTuple_Check(t)) {
+       PyErr_SetString(PyExc_TypeError,
+                       "source prepare function must return a tuple or False");
+       goto bail;
+    } else if (PyTuple_Size(t) != 2) {
+       PyErr_SetString(PyExc_TypeError,
+                       "source prepare function return tuple must be exactly "
+                       "2 elements long");
+       goto bail;
+    }
+
+    ret = PyObject_IsTrue(PyTuple_GET_ITEM(t, 0));
+       *timeout = PYGLIB_PyLong_AsLong(PyTuple_GET_ITEM(t, 1));
+
+       if (*timeout == -1 && PyErr_Occurred()) {
+           ret = FALSE;
+           goto bail;
+       }
+
+    got_err = FALSE;
+
+bail:
+    if (got_err)
+       PyErr_Print();
+
+    Py_XDECREF(t);
+
+    pyglib_gil_state_release(state);
+
+    return ret;
+}
+
+static gboolean
+pyg_source_check(GSource *source)
+{
+    PyGRealSource *pysource = (PyGRealSource *)source;
+    PyObject *t;
+    gboolean ret;
+    PyGILState_STATE state;
+
+    state = pyglib_gil_state_ensure();
+
+    t = PyObject_CallMethod(pysource->obj, "check", NULL);
+
+    if (t == NULL) {
+       PyErr_Print();
+       ret = FALSE;
+    } else {
+       ret = PyObject_IsTrue(t);
+       Py_DECREF(t);
+    }
+
+    pyglib_gil_state_release(state);
+
+    return ret;
+}
+
+static gboolean
+pyg_source_dispatch(GSource *source, GSourceFunc callback, gpointer user_data)
+{
+    PyGRealSource *pysource = (PyGRealSource *)source;
+    PyObject *func, *args, *tuple, *t;
+    gboolean ret;
+    PyGILState_STATE state;
+
+    state = pyglib_gil_state_ensure();
+
+    if (callback) {
+       tuple = user_data;
+
+       func = PyTuple_GetItem(tuple, 0);
+        args = PyTuple_GetItem(tuple, 1);
+    } else {
+       func = Py_None;
+       args = Py_None;
+    }
+
+    t = PyObject_CallMethod(pysource->obj, "dispatch", "OO", func, args);
+
+    if (t == NULL) {
+       PyErr_Print();
+       ret = FALSE;
+    } else {
+       ret = PyObject_IsTrue(t);
+       Py_DECREF(t);
+    }
+
+    pyglib_gil_state_release(state);
+
+    return ret;
+}
+
+static void
+pyg_source_finalize(GSource *source)
+{
+    PyGRealSource *pysource = (PyGRealSource *)source;
+    PyObject *func, *t;
+    PyGILState_STATE state;
+
+    state = pyglib_gil_state_ensure();
+
+    func = PyObject_GetAttrString(pysource->obj, "finalize");
+    if (func) {
+       t = PyObject_CallObject(func, NULL);
+       Py_DECREF(func);
+
+       if (t == NULL) {
+           PyErr_Print();
+       } else {
+           Py_DECREF(t);
+       }
+    }
+
+    pyglib_gil_state_release(state);
+}
+
+static GSourceFuncs pyg_source_funcs =
+{
+    pyg_source_prepare,
+    pyg_source_check,
+    pyg_source_dispatch,
+    pyg_source_finalize
+};
+
+static int
+pyg_source_init(PyGSource *self, PyObject *args, PyObject *kwargs)
+{
+    PyGRealSource *pysource;
+
+    self->source = g_source_new(&pyg_source_funcs, sizeof(PyGRealSource));
+
+    pysource = (PyGRealSource *)self->source;
+    pysource->obj = (PyObject*)self;
+
+    self->inst_dict = NULL;
+    self->weakreflist = NULL;
+
+    self->python_source = TRUE;
+
+    return 0;
+}
+
+static void
+pyg_source_free(PyObject *op)
+{
+    PyObject_GC_Del(op);
+}
+
+/* glib.Idle */
+
+PYGLIB_DEFINE_TYPE("glib.Idle", PyGIdle_Type, PyGSource)
+
+static PyObject *
+pyg_idle_repr(PyGSource *self)
+{
+    return source_repr(self, "idle");
+}
+
+static int
+pyg_idle_init(PyGSource *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "priority", NULL };
+    gint priority = G_PRIORITY_DEFAULT_IDLE;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "|i:glib.Idle.__init__", kwlist,
+                                    &priority))
+       return -1;
+
+    self->source = g_idle_source_new ();
+
+    if (priority != G_PRIORITY_DEFAULT_IDLE)
+       g_source_set_priority(self->source, priority);
+
+    self->inst_dict = NULL;
+    self->weakreflist = NULL;
+
+    self->python_source = FALSE;
+
+    return 0;
+}
+
+/* glib.Timeout */
+
+PYGLIB_DEFINE_TYPE("glib.Timeout", PyGTimeout_Type, PyGSource)
+
+static PyObject *
+pyg_timeout_repr(PyGSource *self)
+{
+    return source_repr(self, "timeout");
+}
+
+static int
+pyg_timeout_init(PyGSource *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "interval", "priority", NULL };
+    gint priority = G_PRIORITY_DEFAULT;
+    guint interval;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "I|i:glib.Timeout.__init__", kwlist,
+                                    &interval, &priority))
+       return -1;
+
+    self->source = g_timeout_source_new(interval);
+
+    if (priority != G_PRIORITY_DEFAULT)
+       g_source_set_priority(self->source, priority);
+
+    self->inst_dict = NULL;
+    self->weakreflist = NULL;
+
+    self->python_source = FALSE;
+
+    return 0;
+}
+
+/* glib.PollFD */
+
+PYGLIB_DEFINE_TYPE("glib.PollFD", PyGPollFD_Type, PyGPollFD)
+
+static PyMemberDef pyg_poll_fd_members[] = {
+    { "fd",      T_INT,    offsetof(PyGPollFD, pollfd.fd),      READONLY },
+    { "events",  T_USHORT, offsetof(PyGPollFD, pollfd.events),  READONLY },
+    { "revents", T_USHORT, offsetof(PyGPollFD, pollfd.revents), READONLY },
+    { NULL, 0, 0, 0 }
+};
+
+static void
+pyg_poll_fd_dealloc(PyGPollFD *self)
+{
+    Py_XDECREF(self->fd_obj);
+    PyObject_DEL(self);
+}
+
+static PyObject *
+pyg_poll_fd_repr(PyGPollFD *self)
+{
+    return PYGLIB_PyUnicode_FromFormat("<GPollFD %d (%d) at 0x%lx>",
+                                self->pollfd.fd, self->pollfd.events,
+                                (long)self);
+}
+
+static int
+pyg_poll_fd_init(PyGPollFD *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "fd", "events", NULL };
+    PyObject *o;
+    gint fd;
+    gushort events;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "OH:glib.PollFD.__init__", kwlist,
+                                    &o, &events))
+       return -1;
+
+    fd = PyObject_AsFileDescriptor(o);
+    if (fd == -1)
+       return -1;
+
+    self->pollfd.fd = fd;
+    self->pollfd.events = events;
+    self->pollfd.revents = 0;
+
+    Py_INCREF(o);
+    self->fd_obj = o;
+
+    return 0;
+}
+
+void
+pyglib_source_register_types(PyObject *d)
+{
+    PyGSource_Type.tp_flags = (Py_TPFLAGS_DEFAULT |
+                              Py_TPFLAGS_BASETYPE |
+                              Py_TPFLAGS_HAVE_GC);
+    PyGSource_Type.tp_init = (initproc)pyg_source_init;
+    PyGSource_Type.tp_free = (freefunc)pyg_source_free;
+    PyGSource_Type.tp_dealloc = (destructor)pyg_source_dealloc;
+    PyGSource_Type.tp_methods = pyg_source_methods;
+    PyGSource_Type.tp_repr = (reprfunc)pyg_source_repr;
+    PyGSource_Type.tp_traverse = (traverseproc)pyg_source_traverse;
+    PyGSource_Type.tp_clear = (inquiry)pyg_source_clear;
+    PyGSource_Type.tp_getset = pyg_source_getsets;
+    PyGSource_Type.tp_weaklistoffset = offsetof(PyGSource, weakreflist);
+    PyGSource_Type.tp_dictoffset = offsetof(PyGSource, inst_dict);
+    PYGLIB_REGISTER_TYPE(d, PyGSource_Type, "Source");
+
+    PyGIdle_Type.tp_repr = (reprfunc)pyg_idle_repr;
+    PyGIdle_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+    PyGIdle_Type.tp_base = (PyTypeObject *)&PyGSource_Type;
+    PyGIdle_Type.tp_init = (initproc)pyg_idle_init;
+    PYGLIB_REGISTER_TYPE(d, PyGIdle_Type, "Idle");
+
+    PyGTimeout_Type.tp_repr = (reprfunc)pyg_timeout_repr;
+    PyGTimeout_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+    PyGTimeout_Type.tp_base = (PyTypeObject *)&PyGSource_Type;
+    PyGTimeout_Type.tp_init = (initproc)pyg_timeout_init;
+    PYGLIB_REGISTER_TYPE(d, PyGTimeout_Type, "Timeout");
+
+    PyGPollFD_Type.tp_dealloc = (destructor)pyg_poll_fd_dealloc;
+    PyGPollFD_Type.tp_repr = (reprfunc)pyg_poll_fd_repr;
+    PyGPollFD_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+    PyGPollFD_Type.tp_members = pyg_poll_fd_members;
+    PyGPollFD_Type.tp_init = (initproc)pyg_poll_fd_init;
+    PYGLIB_REGISTER_TYPE(d, PyGPollFD_Type, "PollFD");
+}
diff --git a/glib/pygsource.h b/glib/pygsource.h
new file mode 100644 (file)
index 0000000..bf2c673
--- /dev/null
@@ -0,0 +1,39 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_SOURCE_H__
+#define __PYG_SOURCE_H__
+
+extern PyTypeObject PyGSource_Type;
+extern PyTypeObject PyGIdle_Type;
+extern PyTypeObject PyGTimeout_Type;
+extern PyTypeObject PyGPollFD_Type;
+
+typedef struct
+{
+    PyObject_HEAD
+    GPollFD pollfd;
+    PyObject *fd_obj;
+} PyGPollFD;
+
+void pyglib_source_register_types(PyObject *d);
+
+#endif /* __PYG_SOURCE_H__ */
diff --git a/glib/pygspawn.c b/glib/pygspawn.c
new file mode 100644 (file)
index 0000000..75e2232
--- /dev/null
@@ -0,0 +1,264 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ *   pygspawn.c: wrapper for the glib 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include <Python.h>
+#include <glib.h>
+
+#include "pyglib.h"
+#include "pyglib-private.h"
+
+struct _PyGChildSetupData {
+    PyObject *func;
+    PyObject *data;
+};
+
+PYGLIB_DEFINE_TYPE("glib.Pid", PyGPid_Type, PYGLIB_PyLongObject)
+
+static PyObject *
+pyg_pid_close(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    g_spawn_close_pid(PYGLIB_PyLong_AsLong(self));
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyMethodDef pyg_pid_methods[] = {
+    { "close", (PyCFunction)pyg_pid_close, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+static void
+pyg_pid_free(PyObject *gpid)
+{
+    g_spawn_close_pid((GPid) PYGLIB_PyLong_AsLong(gpid));
+    PYGLIB_PyLong_Type.tp_free((void *) gpid);
+}
+
+static int
+pyg_pid_tp_init(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    PyErr_SetString(PyExc_TypeError, "glib.Pid cannot be manually instantiated");
+    return -1;
+}
+
+PyObject *
+pyg_pid_new(GPid pid)
+{
+    PYGLIB_PyLongObject *pygpid;
+
+#if PY_VERSION_HEX >= 0x03000000
+    return PyObject_CallMethod((PyObject*)&PyGPid_Type, "__new__", "Oi",
+                              &PyGPid_Type, pid);
+#else
+    pygpid = PyObject_NEW(PyIntObject, &PyGPid_Type);
+    pygpid->ob_ival = pid;
+#endif
+    return (PyObject *) pygpid;
+}
+
+static void
+_pyg_spawn_async_callback(gpointer user_data)
+{
+    struct _PyGChildSetupData *data;
+    PyObject *retval;
+    PyGILState_STATE gil;
+
+    data = (struct _PyGChildSetupData *) user_data;
+    gil = pyglib_gil_state_ensure();
+    if (data->data)
+        retval = PyObject_CallFunction(data->func, "O", data->data);
+    else
+        retval = PyObject_CallFunction(data->func, NULL);
+    if (retval)
+       Py_DECREF(retval);
+    else
+       PyErr_Print();
+    Py_DECREF(data->func);
+    Py_XDECREF(data->data);
+    g_slice_free(struct _PyGChildSetupData, data);
+    pyglib_gil_state_release(gil);
+}
+
+PyObject *
+pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "argv", "envp", "working_directory", "flags",
+                              "child_setup", "user_data", "standard_input",
+                              "standard_output", "standard_error", NULL };
+    PyObject *pyargv, *pyenvp = NULL;
+    char **argv, **envp = NULL;
+    PyObject *func = Py_None, *user_data = NULL;
+    char *working_directory = NULL;
+    int flags = 0, _stdin = -1, _stdout = -1, _stderr = -1;
+    PyObject *pystdin = NULL, *pystdout = NULL, *pystderr = NULL;
+    gint *standard_input, *standard_output, *standard_error;
+    struct _PyGChildSetupData *callback_data = NULL;
+    GError *error = NULL;
+    GPid child_pid = -1;
+    Py_ssize_t len, i;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OsiOOOOO:glib.spawn_async",
+                                     kwlist,
+                                     &pyargv, &pyenvp, &working_directory, &flags,
+                                     &func, &user_data,
+                                     &pystdin, &pystdout, &pystderr))
+        return NULL;
+
+    if (pystdin && PyObject_IsTrue(pystdin))
+        standard_input = &_stdin;
+    else
+        standard_input = NULL;
+
+    if (pystdout && PyObject_IsTrue(pystdout))
+        standard_output = &_stdout;
+    else
+        standard_output = NULL;
+
+    if (pystderr && PyObject_IsTrue(pystderr))
+        standard_error = &_stderr;
+    else
+        standard_error = NULL;
+
+      /* parse argv */
+    if (!PySequence_Check(pyargv)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "glib.spawn_async: "
+                       "first argument must be a sequence of strings");
+        return NULL;
+    }
+    len = PySequence_Length(pyargv);
+    argv = g_new0(char *, len + 1);
+    for (i = 0; i < len; ++i) {
+        PyObject *tmp = PySequence_ITEM(pyargv, i);
+        if (!PYGLIB_PyUnicode_Check(tmp)) {
+            PyErr_SetString(PyExc_TypeError,
+                            "glib.spawn_async: "
+                           "first argument must be a sequence of strings");
+            g_free(argv);
+            Py_XDECREF(tmp);
+            return NULL;
+        }
+        argv[i] = PYGLIB_PyUnicode_AsString(tmp);
+        Py_DECREF(tmp);
+    }
+
+      /* parse envp */
+    if (pyenvp) {
+        if (!PySequence_Check(pyenvp)) {
+            PyErr_SetString(PyExc_TypeError,
+                            "glib.spawn_async: "
+                           "second argument must be a sequence of strings");
+            g_free(argv);
+            return NULL;
+        }
+        len = PySequence_Length(pyenvp);
+        envp = g_new0(char *, len + 1);
+        for (i = 0; i < len; ++i) {
+            PyObject *tmp = PySequence_ITEM(pyenvp, i);
+            if (!PYGLIB_PyUnicode_Check(tmp)) {
+                PyErr_SetString(PyExc_TypeError,
+                                "glib.spawn_async: "
+                               "second argument must be a sequence of strings");
+                g_free(envp);
+                Py_XDECREF(tmp);
+               g_free(argv);
+                return NULL;
+            }
+            envp[i] = PYGLIB_PyUnicode_AsString(tmp);
+            Py_DECREF(tmp);
+        }
+    }
+
+    if (func != Py_None) {
+        if (!PyCallable_Check(func)) {
+            PyErr_SetString(PyExc_TypeError, "child_setup parameter must be callable or None");
+            g_free(argv);
+            if (envp)
+                g_free(envp);
+            return NULL;
+        }
+        callback_data = g_slice_new(struct _PyGChildSetupData);
+        callback_data->func = func;
+        callback_data->data = user_data;
+        Py_INCREF(callback_data->func);
+        if (callback_data->data)
+            Py_INCREF(callback_data->data);
+    }
+
+    if (!g_spawn_async_with_pipes(working_directory, argv, envp, flags,
+                                  (func != Py_None ? _pyg_spawn_async_callback : NULL),
+                                  callback_data, &child_pid,
+                                  standard_input,
+                                  standard_output,
+                                  standard_error,
+                                  &error))
+
+
+    {
+        g_free(argv);
+        if (envp) g_free(envp);
+        if (callback_data) {
+            Py_DECREF(callback_data->func);
+            Py_XDECREF(callback_data->data);
+            g_slice_free(struct _PyGChildSetupData, callback_data);
+        }
+        pyglib_error_check(&error);
+        return NULL;
+    }
+    g_free(argv);
+    if (envp) g_free(envp);
+
+    if (standard_input)
+        pystdin = PYGLIB_PyLong_FromLong(*standard_input);
+    else {
+        Py_INCREF(Py_None);
+        pystdin = Py_None;
+    }
+
+    if (standard_output)
+        pystdout = PYGLIB_PyLong_FromLong(*standard_output);
+    else {
+        Py_INCREF(Py_None);
+        pystdout = Py_None;
+    }
+
+    if (standard_error)
+        pystderr = PYGLIB_PyLong_FromLong(*standard_error);
+    else {
+        Py_INCREF(Py_None);
+        pystderr = Py_None;
+    }
+
+    return Py_BuildValue("NNNN", pyg_pid_new(child_pid), pystdin, pystdout, pystderr);
+}
+
+void
+pyglib_spawn_register_types(PyObject *d)
+{
+    PyGPid_Type.tp_base = &PYGLIB_PyLong_Type;
+    PyGPid_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+    PyGPid_Type.tp_methods = pyg_pid_methods;
+    PyGPid_Type.tp_init = pyg_pid_tp_init;
+    PyGPid_Type.tp_free = (freefunc)pyg_pid_free;
+    PYGLIB_REGISTER_TYPE(d, PyGPid_Type, "Pid");
+}
diff --git a/glib/pygspawn.h b/glib/pygspawn.h
new file mode 100644 (file)
index 0000000..2e8dd3c
--- /dev/null
@@ -0,0 +1,32 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pyglib - Python bindings for GLib toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYG_PID_H__
+#define __PYG_PID_H__
+
+PyObject * pyg_pid_new(GPid pid);
+void pyglib_spawn_register_types(PyObject *d);
+
+PyObject * pyglib_spawn_async(PyObject *self, PyObject *args, PyObject *kwargs);
+
+
+#endif /* __PYG_PID_H__ */
+
diff --git a/gobject/Makefile.am b/gobject/Makefile.am
new file mode 100644 (file)
index 0000000..7208329
--- /dev/null
@@ -0,0 +1,75 @@
+AUTOMAKE_OPTIONS = 1.7
+PLATFORM_VERSION = 2.0
+
+pkgincludedir = $(includedir)/pygtk-$(PLATFORM_VERSION)
+pkginclude_HEADERS = pygobject.h
+
+pkgpyexecdir = $(pyexecdir)
+
+# gobject python scripts
+pygobjectdir = $(pkgpyexecdir)/gobject
+pygobject_PYTHON =     \
+       __init__.py     \
+       constants.py    \
+       propertyhelper.py
+pygobject_LTLIBRARIES = _gobject.la 
+
+common_ldflags = -module -avoid-version
+if PLATFORM_WIN32
+common_ldflags += -no-undefined
+endif
+
+_gobject_la_CFLAGS = \
+       -I$(top_srcdir)/glib \
+       -I$(top_srcdir)/gi \
+       $(PYTHON_INCLUDES) \
+       $(FFI_CFLAGS) \
+       $(GLIB_CFLAGS) \
+        -DPY_SSIZE_T_CLEAN
+
+if ENABLE_INTROSPECTION
+_gobject_la_CFLAGS += $(GI_CFLAGS)
+endif
+
+_gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_gobject|PyInit__gobject"
+_gobject_la_LIBADD = \
+       $(GLIB_LIBS) \
+       $(FFI_LIBS) \
+       $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+_gobject_la_SOURCES =           \
+        gobjectmodule.c         \
+        pygboxed.c              \
+        pygboxed.h              \
+        pygenum.c               \
+        pygenum.h               \
+        pygflags.c              \
+        pygflags.h              \
+        pyginterface.c          \
+        pyginterface.h          \
+        pygobject.c             \
+        pygobject.h             \
+        pygobject-private.h     \
+        pygparamspec.c          \
+        pygparamspec.h          \
+        pygpointer.c            \
+        pygpointer.h            \
+        pygtype.c               \
+        pygtype.h
+
+if HAVE_LIBFFI
+_gobject_la_SOURCES += ffi-marshaller.c ffi-marshaller.h
+endif
+
+if PLATFORM_WIN32
+_gobject_la_CFLAGS += -DPLATFORM_WIN32
+endif
+
+
+all: $(pygobject_LTLIBRARIES:.la=.so)
+check-local: $(pygobject_LTLIBRARIES:.la=.so)
+clean-local:
+       rm -f $(pygobject_LTLIBRARIES:.la=.so)
+.la.so:
+       $(LN_S) .libs/$@ $@ || true
+
+-include $(top_srcdir)/git.mk
diff --git a/gobject/Makefile.in b/gobject/Makefile.in
new file mode 100644 (file)
index 0000000..be4bac8
--- /dev/null
@@ -0,0 +1,793 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+@PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined
+@ENABLE_INTROSPECTION_TRUE@am__append_2 = $(GI_CFLAGS)
+@HAVE_LIBFFI_TRUE@am__append_3 = ffi-marshaller.c ffi-marshaller.h
+@PLATFORM_WIN32_TRUE@am__append_4 = -DPLATFORM_WIN32
+subdir = gobject
+DIST_COMMON = $(pkginclude_HEADERS) $(pygobject_PYTHON) \
+       $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+       $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pygobjectdir)" \
+       "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pkgincludedir)"
+LTLIBRARIES = $(pygobject_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+_gobject_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+       $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+am___gobject_la_SOURCES_DIST = gobjectmodule.c pygboxed.c pygboxed.h \
+       pygenum.c pygenum.h pygflags.c pygflags.h pyginterface.c \
+       pyginterface.h pygobject.c pygobject.h pygobject-private.h \
+       pygparamspec.c pygparamspec.h pygpointer.c pygpointer.h \
+       pygtype.c pygtype.h ffi-marshaller.c ffi-marshaller.h
+@HAVE_LIBFFI_TRUE@am__objects_1 = _gobject_la-ffi-marshaller.lo
+am__gobject_la_OBJECTS = _gobject_la-gobjectmodule.lo \
+       _gobject_la-pygboxed.lo _gobject_la-pygenum.lo \
+       _gobject_la-pygflags.lo _gobject_la-pyginterface.lo \
+       _gobject_la-pygobject.lo _gobject_la-pygparamspec.lo \
+       _gobject_la-pygpointer.lo _gobject_la-pygtype.lo \
+       $(am__objects_1)
+_gobject_la_OBJECTS = $(am__gobject_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+_gobject_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(_gobject_la_CFLAGS) \
+       $(CFLAGS) $(_gobject_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(_gobject_la_SOURCES)
+DIST_SOURCES = $(am___gobject_la_SOURCES_DIST)
+py_compile = $(top_srcdir)/py-compile
+HEADERS = $(pkginclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgincludedir = $(includedir)/pygtk-$(PLATFORM_VERSION)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
+GI_LIBS = @GI_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PLATFORM = @PLATFORM@
+PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
+PYCAIRO_LIBS = @PYCAIRO_LIBS@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = $(pyexecdir)
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.7
+PLATFORM_VERSION = 2.0
+pkginclude_HEADERS = pygobject.h
+
+# gobject python scripts
+pygobjectdir = $(pkgpyexecdir)/gobject
+pygobject_PYTHON = \
+       __init__.py     \
+       constants.py    \
+       propertyhelper.py
+
+pygobject_LTLIBRARIES = _gobject.la 
+common_ldflags = -module -avoid-version $(am__append_1)
+_gobject_la_CFLAGS = -I$(top_srcdir)/glib -I$(top_srcdir)/gi \
+       $(PYTHON_INCLUDES) $(FFI_CFLAGS) $(GLIB_CFLAGS) \
+       -DPY_SSIZE_T_CLEAN $(am__append_2) $(am__append_4)
+_gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_gobject|PyInit__gobject"
+_gobject_la_LIBADD = \
+       $(GLIB_LIBS) \
+       $(FFI_LIBS) \
+       $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+
+_gobject_la_SOURCES = gobjectmodule.c pygboxed.c pygboxed.h pygenum.c \
+       pygenum.h pygflags.c pygflags.h pyginterface.c pyginterface.h \
+       pygobject.c pygobject.h pygobject-private.h pygparamspec.c \
+       pygparamspec.h pygpointer.c pygpointer.h pygtype.c pygtype.h \
+       $(am__append_3)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .la .lo .o .obj .so
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gobject/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign gobject/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-pygobjectLTLIBRARIES: $(pygobject_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(pygobjectdir)" || $(MKDIR_P) "$(DESTDIR)$(pygobjectdir)"
+       @list='$(pygobject_LTLIBRARIES)'; test -n "$(pygobjectdir)" || list=; \
+       list2=; for p in $$list; do \
+         if test -f $$p; then \
+           list2="$$list2 $$p"; \
+         else :; fi; \
+       done; \
+       test -z "$$list2" || { \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pygobjectdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pygobjectdir)"; \
+       }
+
+uninstall-pygobjectLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pygobject_LTLIBRARIES)'; test -n "$(pygobjectdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pygobjectdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pygobjectdir)/$$f"; \
+       done
+
+clean-pygobjectLTLIBRARIES:
+       -test -z "$(pygobject_LTLIBRARIES)" || rm -f $(pygobject_LTLIBRARIES)
+       @list='$(pygobject_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+_gobject.la: $(_gobject_la_OBJECTS) $(_gobject_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(_gobject_la_LINK) -rpath $(pygobjectdir) $(_gobject_la_OBJECTS) $(_gobject_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-ffi-marshaller.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-gobjectmodule.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygboxed.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygenum.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygflags.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pyginterface.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygobject.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygparamspec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygpointer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygtype.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+
+_gobject_la-gobjectmodule.lo: gobjectmodule.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-gobjectmodule.lo -MD -MP -MF $(DEPDIR)/_gobject_la-gobjectmodule.Tpo -c -o _gobject_la-gobjectmodule.lo `test -f 'gobjectmodule.c' || echo '$(srcdir)/'`gobjectmodule.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gobject_la-gobjectmodule.Tpo $(DEPDIR)/_gobject_la-gobjectmodule.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='gobjectmodule.c' object='_gobject_la-gobjectmodule.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-gobjectmodule.lo `test -f 'gobjectmodule.c' || echo '$(srcdir)/'`gobjectmodule.c
+
+_gobject_la-pygboxed.lo: pygboxed.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygboxed.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygboxed.Tpo -c -o _gobject_la-pygboxed.lo `test -f 'pygboxed.c' || echo '$(srcdir)/'`pygboxed.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gobject_la-pygboxed.Tpo $(DEPDIR)/_gobject_la-pygboxed.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygboxed.c' object='_gobject_la-pygboxed.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygboxed.lo `test -f 'pygboxed.c' || echo '$(srcdir)/'`pygboxed.c
+
+_gobject_la-pygenum.lo: pygenum.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygenum.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygenum.Tpo -c -o _gobject_la-pygenum.lo `test -f 'pygenum.c' || echo '$(srcdir)/'`pygenum.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gobject_la-pygenum.Tpo $(DEPDIR)/_gobject_la-pygenum.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygenum.c' object='_gobject_la-pygenum.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygenum.lo `test -f 'pygenum.c' || echo '$(srcdir)/'`pygenum.c
+
+_gobject_la-pygflags.lo: pygflags.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygflags.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygflags.Tpo -c -o _gobject_la-pygflags.lo `test -f 'pygflags.c' || echo '$(srcdir)/'`pygflags.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gobject_la-pygflags.Tpo $(DEPDIR)/_gobject_la-pygflags.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygflags.c' object='_gobject_la-pygflags.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygflags.lo `test -f 'pygflags.c' || echo '$(srcdir)/'`pygflags.c
+
+_gobject_la-pyginterface.lo: pyginterface.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pyginterface.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pyginterface.Tpo -c -o _gobject_la-pyginterface.lo `test -f 'pyginterface.c' || echo '$(srcdir)/'`pyginterface.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gobject_la-pyginterface.Tpo $(DEPDIR)/_gobject_la-pyginterface.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pyginterface.c' object='_gobject_la-pyginterface.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pyginterface.lo `test -f 'pyginterface.c' || echo '$(srcdir)/'`pyginterface.c
+
+_gobject_la-pygobject.lo: pygobject.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygobject.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygobject.Tpo -c -o _gobject_la-pygobject.lo `test -f 'pygobject.c' || echo '$(srcdir)/'`pygobject.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gobject_la-pygobject.Tpo $(DEPDIR)/_gobject_la-pygobject.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygobject.c' object='_gobject_la-pygobject.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygobject.lo `test -f 'pygobject.c' || echo '$(srcdir)/'`pygobject.c
+
+_gobject_la-pygparamspec.lo: pygparamspec.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygparamspec.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygparamspec.Tpo -c -o _gobject_la-pygparamspec.lo `test -f 'pygparamspec.c' || echo '$(srcdir)/'`pygparamspec.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gobject_la-pygparamspec.Tpo $(DEPDIR)/_gobject_la-pygparamspec.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygparamspec.c' object='_gobject_la-pygparamspec.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygparamspec.lo `test -f 'pygparamspec.c' || echo '$(srcdir)/'`pygparamspec.c
+
+_gobject_la-pygpointer.lo: pygpointer.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygpointer.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygpointer.Tpo -c -o _gobject_la-pygpointer.lo `test -f 'pygpointer.c' || echo '$(srcdir)/'`pygpointer.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gobject_la-pygpointer.Tpo $(DEPDIR)/_gobject_la-pygpointer.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygpointer.c' object='_gobject_la-pygpointer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygpointer.lo `test -f 'pygpointer.c' || echo '$(srcdir)/'`pygpointer.c
+
+_gobject_la-pygtype.lo: pygtype.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygtype.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygtype.Tpo -c -o _gobject_la-pygtype.lo `test -f 'pygtype.c' || echo '$(srcdir)/'`pygtype.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gobject_la-pygtype.Tpo $(DEPDIR)/_gobject_la-pygtype.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pygtype.c' object='_gobject_la-pygtype.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygtype.lo `test -f 'pygtype.c' || echo '$(srcdir)/'`pygtype.c
+
+_gobject_la-ffi-marshaller.lo: ffi-marshaller.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-ffi-marshaller.lo -MD -MP -MF $(DEPDIR)/_gobject_la-ffi-marshaller.Tpo -c -o _gobject_la-ffi-marshaller.lo `test -f 'ffi-marshaller.c' || echo '$(srcdir)/'`ffi-marshaller.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/_gobject_la-ffi-marshaller.Tpo $(DEPDIR)/_gobject_la-ffi-marshaller.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='ffi-marshaller.c' object='_gobject_la-ffi-marshaller.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-ffi-marshaller.lo `test -f 'ffi-marshaller.c' || echo '$(srcdir)/'`ffi-marshaller.c
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-pygobjectPYTHON: $(pygobject_PYTHON)
+       @$(NORMAL_INSTALL)
+       test -z "$(pygobjectdir)" || $(MKDIR_P) "$(DESTDIR)$(pygobjectdir)"
+       @list='$(pygobject_PYTHON)'; dlist=; list2=; test -n "$(pygobjectdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+         if test -f $$b$$p; then \
+           $(am__strip_dir) \
+           dlist="$$dlist $$f"; \
+           list2="$$list2 $$b$$p"; \
+         else :; fi; \
+       done; \
+       for file in $$list2; do echo $$file; done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pygobjectdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pygobjectdir)" || exit $$?; \
+       done || exit $$?; \
+       if test -n "$$dlist"; then \
+         if test -z "$(DESTDIR)"; then \
+           PYTHON=$(PYTHON) $(py_compile) --basedir "$(pygobjectdir)" $$dlist; \
+         else \
+           PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pygobjectdir)" $$dlist; \
+         fi; \
+       else :; fi
+
+uninstall-pygobjectPYTHON:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pygobject_PYTHON)'; test -n "$(pygobjectdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       filesc=`echo "$$files" | sed 's|$$|c|'`; \
+       fileso=`echo "$$files" | sed 's|$$|o|'`; \
+       echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$files || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$filesc ")"; \
+       cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$filesc || exit $$?; \
+       echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$fileso ")"; \
+       cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$fileso
+install-pkgincludeHEADERS: $(pkginclude_HEADERS)
+       @$(NORMAL_INSTALL)
+       test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
+       @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
+         $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
+       done
+
+uninstall-pkgincludeHEADERS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$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
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+       for dir in "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pkgincludedir)"; 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:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 clean-local \
+       clean-pygobjectLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgincludeHEADERS \
+       install-pygobjectLTLIBRARIES install-pygobjectPYTHON
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-pkgincludeHEADERS \
+       uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+       clean-generic clean-libtool clean-local \
+       clean-pygobjectLTLIBRARIES ctags distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-pkgincludeHEADERS install-ps \
+       install-ps-am install-pygobjectLTLIBRARIES \
+       install-pygobjectPYTHON install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags uninstall uninstall-am uninstall-pkgincludeHEADERS \
+       uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON
+
+
+all: $(pygobject_LTLIBRARIES:.la=.so)
+check-local: $(pygobject_LTLIBRARIES:.la=.so)
+clean-local:
+       rm -f $(pygobject_LTLIBRARIES:.la=.so)
+.la.so:
+       $(LN_S) .libs/$@ $@ || true
+
+-include $(top_srcdir)/git.mk
+
+# 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:
diff --git a/gobject/__init__.py b/gobject/__init__.py
new file mode 100644 (file)
index 0000000..a9522a6
--- /dev/null
@@ -0,0 +1,119 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2006  Johan Dahlin
+#
+#   gobject/__init__.py: initialisation file for gobject module
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+# this can go when things are a little further along
+
+import sys
+
+from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
+     io_add_watch, source_remove, child_watch_add, markup_escape_text, \
+     get_current_time, filename_display_name, filename_display_basename, \
+     filename_from_utf8, get_application_name, set_application_name, \
+     get_prgname, set_prgname, main_depth, Pid, GError, glib_version, \
+     MainLoop, MainContext, main_context_default, IOChannel, Source, Idle, \
+     Timeout, PollFD, OptionGroup, OptionContext, option, uri_list_extract_uris
+from glib import SPAWN_LEAVE_DESCRIPTORS_OPEN, SPAWN_DO_NOT_REAP_CHILD, \
+     SPAWN_SEARCH_PATH, SPAWN_STDOUT_TO_DEV_NULL, SPAWN_STDERR_TO_DEV_NULL, \
+     SPAWN_CHILD_INHERITS_STDIN, SPAWN_FILE_AND_ARGV_ZERO, PRIORITY_HIGH, \
+     PRIORITY_DEFAULT, PRIORITY_HIGH_IDLE, PRIORITY_DEFAULT_IDLE, \
+     PRIORITY_LOW, IO_IN, IO_OUT, IO_PRI, IO_ERR, IO_HUP, IO_NVAL, \
+     IO_STATUS_ERROR, IO_STATUS_NORMAL, IO_STATUS_EOF, IO_STATUS_AGAIN, \
+     IO_FLAG_APPEND, IO_FLAG_NONBLOCK, IO_FLAG_IS_READABLE, \
+     IO_FLAG_IS_WRITEABLE, IO_FLAG_IS_SEEKABLE, IO_FLAG_MASK, \
+     IO_FLAG_GET_MASK, IO_FLAG_SET_MASK, OPTION_FLAG_HIDDEN, \
+     OPTION_FLAG_IN_MAIN, OPTION_FLAG_REVERSE, OPTION_FLAG_NO_ARG, \
+     OPTION_FLAG_FILENAME, OPTION_FLAG_OPTIONAL_ARG, OPTION_FLAG_NOALIAS, \
+     OPTION_ERROR_UNKNOWN_OPTION, OPTION_ERROR_BAD_VALUE, \
+     OPTION_ERROR_FAILED, OPTION_REMAINING, OPTION_ERROR
+
+from gobject.constants import *
+from gobject._gobject import *
+_PyGObject_API = _gobject._PyGObject_API
+
+from gobject.propertyhelper import property
+
+sys.modules['gobject.option'] = option
+
+class GObjectMeta(type):
+    "Metaclass for automatically registering GObject classes"
+    def __init__(cls, name, bases, dict_):
+        type.__init__(cls, name, bases, dict_)
+        cls._install_properties()
+        cls._type_register(cls.__dict__)
+
+    def _install_properties(cls):
+        gproperties = getattr(cls, '__gproperties__', {})
+
+        props = []
+        for name, prop in cls.__dict__.items():
+            if isinstance(prop, property): # not same as the built-in
+                if name in gproperties:
+                    raise ValueError
+                prop.name = name
+                gproperties[name] = prop.get_pspec_args()
+                props.append(prop)
+
+        if not props:
+            return
+
+        cls.__gproperties__ = gproperties
+
+        if ('do_get_property' in cls.__dict__ or
+            'do_set_property' in cls.__dict__):
+            for prop in props:
+                if (prop.getter != prop._default_getter or
+                    prop.setter != prop._default_setter):
+                    raise TypeError(
+                        "GObject subclass %r defines do_get/set_property"
+                        " and it also uses a property which a custom setter"
+                        " or getter. This is not allowed" % (
+                        cls.__name__,))
+
+        def obj_get_property(self, pspec):
+            name = pspec.name.replace('-', '_')
+            prop = getattr(cls, name, None)
+            if prop:
+                return prop.getter(self)
+        cls.do_get_property = obj_get_property
+
+        def obj_set_property(self, pspec, value):
+            name = pspec.name.replace('-', '_')
+            prop = getattr(cls, name, None)
+            if prop:
+                prop.setter(self, value)
+        cls.do_set_property = obj_set_property
+
+    def _must_register_type(cls, namespace):
+        ## don't register the class if already registered
+        if '__gtype__' in namespace:
+            return False
+
+        return ('__gproperties__' in namespace or
+                '__gsignals__' in namespace or
+                '__gtype_name__' in namespace)
+
+    def _type_register(cls, namespace):
+        if cls._must_register_type(namespace):
+            type_register(cls, namespace.get('__gtype_name__'))
+
+_gobject._install_metaclass(GObjectMeta)
+
+del _gobject
diff --git a/gobject/constants.py b/gobject/constants.py
new file mode 100644 (file)
index 0000000..a6d3ce9
--- /dev/null
@@ -0,0 +1,83 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2006-2007 Johan Dahlin
+#
+#   gobject/constants.py: GObject type constants
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+import sys
+
+import gobject._gobject
+_gobject = sys.modules['gobject._gobject']
+
+# TYPE_INVALID defined in gobjectmodule.c
+TYPE_NONE = _gobject.type_from_name('void')
+TYPE_INTERFACE = _gobject.type_from_name('GInterface')
+TYPE_CHAR = _gobject.type_from_name('gchar')
+TYPE_UCHAR = _gobject.type_from_name('guchar')
+TYPE_BOOLEAN = _gobject.type_from_name('gboolean')
+TYPE_INT = _gobject.type_from_name('gint')
+TYPE_UINT = _gobject.type_from_name('guint')
+TYPE_LONG = _gobject.type_from_name('glong')
+TYPE_ULONG = _gobject.type_from_name('gulong')
+TYPE_INT64 = _gobject.type_from_name('gint64')
+TYPE_UINT64 = _gobject.type_from_name('guint64')
+TYPE_ENUM = _gobject.type_from_name('GEnum')
+TYPE_FLAGS = _gobject.type_from_name('GFlags')
+TYPE_FLOAT = _gobject.type_from_name('gfloat')
+TYPE_DOUBLE = _gobject.type_from_name('gdouble')
+TYPE_STRING = _gobject.type_from_name('gchararray')
+TYPE_POINTER = _gobject.type_from_name('gpointer')
+TYPE_BOXED = _gobject.type_from_name('GBoxed')
+TYPE_PARAM = _gobject.type_from_name('GParam')
+TYPE_OBJECT = _gobject.type_from_name('GObject')
+TYPE_PYOBJECT = _gobject.type_from_name('PyObject')
+TYPE_UNICHAR = TYPE_UINT
+
+# do a little dance to maintain API compatibility
+# as these were origianally defined here, and are
+# now defined in gobjectmodule.c
+G_MINFLOAT = _gobject.G_MINFLOAT
+G_MAXFLOAT = _gobject.G_MAXFLOAT
+G_MINDOUBLE = _gobject.G_MINDOUBLE
+G_MAXDOUBLE = _gobject.G_MAXDOUBLE
+G_MINSHORT = _gobject.G_MINSHORT
+G_MAXSHORT = _gobject.G_MAXSHORT
+G_MAXUSHORT = _gobject.G_MAXUSHORT
+G_MININT = _gobject.G_MININT
+G_MAXINT = _gobject.G_MAXINT
+G_MAXUINT = _gobject.G_MAXUINT
+G_MINLONG = _gobject.G_MINLONG
+G_MAXLONG = _gobject.G_MAXLONG
+G_MAXULONG = _gobject.G_MAXULONG
+G_MININT8 = _gobject.G_MININT8
+G_MAXINT8 = _gobject.G_MAXINT8
+G_MAXUINT8 = _gobject.G_MAXUINT8
+G_MININT16 = _gobject.G_MININT16
+G_MAXINT16 = _gobject.G_MAXINT16
+G_MAXUINT16 = _gobject.G_MAXUINT16
+G_MININT32 = _gobject.G_MININT32
+G_MAXINT32 = _gobject.G_MAXINT32
+G_MAXUINT32 = _gobject.G_MAXUINT32
+G_MININT64 = _gobject.G_MININT64
+G_MAXINT64 = _gobject.G_MAXINT64
+G_MAXUINT64 = _gobject.G_MAXUINT64
+G_MAXSIZE = _gobject.G_MAXSIZE
+G_MAXSSIZE = _gobject.G_MAXSSIZE
+G_MINOFFSET = _gobject.G_MINOFFSET
+G_MAXOFFSET = _gobject.G_MAXOFFSET
+
diff --git a/gobject/ffi-marshaller.c b/gobject/ffi-marshaller.c
new file mode 100644 (file)
index 0000000..60cfc34
--- /dev/null
@@ -0,0 +1,194 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2007 Johan Dahlin
+ *
+ *   ffi-marshaller: Generic CMarshaller using libffi
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include <glib-object.h>
+#include <ffi.h>
+
+static ffi_type *
+g_value_to_ffi_type (const GValue *gvalue, gpointer *value)
+{
+  ffi_type *rettype = NULL;
+  GType type = g_type_fundamental (G_VALUE_TYPE (gvalue));
+  g_assert (type != G_TYPE_INVALID);
+
+  switch (type) {
+  case G_TYPE_BOOLEAN:
+  case G_TYPE_CHAR:
+  case G_TYPE_INT:
+    rettype = &ffi_type_sint;
+    *value = (gpointer)&(gvalue->data[0].v_int);
+    break;
+  case G_TYPE_UCHAR:
+  case G_TYPE_UINT:
+    rettype = &ffi_type_uint;
+    *value = (gpointer)&(gvalue->data[0].v_uint);
+    break;
+  case G_TYPE_STRING:
+  case G_TYPE_OBJECT:
+  case G_TYPE_BOXED:
+  case G_TYPE_POINTER:
+    rettype = &ffi_type_pointer;
+    *value = (gpointer)&(gvalue->data[0].v_pointer);
+    break;
+  case G_TYPE_FLOAT:
+    rettype = &ffi_type_float;
+    *value = (gpointer)&(gvalue->data[0].v_float);
+    break;
+  case G_TYPE_DOUBLE:
+    rettype = &ffi_type_double;
+    *value = (gpointer)&(gvalue->data[0].v_double);
+    break;
+  case G_TYPE_LONG:
+    rettype = &ffi_type_slong;
+    *value = (gpointer)&(gvalue->data[0].v_long);
+    break;
+  case G_TYPE_ULONG:
+    rettype = &ffi_type_ulong;
+    *value = (gpointer)&(gvalue->data[0].v_ulong);
+    break;
+  case G_TYPE_INT64:
+    rettype = &ffi_type_sint64;
+    *value = (gpointer)&(gvalue->data[0].v_int64);
+    break;
+  case G_TYPE_UINT64:
+    rettype = &ffi_type_uint64;
+    *value = (gpointer)&(gvalue->data[0].v_uint64);
+    break;
+  default:
+    rettype = &ffi_type_pointer;
+    *value = NULL;
+    g_warning ("Unsupported fundamental type: %s", g_type_name (type));
+    break;
+  }
+  return rettype;
+}
+
+static void
+g_value_from_ffi_type (GValue *gvalue, gpointer *value)
+{
+  switch (g_type_fundamental (G_VALUE_TYPE (gvalue))) {
+  case G_TYPE_INT:
+      g_value_set_int (gvalue, *(gint*)value);
+      break;
+  case G_TYPE_FLOAT:
+      g_value_set_float (gvalue, *(gfloat*)value);
+      break;
+  case G_TYPE_DOUBLE:
+      g_value_set_double (gvalue, *(gdouble*)value);
+      break;
+  case G_TYPE_BOOLEAN:
+      g_value_set_boolean (gvalue, *(gboolean*)value);
+      break;
+  case G_TYPE_STRING:
+      g_value_set_string (gvalue, *(gchar**)value);
+      break;
+  case G_TYPE_CHAR:
+      g_value_set_char (gvalue, *(gchar*)value);
+      break;
+  case G_TYPE_UCHAR:
+      g_value_set_uchar (gvalue, *(guchar*)value);
+      break;
+  case G_TYPE_UINT:
+      g_value_set_uint (gvalue, *(guint*)value);
+      break;
+  case G_TYPE_POINTER:
+      g_value_set_pointer (gvalue, *(gpointer*)value);
+      break;
+  case G_TYPE_LONG:
+      g_value_set_long (gvalue, *(glong*)value);
+      break;
+  case G_TYPE_ULONG:
+      g_value_set_ulong (gvalue, *(gulong*)value);
+      break;
+  case G_TYPE_INT64:
+      g_value_set_int64 (gvalue, *(gint64*)value);
+      break;
+  case G_TYPE_UINT64:
+      g_value_set_uint64 (gvalue, *(guint64*)value);
+      break;
+  case G_TYPE_BOXED:
+      g_value_set_boxed (gvalue, *(gpointer*)value);
+      break;
+  default:
+    g_warning ("Unsupported fundamental type: %s",
+              g_type_name (g_type_fundamental (G_VALUE_TYPE (gvalue))));
+  }
+
+}
+
+void
+g_cclosure_marshal_generic_ffi (GClosure *closure,
+                               GValue *return_gvalue,
+                               guint n_param_values,
+                               const GValue *param_values,
+                               gpointer invocation_hint,
+                               gpointer marshal_data)
+{
+  ffi_type *rtype;
+  void *rvalue;
+  int n_args;
+  ffi_type **atypes;
+  void **args;
+  int i;
+  ffi_cif cif;
+  GCClosure *cc = (GCClosure*) closure;
+
+  if (return_gvalue && G_VALUE_TYPE (return_gvalue)) 
+    {
+      rtype = g_value_to_ffi_type (return_gvalue, &rvalue);
+    }
+  else 
+    {
+      rtype = &ffi_type_void;
+    }
+
+  rvalue = g_alloca (MAX (rtype->size, sizeof (ffi_arg)));
+  
+  n_args = n_param_values + 1;
+  atypes = g_alloca (sizeof (ffi_type *) * n_args);
+  args =  g_alloca (sizeof (gpointer) * n_args);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      atypes[n_args-1] = g_value_to_ffi_type (param_values + 0,  
+                                             &args[n_args-1]);
+      atypes[0] = &ffi_type_pointer;
+      args[0] = &closure->data;
+    }
+  else
+    {
+      atypes[0] = g_value_to_ffi_type (param_values + 0, &args[0]);
+      atypes[n_args-1] = &ffi_type_pointer;
+      args[n_args-1] = &closure->data;
+    }
+
+  for (i = 1; i < n_args - 1; i++)
+    atypes[i] = g_value_to_ffi_type (param_values + i, &args[i]);
+
+  if (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, n_args, rtype, atypes) != FFI_OK)
+    return;
+
+  ffi_call (&cif, marshal_data ? marshal_data : cc->callback, rvalue, args);
+
+  if (return_gvalue && G_VALUE_TYPE (return_gvalue))
+    g_value_from_ffi_type (return_gvalue, rvalue);
+}
diff --git a/gobject/ffi-marshaller.h b/gobject/ffi-marshaller.h
new file mode 100644 (file)
index 0000000..aac18bd
--- /dev/null
@@ -0,0 +1,31 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2007 Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef _FFI_MARSHALLER_H_
+#define _FFI_MARSHALLER_H_
+
+void g_cclosure_marshal_generic_ffi (GClosure *closure,
+                                    GValue *return_gvalue,
+                                    guint n_param_values,
+                                    const GValue *param_values,
+                                    gpointer invocation_hint,
+                                    gpointer marshal_data);
+
+#endif /* _FFI_MARSHALLER_H_ */
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
new file mode 100644 (file)
index 0000000..2a84606
--- /dev/null
@@ -0,0 +1,2636 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *
+ *   gobjectmodule.c: wrapper for the gobject 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gobject/gvaluecollector.h>
+#include <pyglib.h>
+#include <pythread.h>
+#include "pygobject-private.h"
+#include "pygboxed.h"
+#include "pygenum.h"
+#include "pygflags.h"
+#include "pyginterface.h"
+#include "pygparamspec.h"
+#include "pygpointer.h"
+#include "pygtype.h"
+
+#ifdef HAVE_FFI_H
+#include "ffi-marshaller.h"
+static GSignalCMarshaller marshal_generic = g_cclosure_marshal_generic_ffi;
+#else
+static GSignalCMarshaller marshal_generic = 0;
+#endif
+
+static PyObject *_pyg_signal_accumulator_true_handled_func;
+static GHashTable *log_handlers = NULL;
+static gboolean log_handlers_disabled = FALSE;
+
+static void pyg_flags_add_constants(PyObject *module, GType flags_type,
+                                   const gchar *strip_prefix);
+
+
+/* -------------- GDK threading hooks ---------------------------- */
+
+/**
+ * pyg_set_thread_block_funcs:
+ * @block_threads_func: a function to block Python threads.
+ * @unblock_threads_func: a function to unblock Python threads.
+ *
+ * an interface to allow pygtk to add hooks to handle threading
+ * similar to the old PyGTK 0.6.x releases.  May not work quite right
+ * anymore.
+ */
+static void
+pyg_set_thread_block_funcs (PyGThreadBlockFunc block_threads_func,
+                           PyGThreadBlockFunc unblock_threads_func)
+{
+    g_return_if_fail(pygobject_api_functions.block_threads == NULL &&
+                    pygobject_api_functions.unblock_threads == NULL);
+
+    pygobject_api_functions.block_threads   = block_threads_func;
+    pygobject_api_functions.unblock_threads = unblock_threads_func;
+    pyglib_set_thread_block_funcs(block_threads_func,
+                                 unblock_threads_func);
+}
+
+/**
+ * pyg_destroy_notify:
+ * @user_data: a PyObject pointer.
+ *
+ * A function that can be used as a GDestroyNotify callback that will
+ * call Py_DECREF on the data.
+ */
+void
+pyg_destroy_notify(gpointer user_data)
+{
+    PyObject *obj = (PyObject *)user_data;
+    PyGILState_STATE state;
+
+    state = pyglib_gil_state_ensure();
+    Py_DECREF(obj);
+    pyglib_gil_state_release(state);
+}
+
+
+/* ---------------- gobject module functions -------------------- */
+
+static PyObject *
+pyg_type_name (PyObject *self, PyObject *args)
+{
+    PyObject *gtype;
+    GType type;
+    const gchar *name;
+
+#if 0
+    if (PyErr_Warn(PyExc_DeprecationWarning,
+                  "gobject.type_name is deprecated; "
+                  "use GType.name instead"))
+        return NULL;
+#endif
+
+    if (!PyArg_ParseTuple(args, "O:gobject.type_name", &gtype))
+       return NULL;
+    if ((type = pyg_type_from_object(gtype)) == 0)
+       return NULL;
+    name = g_type_name(type);
+    if (name)
+       return PYGLIB_PyUnicode_FromString(name);
+    PyErr_SetString(PyExc_RuntimeError, "unknown typecode");
+    return NULL;
+}
+
+static PyObject *
+pyg_type_from_name (PyObject *self, PyObject *args)
+{
+    const gchar *name;
+    GType type;
+#if 0
+    if (PyErr_Warn(PyExc_DeprecationWarning,
+                  "gobject.type_from_name is deprecated; "
+                  "use GType.from_name instead"))
+        return NULL;
+#endif
+    if (!PyArg_ParseTuple(args, "s:gobject.type_from_name", &name))
+       return NULL;
+    type = _pyg_type_from_name(name);
+    if (type != 0)
+       return pyg_type_wrapper_new(type);
+    PyErr_Format(PyExc_RuntimeError, "%s: unknown type name: %s",
+         PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+                name);
+    return NULL;
+}
+
+static PyObject *
+pyg_type_parent (PyObject *self, PyObject *args)
+{
+    PyObject *gtype;
+    GType type, parent;
+#if 0
+    if (PyErr_Warn(PyExc_DeprecationWarning,
+                  "gobject.type_parent is deprecated; "
+                  "use GType.parent instead"))
+        return NULL;
+#endif
+    if (!PyArg_ParseTuple(args, "O:gobject.type_parent", &gtype))
+       return NULL;
+    if ((type = pyg_type_from_object(gtype)) == 0)
+       return NULL;
+    parent = g_type_parent(type);
+    if (parent != 0)
+       return pyg_type_wrapper_new(parent);
+    PyErr_SetString(PyExc_RuntimeError, "no parent for type");
+    return NULL;
+}
+
+static PyObject *
+pyg_type_is_a (PyObject *self, PyObject *args)
+{
+    PyObject *gtype, *gparent;
+    GType type, parent;
+#if 0
+    if (PyErr_Warn(PyExc_DeprecationWarning,
+                  "gobject.type_is_a is deprecated; "
+                  "use GType.is_a instead"))
+        return NULL;
+#endif
+    if (!PyArg_ParseTuple(args, "OO:gobject.type_is_a", &gtype, &gparent))
+       return NULL;
+    if ((type = pyg_type_from_object(gtype)) == 0)
+       return NULL;
+    if ((parent = pyg_type_from_object(gparent)) == 0)
+       return NULL;
+    return PyBool_FromLong(g_type_is_a(type, parent));
+}
+
+static PyObject *
+pyg_type_children (PyObject *self, PyObject *args)
+{
+    PyObject *gtype, *list;
+    GType type, *children;
+    guint n_children, i;
+#if 0
+    if (PyErr_Warn(PyExc_DeprecationWarning,
+                  "gobject.type_children is deprecated; "
+                  "use GType.children instead"))
+        return NULL;
+#endif
+    if (!PyArg_ParseTuple(args, "O:gobject.type_children", &gtype))
+       return NULL;
+    if ((type = pyg_type_from_object(gtype)) == 0)
+       return NULL;
+    children = g_type_children(type, &n_children);
+    if (children) {
+        list = PyList_New(0);
+       for (i = 0; i < n_children; i++) {
+           PyObject *o;
+           PyList_Append(list, o=pyg_type_wrapper_new(children[i]));
+           Py_DECREF(o);
+       }
+       g_free(children);
+       return list;
+    }
+    PyErr_SetString(PyExc_RuntimeError, "invalid type, or no children");
+    return NULL;
+}
+
+static PyObject *
+pyg_type_interfaces (PyObject *self, PyObject *args)
+{
+    PyObject *gtype, *list;
+    GType type, *interfaces;
+    guint n_interfaces, i;
+#if 0
+    if (PyErr_Warn(PyExc_DeprecationWarning,
+                  "gobject.type_interfaces is deprecated; "
+                  "use GType.interfaces instead"))
+        return NULL;
+#endif
+    if (!PyArg_ParseTuple(args, "O:gobject.type_interfaces", &gtype))
+       return NULL;
+    if ((type = pyg_type_from_object(gtype)) == 0)
+       return NULL;
+    interfaces = g_type_interfaces(type, &n_interfaces);
+    if (interfaces) {
+        list = PyList_New(0);
+       for (i = 0; i < n_interfaces; i++) {
+           PyObject *o;
+           PyList_Append(list, o=pyg_type_wrapper_new(interfaces[i]));
+           Py_DECREF(o);
+       }
+       g_free(interfaces);
+       return list;
+    }
+    PyErr_SetString(PyExc_RuntimeError, "invalid type, or no interfaces");
+    return NULL;
+}
+
+static void
+pyg_object_set_property (GObject *object, guint property_id,
+                        const GValue *value, GParamSpec *pspec)
+{
+    PyObject *object_wrapper, *retval;
+    PyObject *py_pspec, *py_value;
+    PyGILState_STATE state;
+
+    state = pyglib_gil_state_ensure();
+
+    object_wrapper = pygobject_new(object);
+
+    if (object_wrapper == NULL) {
+       pyglib_gil_state_release(state);
+       return;
+    }
+
+    py_pspec = pyg_param_spec_new(pspec);
+    py_value = pyg_value_as_pyobject (value, TRUE);
+
+    retval = PyObject_CallMethod(object_wrapper, "do_set_property",
+                                "OO", py_pspec, py_value);
+    if (retval) {
+       Py_DECREF(retval);
+    } else {
+       PyErr_Print();
+    }
+
+    Py_DECREF(object_wrapper);
+    Py_DECREF(py_pspec);
+    Py_DECREF(py_value);
+
+    pyglib_gil_state_release(state);
+}
+
+static void
+pyg_object_get_property (GObject *object, guint property_id,
+                        GValue *value, GParamSpec *pspec)
+{
+    PyObject *object_wrapper, *retval;
+    PyObject *py_pspec;
+    PyGILState_STATE state;
+
+    state = pyglib_gil_state_ensure();
+
+    object_wrapper = pygobject_new(object);
+
+    if (object_wrapper == NULL) {
+       pyglib_gil_state_release(state);
+       return;
+    }
+
+    py_pspec = pyg_param_spec_new(pspec);
+    retval = PyObject_CallMethod(object_wrapper, "do_get_property",
+                                "O", py_pspec);
+    if (retval == NULL || pyg_value_from_pyobject(value, retval) < 0) {
+       PyErr_Print();
+    }
+    Py_DECREF(object_wrapper);
+    Py_DECREF(py_pspec);
+    Py_XDECREF(retval);
+
+    pyglib_gil_state_release(state);
+}
+
+static void
+pyg_object_class_init(GObjectClass *class, PyObject *py_class)
+{
+    class->set_property = pyg_object_set_property;
+    class->get_property = pyg_object_get_property;
+}
+
+typedef struct _PyGSignalAccumulatorData {
+    PyObject *callable;
+    PyObject *user_data;
+} PyGSignalAccumulatorData;
+
+static gboolean
+_pyg_signal_accumulator(GSignalInvocationHint *ihint,
+                        GValue *return_accu,
+                        const GValue *handler_return,
+                        gpointer _data)
+{
+    PyObject *py_ihint, *py_return_accu, *py_handler_return, *py_detail;
+    PyObject *py_retval;
+    gboolean retval = FALSE;
+    PyGSignalAccumulatorData *data = _data;
+    PyGILState_STATE state;
+
+    state = pyglib_gil_state_ensure();
+    if (ihint->detail)
+        py_detail = PYGLIB_PyUnicode_FromString(g_quark_to_string(ihint->detail));
+    else {
+        Py_INCREF(Py_None);
+        py_detail = Py_None;
+    }
+
+    py_ihint = Py_BuildValue("lNi", (long int) ihint->signal_id,
+                             py_detail, ihint->run_type);
+    py_handler_return = pyg_value_as_pyobject(handler_return, TRUE);
+    py_return_accu = pyg_value_as_pyobject(return_accu, FALSE);
+    if (data->user_data)
+        py_retval = PyObject_CallFunction(data->callable, "NNNO", py_ihint,
+                                          py_return_accu, py_handler_return,
+                                          data->user_data);
+    else
+        py_retval = PyObject_CallFunction(data->callable, "NNN", py_ihint,
+                                          py_return_accu, py_handler_return);
+    if (!py_retval)
+       PyErr_Print();
+    else {
+        if (!PyTuple_Check(py_retval) || PyTuple_Size(py_retval) != 2) {
+            PyErr_SetString(PyExc_TypeError, "accumulator function must return"
+                            " a (bool, object) tuple");
+            PyErr_Print();
+        } else {
+            retval = PyObject_IsTrue(PyTuple_GET_ITEM(py_retval, 0));
+            if (pyg_value_from_pyobject(return_accu, PyTuple_GET_ITEM(py_retval, 1))) {
+                PyErr_Print();
+            }
+        }
+        Py_DECREF(py_retval);
+    }
+    pyglib_gil_state_release(state);
+    return retval;
+}
+
+static gboolean
+create_signal (GType instance_type, const gchar *signal_name, PyObject *tuple)
+{
+    GSignalFlags signal_flags;
+    PyObject *py_return_type, *py_param_types;
+    GType return_type;
+    guint n_params, i;
+    GType *param_types;
+    guint signal_id;
+    GSignalAccumulator accumulator = NULL;
+    PyGSignalAccumulatorData *accum_data = NULL;
+    PyObject *py_accum = NULL, *py_accum_data = NULL;
+
+    if (!PyArg_ParseTuple(tuple, "iOO|OO", &signal_flags, &py_return_type,
+                         &py_param_types, &py_accum, &py_accum_data))
+    {
+       gchar buf[128];
+
+       PyErr_Clear();
+       g_snprintf(buf, sizeof(buf),
+                  "value for __gsignals__['%s'] not in correct format", signal_name);
+       PyErr_SetString(PyExc_TypeError, buf);
+       return FALSE;
+    }
+
+    if (py_accum && py_accum != Py_None && !PyCallable_Check(py_accum))
+    {
+       gchar buf[128];
+
+       g_snprintf(buf, sizeof(buf),
+                  "accumulator for __gsignals__['%s'] must be callable", signal_name);
+       PyErr_SetString(PyExc_TypeError, buf);
+       return FALSE;
+    }
+
+    return_type = pyg_type_from_object(py_return_type);
+    if (!return_type)
+       return FALSE;
+    if (!PySequence_Check(py_param_types)) {
+       gchar buf[128];
+
+       g_snprintf(buf, sizeof(buf),
+                  "third element of __gsignals__['%s'] tuple must be a sequence", signal_name);
+       PyErr_SetString(PyExc_TypeError, buf);
+       return FALSE;
+    }
+    n_params = PySequence_Length(py_param_types);
+    param_types = g_new(GType, n_params);
+    for (i = 0; i < n_params; i++) {
+       PyObject *item = PySequence_GetItem(py_param_types, i);
+
+       param_types[i] = pyg_type_from_object(item);
+       if (param_types[i] == 0) {
+           Py_DECREF(item);
+           g_free(param_types);
+           return FALSE;
+       }
+       Py_DECREF(item);
+    }
+
+    if (py_accum == _pyg_signal_accumulator_true_handled_func)
+        accumulator = g_signal_accumulator_true_handled;
+    else {
+        if (py_accum != NULL && py_accum != Py_None) {
+            accum_data = g_new(PyGSignalAccumulatorData, 1);
+            accum_data->callable = py_accum;
+            Py_INCREF(py_accum);
+            accum_data->user_data = py_accum_data;
+            Py_XINCREF(py_accum_data);
+            accumulator = _pyg_signal_accumulator;
+        }
+    }
+
+    signal_id = g_signal_newv(signal_name, instance_type, signal_flags,
+                             pyg_signal_class_closure_get(),
+                             accumulator, accum_data,
+                             marshal_generic,
+                             return_type, n_params, param_types);
+    g_free(param_types);
+
+    if (signal_id == 0) {
+       gchar buf[128];
+
+       g_snprintf(buf, sizeof(buf), "could not create signal for %s",
+                  signal_name);
+       PyErr_SetString(PyExc_RuntimeError, buf);
+       return FALSE;
+    }
+    return TRUE;
+}
+
+static gboolean
+override_signal(GType instance_type, const gchar *signal_name)
+{
+    guint signal_id;
+
+    signal_id = g_signal_lookup(signal_name, instance_type);
+    if (!signal_id) {
+       gchar buf[128];
+
+       g_snprintf(buf, sizeof(buf), "could not look up %s", signal_name);
+       PyErr_SetString(PyExc_TypeError, buf);
+       return FALSE;
+    }
+    g_signal_override_class_closure(signal_id, instance_type,
+                                   pyg_signal_class_closure_get());
+    return TRUE;
+}
+
+static PyObject *
+add_signals (GType instance_type, PyObject *signals)
+{
+    gboolean ret = TRUE;
+    GObjectClass *oclass;
+    Py_ssize_t pos = 0;
+    PyObject *key, *value, *overridden_signals = NULL;
+
+    overridden_signals = PyDict_New();
+    oclass = g_type_class_ref(instance_type);
+    while (PyDict_Next(signals, &pos, &key, &value)) {
+       const gchar *signal_name;
+        gchar *signal_name_canon, *c;
+
+       if (!PYGLIB_PyUnicode_Check(key)) {
+           PyErr_SetString(PyExc_TypeError,
+                           "__gsignals__ keys must be strings");
+           ret = FALSE;
+           break;
+       }
+       signal_name = PYGLIB_PyUnicode_AsString (key);
+
+       if (value == Py_None ||
+           (PYGLIB_PyUnicode_Check(value) &&
+            !strcmp(PYGLIB_PyUnicode_AsString(value), "override")))
+        {
+              /* canonicalize signal name, replacing '-' with '_' */
+            signal_name_canon = g_strdup(signal_name);
+            for (c = signal_name_canon; *c; ++c)
+                if (*c == '-')
+                    *c = '_';
+            if (PyDict_SetItemString(overridden_signals,
+                                    signal_name_canon, key)) {
+                g_free(signal_name_canon);
+                ret = FALSE;
+                break;
+            }
+            g_free(signal_name_canon);
+
+           ret = override_signal(instance_type, signal_name);
+       } else {
+           ret = create_signal(instance_type, signal_name, value);
+       }
+
+       if (!ret)
+           break;
+    }
+    g_type_class_unref(oclass);
+    if (ret)
+        return overridden_signals;
+    else {
+        Py_XDECREF(overridden_signals);
+        return NULL;
+    }
+}
+
+static GParamSpec *
+create_property (const gchar  *prop_name,
+                GType         prop_type,
+                const gchar  *nick,
+                const gchar  *blurb,
+                PyObject     *args,
+                GParamFlags   flags)
+{
+    GParamSpec *pspec = NULL;
+
+    switch (G_TYPE_FUNDAMENTAL(prop_type)) {
+    case G_TYPE_CHAR:
+       {
+           gchar minimum, maximum, default_value;
+
+           if (!PyArg_ParseTuple(args, "ccc", &minimum, &maximum,
+                                 &default_value))
+               return NULL;
+           pspec = g_param_spec_char (prop_name, nick, blurb, minimum,
+                                      maximum, default_value, flags);
+       }
+       break;
+    case G_TYPE_UCHAR:
+       {
+           gchar minimum, maximum, default_value;
+
+           if (!PyArg_ParseTuple(args, "ccc", &minimum, &maximum,
+                                 &default_value))
+               return NULL;
+           pspec = g_param_spec_uchar (prop_name, nick, blurb, minimum,
+                                       maximum, default_value, flags);
+       }
+       break;
+    case G_TYPE_BOOLEAN:
+       {
+           gboolean default_value;
+
+           if (!PyArg_ParseTuple(args, "i", &default_value))
+               return NULL;
+           pspec = g_param_spec_boolean (prop_name, nick, blurb,
+                                         default_value, flags);
+       }
+       break;
+    case G_TYPE_INT:
+       {
+           gint minimum, maximum, default_value;
+
+           if (!PyArg_ParseTuple(args, "iii", &minimum, &maximum,
+                                 &default_value))
+               return NULL;
+           pspec = g_param_spec_int (prop_name, nick, blurb, minimum,
+                                     maximum, default_value, flags);
+       }
+       break;
+    case G_TYPE_UINT:
+       {
+           guint minimum, maximum, default_value;
+
+           if (!PyArg_ParseTuple(args, "III", &minimum, &maximum,
+                                 &default_value))
+               return NULL;
+           pspec = g_param_spec_uint (prop_name, nick, blurb, minimum,
+                                      maximum, default_value, flags);
+       }
+       break;
+    case G_TYPE_LONG:
+       {
+           glong minimum, maximum, default_value;
+
+           if (!PyArg_ParseTuple(args, "lll", &minimum, &maximum,
+                                 &default_value))
+               return NULL;
+           pspec = g_param_spec_long (prop_name, nick, blurb, minimum,
+                                      maximum, default_value, flags);
+       }
+       break;
+    case G_TYPE_ULONG:
+       {
+           gulong minimum, maximum, default_value;
+
+           if (!PyArg_ParseTuple(args, "kkk", &minimum, &maximum,
+                                 &default_value))
+               return NULL;
+           pspec = g_param_spec_ulong (prop_name, nick, blurb, minimum,
+                                       maximum, default_value, flags);
+       }
+       break;
+    case G_TYPE_INT64:
+       {
+           gint64 minimum, maximum, default_value;
+
+           if (!PyArg_ParseTuple(args, "LLL", &minimum, &maximum,
+                                 &default_value))
+               return NULL;
+           pspec = g_param_spec_int64 (prop_name, nick, blurb, minimum,
+                                       maximum, default_value, flags);
+       }
+       break;
+    case G_TYPE_UINT64:
+       {
+           guint64 minimum, maximum, default_value;
+
+           if (!PyArg_ParseTuple(args, "KKK", &minimum, &maximum,
+                                 &default_value))
+               return NULL;
+           pspec = g_param_spec_uint64 (prop_name, nick, blurb, minimum,
+                                        maximum, default_value, flags);
+       }
+       break;
+    case G_TYPE_ENUM:
+       {
+           gint default_value;
+           PyObject *pydefault;
+
+           if (!PyArg_ParseTuple(args, "O", &pydefault))
+               return NULL;
+
+           if (pyg_enum_get_value(prop_type, pydefault,
+                                  (gint *)&default_value))
+               return NULL;
+
+           pspec = g_param_spec_enum (prop_name, nick, blurb,
+                                      prop_type, default_value, flags);
+       }
+       break;
+    case G_TYPE_FLAGS:
+       {
+           guint default_value;
+           PyObject *pydefault;
+
+           if (!PyArg_ParseTuple(args, "O", &pydefault))
+               return NULL;
+
+           if (pyg_flags_get_value(prop_type, pydefault,
+                                   (gint *)&default_value))
+               return NULL;
+
+           pspec = g_param_spec_flags (prop_name, nick, blurb,
+                                       prop_type, default_value, flags);
+       }
+       break;
+    case G_TYPE_FLOAT:
+       {
+           gfloat minimum, maximum, default_value;
+
+           if (!PyArg_ParseTuple(args, "fff", &minimum, &maximum,
+                                 &default_value))
+               return NULL;
+           pspec = g_param_spec_float (prop_name, nick, blurb, minimum,
+                                       maximum, default_value, flags);
+       }
+       break;
+    case G_TYPE_DOUBLE:
+       {
+           gdouble minimum, maximum, default_value;
+
+           if (!PyArg_ParseTuple(args, "ddd", &minimum, &maximum,
+                                 &default_value))
+               return NULL;
+           pspec = g_param_spec_double (prop_name, nick, blurb, minimum,
+                                        maximum, default_value, flags);
+       }
+       break;
+    case G_TYPE_STRING:
+       {
+           const gchar *default_value;
+
+           if (!PyArg_ParseTuple(args, "z", &default_value))
+               return NULL;
+           pspec = g_param_spec_string (prop_name, nick, blurb,
+                                        default_value, flags);
+       }
+       break;
+    case G_TYPE_PARAM:
+       if (!PyArg_ParseTuple(args, ""))
+           return NULL;
+       pspec = g_param_spec_param (prop_name, nick, blurb, prop_type, flags);
+       break;
+    case G_TYPE_BOXED:
+       if (!PyArg_ParseTuple(args, ""))
+           return NULL;
+       pspec = g_param_spec_boxed (prop_name, nick, blurb, prop_type, flags);
+       break;
+    case G_TYPE_POINTER:
+       if (!PyArg_ParseTuple(args, ""))
+           return NULL;
+       pspec = g_param_spec_pointer (prop_name, nick, blurb, flags);
+       break;
+    case G_TYPE_OBJECT:
+       if (!PyArg_ParseTuple(args, ""))
+           return NULL;
+       pspec = g_param_spec_object (prop_name, nick, blurb, prop_type, flags);
+       break;
+    default:
+       /* unhandled pspec type ... */
+       break;
+    }
+
+    if (!pspec) {
+       char buf[128];
+
+       g_snprintf(buf, sizeof(buf), "could not create param spec for type %s",
+                  g_type_name(prop_type));
+       PyErr_SetString(PyExc_TypeError, buf);
+       return NULL;
+    }
+
+    return pspec;
+}
+
+GParamSpec *
+pyg_param_spec_from_object (PyObject *tuple)
+{
+    gint val_length;
+    const gchar *prop_name;
+    GType prop_type;
+    const gchar *nick, *blurb;
+    PyObject *slice, *item, *py_prop_type;
+    GParamSpec *pspec;
+
+    val_length = PyTuple_Size(tuple);
+    if (val_length < 4) {
+       PyErr_SetString(PyExc_TypeError,
+                       "paramspec tuples must be at least 4 elements long");
+       return NULL;
+    }
+
+    slice = PySequence_GetSlice(tuple, 0, 4);
+    if (!slice) {
+       return NULL;
+    }
+
+    if (!PyArg_ParseTuple(slice, "sOzz", &prop_name, &py_prop_type, &nick, &blurb)) {
+       Py_DECREF(slice);
+       return NULL;
+    }
+
+    Py_DECREF(slice);
+
+    prop_type = pyg_type_from_object(py_prop_type);
+    if (!prop_type) {
+       return NULL;
+    }
+
+    item = PyTuple_GetItem(tuple, val_length-1);
+    if (!PYGLIB_PyLong_Check(item)) {
+       PyErr_SetString(PyExc_TypeError,
+                       "last element in tuple must be an int");
+       return NULL;
+    }
+
+    /* slice is the extra items in the tuple */
+    slice = PySequence_GetSlice(tuple, 4, val_length-1);
+    pspec = create_property(prop_name, prop_type,
+                           nick, blurb, slice,
+                           PYGLIB_PyLong_AsLong(item));
+
+    return pspec;
+}
+
+static gboolean
+add_properties (GType instance_type, PyObject *properties)
+{
+    gboolean ret = TRUE;
+    GObjectClass *oclass;
+    Py_ssize_t pos = 0;
+    PyObject *key, *value;
+
+    oclass = g_type_class_ref(instance_type);
+    while (PyDict_Next(properties, &pos, &key, &value)) {
+       const gchar *prop_name;
+       GType prop_type;
+       const gchar *nick, *blurb;
+       GParamFlags flags;
+       gint val_length;
+       PyObject *slice, *item, *py_prop_type;
+       GParamSpec *pspec;
+
+       /* values are of format (type,nick,blurb, type_specific_args, flags) */
+
+       if (!PYGLIB_PyUnicode_Check(key)) {
+           PyErr_SetString(PyExc_TypeError,
+                           "__gproperties__ keys must be strings");
+           ret = FALSE;
+           break;
+       }
+       prop_name = PYGLIB_PyUnicode_AsString (key);
+
+       if (!PyTuple_Check(value)) {
+           PyErr_SetString(PyExc_TypeError,
+                           "__gproperties__ values must be tuples");
+           ret = FALSE;
+           break;
+       }
+       val_length = PyTuple_Size(value);
+       if (val_length < 4) {
+           PyErr_SetString(PyExc_TypeError,
+                           "__gproperties__ values must be at least 4 elements long");
+           ret = FALSE;
+           break;
+       }
+
+       slice = PySequence_GetSlice(value, 0, 3);
+       if (!slice) {
+           ret = FALSE;
+           break;
+       }
+       if (!PyArg_ParseTuple(slice, "Ozz", &py_prop_type, &nick, &blurb)) {
+           Py_DECREF(slice);
+           ret = FALSE;
+           break;
+       }
+       Py_DECREF(slice);
+       prop_type = pyg_type_from_object(py_prop_type);
+       if (!prop_type) {
+           ret = FALSE;
+           break;
+       }
+       item = PyTuple_GetItem(value, val_length-1);
+       if (!PYGLIB_PyLong_Check(item)) {
+           PyErr_SetString(PyExc_TypeError,
+               "last element in __gproperties__ value tuple must be an int");
+           ret = FALSE;
+           break;
+       }
+       flags = PYGLIB_PyLong_AsLong(item);
+
+       /* slice is the extra items in the tuple */
+       slice = PySequence_GetSlice(value, 3, val_length-1);
+       pspec = create_property(prop_name, prop_type, nick, blurb,
+                               slice, flags);
+       Py_DECREF(slice);
+
+       if (pspec) {
+           g_object_class_install_property(oclass, 1, pspec);
+       } else {
+            PyObject *type, *value, *traceback;
+           ret = FALSE;
+            PyErr_Fetch(&type, &value, &traceback);
+            if (PYGLIB_PyUnicode_Check(value)) {
+                char msg[256];
+                g_snprintf(msg, 256,
+                          "%s (while registering property '%s' for GType '%s')",
+               PYGLIB_PyUnicode_AsString(value),
+                          prop_name, g_type_name(instance_type));
+                Py_DECREF(value);
+                value = PYGLIB_PyUnicode_FromString(msg);
+            }
+            PyErr_Restore(type, value, traceback);
+           break;
+       }
+    }
+
+    g_type_class_unref(oclass);
+    return ret;
+}
+
+static void
+pyg_register_class_init(GType gtype, PyGClassInitFunc class_init)
+{
+    GSList *list;
+
+    list = g_type_get_qdata(gtype, pygobject_class_init_key);
+    list = g_slist_prepend(list, class_init);
+    g_type_set_qdata(gtype, pygobject_class_init_key, list);
+}
+
+static int
+pyg_run_class_init(GType gtype, gpointer gclass, PyTypeObject *pyclass)
+{
+    GSList *list;
+    PyGClassInitFunc class_init;
+    GType parent_type;
+    int rv;
+
+    parent_type = g_type_parent(gtype);
+    if (parent_type) {
+        rv = pyg_run_class_init(parent_type, gclass, pyclass);
+        if (rv)
+           return rv;
+    }
+
+    list = g_type_get_qdata(gtype, pygobject_class_init_key);
+    for (; list; list = list->next) {
+       class_init = list->data;
+        rv = class_init(gclass, pyclass);
+        if (rv)
+           return rv;
+    }
+
+    return 0;
+}
+
+static PyObject *
+_wrap_pyg_type_register(PyObject *self, PyObject *args)
+{
+    PyTypeObject *class;
+    char *type_name = NULL;
+
+    if (!PyArg_ParseTuple(args, "O!|z:gobject.type_register",
+                         &PyType_Type, &class, &type_name))
+       return NULL;
+    if (!PyType_IsSubtype(class, &PyGObject_Type)) {
+       PyErr_SetString(PyExc_TypeError,
+                       "argument must be a GObject subclass");
+       return NULL;
+    }
+
+      /* Check if type already registered */
+    if (pyg_type_from_object((PyObject *) class) ==
+        pyg_type_from_object((PyObject *) class->tp_base))
+    {
+        if (pyg_type_register(class, type_name))
+            return NULL;
+    }
+
+    Py_INCREF(class);
+    return (PyObject *) class;
+}
+
+static char *
+get_type_name_for_class(PyTypeObject *class)
+{
+    gint i, name_serial;
+    char name_serial_str[16];
+    PyObject *module;
+    char *type_name = NULL;
+
+    /* make name for new GType */
+    name_serial = 1;
+    /* give up after 1000 tries, just in case.. */
+    while (name_serial < 1000)
+    {
+       g_free(type_name);
+       snprintf(name_serial_str, 16, "-v%i", name_serial);
+       module = PyObject_GetAttrString((PyObject *)class, "__module__");
+       if (module && PYGLIB_PyUnicode_Check(module)) {
+           type_name = g_strconcat(PYGLIB_PyUnicode_AsString(module), ".",
+                                   class->tp_name,
+                                   name_serial > 1 ? name_serial_str : NULL,
+                                   NULL);
+           Py_DECREF(module);
+       } else {
+           if (module)
+               Py_DECREF(module);
+           else
+               PyErr_Clear();
+           type_name = g_strconcat(class->tp_name,
+                                   name_serial > 1 ? name_serial_str : NULL,
+                                   NULL);
+       }
+       /* convert '.' in type name to '+', which isn't banned (grumble) */
+       for (i = 0; type_name[i] != '\0'; i++)
+           if (type_name[i] == '.')
+               type_name[i] = '+';
+       if (_pyg_type_from_name(type_name) == 0)
+           break;              /* we now have a unique name */
+       ++name_serial;
+    }
+
+    return type_name;
+}
+
+
+static GStaticPrivate pygobject_construction_wrapper = G_STATIC_PRIVATE_INIT;
+
+static inline void
+pygobject_init_wrapper_set(PyObject *wrapper)
+{
+    g_static_private_set(&pygobject_construction_wrapper, wrapper, NULL);
+}
+
+static inline PyObject *
+pygobject_init_wrapper_get(void)
+{
+    return (PyObject *) g_static_private_get(&pygobject_construction_wrapper);
+}
+
+static void
+pygobject__g_instance_init(GTypeInstance   *instance,
+                           gpointer         g_class)
+{
+    GObject *object = (GObject *) instance;
+    PyObject *wrapper, *args, *kwargs;
+
+    if (!g_type_get_qdata(G_OBJECT_TYPE(object),
+                         pygobject_has_updated_constructor_key))
+        return;
+
+    wrapper = g_object_get_qdata(object, pygobject_wrapper_key);
+    if (wrapper == NULL) {
+        wrapper = pygobject_init_wrapper_get();
+        if (wrapper && ((PyGObject *) wrapper)->obj == NULL) {
+            ((PyGObject *) wrapper)->obj = object;
+            pygobject_register_wrapper(wrapper);
+        }
+    }
+    pygobject_init_wrapper_set(NULL);
+    if (wrapper == NULL) {
+          /* this looks like a python object created through
+           * g_object_new -> we have no python wrapper, so create it
+           * now */
+        PyGILState_STATE state;
+        state = pyglib_gil_state_ensure();
+        wrapper = pygobject_new_full(object, FALSE, g_class);
+        args = PyTuple_New(0);
+        kwargs = PyDict_New();
+        if (Py_TYPE(wrapper)->tp_init(wrapper, args, kwargs))
+            PyErr_Print();
+        Py_DECREF(wrapper);
+        Py_DECREF(args);
+        Py_DECREF(kwargs);
+        pyglib_gil_state_release(state);
+    }
+}
+
+
+/*  This implementation is bad, see bug 566571 for an example why.
+ *  Instead of scanning explicitly declared bases for interfaces, we
+ *  should automatically initialize all implemented interfaces to
+ *  prevent bugs like that one.  However, this will lead to
+ *  performance degradation as each virtual method in derived classes
+ *  will round-trip through do_*() stuff, *even* if it is not
+ *  overriden.  We need to teach codegen to retain parent method
+ *  instead of setting virtual to *_proxy_do_*() if corresponding
+ *  do_*() is not overriden.  Ok, that was a messy explanation.
+ */
+static void
+pyg_type_add_interfaces(PyTypeObject *class, GType instance_type,
+                        PyObject *bases, gboolean new_interfaces,
+                        GType *parent_interfaces, guint n_parent_interfaces)
+{
+    int i;
+
+    if (!bases) {
+        g_warning("type has no bases");
+        return;
+    }
+
+    for (i = 0; i < PyTuple_GET_SIZE(bases); ++i) {
+        guint k;
+        PyObject *base = PyTuple_GET_ITEM(bases, i);
+        GType itype;
+        gboolean is_new = TRUE;
+        const GInterfaceInfo *iinfo;
+        GInterfaceInfo iinfo_copy;
+
+        /* 'base' can also be a PyClassObject, see bug #566571. */
+        if (!PyType_Check(base))
+            continue;
+
+        if (!PyType_IsSubtype((PyTypeObject*) base, &PyGInterface_Type))
+            continue;
+
+        itype = pyg_type_from_object(base);
+
+        /* Happens for _implementations_ of an interface. */
+        if (!G_TYPE_IS_INTERFACE(itype))
+            continue;
+
+        for (k = 0; k < n_parent_interfaces; ++k) {
+            if (parent_interfaces[k] == itype) {
+                is_new = FALSE;
+                break;
+            }
+        }
+
+        if ((new_interfaces && !is_new) || (!new_interfaces && is_new))
+            continue;
+
+        iinfo = pyg_lookup_interface_info(itype);
+        if (!iinfo) {
+            gchar *error;
+            error = g_strdup_printf("Interface type %s "
+                                    "has no Python implementation support",
+                                    ((PyTypeObject *) base)->tp_name);
+            PyErr_Warn(PyExc_RuntimeWarning, error);
+            g_free(error);
+            continue;
+        }
+
+        iinfo_copy = *iinfo;
+        iinfo_copy.interface_data = class;
+        g_type_add_interface_static(instance_type, itype, &iinfo_copy);
+    }
+}
+
+int
+pyg_type_register(PyTypeObject *class, const char *type_name)
+{
+    PyObject *gtype, *gsignals, *gproperties, *overridden_signals;
+    GType parent_type, instance_type;
+    GType *parent_interfaces;
+    guint n_parent_interfaces;
+    GTypeQuery query;
+    gpointer gclass;
+    gpointer has_new_constructor_api;
+    GTypeInfo type_info = {
+       0,    /* class_size */
+
+       (GBaseInitFunc) NULL,
+       (GBaseFinalizeFunc) NULL,
+
+       (GClassInitFunc) pyg_object_class_init,
+       (GClassFinalizeFunc) NULL,
+       NULL, /* class_data */
+
+       0,    /* instance_size */
+       0,    /* n_preallocs */
+       (GInstanceInitFunc) pygobject__g_instance_init
+    };
+    gchar *new_type_name;
+
+    /* find the GType of the parent */
+    parent_type = pyg_type_from_object((PyObject *)class);
+    if (!parent_type)
+       return -1;
+
+    parent_interfaces = g_type_interfaces(parent_type, &n_parent_interfaces);
+
+    if (type_name)
+       /* care is taken below not to free this */
+        new_type_name = (gchar *) type_name;
+    else
+       new_type_name = get_type_name_for_class(class);
+
+    /* set class_data that will be passed to the class_init function. */
+    type_info.class_data = class;
+
+    /* fill in missing values of GTypeInfo struct */
+    g_type_query(parent_type, &query);
+    type_info.class_size = query.class_size;
+    type_info.instance_size = query.instance_size;
+
+    /* create new typecode */
+    instance_type = g_type_register_static(parent_type, new_type_name,
+                                          &type_info, 0);
+    if (instance_type == 0) {
+       PyErr_Format(PyExc_RuntimeError,
+                    "could not create new GType: %s (subclass of %s)",
+                    new_type_name,
+                    g_type_name(parent_type));
+
+        if (type_name == NULL)
+            g_free(new_type_name);
+
+       return -1;
+    }
+
+    if (type_name == NULL)
+        g_free(new_type_name);
+
+    /* store pointer to the class with the GType */
+    Py_INCREF(class);
+    g_type_set_qdata(instance_type, g_quark_from_string("PyGObject::class"),
+                    class);
+
+    /* set new value of __gtype__ on class */
+    gtype = pyg_type_wrapper_new(instance_type);
+    PyObject_SetAttrString((PyObject *)class, "__gtype__", gtype);
+    Py_DECREF(gtype);
+
+      /* propagate new constructor API compatility flag from parent to child type */
+    has_new_constructor_api =
+       g_type_get_qdata(parent_type,
+                        pygobject_has_updated_constructor_key);
+    if (has_new_constructor_api != NULL)
+        g_type_set_qdata(instance_type, pygobject_has_updated_constructor_key,
+                         has_new_constructor_api);
+
+    /* if no __doc__, set it to the auto doc descriptor */
+    if (PyDict_GetItemString(class->tp_dict, "__doc__") == NULL) {
+       PyDict_SetItemString(class->tp_dict, "__doc__",
+                            pyg_object_descr_doc_get());
+    }
+
+    /*
+     * Note: Interfaces to be implemented are searched twice.  First
+     * we register interfaces that are already implemented by a parent
+     * type.  The second time, the remaining interfaces are
+     * registered, i.e. the ones that are not implemented by a parent
+     * type.  In between these two loops, properties and signals are
+     * registered.  It has to be done this way, in two steps,
+     * otherwise glib will complain.  If registering all interfaces
+     * always before properties, you get an error like:
+     *
+     *    ../gobject:121: Warning: Object class
+     *    test_interface+MyObject doesn't implement property
+     *    'some-property' from interface 'TestInterface'
+     *
+     * If, on the other hand, you register interfaces after
+     * registering the properties, you get something like:
+     *
+     *     ../gobject:121: Warning: cannot add interface type
+     *    `TestInterface' to type `test_interface+MyUnknown', since
+     *    type `test_interface+MyUnknown' already conforms to
+     *    interface
+     *
+     * This looks like a GLib quirk, but no bug has been filed
+     * upstream.  However we have a unit test for this particular
+     * problem, which can be found in test_interfaces.py, class
+     * TestInterfaceImpl.
+     *
+     * See also comment above pyg_type_add_interfaces().
+     */
+    pyg_type_add_interfaces(class, instance_type, class->tp_bases, FALSE,
+                            parent_interfaces, n_parent_interfaces);
+
+    /* we look this up in the instance dictionary, so we don't
+     * accidentally get a parent type's __gsignals__ attribute. */
+    gsignals = PyDict_GetItemString(class->tp_dict, "__gsignals__");
+    if (gsignals) {
+       if (!PyDict_Check(gsignals)) {
+           PyErr_SetString(PyExc_TypeError,
+                           "__gsignals__ attribute not a dict!");
+            g_free(parent_interfaces);
+           return -1;
+       }
+       if (!(overridden_signals = add_signals(instance_type, gsignals))) {
+            g_free(parent_interfaces);
+           return -1;
+       }
+        if (PyDict_SetItemString(class->tp_dict, "__gsignals__",
+                                overridden_signals)) {
+            g_free(parent_interfaces);
+            return -1;
+        }
+        Py_DECREF(overridden_signals);
+    } else {
+       PyErr_Clear();
+    }
+
+    /* we look this up in the instance dictionary, so we don't
+     * accidentally get a parent type's __gsignals__ attribute. */
+    gproperties = PyDict_GetItemString(class->tp_dict, "__gproperties__");
+    if (gproperties) {
+       if (!PyDict_Check(gproperties)) {
+           PyErr_SetString(PyExc_TypeError,
+                           "__gproperties__ attribute not a dict!");
+            g_free(parent_interfaces);
+           return -1;
+       }
+       if (!add_properties(instance_type, gproperties)) {
+            g_free(parent_interfaces);
+           return -1;
+       }
+       PyDict_DelItemString(class->tp_dict, "__gproperties__");
+       /* Borrowed reference. Py_DECREF(gproperties); */
+    } else {
+       PyErr_Clear();
+    }
+
+    /* Register new interfaces, that are _not_ already defined by
+     * the parent type.  FIXME: See above.
+     */
+    pyg_type_add_interfaces(class, instance_type, class->tp_bases, TRUE,
+                            parent_interfaces, n_parent_interfaces);
+
+    gclass = g_type_class_ref(instance_type);
+    if (pyg_run_class_init(instance_type, gclass, class)) {
+        g_type_class_unref(gclass);
+        g_free(parent_interfaces);
+        return -1;
+    }
+    g_type_class_unref(gclass);
+    g_free(parent_interfaces);
+
+    if (gsignals)
+        PyDict_DelItemString(class->tp_dict, "__gsignals__");
+
+    return 0;
+}
+
+static PyObject *
+pyg_signal_new(PyObject *self, PyObject *args)
+{
+    gchar *signal_name;
+    PyObject *py_type;
+    GSignalFlags signal_flags;
+    GType return_type;
+    PyObject *py_return_type, *py_param_types;
+
+    GType instance_type = 0;
+    Py_ssize_t n_params, i;
+    GType *param_types;
+
+    guint signal_id;
+
+    if (!PyArg_ParseTuple(args, "sOiOO:gobject.signal_new", &signal_name,
+                         &py_type, &signal_flags, &py_return_type,
+                         &py_param_types))
+       return NULL;
+
+    instance_type = pyg_type_from_object(py_type);
+    if (!instance_type)
+       return NULL;
+    if (!(G_TYPE_IS_INSTANTIATABLE(instance_type) || G_TYPE_IS_INTERFACE(instance_type))) {
+       PyErr_SetString(PyExc_TypeError,
+                       "argument 2 must be an object type or interface type");
+       return NULL;
+    }
+
+    return_type = pyg_type_from_object(py_return_type);
+    if (!return_type)
+       return NULL;
+
+    if (!PySequence_Check(py_param_types)) {
+       PyErr_SetString(PyExc_TypeError,
+                       "argument 5 must be a sequence of GType codes");
+       return NULL;
+    }
+    n_params = PySequence_Length(py_param_types);
+    param_types = g_new(GType, n_params);
+    for (i = 0; i < n_params; i++) {
+       PyObject *item = PySequence_GetItem(py_param_types, i);
+
+       param_types[i] = pyg_type_from_object(item);
+       if (param_types[i] == 0) {
+           PyErr_Clear();
+           Py_DECREF(item);
+           PyErr_SetString(PyExc_TypeError,
+                           "argument 5 must be a sequence of GType codes");
+           g_free(param_types);
+           return NULL;
+       }
+       Py_DECREF(item);
+    }
+
+    signal_id = g_signal_newv(signal_name, instance_type, signal_flags,
+                             pyg_signal_class_closure_get(),
+                             (GSignalAccumulator)0, NULL,
+                             (GSignalCMarshaller)0,
+                             return_type, n_params, param_types);
+    g_free(param_types);
+    if (signal_id != 0)
+       return PYGLIB_PyLong_FromLong(signal_id);
+    PyErr_SetString(PyExc_RuntimeError, "could not create signal");
+    return NULL;
+}
+
+static PyObject *
+pyg_signal_list_names (PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "type", NULL };
+    PyObject *py_itype, *list;
+    GObjectClass *class = NULL;
+    GType itype;
+    guint n;
+    guint *ids;
+    guint i;
+    gpointer iface = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O:gobject.signal_list_names",
+                                     kwlist, &py_itype))
+       return NULL;
+    if ((itype = pyg_type_from_object(py_itype)) == 0)
+       return NULL;
+
+    if (G_TYPE_IS_INSTANTIATABLE(itype)) {
+       class = g_type_class_ref(itype);
+       if (!class) {
+           PyErr_SetString(PyExc_RuntimeError,
+                           "could not get a reference to type class");
+           return NULL;
+       }
+    } else if (!G_TYPE_IS_INTERFACE(itype)) {
+       PyErr_SetString(PyExc_TypeError,
+                       "type must be instantiable or an interface");
+       return NULL;
+    } else {
+        iface = g_type_default_interface_ref(itype);
+    }
+
+    ids = g_signal_list_ids(itype, &n);
+
+    list = PyTuple_New((gint)n);
+    if (list != NULL) {
+       for (i = 0; i < n; i++)
+           PyTuple_SetItem(list, i,
+                       PYGLIB_PyUnicode_FromString(g_signal_name(ids[i])));
+    }
+
+    g_free(ids);
+    if (class)
+        g_type_class_unref(class);
+    else
+       g_type_default_interface_unref(iface);
+
+    return list;
+}
+
+static PyObject *
+pyg_signal_list_ids (PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "type", NULL };
+    PyObject *py_itype, *list;
+    GObjectClass *class = NULL;
+    GType itype;
+    guint n;
+    guint *ids;
+    guint i;
+    gpointer iface = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     "O:gobject.signal_list_ids",
+                                     kwlist, &py_itype))
+       return NULL;
+    if ((itype = pyg_type_from_object(py_itype)) == 0)
+       return NULL;
+
+    if (G_TYPE_IS_INSTANTIATABLE(itype)) {
+       class = g_type_class_ref(itype);
+       if (!class) {
+           PyErr_SetString(PyExc_RuntimeError,
+                           "could not get a reference to type class");
+           return NULL;
+       }
+    } else if (!G_TYPE_IS_INTERFACE(itype)) {
+       PyErr_SetString(PyExc_TypeError,
+                       "type must be instantiable or an interface");
+       return NULL;
+    } else {
+        iface = g_type_default_interface_ref(itype);
+    }
+
+    ids = g_signal_list_ids(itype, &n);
+
+    list = PyTuple_New((gint)n);
+    if (list == NULL) {
+       g_free(ids);
+       g_type_class_unref(class);
+       return NULL;
+    }
+
+    for (i = 0; i < n; i++)
+       PyTuple_SetItem(list, i, PYGLIB_PyLong_FromLong(ids[i]));
+    g_free(ids);
+    if (class)
+        g_type_class_unref(class);
+    else
+       g_type_default_interface_unref(iface);
+
+    return list;
+}
+
+static PyObject *
+pyg_signal_lookup (PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "name", "type", NULL };
+    PyObject *py_itype;
+    GObjectClass *class = NULL;
+    GType itype;
+    gchar *signal_name;
+    guint id;
+    gpointer iface = NULL;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sO:gobject.signal_lookup",
+                                     kwlist, &signal_name, &py_itype))
+       return NULL;
+    if ((itype = pyg_type_from_object(py_itype)) == 0)
+       return NULL;
+
+    if (G_TYPE_IS_INSTANTIATABLE(itype)) {
+       class = g_type_class_ref(itype);
+       if (!class) {
+           PyErr_SetString(PyExc_RuntimeError,
+                           "could not get a reference to type class");
+           return NULL;
+       }
+    } else if (!G_TYPE_IS_INTERFACE(itype)) {
+       PyErr_SetString(PyExc_TypeError,
+                       "type must be instantiable or an interface");
+       return NULL;
+    } else {
+        iface = g_type_default_interface_ref(itype);
+    }
+
+    id = g_signal_lookup(signal_name, itype);
+
+    if (class)
+        g_type_class_unref(class);
+    else
+       g_type_default_interface_unref(iface);
+    return PYGLIB_PyLong_FromLong(id);
+}
+
+static PyObject *
+pyg_signal_name (PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "signal_id", NULL };
+    const gchar *signal_name;
+    guint id;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:gobject.signal_name",
+                                     kwlist, &id))
+       return NULL;
+    signal_name = g_signal_name(id);
+    if (signal_name)
+        return PYGLIB_PyUnicode_FromString(signal_name);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pyg_signal_query (PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist1[] = { "name", "type", NULL };
+    static char *kwlist2[] = { "signal_id", NULL };
+    PyObject *py_query, *params_list, *py_itype;
+    GObjectClass *class = NULL;
+    GType itype;
+    gchar *signal_name;
+    guint i;
+    GSignalQuery query;
+    guint id;
+    gpointer iface = NULL;
+
+    if (PyArg_ParseTupleAndKeywords(args, kwargs, "sO:gobject.signal_query",
+                                     kwlist1, &signal_name, &py_itype)) {
+        if ((itype = pyg_type_from_object(py_itype)) == 0)
+            return NULL;
+
+        if (G_TYPE_IS_INSTANTIATABLE(itype)) {
+            class = g_type_class_ref(itype);
+            if (!class) {
+                PyErr_SetString(PyExc_RuntimeError,
+                                "could not get a reference to type class");
+                return NULL;
+            }
+        } else if (!G_TYPE_IS_INTERFACE(itype)) {
+            PyErr_SetString(PyExc_TypeError,
+                            "type must be instantiable or an interface");
+            return NULL;
+        } else {
+            iface = g_type_default_interface_ref(itype);
+        }
+        id = g_signal_lookup(signal_name, itype);
+    } else {
+       PyErr_Clear();
+        if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                         "i:gobject.signal_query",
+                                         kwlist2, &id)) {
+            PyErr_Clear();
+            PyErr_SetString(PyExc_TypeError,
+                            "Usage: one of:\n"
+                            "  gobject.signal_query(name, type)\n"
+                            "  gobject.signal_query(signal_id)");
+
+       return NULL;
+        }
+    }
+
+    g_signal_query(id, &query);
+
+    if (query.signal_id == 0) {
+        Py_INCREF(Py_None);
+        py_query = Py_None;
+        goto done;
+    }
+    py_query = PyTuple_New(6);
+    if (py_query == NULL) {
+        goto done;
+    }
+    params_list = PyTuple_New(query.n_params);
+    if (params_list == NULL) {
+        Py_DECREF(py_query);
+        py_query = NULL;
+        goto done;
+    }
+
+    PyTuple_SET_ITEM(py_query, 0, PYGLIB_PyLong_FromLong(query.signal_id));
+    PyTuple_SET_ITEM(py_query, 1, PYGLIB_PyUnicode_FromString(query.signal_name));
+    PyTuple_SET_ITEM(py_query, 2, pyg_type_wrapper_new(query.itype));
+    PyTuple_SET_ITEM(py_query, 3, PYGLIB_PyLong_FromLong(query.signal_flags));
+    PyTuple_SET_ITEM(py_query, 4, pyg_type_wrapper_new(query.return_type));
+    for (i = 0; i < query.n_params; i++) {
+        PyTuple_SET_ITEM(params_list, i,
+                         pyg_type_wrapper_new(query.param_types[i]));
+    }
+    PyTuple_SET_ITEM(py_query, 5, params_list);
+
+ done:
+    if (class)
+        g_type_class_unref(class);
+    if (iface)
+        g_type_default_interface_unref(iface);
+
+    return py_query;
+}
+
+static PyObject *
+pyg_object_class_list_properties (PyObject *self, PyObject *args)
+{
+    GParamSpec **specs;
+    PyObject *py_itype, *list;
+    GType itype;
+    GObjectClass *class = NULL;
+    gpointer iface = NULL;
+    guint nprops;
+    guint i;
+
+    if (!PyArg_ParseTuple(args, "O:gobject.list_properties",
+                         &py_itype))
+       return NULL;
+    if ((itype = pyg_type_from_object(py_itype)) == 0)
+       return NULL;
+
+    if (G_TYPE_IS_INTERFACE(itype)) {
+        iface = g_type_default_interface_ref(itype);
+        if (!iface) {
+            PyErr_SetString(PyExc_RuntimeError,
+                            "could not get a reference to interface type");
+            return NULL;
+        }
+        specs = g_object_interface_list_properties(iface, &nprops);
+    } else if (g_type_is_a(itype, G_TYPE_OBJECT)) {
+        class = g_type_class_ref(itype);
+        if (!class) {
+            PyErr_SetString(PyExc_RuntimeError,
+                            "could not get a reference to type class");
+            return NULL;
+        }
+        specs = g_object_class_list_properties(class, &nprops);
+    } else {
+       PyErr_SetString(PyExc_TypeError,
+                        "type must be derived from GObject or an interface");
+       return NULL;
+    }
+
+    list = PyTuple_New(nprops);
+    if (list == NULL) {
+       g_free(specs);
+       g_type_class_unref(class);
+       return NULL;
+    }
+    for (i = 0; i < nprops; i++) {
+       PyTuple_SetItem(list, i, pyg_param_spec_new(specs[i]));
+    }
+    g_free(specs);
+    if (class)
+        g_type_class_unref(class);
+    else
+        g_type_default_interface_unref(iface);
+
+    return list;
+}
+
+static PyObject *
+pyg_object_new (PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    PyObject *pytype;
+    GType type;
+    GObject *obj = NULL;
+    GObjectClass *class;
+    guint n_params = 0, i;
+    GParameter *params = NULL;
+
+    if (!PyArg_ParseTuple (args, "O:gobject.new", &pytype)) {
+       return NULL;
+    }
+
+    if ((type = pyg_type_from_object (pytype)) == 0)
+       return NULL;
+
+    if (G_TYPE_IS_ABSTRACT(type)) {
+       PyErr_Format(PyExc_TypeError, "cannot create instance of abstract "
+                    "(non-instantiable) type `%s'", g_type_name(type));
+       return NULL;
+    }
+
+    if ((class = g_type_class_ref (type)) == NULL) {
+       PyErr_SetString(PyExc_TypeError,
+                       "could not get a reference to type class");
+       return NULL;
+    }
+
+    if (!pygobject_prepare_construct_properties (class, kwargs, &n_params, &params))
+        goto cleanup;
+
+    obj = g_object_newv(type, n_params, params);
+    if (!obj)
+       PyErr_SetString (PyExc_RuntimeError, "could not create object");
+
+ cleanup:
+    for (i = 0; i < n_params; i++) {
+       g_free((gchar *) params[i].name);
+       g_value_unset(&params[i].value);
+    }
+    g_free(params);
+    g_type_class_unref(class);
+
+    if (obj) {
+       self = (PyGObject *) pygobject_new_full((GObject *)obj, FALSE, NULL);
+        g_object_unref(obj);
+    } else
+        self = NULL;
+
+    return (PyObject *) self;
+}
+
+gboolean
+pyg_handler_marshal(gpointer user_data)
+{
+    PyObject *tuple, *ret;
+    gboolean res;
+    PyGILState_STATE state;
+
+    g_return_val_if_fail(user_data != NULL, FALSE);
+
+    state = pyglib_gil_state_ensure();
+
+    tuple = (PyObject *)user_data;
+    ret = PyObject_CallObject(PyTuple_GetItem(tuple, 0),
+                             PyTuple_GetItem(tuple, 1));
+    if (!ret) {
+       PyErr_Print();
+       res = FALSE;
+    } else {
+       res = PyObject_IsTrue(ret);
+       Py_DECREF(ret);
+    }
+
+    pyglib_gil_state_release(state);
+
+    return res;
+}
+
+static int
+pygobject_gil_state_ensure (void)
+{
+    return pyglib_gil_state_ensure ();
+}
+
+static void
+pygobject_gil_state_release (int flag)
+{
+    pyglib_gil_state_release(flag);
+}
+
+static PyObject *
+pyg_threads_init (PyObject *unused, PyObject *args, PyObject *kwargs)
+{
+    if (!pyglib_enable_threads())
+        return NULL;
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+/* Only for backwards compatibility */
+int
+pygobject_enable_threads(void)
+{
+    if (!pyglib_enable_threads())
+       return -1;
+    return 0;
+}
+
+static void
+pyg_note_threads_enabled(void)
+{
+    pygobject_api_functions.threads_enabled = TRUE;
+}
+
+static PyObject *
+pyg_signal_accumulator_true_handled(PyObject *unused, PyObject *args)
+{
+    PyErr_SetString(PyExc_TypeError,
+                   "signal_accumulator_true_handled can only"
+                    " be used as accumulator argument when registering signals");
+    return NULL;
+}
+
+static gboolean
+marshal_emission_hook(GSignalInvocationHint *ihint,
+                     guint n_param_values,
+                     const GValue *param_values,
+                     gpointer user_data)
+{
+    PyGILState_STATE state;
+    gboolean retval = FALSE;
+    PyObject *func, *args;
+    PyObject *retobj;
+    PyObject *params;
+    guint i;
+
+    state = pyglib_gil_state_ensure();
+
+    /* construct Python tuple for the parameter values */
+    params = PyTuple_New(n_param_values);
+
+    for (i = 0; i < n_param_values; i++) {
+       PyObject *item = pyg_value_as_pyobject(&param_values[i], FALSE);
+
+       /* error condition */
+       if (!item) {
+           goto out;
+       }
+       PyTuple_SetItem(params, i, item);
+    }
+
+    args = (PyObject *)user_data;
+    func = PyTuple_GetItem(args, 0);
+    args = PySequence_Concat(params, PyTuple_GetItem(args, 1));
+    Py_DECREF(params);
+
+    /* params passed to function may have extra arguments */
+
+    retobj = PyObject_CallObject(func, args);
+    Py_DECREF(args);
+    if (retobj == NULL) {
+        PyErr_Print();
+    }
+
+    retval = (retobj == Py_True ? TRUE : FALSE);
+    Py_XDECREF(retobj);
+out:
+    pyglib_gil_state_release(state);
+    return retval;
+}
+
+static PyObject *
+pyg_add_emission_hook(PyGObject *self, PyObject *args)
+{
+    PyObject *first, *callback, *extra_args, *data;
+    gchar *name;
+    gulong hook_id;
+    guint sigid;
+    Py_ssize_t len;
+    GQuark detail = 0;
+    GType gtype;
+    PyObject *pygtype;
+
+    len = PyTuple_Size(args);
+    if (len < 3) {
+       PyErr_SetString(PyExc_TypeError,
+                       "gobject.add_emission_hook requires at least 3 arguments");
+       return NULL;
+    }
+    first = PySequence_GetSlice(args, 0, 3);
+    if (!PyArg_ParseTuple(first, "OsO:add_emission_hook",
+                         &pygtype, &name, &callback)) {
+       Py_DECREF(first);
+       return NULL;
+    }
+    Py_DECREF(first);
+
+    if ((gtype = pyg_type_from_object(pygtype)) == 0) {
+       return NULL;
+    }
+    if (!PyCallable_Check(callback)) {
+       PyErr_SetString(PyExc_TypeError, "third argument must be callable");
+       return NULL;
+    }
+
+    if (!g_signal_parse_name(name, gtype, &sigid, &detail, TRUE)) {
+       PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+                       PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+                    name);
+       return NULL;
+    }
+    extra_args = PySequence_GetSlice(args, 3, len);
+    if (extra_args == NULL)
+       return NULL;
+
+    data = Py_BuildValue("(ON)", callback, extra_args);
+    if (data == NULL)
+      return NULL;
+
+    hook_id = g_signal_add_emission_hook(sigid, detail,
+                                        marshal_emission_hook,
+                                        data,
+                                        (GDestroyNotify)pyg_destroy_notify);
+
+    return PyLong_FromUnsignedLong(hook_id);
+}
+
+static PyObject *
+pyg_remove_emission_hook(PyGObject *self, PyObject *args)
+{
+    PyObject *pygtype;
+    char *name;
+    guint signal_id;
+    gulong hook_id;
+    GType gtype;
+
+    if (!PyArg_ParseTuple(args, "Osk:gobject.remove_emission_hook",
+                         &pygtype, &name, &hook_id))
+       return NULL;
+
+    if ((gtype = pyg_type_from_object(pygtype)) == 0) {
+       return NULL;
+    }
+
+    if (!g_signal_parse_name(name, gtype, &signal_id, NULL, TRUE)) {
+       PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+                 PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+                 name);
+       return NULL;
+    }
+
+    g_signal_remove_emission_hook(signal_id, hook_id);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pyg__install_metaclass(PyObject *dummy, PyTypeObject *metaclass)
+{
+    Py_INCREF(metaclass);
+    PyGObject_MetaType = metaclass;
+    Py_INCREF(metaclass);
+
+    Py_TYPE(&PyGObject_Type) = metaclass;
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyMethodDef _gobject_functions[] = {
+    { "type_name", pyg_type_name, METH_VARARGS },
+    { "type_from_name", pyg_type_from_name, METH_VARARGS },
+    { "type_parent", pyg_type_parent, METH_VARARGS },
+    { "type_is_a", pyg_type_is_a, METH_VARARGS },
+    { "type_children", pyg_type_children, METH_VARARGS },
+    { "type_interfaces", pyg_type_interfaces, METH_VARARGS },
+    { "type_register", _wrap_pyg_type_register, METH_VARARGS },
+    { "signal_new", pyg_signal_new, METH_VARARGS },
+    { "signal_list_names",
+      (PyCFunction)pyg_signal_list_names, METH_VARARGS|METH_KEYWORDS },
+    { "signal_list_ids",
+      (PyCFunction)pyg_signal_list_ids, METH_VARARGS|METH_KEYWORDS },
+    { "signal_lookup",
+      (PyCFunction)pyg_signal_lookup, METH_VARARGS|METH_KEYWORDS },
+    { "signal_name",
+      (PyCFunction)pyg_signal_name, METH_VARARGS|METH_KEYWORDS },
+    { "signal_query",
+      (PyCFunction)pyg_signal_query, METH_VARARGS|METH_KEYWORDS },
+    { "list_properties",
+      pyg_object_class_list_properties, METH_VARARGS },
+    { "new",
+      (PyCFunction)pyg_object_new, METH_VARARGS|METH_KEYWORDS },
+    { "threads_init",
+      (PyCFunction)pyg_threads_init, METH_VARARGS|METH_KEYWORDS },
+    { "signal_accumulator_true_handled",
+      (PyCFunction)pyg_signal_accumulator_true_handled, METH_VARARGS },
+    { "add_emission_hook",
+      (PyCFunction)pyg_add_emission_hook, METH_VARARGS },
+    { "remove_emission_hook",
+      (PyCFunction)pyg_remove_emission_hook, METH_VARARGS },
+    { "_install_metaclass",
+      (PyCFunction)pyg__install_metaclass, METH_O },
+
+    { NULL, NULL, 0 }
+};
+
+
+/* ----------------- Constant extraction ------------------------ */
+
+/**
+ * pyg_constant_strip_prefix:
+ * @name: the constant name.
+ * @strip_prefix: the prefix to strip.
+ *
+ * Advances the pointer @name by strlen(@strip_prefix) characters.  If
+ * the resulting name does not start with a letter or underscore, the
+ * @name pointer will be rewound.  This is to ensure that the
+ * resulting name is a valid identifier.  Hence the returned string is
+ * a pointer into the string @name.
+ *
+ * Returns: the stripped constant name.
+ */
+const gchar *
+pyg_constant_strip_prefix(const gchar *name, const gchar *strip_prefix)
+{
+    gint prefix_len;
+    guint i;
+
+    prefix_len = strlen(strip_prefix);
+
+    /* Check so name starts with strip_prefix, if it doesn't:
+     * return the rest of the part which doesn't match
+     */
+    for (i = 0; i < prefix_len; i++) {
+       if (name[i] != strip_prefix[i] && name[i] != '_') {
+           return &name[i];
+       }
+    }
+
+    /* strip off prefix from value name, while keeping it a valid
+     * identifier */
+    for (i = prefix_len; i >= 0; i--) {
+       if (g_ascii_isalpha(name[i]) || name[i] == '_') {
+           return &name[i];
+       }
+    }
+    return name;
+}
+
+/**
+ * pyg_enum_add_constants:
+ * @module: a Python module
+ * @enum_type: the GType of the enumeration.
+ * @strip_prefix: the prefix to strip from the constant names.
+ *
+ * Adds constants to the given Python module for each value name of
+ * the enumeration.  A prefix will be stripped from each enum name.
+ */
+static void
+pyg_enum_add_constants(PyObject *module, GType enum_type,
+                      const gchar *strip_prefix)
+{
+    GEnumClass *eclass;
+    guint i;
+
+    if (!G_TYPE_IS_ENUM(enum_type)) {
+       if (G_TYPE_IS_FLAGS(enum_type)) /* See bug #136204 */
+           pyg_flags_add_constants(module, enum_type, strip_prefix);
+       else
+           g_warning("`%s' is not an enum type", g_type_name(enum_type));
+       return;
+    }
+    g_return_if_fail (strip_prefix != NULL);
+
+    eclass = G_ENUM_CLASS(g_type_class_ref(enum_type));
+
+    for (i = 0; i < eclass->n_values; i++) {
+       const gchar *name = eclass->values[i].value_name;
+       gint value = eclass->values[i].value;
+
+       PyModule_AddIntConstant(module,
+                               (char*) pyg_constant_strip_prefix(name, strip_prefix),
+                               (long) value);
+    }
+
+    g_type_class_unref(eclass);
+}
+
+/**
+ * pyg_flags_add_constants:
+ * @module: a Python module
+ * @flags_type: the GType of the flags type.
+ * @strip_prefix: the prefix to strip from the constant names.
+ *
+ * Adds constants to the given Python module for each value name of
+ * the flags set.  A prefix will be stripped from each flag name.
+ */
+static void
+pyg_flags_add_constants(PyObject *module, GType flags_type,
+                       const gchar *strip_prefix)
+{
+    GFlagsClass *fclass;
+    guint i;
+
+    if (!G_TYPE_IS_FLAGS(flags_type)) {
+       if (G_TYPE_IS_ENUM(flags_type)) /* See bug #136204 */
+           pyg_enum_add_constants(module, flags_type, strip_prefix);
+       else
+           g_warning("`%s' is not an flags type", g_type_name(flags_type));
+       return;
+    }
+    g_return_if_fail (strip_prefix != NULL);
+
+    fclass = G_FLAGS_CLASS(g_type_class_ref(flags_type));
+
+    for (i = 0; i < fclass->n_values; i++) {
+       const gchar *name = fclass->values[i].value_name;
+       guint value = fclass->values[i].value;
+
+       PyModule_AddIntConstant(module,
+                               (char*) pyg_constant_strip_prefix(name, strip_prefix),
+                               (long) value);
+    }
+
+    g_type_class_unref(fclass);
+}
+
+/**
+ * pyg_error_check:
+ * @error: a pointer to the GError.
+ *
+ * Checks to see if the GError has been set.  If the error has been
+ * set, then the gobject.GError Python exception will be raised, and
+ * the GError cleared.
+ *
+ * Returns: True if an error was set.
+ *
+ * Deprecated: Since 2.16, use pyglib_error_check instead.
+ */
+gboolean
+pyg_error_check(GError **error)
+{
+#if 0
+    if (PyErr_Warn(PyExc_DeprecationWarning,
+                  "pyg_error_check is deprecated, use "
+                  "pyglib_error_check instead"))
+        return NULL;
+#endif
+    return pyglib_error_check(error);
+}
+
+/**
+ * pyg_gerror_exception_check:
+ * @error: a standard GLib GError ** output parameter
+ *
+ * Checks to see if a GError exception has been raised, and if so
+ * translates the python exception to a standard GLib GError.  If the
+ * raised exception is not a GError then PyErr_Print() is called.
+ *
+ * Returns: 0 if no exception has been raised, -1 if it is a
+ * valid gobject.GError, -2 otherwise.
+ *
+ * Deprecated: Since 2.16, use pyglib_gerror_exception_check instead.
+ */
+gboolean
+pyg_gerror_exception_check(GError **error)
+{
+#if 0
+    if (PyErr_Warn(PyExc_DeprecationWarning,
+                  "pyg_gerror_exception_check is deprecated, use "
+                  "pyglib_gerror_exception_check instead"))
+        return NULL;
+#endif
+    return pyglib_gerror_exception_check(error);
+}
+
+/**
+ * pyg_parse_constructor_args: helper function for PyGObject constructors
+ * @obj_type: GType of the GObject, for parameter introspection
+ * @arg_names: %NULL-terminated array of constructor argument names
+ * @prop_names: %NULL-terminated array of property names, with direct
+ * correspondence to @arg_names
+ * @params: GParameter array where parameters will be placed; length
+ * of this array must be at least equal to the number of
+ * arguments/properties
+ * @nparams: output parameter to contain actual number of arguments found
+ * @py_args: array of PyObject* containing the actual constructor arguments
+ *
+ * Parses an array of PyObject's and creates a GParameter array
+ *
+ * Return value: %TRUE if all is successful, otherwise %FALSE and
+ * python exception set.
+ **/
+static gboolean
+pyg_parse_constructor_args(GType        obj_type,
+                           char       **arg_names,
+                           char       **prop_names,
+                           GParameter  *params,
+                           guint       *nparams,
+                           PyObject   **py_args)
+{
+    guint arg_i, param_i;
+    GObjectClass *oclass;
+
+    oclass = g_type_class_ref(obj_type);
+    g_return_val_if_fail(oclass, FALSE);
+
+    for (param_i = arg_i = 0; arg_names[arg_i]; ++arg_i) {
+        GParamSpec *spec;
+        if (!py_args[arg_i])
+            continue;
+        spec = g_object_class_find_property(oclass, prop_names[arg_i]);
+        params[param_i].name = prop_names[arg_i];
+        g_value_init(&params[param_i].value, spec->value_type);
+        if (pyg_value_from_pyobject(&params[param_i].value, py_args[arg_i]) == -1) {
+            int i;
+            PyErr_Format(PyExc_TypeError, "could not convert parameter '%s' of type '%s'",
+                         arg_names[arg_i], g_type_name(spec->value_type));
+            g_type_class_unref(oclass);
+            for (i = 0; i < param_i; ++i)
+                g_value_unset(&params[i].value);
+            return FALSE;
+        }
+        ++param_i;
+    }
+    g_type_class_unref(oclass);
+    *nparams = param_i;
+    return TRUE;
+}
+
+int
+pygobject_constructv(PyGObject  *self,
+                     guint       n_parameters,
+                     GParameter *parameters)
+{
+    if (self->obj == NULL) {
+        GObject *obj;
+        pygobject_init_wrapper_set((PyObject *) self);
+        obj = g_object_newv(pyg_type_from_object((PyObject *) self),
+                            n_parameters, parameters);
+        pygobject_init_wrapper_set(NULL);
+        if (self->obj == NULL) {
+            self->obj = obj;
+            pygobject_register_wrapper((PyObject *) self);
+        }
+    } else {
+        int i;
+        for (i = 0; i < n_parameters; ++i)
+            g_object_set_property(self->obj,
+                                 parameters[i].name,
+                                 &parameters[i].value);
+    }
+    return 0;
+}
+
+/* This function is mostly juste copy-paste from g_object_new, but
+ * calls pygobject_constructv instead of g_object_newv */
+int
+pygobject_construct(PyGObject *self, const char *first_property_name, ...)
+{
+    va_list var_args;
+    GObjectClass *class;
+    GParameter *params;
+    const gchar *name;
+    guint n_params = 0, n_alloced_params = 16;
+    GType object_type = pyg_type_from_object((PyObject *) self);
+    int retval;
+
+    if (!first_property_name)
+        return pygobject_constructv(self, 0, NULL);
+
+    va_start(var_args, first_property_name);
+    class = g_type_class_ref(object_type);
+
+    params = g_new(GParameter, n_alloced_params);
+    name = first_property_name;
+    while (name)
+    {
+        gchar *error = NULL;
+        GParamSpec *pspec = g_object_class_find_property(class, name);
+
+        if (!pspec)
+       {
+            g_warning("%s: object class `%s' has no property named `%s'",
+                      G_STRFUNC,
+                      g_type_name(object_type),
+                      name);
+            break;
+       }
+        if (n_params >= n_alloced_params)
+       {
+            n_alloced_params += 16;
+            params = g_renew(GParameter, params, n_alloced_params);
+       }
+        params[n_params].name = name;
+        params[n_params].value.g_type = 0;
+        g_value_init(&params[n_params].value, G_PARAM_SPEC_VALUE_TYPE(pspec));
+        G_VALUE_COLLECT(&params[n_params].value, var_args, 0, &error);
+        if (error)
+       {
+            g_warning("%s: %s", G_STRFUNC, error);
+            g_free(error);
+            g_value_unset(&params[n_params].value);
+            break;
+       }
+        n_params++;
+        name = va_arg(var_args, gchar*);
+    }
+
+    retval = pygobject_constructv(self, n_params, params);
+
+    while (n_params--)
+        g_value_unset(&params[n_params].value);
+    g_free(params);
+    va_end(var_args);
+    g_type_class_unref(class);
+    return retval;
+}
+
+void
+pyg_set_object_has_new_constructor(GType type)
+{
+    g_type_set_qdata(type, pygobject_has_updated_constructor_key, GINT_TO_POINTER(1));
+}
+
+PyObject *
+pyg_integer_richcompare(PyObject *v, PyObject *w, int op)
+{
+    PyObject *result;
+    gboolean t;
+
+    switch (op) {
+    case Py_EQ: t = PYGLIB_PyLong_AS_LONG(v) == PYGLIB_PyLong_AS_LONG(w); break;
+    case Py_NE: t = PYGLIB_PyLong_AS_LONG(v) != PYGLIB_PyLong_AS_LONG(w); break;
+    case Py_LE: t = PYGLIB_PyLong_AS_LONG(v) <= PYGLIB_PyLong_AS_LONG(w); break;
+    case Py_GE: t = PYGLIB_PyLong_AS_LONG(v) >= PYGLIB_PyLong_AS_LONG(w); break;
+    case Py_LT: t = PYGLIB_PyLong_AS_LONG(v) <  PYGLIB_PyLong_AS_LONG(w); break;
+    case Py_GT: t = PYGLIB_PyLong_AS_LONG(v) >  PYGLIB_PyLong_AS_LONG(w); break;
+    default: g_assert_not_reached();
+    }
+
+    result = t ? Py_True : Py_False;
+    Py_INCREF(result);
+    return result;
+}
+
+static void
+_log_func(const gchar *log_domain,
+          GLogLevelFlags log_level,
+          const gchar *message,
+          gpointer user_data)
+{
+    if (G_LIKELY(Py_IsInitialized()))
+    {
+       PyGILState_STATE state;
+       PyObject* warning = user_data;
+
+       state = pyglib_gil_state_ensure();
+       PyErr_Warn(warning, (char *) message);
+       pyglib_gil_state_release(state);
+    } else
+        g_log_default_handler(log_domain, log_level, message, user_data);
+}
+
+static void
+add_warning_redirection(const char *domain,
+                        PyObject   *warning)
+{
+    g_return_if_fail(domain != NULL);
+    g_return_if_fail(warning != NULL);
+
+    if (!log_handlers_disabled)
+    {
+       guint handler;
+       gpointer old_handler;
+
+       if (!log_handlers)
+           log_handlers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
+
+       if ((old_handler = g_hash_table_lookup(log_handlers, domain)))
+           g_log_remove_handler(domain, GPOINTER_TO_UINT(old_handler));
+
+       handler = g_log_set_handler(domain, G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING,
+                                   _log_func, warning);
+       g_hash_table_insert(log_handlers, g_strdup(domain), GUINT_TO_POINTER(handler));
+    }
+}
+
+static void
+remove_handler(gpointer domain,
+               gpointer handler,
+              gpointer unused)
+{
+    g_log_remove_handler(domain, GPOINTER_TO_UINT(handler));
+}
+
+static void
+disable_warning_redirections(void)
+{
+    log_handlers_disabled = TRUE;
+
+    if (log_handlers)
+    {
+       g_hash_table_foreach(log_handlers, remove_handler, NULL);
+       g_hash_table_destroy(log_handlers);
+       log_handlers = NULL;
+    }
+}
+
+/* ----------------- gobject module initialisation -------------- */
+
+struct _PyGObject_Functions pygobject_api_functions = {
+  pygobject_register_class,
+  pygobject_register_wrapper,
+  pygobject_register_sinkfunc,
+  pygobject_lookup_class,
+  pygobject_new,
+
+  pyg_closure_new,
+  pygobject_watch_closure,
+  pyg_destroy_notify,
+
+  pyg_type_from_object,
+  pyg_type_wrapper_new,
+  pyg_enum_get_value,
+  pyg_flags_get_value,
+  pyg_register_gtype_custom,
+  pyg_value_from_pyobject,
+  pyg_value_as_pyobject,
+
+  pyg_register_interface,
+
+  &PyGBoxed_Type,
+  pyg_register_boxed,
+  pyg_boxed_new,
+
+  &PyGPointer_Type,
+  pyg_register_pointer,
+  pyg_pointer_new,
+
+  pyg_enum_add_constants,
+  pyg_flags_add_constants,
+
+  pyg_constant_strip_prefix,
+
+  pyg_error_check,
+
+  pyg_set_thread_block_funcs,
+  (PyGThreadBlockFunc)0, /* block_threads */
+  (PyGThreadBlockFunc)0, /* unblock_threads */
+
+  &PyGParamSpec_Type,
+  pyg_param_spec_new,
+  pyg_param_spec_from_object,
+
+  pyg_pyobj_to_unichar_conv,
+  pyg_parse_constructor_args,
+  pyg_param_gvalue_as_pyobject,
+  pyg_param_gvalue_from_pyobject,
+
+  &PyGEnum_Type,
+  pyg_enum_add,
+  pyg_enum_from_gtype,
+
+  &PyGFlags_Type,
+  pyg_flags_add,
+  pyg_flags_from_gtype,
+
+  FALSE, /* threads_enabled */
+  pygobject_enable_threads,
+  pygobject_gil_state_ensure,
+  pygobject_gil_state_release,
+  pyg_register_class_init,
+  pyg_register_interface_info,
+
+  pyg_closure_set_exception_handler,
+  pygobject_constructv,
+  pygobject_construct,
+  pyg_set_object_has_new_constructor,
+
+  add_warning_redirection,
+  disable_warning_redirections,
+
+  pyg_type_register_custom_callback,
+  pyg_gerror_exception_check,
+
+  pyglib_option_group_new,
+  pyg_type_from_object_strict
+};
+
+/* for addon libraries ... */
+static void
+pygobject_register_api(PyObject *d)
+{
+    PyObject *api;
+
+    api = PYGLIB_CPointer_WrapPointer(&pygobject_api_functions, "gobject._PyGObject_API");
+    PyDict_SetItemString(d, "_PyGObject_API", api);
+    Py_DECREF(api);
+}
+
+/* some constants */
+static void
+pygobject_register_constants(PyObject *m)
+{
+    /* PyFloat_ return a new ref, and add object takes the ref */
+    PyModule_AddObject(m,       "G_MINFLOAT", PyFloat_FromDouble(G_MINFLOAT));
+    PyModule_AddObject(m,       "G_MAXFLOAT", PyFloat_FromDouble(G_MAXFLOAT));
+    PyModule_AddObject(m,       "G_MINDOUBLE", PyFloat_FromDouble(G_MINDOUBLE));
+    PyModule_AddObject(m,       "G_MAXDOUBLE", PyFloat_FromDouble(G_MAXDOUBLE));
+    PyModule_AddIntConstant(m,  "G_MINSHORT", G_MINSHORT);
+    PyModule_AddIntConstant(m,  "G_MAXSHORT", G_MAXSHORT);
+    PyModule_AddIntConstant(m,  "G_MAXUSHORT", G_MAXUSHORT);
+    PyModule_AddIntConstant(m,  "G_MININT", G_MININT);
+    PyModule_AddIntConstant(m,  "G_MAXINT", G_MAXINT);
+    PyModule_AddObject(m,       "G_MINLONG", PyLong_FromLong(G_MINLONG));
+    PyModule_AddObject(m,       "G_MAXLONG", PyLong_FromLong(G_MAXLONG));
+    PyModule_AddObject(m,       "G_MAXULONG", PyLong_FromUnsignedLong(G_MAXULONG));
+    PyModule_AddIntConstant(m,  "G_MININT8", G_MININT8);
+    PyModule_AddIntConstant(m,  "G_MAXINT8", G_MAXINT8);
+    PyModule_AddIntConstant(m,  "G_MAXUINT8", G_MAXUINT8);
+    PyModule_AddIntConstant(m,  "G_MININT16", G_MININT16);
+    PyModule_AddIntConstant(m,  "G_MAXINT16", G_MAXINT16);
+    PyModule_AddIntConstant(m,  "G_MAXUINT16", G_MAXUINT16);
+    PyModule_AddIntConstant(m,  "G_MININT32", G_MININT32);
+    PyModule_AddIntConstant(m,  "G_MAXINT32", G_MAXINT32);
+    PyModule_AddObject(m,       "G_MININT64", PyLong_FromLongLong(G_MININT64));
+    PyModule_AddObject(m,       "G_MAXINT64", PyLong_FromLongLong(G_MAXINT64));
+    PyModule_AddObject(m,       "G_MAXUINT64", PyLong_FromUnsignedLongLong(G_MAXUINT64));
+#if PY_VERSION_HEX < 0x02050000 /* 2.3, 2.4 */
+    PyModule_AddObject(m,       "G_MAXSIZE", PyLong_FromUnsignedLongLong(G_MAXSIZE));
+    PyModule_AddObject(m,       "G_MAXSSIZE", PyLong_FromUnsignedLongLong(G_MAXSSIZE));
+#elif PY_VERSION_HEX < 0x02060000 /* 2.5 */
+    PyModule_AddObject(m,       "G_MAXSIZE", PYGLIB_PyLong_FromSize_t(G_MAXSIZE));
+    PyModule_AddObject(m,       "G_MAXSSIZE", PYGLIB_PyLong_FromSsize_t(G_MAXSSIZE));
+#else /* 2.6+ */
+    PyModule_AddObject(m,       "G_MAXSIZE", PyLong_FromSize_t(G_MAXSIZE));
+    PyModule_AddObject(m,       "G_MAXSSIZE", PyLong_FromSsize_t(G_MAXSSIZE));
+#endif
+    PyModule_AddObject(m,       "G_MINOFFSET", PyLong_FromLongLong(G_MINOFFSET));
+    PyModule_AddObject(m,       "G_MAXOFFSET", PyLong_FromLongLong(G_MAXOFFSET));
+
+    /* in order for test_properties to pass, G_MAXUINT must be initialized using
+       PyLong_FromUnsignedLong, despite AFAICT it is unecessary for 32bit int types.
+       In the interests of consistancy I did the same for MAXUINT32 */
+    PyModule_AddObject(m,       "G_MAXUINT32", PyLong_FromUnsignedLong(G_MAXUINT32));
+    PyModule_AddObject(m,       "G_MAXUINT", PyLong_FromUnsignedLong(G_MAXUINT));
+
+    PyModule_AddIntConstant(m, "SIGNAL_RUN_FIRST", G_SIGNAL_RUN_FIRST);
+    PyModule_AddIntConstant(m, "SIGNAL_RUN_LAST", G_SIGNAL_RUN_LAST);
+    PyModule_AddIntConstant(m, "SIGNAL_RUN_CLEANUP", G_SIGNAL_RUN_CLEANUP);
+    PyModule_AddIntConstant(m, "SIGNAL_NO_RECURSE", G_SIGNAL_NO_RECURSE);
+    PyModule_AddIntConstant(m, "SIGNAL_DETAILED", G_SIGNAL_DETAILED);
+    PyModule_AddIntConstant(m, "SIGNAL_ACTION", G_SIGNAL_ACTION);
+    PyModule_AddIntConstant(m, "SIGNAL_NO_HOOKS", G_SIGNAL_NO_HOOKS);
+
+    PyModule_AddIntConstant(m, "PARAM_READABLE", G_PARAM_READABLE);
+    PyModule_AddIntConstant(m, "PARAM_WRITABLE", G_PARAM_WRITABLE);
+    PyModule_AddIntConstant(m, "PARAM_CONSTRUCT", G_PARAM_CONSTRUCT);
+    PyModule_AddIntConstant(m, "PARAM_CONSTRUCT_ONLY", G_PARAM_CONSTRUCT_ONLY);
+    PyModule_AddIntConstant(m, "PARAM_LAX_VALIDATION", G_PARAM_LAX_VALIDATION);
+    PyModule_AddIntConstant(m, "PARAM_READWRITE", G_PARAM_READWRITE);
+
+    /* The rest of the types are set in __init__.py */
+    PyModule_AddObject(m, "TYPE_INVALID", pyg_type_wrapper_new(G_TYPE_INVALID));
+    PyModule_AddObject(m, "TYPE_GSTRING", pyg_type_wrapper_new(G_TYPE_GSTRING));
+}
+
+/* features */
+static void
+pygobject_register_features(PyObject *d)
+{
+    PyObject *features;
+
+    features = PyDict_New();
+#ifdef HAVE_FFI_H
+    PyDict_SetItemString(features, "generic-c-marshaller", Py_True);
+#endif
+    PyDict_SetItemString(d, "features", features);
+    Py_DECREF(features);
+}
+
+static void
+pygobject_register_version_tuples(PyObject *d)
+{
+    PyObject *tuple;
+
+    /* pygobject version */
+    tuple = Py_BuildValue ("(iii)",
+                          PYGOBJECT_MAJOR_VERSION,
+                          PYGOBJECT_MINOR_VERSION,
+                          PYGOBJECT_MICRO_VERSION);
+    PyDict_SetItemString(d, "pygobject_version", tuple);
+
+    /* backwards compatibility */
+    PyDict_SetItemString(d, "pygtk_version", tuple);
+    Py_DECREF(tuple);
+}
+
+static void
+pygobject_register_warnings(PyObject *d)
+{
+    PyObject *warning;
+
+    warning = PyErr_NewException("gobject.Warning", PyExc_Warning, NULL);
+    PyDict_SetItemString(d, "Warning", warning);
+    add_warning_redirection("GLib", warning);
+    add_warning_redirection("GLib-GObject", warning);
+    add_warning_redirection("GThread", warning);
+}
+
+
+PYGLIB_MODULE_START(_gobject, "gobject._gobject")
+{
+    PyObject *d;
+
+    g_type_init();
+    pyglib_init();
+
+    d = PyModule_GetDict(module);
+    pygobject_register_api(d);
+    pygobject_register_constants(module);
+    pygobject_register_features(d);
+    pygobject_register_version_tuples(d);
+    pygobject_register_warnings(d);
+    pygobject_type_register_types(d);
+    pygobject_object_register_types(d);
+    pygobject_interface_register_types(d);
+    pygobject_paramspec_register_types(d);
+    pygobject_boxed_register_types(d);
+    pygobject_pointer_register_types(d);
+    pygobject_enum_register_types(d);
+    pygobject_flags_register_types(d);
+
+      /* signal registration recognizes this special accumulator 'constant' */
+    _pyg_signal_accumulator_true_handled_func = \
+        PyDict_GetItemString(d, "signal_accumulator_true_handled");
+
+    pygobject_api_functions.threads_enabled = pyglib_threads_enabled();
+    _pyglib_notify_on_enabling_threads(pyg_note_threads_enabled);
+}
+PYGLIB_MODULE_END
diff --git a/gobject/propertyhelper.py b/gobject/propertyhelper.py
new file mode 100644 (file)
index 0000000..9643c82
--- /dev/null
@@ -0,0 +1,303 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2007 Johan Dahlin
+#
+#   gobject/propertyhelper.py: GObject property wrapper/helper
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+import sys
+
+import gobject._gobject
+_gobject = sys.modules['gobject._gobject']
+
+from gobject.constants import \
+     TYPE_NONE, TYPE_INTERFACE, TYPE_CHAR, TYPE_UCHAR, \
+     TYPE_BOOLEAN, TYPE_INT, TYPE_UINT, TYPE_LONG, \
+     TYPE_ULONG, TYPE_INT64, TYPE_UINT64, TYPE_ENUM, \
+     TYPE_FLAGS, TYPE_FLOAT, TYPE_DOUBLE, TYPE_STRING, \
+     TYPE_POINTER, TYPE_BOXED, TYPE_PARAM, TYPE_OBJECT, \
+     TYPE_PYOBJECT
+from gobject.constants import \
+     G_MINFLOAT, G_MAXFLOAT, G_MINDOUBLE, G_MAXDOUBLE, \
+     G_MININT, G_MAXINT, G_MAXUINT, G_MINLONG, G_MAXLONG, \
+     G_MAXULONG
+
+if sys.version_info >= (3, 0):
+    _basestring = str
+    _long = int
+else:
+    _basestring = basestring
+    _long = long
+
+class property(object):
+    """
+    Creates a new property which in conjunction with GObject subclass will
+    create a property proxy:
+
+    >>> class MyObject(gobject.GObject):
+    >>> ... prop = gobject.property(type=str)
+
+    >>> obj = MyObject()
+    >>> obj.prop = 'value'
+
+    >>> obj.prop
+    'value'
+
+    The API is similar to the builtin property:
+
+    class AnotherObject(gobject.GObject):
+        @gobject.property
+        def prop(self):
+            return ...
+
+    Which will create a read-only property called prop.
+    """
+
+    class __metaclass__(type):
+        def __repr__(self):
+            return "<class 'gobject.property'>"
+
+    def __init__(self, getter=None, setter=None, type=None, default=None,
+                 nick='', blurb='', flags=_gobject.PARAM_READWRITE,
+                 minimum=None, maximum=None):
+        """
+        @param  getter: getter to get the value of the property
+        @type   getter: callable
+        @param  setter: setter to set the value of the property
+        @type   setter: callable
+        @param    type: type of property
+        @type     type: type
+        @param default: default value
+        @param    nick: short description
+        @type     bick: string
+        @param   blurb: long description
+        @type    blurb: string
+        @param flags:    parameter flags, one of:
+        - gobject.PARAM_READABLE
+        - gobject.PARAM_READWRITE
+        - gobject.PARAM_WRITABLE
+        - gobject.PARAM_CONSTRUCT
+        - gobject.PARAM_CONSTRUCT_ONLY
+        - gobject.PARAM_LAX_VALIDATION
+        @keyword minimum:  minimum allowed value (int, float, long only)
+        @keyword maximum:  maximum allowed value (int, float, long only)
+        """
+
+        if getter and not setter:
+            setter = self._readonly_setter
+        elif setter and not getter:
+            getter = self._writeonly_getter
+        elif not setter and not getter:
+            getter = self._default_getter
+            setter = self._default_setter
+        self.getter = getter
+        self.setter = setter
+
+        if type is None:
+            type = object
+        self.type = self._type_from_python(type)
+        self.default = self._get_default(default)
+        self._check_default()
+
+        if not isinstance(nick, _basestring):
+            raise TypeError("nick must be a string")
+        self.nick = nick
+
+        if not isinstance(blurb, _basestring):
+            raise TypeError("blurb must be a string")
+        self.blurb = blurb
+
+        if flags < 0 or flags > 32:
+            raise TypeError("invalid flag value: %r" % (flags,))
+        self.flags = flags
+
+        if minimum is not None:
+            if minimum < self._get_minimum():
+                raise TypeError(
+                    "Minimum for type %s cannot be lower than %d" % (
+                    self.type, self._get_minimum()))
+        else:
+            minimum = self._get_minimum()
+        self.minimum = minimum
+        if maximum is not None:
+            if maximum > self._get_maximum():
+                raise TypeError(
+                    "Maximum for type %s cannot be higher than %d" % (
+                    self.type, self._get_maximum()))
+        else:
+            maximum = self._get_maximum()
+        self.maximum = maximum
+
+        self.name = None
+
+        self._exc = None
+
+    def __repr__(self):
+        return '<gobject property %s (%s)>' % (
+            self.name or '(uninitialized)',
+            _gobject.type_name(self.type))
+
+    def __get__(self, instance, klass):
+        if instance is None:
+            return self
+
+        self._exc = None
+        value = instance.get_property(self.name)
+        if self._exc:
+            exc = self._exc
+            self._exc = None
+            raise exc
+
+        return value
+
+    def __set__(self, instance, value):
+        if instance is None:
+            raise TypeError
+
+        self._exc = None
+        instance.set_property(self.name, value)
+        if self._exc:
+            exc = self._exc
+            self._exc = None
+            raise exc
+
+    def _type_from_python(self, type_):
+        if type_ == _long:
+            return TYPE_LONG
+        elif type_ == int:
+            return TYPE_INT
+        elif type_ == bool:
+            return TYPE_BOOLEAN
+        elif type_ == float:
+            return TYPE_DOUBLE
+        elif type_ == str:
+            return TYPE_STRING
+        elif type_ == object:
+            return TYPE_PYOBJECT
+        elif isinstance(type_, type) and issubclass(type_, _gobject.GObject):
+            return type_.__gtype__
+        elif type_ in [TYPE_NONE, TYPE_INTERFACE, TYPE_CHAR, TYPE_UCHAR,
+                      TYPE_INT, TYPE_UINT, TYPE_BOOLEAN, TYPE_LONG,
+                      TYPE_ULONG, TYPE_INT64, TYPE_UINT64, TYPE_ENUM,
+                      TYPE_FLAGS, TYPE_FLOAT, TYPE_DOUBLE, TYPE_POINTER,
+                      TYPE_BOXED, TYPE_PARAM, TYPE_OBJECT, TYPE_STRING,
+                      TYPE_PYOBJECT]:
+            return type_
+        else:
+            raise TypeError("Unsupported type: %r" % (type_,))
+
+    def _get_default(self, default):
+        ptype = self.type
+        if default is not None:
+            return default
+
+        if ptype in [TYPE_INT, TYPE_UINT, TYPE_LONG, TYPE_ULONG,
+                     TYPE_INT64, TYPE_UINT64]:
+            return 0
+        elif ptype == TYPE_STRING:
+            return ''
+        elif ptype == TYPE_FLOAT or ptype == TYPE_DOUBLE:
+            return 0.0
+        else:
+            return None
+
+    def _check_default(self):
+        ptype = self.type
+        default = self.default
+        if (ptype == TYPE_BOOLEAN and (default not in (True, False))):
+            raise TypeError(
+                "default must be True or False, not %r" % (default,))
+        elif ptype == TYPE_PYOBJECT:
+            if default is not None:
+                raise TypeError("object types does not have default values")
+
+    def _get_minimum(self):
+        ptype = self.type
+        if ptype in [TYPE_UINT, TYPE_ULONG, TYPE_UINT64]:
+            return 0
+        # Remember that G_MINFLOAT and G_MINDOUBLE are something different.
+        elif ptype == TYPE_FLOAT:
+            return -G_MAXFLOAT
+        elif ptype == TYPE_DOUBLE:
+            return -G_MAXDOUBLE
+        elif ptype == TYPE_INT:
+            return G_MININT
+        elif ptype == TYPE_LONG:
+            return G_MINLONG
+        elif ptype == TYPE_INT64:
+            return -2 ** 62 - 1
+
+        return None
+
+    def _get_maximum(self):
+        ptype = self.type
+        if ptype == TYPE_UINT:
+            return G_MAXUINT
+        elif ptype == TYPE_ULONG:
+            return G_MAXULONG
+        elif ptype == TYPE_INT64:
+            return 2 ** 62 - 1
+        elif ptype == TYPE_UINT64:
+            return 2 ** 63 - 1
+        elif ptype == TYPE_FLOAT:
+            return G_MAXFLOAT
+        elif ptype == TYPE_DOUBLE:
+            return G_MAXDOUBLE
+        elif ptype == TYPE_INT:
+            return G_MAXINT
+        elif ptype == TYPE_LONG:
+            return G_MAXLONG
+
+        return None
+
+    #
+    # Getter and Setter
+    #
+
+    def _default_setter(self, instance, value):
+        setattr(instance, '_property_helper_'+self.name, value)
+
+    def _default_getter(self, instance):
+        return getattr(instance, '_property_helper_'+self.name, self.default)
+
+    def _readonly_setter(self, instance, value):
+        self._exc = TypeError("%s property of %s is read-only" % (
+            self.name, type(instance).__name__))
+
+    def _writeonly_getter(self, instance):
+        self._exc = TypeError("%s property of %s is write-only" % (
+            self.name, type(instance).__name__))
+
+    #
+    # Public API
+    #
+
+    def get_pspec_args(self):
+        ptype = self.type
+        if ptype in [TYPE_INT, TYPE_UINT, TYPE_LONG, TYPE_ULONG,
+                     TYPE_INT64, TYPE_UINT64, TYPE_FLOAT, TYPE_DOUBLE]:
+            args = self._get_minimum(), self._get_maximum(), self.default
+        elif ptype == TYPE_STRING or ptype == TYPE_BOOLEAN:
+            args = (self.default,)
+        elif ptype == TYPE_PYOBJECT:
+            args = ()
+        elif ptype.is_a(TYPE_OBJECT):
+            args = ()
+        else:
+            raise NotImplementedError(ptype)
+
+        return (self.type, self.nick, self.blurb) + args + (self.flags,)
diff --git a/gobject/pygboxed.c b/gobject/pygboxed.c
new file mode 100644 (file)
index 0000000..a00386b
--- /dev/null
@@ -0,0 +1,234 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *
+ *   pygboxed.c: wrapper for GBoxed
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pygobject-private.h"
+#include "pygboxed.h"
+
+#include "pygi.h"
+
+GQuark pygboxed_type_key;
+GQuark pygboxed_marshal_key;
+
+PYGLIB_DEFINE_TYPE("gobject.GBoxed", PyGBoxed_Type, PyGBoxed);
+
+static void
+pyg_boxed_dealloc(PyGBoxed *self)
+{
+    if (self->free_on_dealloc && self->boxed) {
+       PyGILState_STATE state = pyglib_gil_state_ensure();
+       g_boxed_free(self->gtype, self->boxed);
+       pyglib_gil_state_release(state);
+    }
+
+    Py_TYPE(self)->tp_free((PyObject *)self);
+}
+
+static PyObject*
+pyg_boxed_richcompare(PyObject *self, PyObject *other, int op)
+{
+    if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGBoxed_Type)
+        return _pyglib_generic_ptr_richcompare(((PyGBoxed*)self)->boxed,
+                                               ((PyGBoxed*)other)->boxed,
+                                               op);
+    else {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+}
+
+
+static long
+pyg_boxed_hash(PyGBoxed *self)
+{
+    return (long)self->boxed;
+}
+
+static PyObject *
+pyg_boxed_repr(PyGBoxed *self)
+{
+    gchar buf[128];
+
+    g_snprintf(buf, sizeof(buf), "<%s at 0x%lx>", g_type_name(self->gtype),
+              (long)self->boxed);
+    return PYGLIB_PyUnicode_FromString(buf);
+}
+
+static int
+pyg_boxed_init(PyGBoxed *self, PyObject *args, PyObject *kwargs)
+{
+    gchar buf[512];
+
+    if (!PyArg_ParseTuple(args, ":GBoxed.__init__"))
+       return -1;
+
+    self->boxed = NULL;
+    self->gtype = 0;
+    self->free_on_dealloc = FALSE;
+
+    g_snprintf(buf, sizeof(buf), "%s can not be constructed",
+              Py_TYPE(self)->tp_name);
+    PyErr_SetString(PyExc_NotImplementedError, buf);
+    return -1;
+}
+
+static void
+pyg_boxed_free(PyObject *op)
+{
+  PyObject_FREE(op);
+}
+
+static PyObject *
+pyg_boxed_copy(PyGBoxed *self)
+{
+    return pyg_boxed_new (self->gtype, self->boxed, TRUE, TRUE);
+}
+
+
+
+static PyMethodDef pygboxed_methods[] = {
+    { "copy", (PyCFunction) pyg_boxed_copy, METH_NOARGS },
+    { NULL, NULL, 0 }
+};
+
+
+/**
+ * pyg_register_boxed:
+ * @dict: the module dictionary to store the wrapper class.
+ * @class_name: the Python name for the wrapper class.
+ * @boxed_type: the GType of the boxed type being wrapped.
+ * @type: the wrapper class.
+ *
+ * Registers a wrapper for a boxed type.  The wrapper class will be a
+ * subclass of gobject.GBoxed, and a reference to the wrapper class
+ * will be stored in the provided module dictionary.
+ */
+void
+pyg_register_boxed(PyObject *dict, const gchar *class_name,
+                  GType boxed_type, PyTypeObject *type)
+{
+    PyObject *o;
+
+    g_return_if_fail(dict != NULL);
+    g_return_if_fail(class_name != NULL);
+    g_return_if_fail(boxed_type != 0);
+
+    if (!type->tp_dealloc)  type->tp_dealloc  = (destructor)pyg_boxed_dealloc;
+
+    Py_TYPE(type) = &PyType_Type;
+    type->tp_base = &PyGBoxed_Type;
+
+    if (PyType_Ready(type) < 0) {
+       g_warning("could not get type `%s' ready", type->tp_name);
+       return;
+    }
+
+    PyDict_SetItemString(type->tp_dict, "__gtype__",
+                        o=pyg_type_wrapper_new(boxed_type));
+    Py_DECREF(o);
+
+    g_type_set_qdata(boxed_type, pygboxed_type_key, type);
+
+    PyDict_SetItemString(dict, (char *)class_name, (PyObject *)type);
+}
+
+/**
+ * pyg_boxed_new:
+ * @boxed_type: the GType of the boxed value.
+ * @boxed: the boxed value.
+ * @copy_boxed: whether the new boxed wrapper should hold a copy of the value.
+ * @own_ref: whether the boxed wrapper should own the boxed value.
+ *
+ * Creates a wrapper for a boxed value.  If @copy_boxed is set to
+ * True, the wrapper will hold a copy of the value, instead of the
+ * value itself.  If @own_ref is True, then the value held by the
+ * wrapper will be freed when the wrapper is deallocated.  If
+ * @copy_boxed is True, then @own_ref must also be True.
+ *
+ * Returns: the boxed wrapper.
+ */
+PyObject *
+pyg_boxed_new(GType boxed_type, gpointer boxed, gboolean copy_boxed,
+             gboolean own_ref)
+{
+    PyGILState_STATE state;
+    PyGBoxed *self;
+    PyTypeObject *tp;
+
+    g_return_val_if_fail(boxed_type != 0, NULL);
+    g_return_val_if_fail(!copy_boxed || (copy_boxed && own_ref), NULL);
+
+    state = pyglib_gil_state_ensure();
+
+    if (!boxed) {
+       Py_INCREF(Py_None);
+       pyglib_gil_state_release(state);
+       return Py_None;
+    }
+
+    tp = g_type_get_qdata(boxed_type, pygboxed_type_key);
+
+    if (!tp)
+        tp = (PyTypeObject *)pygi_type_import_by_g_type(boxed_type);
+
+    if (!tp)
+       tp = (PyTypeObject *)&PyGBoxed_Type; /* fallback */
+
+    self = (PyGBoxed *)tp->tp_alloc(tp, 0);
+
+    if (self == NULL) {
+       pyglib_gil_state_release(state);
+        return NULL;
+    }
+
+    if (copy_boxed)
+       boxed = g_boxed_copy(boxed_type, boxed);
+    self->boxed = boxed;
+    self->gtype = boxed_type;
+    self->free_on_dealloc = own_ref;
+
+    pyglib_gil_state_release(state);
+    
+    return (PyObject *)self;
+}
+
+void
+pygobject_boxed_register_types(PyObject *d)
+{
+    pygboxed_type_key        = g_quark_from_static_string("PyGBoxed::class");
+    pygboxed_marshal_key     = g_quark_from_static_string("PyGBoxed::marshal");
+
+    PyGBoxed_Type.tp_dealloc = (destructor)pyg_boxed_dealloc;
+    PyGBoxed_Type.tp_richcompare = pyg_boxed_richcompare;
+    PyGBoxed_Type.tp_repr = (reprfunc)pyg_boxed_repr;
+    PyGBoxed_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+    PyGBoxed_Type.tp_methods = pygboxed_methods;
+    PyGBoxed_Type.tp_init = (initproc)pyg_boxed_init;
+    PyGBoxed_Type.tp_free = (freefunc)pyg_boxed_free;
+    PyGBoxed_Type.tp_hash = (hashfunc)pyg_boxed_hash;
+    
+    PYGOBJECT_REGISTER_GTYPE(d, PyGBoxed_Type, "GBoxed", G_TYPE_BOXED);
+}
diff --git a/gobject/pygboxed.h b/gobject/pygboxed.h
new file mode 100644 (file)
index 0000000..8433b9d
--- /dev/null
@@ -0,0 +1,27 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_BOXED_H__ 
+#define __PYGOBJECT_BOXED_H__
+
+void pygobject_boxed_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_BOXED_H__ */
diff --git a/gobject/pygenum.c b/gobject/pygenum.c
new file mode 100644 (file)
index 0000000..c0a51a9
--- /dev/null
@@ -0,0 +1,366 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ * Copyright (C) 2004       Johan Dahlin
+ *
+ *   pygenum.c: GEnum wrapper
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pygobject-private.h"
+
+#include "pygi.h"
+
+GQuark pygenum_class_key;
+
+PYGLIB_DEFINE_TYPE("gobject.GEnum", PyGEnum_Type, PyGEnum);
+
+static PyObject *
+pyg_enum_val_new(PyObject* subclass, GType gtype, PyObject *intval)
+{     
+    PyObject *item;
+    
+#if PY_VERSION_HEX >= 0x03000000
+    item = PyObject_CallMethod((PyObject*)&PyLong_Type, "__new__", "OO",
+                               subclass, intval);
+#else
+    item = ((PyTypeObject *)subclass)->tp_alloc((PyTypeObject *)subclass, 0);
+    ((PyIntObject*)item)->ob_ival = PyInt_AS_LONG(intval);
+#endif    
+    ((PyGEnum*)item)->gtype = gtype;
+    
+    return item;
+}
+
+static PyObject *
+pyg_enum_richcompare(PyGEnum *self, PyObject *other, int op)
+{
+    static char warning[256];
+
+    if (!PYGLIB_PyLong_Check(other)) {
+       Py_INCREF(Py_NotImplemented);
+       return Py_NotImplemented;
+    }
+
+    if (PyObject_TypeCheck(other, &PyGEnum_Type) && ((PyGEnum*)other)->gtype != self->gtype) {
+       g_snprintf(warning, sizeof(warning), "comparing different enum types: %s and %s",
+                  g_type_name(self->gtype), g_type_name(((PyGEnum*)other)->gtype));
+       if (PyErr_Warn(PyExc_Warning, warning))
+           return NULL;
+    }
+
+    return pyg_integer_richcompare((PyObject *)self, other, op);
+}
+
+static PyObject *
+pyg_enum_repr(PyGEnum *self)
+{
+  GEnumClass *enum_class;
+  const char *value;
+  guint index;
+  static char tmp[256];
+  long l;
+
+  enum_class = g_type_class_ref(self->gtype);
+  g_assert(G_IS_ENUM_CLASS(enum_class));
+
+  l = PYGLIB_PyLong_AS_LONG(self);
+  for (index = 0; index < enum_class->n_values; index++) 
+      if (l == enum_class->values[index].value)
+          break;
+
+  value = enum_class->values[index].value_name;
+  if (value)
+      sprintf(tmp, "<enum %s of type %s>", value, g_type_name(self->gtype));
+  else
+      sprintf(tmp, "<enum %ld of type %s>", PYGLIB_PyLong_AS_LONG(self), g_type_name(self->gtype));
+
+  g_type_class_unref(enum_class);
+
+  return PYGLIB_PyUnicode_FromString(tmp);
+}
+
+static PyObject *
+pyg_enum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "value", NULL };
+    long value;
+    PyObject *pytc, *values, *ret, *intvalue;
+    GType gtype;
+    GEnumClass *eclass;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "l", kwlist, &value))
+       return NULL;
+
+    pytc = PyObject_GetAttrString((PyObject *)type, "__gtype__");
+    if (!pytc)
+       return NULL;
+
+    if (!PyObject_TypeCheck(pytc, &PyGTypeWrapper_Type)) {
+       Py_DECREF(pytc);
+       PyErr_SetString(PyExc_TypeError,
+                       "__gtype__ attribute not a typecode");
+       return NULL;
+    }
+
+    gtype = pyg_type_from_object(pytc);
+    Py_DECREF(pytc);
+
+    eclass = G_ENUM_CLASS(g_type_class_ref(gtype));
+
+    /* A check that 0 < value < eclass->n_values was here but got
+     * removed: enumeration values do not need to be consequitive,
+     * e.g. GtkPathPriorityType values are not.
+     */
+
+    values = PyObject_GetAttrString((PyObject *)type, "__enum_values__");
+    if (!values) {
+       g_type_class_unref(eclass);
+       return NULL;
+    }
+
+    /* Note that size of __enum_values__ dictionary can easily be less
+     * than 'n_values'.  This happens if some values of the enum are
+     * numerically equal, e.g. gtk.ANCHOR_N == gtk.ANCHOR_NORTH.
+     * Johan said that "In retrospect, using a dictionary to store the
+     * values might not have been that good", but we need to keep
+     * backward compatibility.
+     */
+    if (!PyDict_Check(values) || PyDict_Size(values) > eclass->n_values) {
+       PyErr_SetString(PyExc_TypeError, "__enum_values__ badly formed");
+       Py_DECREF(values);
+       g_type_class_unref(eclass);
+       return NULL;
+    }
+
+    g_type_class_unref(eclass);
+
+    intvalue = PYGLIB_PyLong_FromLong(value);
+    ret = PyDict_GetItem(values, intvalue);
+    Py_DECREF(intvalue);
+    Py_DECREF(values);
+    if (ret)
+        Py_INCREF(ret);
+    else
+       PyErr_Format(PyExc_ValueError, "invalid enum value: %ld", value);
+
+    return ret;
+}
+
+PyObject*
+pyg_enum_from_gtype (GType gtype, int value)
+{
+    PyObject *pyclass, *values, *retval, *intvalue;
+
+    g_return_val_if_fail(gtype != G_TYPE_INVALID, NULL);
+
+    /* Get a wrapper class by:
+     * 1. check for one attached to the gtype
+     * 2. lookup one in a typelib
+     * 3. creating a new one
+     */
+    pyclass = (PyObject*)g_type_get_qdata(gtype, pygenum_class_key);
+    if (!pyclass)
+        pyclass = pygi_type_import_by_g_type(gtype);
+    if (!pyclass)
+        pyclass = pyg_enum_add(NULL, g_type_name(gtype), NULL, gtype);
+    if (!pyclass)
+       return PYGLIB_PyLong_FromLong(value);
+
+    values = PyDict_GetItemString(((PyTypeObject *)pyclass)->tp_dict,
+                                 "__enum_values__");
+    intvalue = PYGLIB_PyLong_FromLong(value);
+    retval = PyDict_GetItem(values, intvalue);
+    if (retval) {
+       Py_INCREF(retval);
+    }
+    else {
+       PyErr_Clear();
+       retval = pyg_enum_val_new(pyclass, gtype, intvalue);
+    }
+    Py_DECREF(intvalue);
+
+    return retval;
+}
+
+PyObject *
+pyg_enum_add (PyObject *   module,
+             const char * typename,
+             const char * strip_prefix,
+             GType        gtype)
+{
+    PyGILState_STATE state;
+    PyObject *instance_dict, *stub, *values, *o;
+    GEnumClass *eclass;
+    int i;
+
+    g_return_val_if_fail(typename != NULL, NULL);
+    if (!g_type_is_a(gtype, G_TYPE_ENUM)) {
+        g_warning("Trying to register gtype '%s' as enum when in fact it is of type '%s'",
+                  g_type_name(gtype), g_type_name(G_TYPE_FUNDAMENTAL(gtype)));
+        return NULL;
+    }
+
+    state = pyglib_gil_state_ensure();
+
+    instance_dict = PyDict_New();
+    stub = PyObject_CallFunction((PyObject *)&PyType_Type, "s(O)O",
+                                 typename, (PyObject *)&PyGEnum_Type,
+                                 instance_dict);
+    Py_DECREF(instance_dict);
+    if (!stub) {
+       PyErr_SetString(PyExc_RuntimeError, "can't create const");
+       pyglib_gil_state_release(state);
+       return NULL;
+    }
+
+    ((PyTypeObject *)stub)->tp_flags &= ~Py_TPFLAGS_BASETYPE;
+    ((PyTypeObject *)stub)->tp_new = pyg_enum_new;
+
+    if (module)
+       PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict,
+                            "__module__",
+                            PYGLIB_PyUnicode_FromString(PyModule_GetName(module)));
+
+    g_type_set_qdata(gtype, pygenum_class_key, stub);
+
+    o = pyg_type_wrapper_new(gtype);
+    PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict, "__gtype__", o);
+    Py_DECREF(o);
+
+    if (module) {
+       /* Add it to the module name space */
+       PyModule_AddObject(module, (char*)typename, stub);
+       Py_INCREF(stub);
+    }
+
+    /* Register enum values */
+    eclass = G_ENUM_CLASS(g_type_class_ref(gtype));
+
+    values = PyDict_New();
+    for (i = 0; i < eclass->n_values; i++) {
+       PyObject *item, *intval;
+      
+        intval = PYGLIB_PyLong_FromLong(eclass->values[i].value);
+       item = pyg_enum_val_new(stub, gtype, intval);
+       PyDict_SetItem(values, intval, item);
+        Py_DECREF(intval);
+
+       if (module) {
+           char *prefix;
+
+           prefix = g_strdup(pyg_constant_strip_prefix(eclass->values[i].value_name, strip_prefix));
+           PyModule_AddObject(module, prefix, item);
+           g_free(prefix);
+
+           Py_INCREF(item);
+       }
+    }
+
+    PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict,
+                        "__enum_values__", values);
+    Py_DECREF(values);
+
+    g_type_class_unref(eclass);
+
+    pyglib_gil_state_release(state);
+    return stub;
+}
+
+static PyObject *
+pyg_enum_reduce(PyObject *self, PyObject *args)
+{
+    if (!PyArg_ParseTuple(args, ":GEnum.__reduce__"))
+        return NULL;
+
+    return Py_BuildValue("(O(i)O)", Py_TYPE(self), PYGLIB_PyLong_AsLong(self),
+                         PyObject_GetAttrString(self, "__dict__"));
+}
+
+static PyObject *
+pyg_enum_get_value_name(PyGEnum *self, void *closure)
+{
+  GEnumClass *enum_class;
+  GEnumValue *enum_value;
+  PyObject *retval;
+
+  enum_class = g_type_class_ref(self->gtype);
+  g_assert(G_IS_ENUM_CLASS(enum_class));
+
+  enum_value = g_enum_get_value(enum_class, PYGLIB_PyLong_AS_LONG(self));
+
+  retval = PYGLIB_PyUnicode_FromString(enum_value->value_name);
+  g_type_class_unref(enum_class);
+
+  return retval;
+}
+
+static PyObject *
+pyg_enum_get_value_nick(PyGEnum *self, void *closure)
+{
+  GEnumClass *enum_class;
+  GEnumValue *enum_value;
+  PyObject *retval;
+
+  enum_class = g_type_class_ref(self->gtype);
+  g_assert(G_IS_ENUM_CLASS(enum_class));
+
+  enum_value = g_enum_get_value(enum_class, PYGLIB_PyLong_AS_LONG(self));
+
+  retval = PYGLIB_PyUnicode_FromString(enum_value->value_nick);
+  g_type_class_unref(enum_class);
+
+  return retval;
+}
+
+
+static PyMethodDef pyg_enum_methods[] = {
+    { "__reduce__", (PyCFunction)pyg_enum_reduce, METH_VARARGS },
+    { NULL, NULL, 0 }
+};
+
+static PyGetSetDef pyg_enum_getsets[] = {
+    { "value_name", (getter)pyg_enum_get_value_name, (setter)0 },
+    { "value_nick", (getter)pyg_enum_get_value_nick, (setter)0 },
+    { NULL, 0, 0 }
+};
+
+void
+pygobject_enum_register_types(PyObject *d)
+{
+    pygenum_class_key        = g_quark_from_static_string("PyGEnum::class");
+
+    PyGEnum_Type.tp_base = &PYGLIB_PyLong_Type;
+#if PY_VERSION_HEX < 0x03000000
+    PyGEnum_Type.tp_new = pyg_enum_new;
+#else
+    PyGEnum_Type.tp_new = PyLong_Type.tp_new;
+    PyGEnum_Type.tp_hash = PyLong_Type.tp_hash;    
+#endif
+    PyGEnum_Type.tp_repr = (reprfunc)pyg_enum_repr;
+    PyGEnum_Type.tp_str = (reprfunc)pyg_enum_repr;
+    PyGEnum_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+    PyGEnum_Type.tp_richcompare = (richcmpfunc)pyg_enum_richcompare;
+    PyGEnum_Type.tp_methods = pyg_enum_methods;
+    PyGEnum_Type.tp_getset = pyg_enum_getsets;
+    PYGOBJECT_REGISTER_GTYPE(d, PyGEnum_Type, "GEnum", G_TYPE_ENUM);
+}
diff --git a/gobject/pygenum.h b/gobject/pygenum.h
new file mode 100644 (file)
index 0000000..0558831
--- /dev/null
@@ -0,0 +1,27 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_ENUM_H__ 
+#define __PYGOBJECT_ENUM_H__
+
+void pygobject_enum_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_ENUM_H__ */
diff --git a/gobject/pygflags.c b/gobject/pygflags.c
new file mode 100644 (file)
index 0000000..8c00f15
--- /dev/null
@@ -0,0 +1,485 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ * Copyright (C) 2004       Johan Dahlin
+ *
+ *   pygenum.c: GFlags wrapper
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pygobject-private.h"
+#include "pygflags.h"
+
+#include "pygi.h"
+
+GQuark pygflags_class_key;
+
+PYGLIB_DEFINE_TYPE("gobject.GFlags", PyGFlags_Type, PyGFlags);
+
+static PyObject *
+pyg_flags_val_new(PyObject* subclass, GType gtype, PyObject *intval)
+{     
+    PyObject *item;
+    
+#if PY_VERSION_HEX >= 0x03000000
+    item = PyObject_CallMethod((PyObject*)&PyLong_Type, "__new__", "OO",
+                               subclass, intval);
+#else
+    item = ((PyTypeObject *)subclass)->tp_alloc((PyTypeObject *)subclass, 0);
+    ((PyIntObject*)item)->ob_ival = PyInt_AS_LONG(intval);
+#endif    
+    ((PyGFlags*)item)->gtype = gtype;
+    
+    return item;
+}
+
+static PyObject *
+pyg_flags_richcompare(PyGFlags *self, PyObject *other, int op)
+{
+    static char warning[256];
+
+    if (!PYGLIB_PyLong_Check(other)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+
+    if (PyObject_TypeCheck(other, &PyGFlags_Type) && ((PyGFlags*)other)->gtype != self->gtype) {
+       g_snprintf(warning, sizeof(warning), "comparing different flags types: %s and %s",
+                  g_type_name(self->gtype), g_type_name(((PyGFlags*)other)->gtype));
+       if (PyErr_Warn(PyExc_Warning, warning))
+           return NULL;
+    }
+
+    return pyg_integer_richcompare((PyObject *)self, other, op);
+}
+
+static char *
+generate_repr(GType gtype, int value)
+{
+    GFlagsClass *flags_class;
+    char *retval = NULL, *tmp;
+    int i;
+
+    flags_class = g_type_class_ref(gtype);
+    g_assert(G_IS_FLAGS_CLASS(flags_class));
+
+    for (i = 0; i < flags_class->n_values; i++) {
+       /* Some types (eg GstElementState in GStreamer 0.8) has flags with 0 values,
+         * we're just ignore them for now otherwise they'll always show up
+         */
+        if (flags_class->values[i].value == 0)
+            continue;
+
+        if ((value & flags_class->values[i].value) == flags_class->values[i].value) {
+           if (retval) {
+               tmp = g_strdup_printf("%s | %s", retval, flags_class->values[i].value_name);
+               g_free(retval);
+               retval = tmp;
+           } else {
+               retval = g_strdup_printf("%s", flags_class->values[i].value_name);
+           }
+       }
+    }
+
+    g_type_class_unref(flags_class);
+
+    return retval;
+}
+
+static PyObject *
+pyg_flags_repr(PyGFlags *self)
+{
+    char *tmp, *retval;
+    PyObject *pyretval;
+
+    tmp = generate_repr(self->gtype, PYGLIB_PyLong_AS_LONG(self));
+
+    if (tmp)
+        retval = g_strdup_printf("<flags %s of type %s>", tmp,
+                                 g_type_name(self->gtype));
+    else
+        retval = g_strdup_printf("<flags %ld of type %s>", PYGLIB_PyLong_AS_LONG(self),
+                                 g_type_name(self->gtype));
+    g_free(tmp);
+
+    pyretval = PYGLIB_PyUnicode_FromString(retval);
+    g_free(retval);
+
+    return pyretval;
+}
+
+static PyObject *
+pyg_flags_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "value", NULL };
+    long value;
+    PyObject *pytc, *values, *ret, *pyint;
+    GType gtype;
+    GFlagsClass *eclass;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "l", kwlist, &value))
+       return NULL;
+
+    pytc = PyObject_GetAttrString((PyObject *)type, "__gtype__");
+    if (!pytc)
+       return NULL;
+
+    if (!PyObject_TypeCheck(pytc, &PyGTypeWrapper_Type)) {
+       Py_DECREF(pytc);
+       PyErr_SetString(PyExc_TypeError,
+                       "__gtype__ attribute not a typecode");
+       return NULL;
+    }
+
+    gtype = pyg_type_from_object(pytc);
+    Py_DECREF(pytc);
+
+    eclass = G_FLAGS_CLASS(g_type_class_ref(gtype));
+
+    values = PyObject_GetAttrString((PyObject *)type, "__flags_values__");
+    if (!values) {
+       g_type_class_unref(eclass);
+       return NULL;
+    }
+
+    if (!PyDict_Check(values)) {
+       PyErr_SetString(PyExc_TypeError, "__flags_values__ badly formed");
+       Py_DECREF(values);
+       g_type_class_unref(eclass);
+       return NULL;
+    }
+
+    g_type_class_unref(eclass);
+
+    pyint = PYGLIB_PyLong_FromLong(value);
+    ret = PyDict_GetItem(values, pyint);
+    if (!ret) {
+        PyErr_Clear();
+
+        ret = pyg_flags_val_new((PyObject *)type, gtype, pyint);
+        g_assert(ret != NULL);
+    } else {
+        Py_INCREF(ret);
+    }
+
+    Py_DECREF(pyint);
+    Py_DECREF(values);
+
+    return ret;
+}
+
+PyObject*
+pyg_flags_from_gtype (GType gtype, int value)
+{
+    PyObject *pyclass, *values, *retval, *pyint;
+
+    g_return_val_if_fail(gtype != G_TYPE_INVALID, NULL);
+
+    /* Get a wrapper class by:
+     * 1. check for one attached to the gtype
+     * 2. lookup one in a typelib
+     * 3. creating a new one
+     */
+    pyclass = (PyObject*)g_type_get_qdata(gtype, pygflags_class_key);
+    if (!pyclass)
+        pyclass = pygi_type_import_by_g_type(gtype);
+    if (!pyclass)
+        pyclass = pyg_flags_add(NULL, g_type_name(gtype), NULL, gtype);
+    if (!pyclass)
+       return PYGLIB_PyLong_FromLong(value);
+
+    values = PyDict_GetItemString(((PyTypeObject *)pyclass)->tp_dict,
+                                 "__flags_values__");
+    pyint = PYGLIB_PyLong_FromLong(value);
+    retval = PyDict_GetItem(values, pyint);
+    if (!retval) {
+       PyErr_Clear();
+
+       retval = pyg_flags_val_new(pyclass, gtype, pyint);
+       g_assert(retval != NULL);
+    } else {
+       Py_INCREF(retval);
+    }
+    Py_DECREF(pyint);
+    
+    return retval;
+}
+
+PyObject *
+pyg_flags_add (PyObject *   module,
+              const char * typename,
+              const char * strip_prefix,
+              GType        gtype)
+{
+    PyGILState_STATE state;
+    PyObject *instance_dict, *stub, *values, *o;
+    GFlagsClass *eclass;
+    int i;
+
+    g_return_val_if_fail(typename != NULL, NULL);
+    if (!g_type_is_a(gtype, G_TYPE_FLAGS)) {
+        g_warning("Trying to register gtype '%s' as flags when in fact it is of type '%s'",
+                  g_type_name(gtype), g_type_name(G_TYPE_FUNDAMENTAL(gtype)));
+        return NULL;
+    }
+
+    state = pyglib_gil_state_ensure();
+
+    instance_dict = PyDict_New();
+    stub = PyObject_CallFunction((PyObject *)&PyType_Type, "s(O)O",
+                                 typename, (PyObject *)&PyGFlags_Type,
+                                 instance_dict);
+    Py_DECREF(instance_dict);
+    if (!stub) {
+       PyErr_SetString(PyExc_RuntimeError, "can't create const");
+       pyglib_gil_state_release(state);
+        return NULL;
+    }
+
+    ((PyTypeObject *)stub)->tp_flags &= ~Py_TPFLAGS_BASETYPE;
+    ((PyTypeObject *)stub)->tp_new = pyg_flags_new;
+
+    if (module) {
+        PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict,
+                             "__module__",
+                             PYGLIB_PyUnicode_FromString(PyModule_GetName(module)));
+
+          /* Add it to the module name space */
+        PyModule_AddObject(module, (char*)typename, stub);
+        Py_INCREF(stub);
+    }
+    g_type_set_qdata(gtype, pygflags_class_key, stub);
+
+    o = pyg_type_wrapper_new(gtype);
+    PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict, "__gtype__", o);
+    Py_DECREF(o);
+
+    /* Register flag values */
+    eclass = G_FLAGS_CLASS(g_type_class_ref(gtype));
+
+    values = PyDict_New();
+    for (i = 0; i < eclass->n_values; i++) {
+      PyObject *item, *intval;
+      
+      intval = PYGLIB_PyLong_FromLong(eclass->values[i].value);
+      item = pyg_flags_val_new(stub, gtype, intval);
+      PyDict_SetItem(values, intval, item);
+      Py_DECREF(intval);
+
+      if (module) {
+         char *prefix;
+
+         prefix = g_strdup(pyg_constant_strip_prefix(eclass->values[i].value_name, strip_prefix));
+         Py_INCREF(item);
+         PyModule_AddObject(module, prefix, item);
+         g_free(prefix);
+      }
+      Py_DECREF(item);
+    }
+
+    PyDict_SetItemString(((PyTypeObject *)stub)->tp_dict,
+                        "__flags_values__", values);
+    Py_DECREF(values);
+
+    g_type_class_unref(eclass);
+
+    pyglib_gil_state_release(state);
+
+    return stub;
+}
+
+static PyObject *
+pyg_flags_and(PyGFlags *a, PyGFlags *b)
+{
+       if (!PyGFlags_Check(a) || !PyGFlags_Check(b))
+               return PYGLIB_PyLong_Type.tp_as_number->nb_and((PyObject*)a,
+                                                      (PyObject*)b);
+
+       return pyg_flags_from_gtype(a->gtype,
+                                   PYGLIB_PyLong_AS_LONG(a) & PYGLIB_PyLong_AS_LONG(b));
+}
+
+static PyObject *
+pyg_flags_or(PyGFlags *a, PyGFlags *b)
+{
+       if (!PyGFlags_Check(a) || !PyGFlags_Check(b))
+               return PYGLIB_PyLong_Type.tp_as_number->nb_or((PyObject*)a,
+                                                     (PyObject*)b);
+
+       return pyg_flags_from_gtype(a->gtype, PYGLIB_PyLong_AS_LONG(a) | PYGLIB_PyLong_AS_LONG(b));
+}
+
+static PyObject *
+pyg_flags_xor(PyGFlags *a, PyGFlags *b)
+{
+       if (!PyGFlags_Check(a) || !PyGFlags_Check(b))
+               return PYGLIB_PyLong_Type.tp_as_number->nb_xor((PyObject*)a,
+                                                      (PyObject*)b);
+
+       return pyg_flags_from_gtype(a->gtype,
+                                   PYGLIB_PyLong_AS_LONG(a) ^ PYGLIB_PyLong_AS_LONG(b));
+
+}
+
+static PyObject *
+pyg_flags_warn (PyObject *self, PyObject *args)
+{
+    if (PyErr_Warn(PyExc_Warning, "unsupported arithmetic operation for flags type"))
+       return NULL;
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pyg_flags_get_first_value_name(PyGFlags *self, void *closure)
+{
+  GFlagsClass *flags_class;
+  GFlagsValue *flags_value;
+  PyObject *retval;
+
+  flags_class = g_type_class_ref(self->gtype);
+  g_assert(G_IS_FLAGS_CLASS(flags_class));
+  flags_value = g_flags_get_first_value(flags_class, PYGLIB_PyLong_AS_LONG(self));
+  if (flags_value)
+      retval = PYGLIB_PyUnicode_FromString(flags_value->value_name);
+  else {
+      retval = Py_None;
+      Py_INCREF(Py_None);
+  }
+  g_type_class_unref(flags_class);
+
+  return retval;
+}
+
+static PyObject *
+pyg_flags_get_first_value_nick(PyGFlags *self, void *closure)
+{
+  GFlagsClass *flags_class;
+  GFlagsValue *flags_value;
+  PyObject *retval;
+
+  flags_class = g_type_class_ref(self->gtype);
+  g_assert(G_IS_FLAGS_CLASS(flags_class));
+
+  flags_value = g_flags_get_first_value(flags_class, PYGLIB_PyLong_AS_LONG(self));
+  if (flags_value)
+      retval = PYGLIB_PyUnicode_FromString(flags_value->value_nick);
+  else {
+      retval = Py_None;
+      Py_INCREF(Py_None);
+  }
+  g_type_class_unref(flags_class);
+
+  return retval;
+}
+
+static PyObject *
+pyg_flags_get_value_names(PyGFlags *self, void *closure)
+{
+  GFlagsClass *flags_class;
+  PyObject *retval;
+  int i;
+
+  flags_class = g_type_class_ref(self->gtype);
+  g_assert(G_IS_FLAGS_CLASS(flags_class));
+
+  retval = PyList_New(0);
+  for (i = 0; i < flags_class->n_values; i++)
+      if ((PYGLIB_PyLong_AS_LONG(self) & flags_class->values[i].value) == flags_class->values[i].value)
+         PyList_Append(retval, PYGLIB_PyUnicode_FromString(flags_class->values[i].value_name));
+
+  g_type_class_unref(flags_class);
+
+  return retval;
+}
+
+static PyObject *
+pyg_flags_get_value_nicks(PyGFlags *self, void *closure)
+{
+  GFlagsClass *flags_class;
+  PyObject *retval;
+  int i;
+
+  flags_class = g_type_class_ref(self->gtype);
+  g_assert(G_IS_FLAGS_CLASS(flags_class));
+
+  retval = PyList_New(0);
+  for (i = 0; i < flags_class->n_values; i++)
+      if ((PYGLIB_PyLong_AS_LONG(self) & flags_class->values[i].value) == flags_class->values[i].value)
+         PyList_Append(retval, PYGLIB_PyUnicode_FromString(flags_class->values[i].value_nick));
+
+  g_type_class_unref(flags_class);
+
+  return retval;
+}
+
+static PyGetSetDef pyg_flags_getsets[] = {
+    { "first_value_name", (getter)pyg_flags_get_first_value_name, (setter)0 },
+    { "first_value_nick", (getter)pyg_flags_get_first_value_nick, (setter)0 },
+    { "value_names", (getter)pyg_flags_get_value_names, (setter)0 },
+    { "value_nicks", (getter)pyg_flags_get_value_nicks, (setter)0 },
+    { NULL, 0, 0 }
+};
+
+static PyNumberMethods pyg_flags_as_number = {
+       (binaryfunc)pyg_flags_warn,             /* nb_add */
+       (binaryfunc)pyg_flags_warn,             /* nb_subtract */
+       (binaryfunc)pyg_flags_warn,             /* nb_multiply */
+       (binaryfunc)pyg_flags_warn,             /* nb_divide */
+       (binaryfunc)pyg_flags_warn,             /* nb_remainder */
+#if PY_VERSION_HEX < 0x03000000
+        (binaryfunc)pyg_flags_warn,            /* nb_divmod */
+#endif
+       (ternaryfunc)pyg_flags_warn,            /* nb_power */
+       0,                                      /* nb_negative */
+       0,                                      /* nb_positive */
+       0,                                      /* nb_absolute */
+       0,                                      /* nb_nonzero */
+       0,                                      /* nb_invert */
+       0,                                      /* nb_lshift */
+       0,                                      /* nb_rshift */
+       (binaryfunc)pyg_flags_and,              /* nb_and */
+       (binaryfunc)pyg_flags_xor,              /* nb_xor */
+       (binaryfunc)pyg_flags_or,               /* nb_or */
+};
+
+void
+pygobject_flags_register_types(PyObject *d)
+{
+    pygflags_class_key = g_quark_from_static_string("PyGFlags::class");
+
+    PyGFlags_Type.tp_base = &PYGLIB_PyLong_Type;
+#if PY_VERSION_HEX < 0x03000000
+    PyGFlags_Type.tp_new = pyg_flags_new;
+#else
+    PyGFlags_Type.tp_new = PyLong_Type.tp_new;
+    PyGFlags_Type.tp_hash = PyLong_Type.tp_hash;    
+#endif
+    PyGFlags_Type.tp_repr = (reprfunc)pyg_flags_repr;
+    PyGFlags_Type.tp_as_number = &pyg_flags_as_number;
+    PyGFlags_Type.tp_str = (reprfunc)pyg_flags_repr;
+    PyGFlags_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+    PyGFlags_Type.tp_richcompare = (richcmpfunc)pyg_flags_richcompare;
+    PyGFlags_Type.tp_getset = pyg_flags_getsets;
+    PYGOBJECT_REGISTER_GTYPE(d, PyGFlags_Type, "GFlags", G_TYPE_FLAGS);
+}
diff --git a/gobject/pygflags.h b/gobject/pygflags.h
new file mode 100644 (file)
index 0000000..e93265c
--- /dev/null
@@ -0,0 +1,27 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_FLAGS_H__ 
+#define __PYGOBJECT_FLAGS_H__
+
+void pygobject_flags_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_FLAGS_H__ */
diff --git a/gobject/pyginterface.c b/gobject/pyginterface.c
new file mode 100644 (file)
index 0000000..29af546
--- /dev/null
@@ -0,0 +1,122 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *   pyginterface.c: wrapper for the gobject 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <Python.h>
+#include "pyglib.h"
+#include "pygobject-private.h"
+
+GQuark pyginterface_type_key;
+GQuark pyginterface_info_key;
+
+PYGLIB_DEFINE_TYPE("gobject.GInterface", PyGInterface_Type, PyObject)
+
+static int
+pyg_interface_init(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    gchar buf[512];
+
+    if (!PyArg_ParseTuple(args, ":GInterface.__init__"))
+       return -1;
+
+    g_snprintf(buf, sizeof(buf), "%s can not be constructed",
+              Py_TYPE(self)->tp_name);
+    PyErr_SetString(PyExc_NotImplementedError, buf);
+    return -1;
+}
+
+static void
+pyg_interface_free(PyObject *op)
+{
+    PyObject_FREE(op);
+}
+
+/**
+ * pyg_register_interface:
+ * @dict: a module dictionary.
+ * @class_name: the class name for the wrapper class.
+ * @gtype: the GType of the interface.
+ * @type: the wrapper class for the interface.
+ *
+ * Registers a Python class as the wrapper for a GInterface.  As a
+ * convenience it will also place a reference to the wrapper class in
+ * the provided module dictionary.
+ */
+void
+pyg_register_interface(PyObject *dict, const gchar *class_name,
+                       GType gtype, PyTypeObject *type)
+{
+    PyObject *o;
+
+    Py_TYPE(type) = &PyType_Type;
+    type->tp_base = &PyGInterface_Type;
+
+    if (PyType_Ready(type) < 0) {
+        g_warning("could not ready `%s'", type->tp_name);
+        return;
+    }
+
+    if (gtype) {
+        o = pyg_type_wrapper_new(gtype);
+        PyDict_SetItemString(type->tp_dict, "__gtype__", o);
+        Py_DECREF(o);
+    }
+
+    g_type_set_qdata(gtype, pyginterface_type_key, type);
+    
+    PyDict_SetItemString(dict, (char *)class_name, (PyObject *)type);
+    
+}
+
+void
+pyg_register_interface_info(GType gtype, const GInterfaceInfo *info)
+{
+    g_type_set_qdata(gtype, pyginterface_info_key, (gpointer) info);
+}
+
+const GInterfaceInfo *
+pyg_lookup_interface_info(GType gtype)
+{
+    return g_type_get_qdata(gtype, pyginterface_info_key);
+}
+
+void
+pygobject_interface_register_types(PyObject *d)
+{
+  pyginterface_type_key = g_quark_from_static_string("PyGInterface::type");
+  pyginterface_info_key = g_quark_from_static_string("PyGInterface::info");
+
+  PyGInterface_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+  PyGInterface_Type.tp_init = (initproc)pyg_interface_init;
+  PyGInterface_Type.tp_free = (freefunc)pyg_interface_free;
+
+  PYGOBJECT_REGISTER_GTYPE(d, PyGInterface_Type, "GInterface", G_TYPE_INTERFACE)
+
+  PyDict_SetItemString(PyGInterface_Type.tp_dict, "__doc__",
+                      pyg_object_descr_doc_get());
+  PyDict_SetItemString(PyGInterface_Type.tp_dict, "__gdoc__",
+                      pyg_object_descr_doc_get());
+  
+}
diff --git a/gobject/pyginterface.h b/gobject/pyginterface.h
new file mode 100644 (file)
index 0000000..0f390c2
--- /dev/null
@@ -0,0 +1,40 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *   pyginterface.c: wrapper for the gobject 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_INTERFACE_H__ 
+#define __PYGOBJECT_INTERFACE_H__
+
+extern GQuark pyginterface_type_key;
+extern GQuark pyginterface_info_key;
+
+extern PyTypeObject PyGInterface_Type;
+
+void pyg_register_interface(PyObject *dict,
+                           const gchar *class_name,
+                           GType gtype,
+                           PyTypeObject *type);
+const GInterfaceInfo * pyg_lookup_interface_info(GType gtype);
+void pyg_register_interface_info(GType gtype, const
+                                GInterfaceInfo *info);
+void pygobject_interface_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_INTERFACE_H__ */
diff --git a/gobject/pygobject-private.h b/gobject/pygobject-private.h
new file mode 100644 (file)
index 0000000..6f3a25e
--- /dev/null
@@ -0,0 +1,242 @@
+#ifndef _PYGOBJECT_PRIVATE_H_
+#define _PYGOBJECT_PRIVATE_H_
+
+#ifdef _PYGOBJECT_H_
+#  error "include pygobject.h or pygobject-private.h, but not both"
+#endif
+
+#define _INSIDE_PYGOBJECT_
+#include "pygobject.h"
+
+#include "pyglib-python-compat.h"
+
+#define PYGOBJECT_REGISTER_GTYPE(d, type, name, gtype)      \
+  {                                                         \
+    PyObject *o;                                           \
+    PYGLIB_REGISTER_TYPE(d, type, name);                    \
+    PyDict_SetItemString(type.tp_dict, "__gtype__",         \
+                        o=pyg_type_wrapper_new(gtype));    \
+    Py_DECREF(o);                                           \
+}
+
+/* from gobjectmodule.c */
+extern struct _PyGObject_Functions pygobject_api_functions;
+#define pyg_block_threads()   G_STMT_START { \
+    if (pygobject_api_functions.block_threads != NULL)    \
+      (* pygobject_api_functions.block_threads)();        \
+  } G_STMT_END
+#define pyg_unblock_threads() G_STMT_START { \
+    if (pygobject_api_functions.unblock_threads != NULL)  \
+      (* pygobject_api_functions.unblock_threads)();      \
+  } G_STMT_END
+
+#define pyg_threads_enabled (pygobject_api_functions.threads_enabled)
+
+#ifdef DISABLE_THREADING
+#define pyg_gil_state_ensure() 0
+#define pyg_gil_state_release(state) G_STMT_START {     \
+    } G_STMT_END
+
+#else
+#define pyg_gil_state_ensure() (pygobject_api_functions.threads_enabled? (PyGILState_Ensure()) : 0)
+#define pyg_gil_state_release(state) G_STMT_START {     \
+    if (pygobject_api_functions.threads_enabled)        \
+        PyGILState_Release(state);                      \
+    } G_STMT_END
+#endif
+
+#define pyg_begin_allow_threads                         \
+    G_STMT_START {                                      \
+        PyThreadState *_save = NULL;                    \
+        if (pygobject_api_functions.threads_enabled)    \
+            _save = PyEval_SaveThread();
+#define pyg_end_allow_threads                           \
+        if (pygobject_api_functions.threads_enabled)    \
+            PyEval_RestoreThread(_save);                \
+    } G_STMT_END
+
+
+#ifndef Py_CLEAR /* since Python 2.4 */
+# define Py_CLEAR(op)                          \
+        do {                                   \
+                if (op) {                      \
+                        PyObject *tmp = (PyObject *)(op);      \
+                        (op) = NULL;           \
+                        Py_DECREF(tmp);                \
+                }                              \
+        } while (0)
+#endif
+
+extern GType PY_TYPE_OBJECT;
+
+extern GQuark pygboxed_type_key;
+extern GQuark pygboxed_marshal_key;
+extern GQuark pygenum_class_key;
+extern GQuark pygflags_class_key;
+extern GQuark pyginterface_type_key;
+extern GQuark pyginterface_info_key;
+extern GQuark pygobject_class_init_key;
+extern GQuark pygobject_class_key;
+extern GQuark pygobject_wrapper_key;
+extern GQuark pygpointer_class_key;
+extern GQuark pygobject_has_updated_constructor_key;
+extern GQuark pygobject_instance_data_key;
+
+void     pygobject_data_free  (PyGObjectData *data);
+void     pyg_destroy_notify   (gpointer     user_data);
+gboolean pyg_handler_marshal  (gpointer     user_data);
+gboolean pyg_error_check      (GError     **error);
+int      pygobject_constructv (PyGObject   *self,
+                               guint        n_parameters,
+                               GParameter  *parameters);
+int      pygobject_construct  (PyGObject   *self,
+                               const char  *first_property_name,
+                               ...);
+void     pyg_set_object_has_new_constructor (GType gtype);
+
+PyObject *pyg_integer_richcompare(PyObject *v,
+                                  PyObject *w,
+                                  int op);
+
+gboolean pyg_gerror_exception_check(GError **error);
+
+/* from pygtype.h */
+extern PyTypeObject PyGTypeWrapper_Type;
+
+PyObject *pyg_type_wrapper_new (GType type);
+GType     pyg_type_from_object_strict (PyObject *obj, gboolean strict);
+GType     pyg_type_from_object (PyObject *obj);
+
+gint pyg_enum_get_value  (GType enum_type, PyObject *obj, gint *val);
+gint pyg_flags_get_value (GType flag_type, PyObject *obj, gint *val);
+int pyg_pyobj_to_unichar_conv (PyObject* py_obj, void* ptr);
+
+typedef PyObject *(* fromvaluefunc)(const GValue *value);
+typedef int (*tovaluefunc)(GValue *value, PyObject *obj);
+
+void      pyg_register_gtype_custom(GType gtype,
+                            fromvaluefunc from_func,
+                            tovaluefunc to_func);
+int       pyg_value_from_pyobject(GValue *value, PyObject *obj);
+PyObject *pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed);
+int       pyg_param_gvalue_from_pyobject(GValue* value,
+                                         PyObject* py_obj,
+                                         const GParamSpec* pspec);
+PyObject *pyg_param_gvalue_as_pyobject(const GValue* gvalue,
+                                       gboolean copy_boxed,
+                                       const GParamSpec* pspec);
+
+GClosure *pyg_closure_new(PyObject *callback, PyObject *extra_args, PyObject *swap_data);
+void     pyg_closure_set_exception_handler(GClosure *closure,
+                                           PyClosureExceptionHandler handler);
+GClosure *pyg_signal_class_closure_get(void);
+GClosure *gclosure_from_pyfunc(PyGObject *object, PyObject *func);
+
+PyObject *pyg_object_descr_doc_get(void);
+void pygobject_object_register_types(PyObject *d);
+
+extern PyTypeObject *PyGObject_MetaType;
+
+/* from pygobject.h */
+extern PyTypeObject PyGObject_Type;
+extern PyTypeObject PyGProps_Type;
+extern PyTypeObject PyGPropsDescr_Type;
+extern PyTypeObject PyGPropsIter_Type;
+
+  /* Data that belongs to the GObject instance, not the Python wrapper */
+struct _PyGObjectData {
+    PyTypeObject *type; /* wrapper type for this instance */
+    GSList *closures;
+};
+
+void          pygobject_register_class   (PyObject *dict,
+                                         const gchar *type_name,
+                                         GType gtype, PyTypeObject *type,
+                                         PyObject *bases);
+void          pygobject_register_wrapper (PyObject *self);
+PyObject *    pygobject_new              (GObject *obj);
+PyObject *    pygobject_new_full         (GObject *obj, gboolean sink, gpointer g_class);
+PyObject *    pygobject_new_sunk         (GObject *obj);
+void          pygobject_sink             (GObject *obj);
+PyTypeObject *pygobject_lookup_class     (GType gtype);
+void          pygobject_watch_closure    (PyObject *self, GClosure *closure);
+void          pygobject_register_sinkfunc(GType type,
+                                         void (* sinkfunc)(GObject *object));
+int           pyg_type_register          (PyTypeObject *class,
+                                         const gchar *type_name);
+
+/* from pygboxed.c */
+extern PyTypeObject PyGBoxed_Type;
+
+void       pyg_register_boxed (PyObject *dict, const gchar *class_name,
+                              GType boxed_type, PyTypeObject *type);
+PyObject * pyg_boxed_new      (GType boxed_type, gpointer boxed,
+                              gboolean copy_boxed, gboolean own_ref);
+
+extern PyTypeObject PyGPointer_Type;
+
+void       pyg_register_pointer (PyObject *dict, const gchar *class_name,
+                                GType pointer_type, PyTypeObject *type);
+PyObject * pyg_pointer_new      (GType pointer_type, gpointer pointer);
+
+const gchar * pyg_constant_strip_prefix(const gchar *name, const gchar *strip_prefix);
+
+/* pygflags */
+typedef struct {
+       PYGLIB_PyLongObject parent;
+    GType gtype;
+} PyGFlags;
+
+extern PyTypeObject PyGFlags_Type;
+
+#define PyGFlags_Check(x) (g_type_is_a(((PyGFlags*)x)->gtype, G_TYPE_FLAGS))
+
+extern PyObject * pyg_flags_add        (PyObject *   module,
+                                       const char * type_name,
+                                       const char * strip_prefix,
+                                       GType        gtype);
+extern PyObject * pyg_flags_from_gtype (GType        gtype,
+                                       int          value);
+
+/* pygenum */
+#define PyGEnum_Check(x) (g_type_is_a(((PyGFlags*)x)->gtype, G_TYPE_ENUM))
+
+typedef struct {
+       PYGLIB_PyLongObject parent;
+    GType gtype;
+} PyGEnum;
+
+extern PyTypeObject PyGEnum_Type;
+
+extern PyObject * pyg_enum_add        (PyObject *   module,
+                                      const char * type_name,
+                                      const char * strip_prefix,
+                                      GType        gtype);
+extern PyObject * pyg_enum_from_gtype (GType        gtype,
+                                      int          value);
+
+/* pygtype.c */
+extern GHashTable *custom_type_registration;
+void pyg_type_register_custom_callback(const gchar *type_name,
+                                      PyGTypeRegistrationFunction callback,
+                                      gpointer data);
+PyTypeObject * pyg_type_get_custom(const gchar *name);
+GType _pyg_type_from_name(const gchar *name);
+
+/* pygobject.c */
+extern PyTypeObject PyGObjectWeakRef_Type;
+
+static inline PyGObjectData *
+pyg_object_peek_inst_data(GObject *obj)
+{
+    return ((PyGObjectData *)
+            g_object_get_qdata(obj, pygobject_instance_data_key));
+}
+
+gboolean        pygobject_prepare_construct_properties  (GObjectClass *class,
+                                                         PyObject *kwargs,
+                                                         guint *n_params,
+                                                         GParameter **params);
+
+
+#endif
diff --git a/gobject/pygobject.c b/gobject/pygobject.c
new file mode 100644 (file)
index 0000000..6c2f06c
--- /dev/null
@@ -0,0 +1,2409 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *
+ *   pygobject.c: wrapper for the GObject type.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pygobject-private.h"
+#include "pyginterface.h"
+#include "pygparamspec.h"
+
+#include "pygi.h"
+
+
+static void pygobject_dealloc(PyGObject *self);
+static int  pygobject_traverse(PyGObject *self, visitproc visit, void *arg);
+static int  pygobject_clear(PyGObject *self);
+static PyObject * pyg_type_get_bases(GType gtype);
+static inline int pygobject_clear(PyGObject *self);
+static PyObject * pygobject_weak_ref_new(GObject *obj, PyObject *callback, PyObject *user_data);
+static inline PyGObjectData * pyg_object_peek_inst_data(GObject *obj);
+static PyObject * pygobject_weak_ref_new(GObject *obj, PyObject *callback, PyObject *user_data);
+static void pygobject_inherit_slots(PyTypeObject *type, PyObject *bases,
+                                   gboolean check_for_present);
+static void pygobject_find_slot_for(PyTypeObject *type, PyObject *bases, int slot_offset,
+                                   gboolean check_for_present);
+GType PY_TYPE_OBJECT = 0;
+GQuark pygobject_class_key;
+GQuark pygobject_class_init_key;
+GQuark pygobject_wrapper_key;
+GQuark pygobject_has_updated_constructor_key;
+GQuark pygobject_instance_data_key;
+GQuark pygobject_ref_sunk_key;
+
+
+/* -------------- class <-> wrapper manipulation --------------- */
+
+void
+pygobject_data_free(PyGObjectData *data)
+{
+    PyGILState_STATE state = pyglib_gil_state_ensure();
+    GSList *closures, *tmp;
+    Py_DECREF(data->type);
+    tmp = closures = data->closures;
+#ifndef NDEBUG
+    data->closures = NULL;
+    data->type = NULL;
+#endif
+    pyg_begin_allow_threads;
+    while (tmp) {
+       GClosure *closure = tmp->data;
+          /* we get next item first, because the current link gets
+           * invalidated by pygobject_unwatch_closure */
+       tmp = tmp->next;
+       g_closure_invalidate(closure);
+    }
+    pyg_end_allow_threads;
+    if (data->closures != NULL)
+       g_warning("invalidated all closures, but data->closures != NULL !");
+
+    g_free(data);
+    pyglib_gil_state_release(state);
+}
+
+static inline PyGObjectData *
+pygobject_data_new(void)
+{
+    PyGObjectData *data;
+    data = g_new0(PyGObjectData, 1);
+    return data;
+}
+
+static inline PyGObjectData *
+pygobject_get_inst_data(PyGObject *self)
+{
+    PyGObjectData *inst_data;
+
+    if (G_UNLIKELY(!self->obj))
+        return NULL;
+    inst_data = g_object_get_qdata(self->obj, pygobject_instance_data_key);
+    if (inst_data == NULL)
+    {
+        inst_data = pygobject_data_new();
+
+        inst_data->type = Py_TYPE(self);
+        Py_INCREF((PyObject *) inst_data->type);
+
+        g_object_set_qdata_full(self->obj, pygobject_instance_data_key,
+                                inst_data, (GDestroyNotify) pygobject_data_free);
+    }
+    return inst_data;
+}
+
+
+typedef struct {
+    GType type;
+    void (* sinkfunc)(GObject *object);
+} SinkFunc;
+static GArray *sink_funcs = NULL;
+
+GHashTable *custom_type_registration = NULL;
+
+PyTypeObject *PyGObject_MetaType = NULL;
+
+/**
+ * pygobject_sink:
+ * @obj: a GObject
+ * 
+ * As Python handles reference counting for us, the "floating
+ * reference" code in GTK is not all that useful.  In fact, it can
+ * cause leaks.  This function should be called to remove the floating
+ * references on objects on construction.
+ **/
+void
+pygobject_sink(GObject *obj)
+{
+    gboolean sunk = FALSE;
+
+    /* We use a gobject data key to avoid running the sink funcs more than once. */
+    if (g_object_get_qdata (obj, pygobject_ref_sunk_key))
+        return;
+
+    if (sink_funcs) {
+       gint i;
+
+       for (i = 0; i < sink_funcs->len; i++) {
+           if (g_type_is_a(G_OBJECT_TYPE(obj),
+                           g_array_index(sink_funcs, SinkFunc, i).type)) {
+               g_array_index(sink_funcs, SinkFunc, i).sinkfunc(obj);
+
+               sunk = TRUE;
+                break;
+           }
+       }
+    }
+
+    if (!sunk && G_IS_INITIALLY_UNOWNED (obj))
+        g_object_ref_sink(obj);
+
+    g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1));
+}
+
+/**
+ * pygobject_register_sinkfunc:
+ * type: the GType the sink function applies to.
+ * sinkfunc: a function to remove the floating reference on an object.
+ *
+ * As Python handles reference counting for us, the "floating
+ * reference" code in GTK is not all that useful.  In fact, it can
+ * cause leaks.  For this reason, PyGTK removes the floating
+ * references on objects on construction.
+ *
+ * The sinkfunc should be able to remove the floating reference on
+ * instances of the given type, or any subclasses.
+ *
+ * Deprecated: Since 2.22, sinkfuncs are not needed.
+ */
+void
+pygobject_register_sinkfunc(GType type, void (* sinkfunc)(GObject *object))
+{
+    SinkFunc sf;
+
+    g_message ("pygobject_register_sinkfunc is deprecated (%s)",
+               g_type_name(type));
+
+#if 0
+    g_return_if_fail(G_TYPE_IS_OBJECT(type));
+#endif
+    g_return_if_fail(sinkfunc != NULL);
+    
+    if (!sink_funcs)
+       sink_funcs = g_array_new(FALSE, FALSE, sizeof(SinkFunc));
+
+    sf.type = type;
+    sf.sinkfunc = sinkfunc;
+    g_array_append_val(sink_funcs, sf);
+}
+
+typedef struct {
+    PyObject_HEAD
+    GParamSpec **props;
+    guint n_props;
+    guint index;
+} PyGPropsIter;
+
+PYGLIB_DEFINE_TYPE("gobject.GPropsIter", PyGPropsIter_Type, PyGPropsIter);
+
+static void
+pyg_props_iter_dealloc(PyGPropsIter *self)
+{
+    g_free(self->props);
+    PyObject_Del((PyObject*) self);
+}
+
+static PyObject*
+pygobject_props_iter_next(PyGPropsIter *iter)
+{
+    if (iter->index < iter->n_props)
+        return pyg_param_spec_new(iter->props[iter->index++]);
+    else {
+        PyErr_SetNone(PyExc_StopIteration);
+        return NULL;
+    }
+}
+
+typedef struct {
+    PyObject_HEAD
+    /* a reference to the object containing the properties */
+    PyGObject *pygobject;
+    GType      gtype;
+} PyGProps;
+
+static void
+PyGProps_dealloc(PyGProps* self)
+{
+    PyGObject *tmp;
+
+    PyObject_GC_UnTrack((PyObject*)self);
+
+    tmp = self->pygobject;
+    self->pygobject = NULL;
+    Py_XDECREF(tmp);
+
+    PyObject_GC_Del((PyObject*)self);
+}
+
+static PyObject*
+build_parameter_list(GObjectClass *class)
+{
+    GParamSpec **props;
+    guint n_props = 0, i;
+    PyObject *prop_str;
+    PyObject *props_list;
+
+    props = g_object_class_list_properties(class, &n_props);
+    props_list = PyList_New(n_props);
+    for (i = 0; i < n_props; i++) {
+       char *name;
+       name = g_strdup(g_param_spec_get_name(props[i]));
+       /* hyphens cannot belong in identifiers */
+       g_strdelimit(name, "-", '_');
+       prop_str = PYGLIB_PyUnicode_FromString(name);
+       
+       PyList_SetItem(props_list, i, prop_str);
+       g_free(name);
+    }
+
+    if (props)
+        g_free(props);
+    
+    return props_list;
+}
+
+static PyObject*
+PyGProps_getattro(PyGProps *self, PyObject *attr)
+{
+    char *attr_name;
+    GObjectClass *class;
+    GParamSpec *pspec;
+    GValue value = { 0, };
+    PyObject *ret;
+
+    attr_name = PYGLIB_PyUnicode_AsString(attr);
+    if (!attr_name) {
+        PyErr_Clear();
+        return PyObject_GenericGetAttr((PyObject *)self, attr);
+    }
+
+    class = g_type_class_ref(self->gtype);
+    
+    if (!strcmp(attr_name, "__members__")) {
+       return build_parameter_list(class);
+    }
+
+    if (self->pygobject != NULL) {
+        ret = pygi_get_property_value (self->pygobject, attr_name);
+        if (ret != NULL)
+            return ret;
+    }
+
+    pspec = g_object_class_find_property(class, attr_name);
+    g_type_class_unref(class);
+
+    if (!pspec) {
+       return PyObject_GenericGetAttr((PyObject *)self, attr);
+    }
+
+    if (!(pspec->flags & G_PARAM_READABLE)) {
+       PyErr_Format(PyExc_TypeError,
+                    "property '%s' is not readable", attr_name);
+       return NULL;
+    }
+
+    /* If we're doing it without an instance, return a GParamSpec */
+    if (!self->pygobject) {
+        return pyg_param_spec_new(pspec);
+    }
+    
+    g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
+    pyg_begin_allow_threads;
+    g_object_get_property(self->pygobject->obj, attr_name, &value);
+    pyg_end_allow_threads;
+    ret = pyg_param_gvalue_as_pyobject(&value, TRUE, pspec);
+    g_value_unset(&value);
+    
+    return ret;
+}
+
+static gboolean
+set_property_from_pspec(GObject *obj,
+                       char *attr_name,
+                       GParamSpec *pspec,
+                       PyObject *pvalue)
+{
+    GValue value = { 0, };
+
+    if (pspec->flags & G_PARAM_CONSTRUCT_ONLY) {
+       PyErr_Format(PyExc_TypeError,
+                    "property '%s' can only be set in constructor",
+                    attr_name);
+       return FALSE;
+    }  
+
+    if (!(pspec->flags & G_PARAM_WRITABLE)) {
+       PyErr_Format(PyExc_TypeError,
+                    "property '%s' is not writable", attr_name);
+       return FALSE;
+    }  
+
+    g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
+    if (pyg_param_gvalue_from_pyobject(&value, pvalue, pspec) < 0) {
+       PyErr_SetString(PyExc_TypeError,
+                       "could not convert argument to correct param type");
+       return FALSE;
+    }
+
+    pyg_begin_allow_threads;
+    g_object_set_property(obj, attr_name, &value);
+    pyg_end_allow_threads;
+
+    g_value_unset(&value);
+    
+    return TRUE;
+}
+
+PYGLIB_DEFINE_TYPE("gobject.GProps", PyGProps_Type, PyGProps);
+
+static int
+PyGProps_setattro(PyGProps *self, PyObject *attr, PyObject *pvalue)
+{
+    GParamSpec *pspec;
+    char *attr_name;
+    GObject *obj;
+    int ret = -1;
+    
+    if (pvalue == NULL) {
+       PyErr_SetString(PyExc_TypeError, "properties cannot be "
+                       "deleted");
+       return -1;
+    }
+
+    attr_name = PYGLIB_PyUnicode_AsString(attr);
+    if (!attr_name) {
+        PyErr_Clear();
+        return PyObject_GenericSetAttr((PyObject *)self, attr, pvalue);
+    }
+
+    if (!self->pygobject) {
+        PyErr_SetString(PyExc_TypeError,
+                       "cannot set GOject properties without an instance");
+        return -1;
+    }
+
+    ret = pygi_set_property_value (self->pygobject, attr_name, pvalue);
+    if (ret == 0)
+        return 0;
+    else if (ret == -1)
+        if (PyErr_Occurred())
+            return -1;
+
+    obj = self->pygobject->obj;
+    pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(obj), attr_name);
+    if (!pspec) {
+       return PyObject_GenericSetAttr((PyObject *)self, attr, pvalue);
+    }
+
+    if (!set_property_from_pspec(obj, attr_name, pspec, pvalue))
+       return -1;
+                                 
+    return 0;
+}
+
+static int
+pygobject_props_traverse(PyGProps *self, visitproc visit, void *arg)
+{
+    if (self->pygobject && visit((PyObject *) self->pygobject, arg) < 0)
+        return -1;
+    return 0;
+}
+
+static PyObject*
+pygobject_props_get_iter(PyGProps *self)
+{
+    PyGPropsIter *iter;
+    GObjectClass *class;
+
+    iter = PyObject_NEW(PyGPropsIter, &PyGPropsIter_Type);
+    class = g_type_class_ref(self->gtype);
+    iter->props = g_object_class_list_properties(class, &iter->n_props);
+    iter->index = 0;
+    g_type_class_unref(class);
+    return (PyObject *) iter;
+}
+
+static Py_ssize_t
+PyGProps_length(PyGProps *self)
+{
+    GObjectClass *class;
+    GParamSpec **props;
+    guint n_props;
+    
+    class = g_type_class_ref(self->gtype);
+    props = g_object_class_list_properties(class, &n_props);
+    g_type_class_unref(class);
+    g_free(props);
+
+    return (Py_ssize_t)n_props;
+}
+
+static PySequenceMethods _PyGProps_as_sequence = {
+    (lenfunc) PyGProps_length,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0
+};
+
+PYGLIB_DEFINE_TYPE("gobject.GPropsDescr", PyGPropsDescr_Type, PyObject);
+
+static PyObject *
+pyg_props_descr_descr_get(PyObject *self, PyObject *obj, PyObject *type)
+{
+    PyGProps *gprops;
+
+    gprops = PyObject_GC_New(PyGProps, &PyGProps_Type);
+    if (obj == NULL || obj == Py_None) {
+        gprops->pygobject = NULL;
+        gprops->gtype = pyg_type_from_object(type);
+    } else {
+        if (!PyObject_IsInstance(obj, (PyObject *) &PyGObject_Type)) {
+            PyErr_SetString(PyExc_TypeError, "cannot use GObject property"
+                            " descriptor on non-GObject instances");
+            return NULL;
+        }
+        Py_INCREF(obj);
+        gprops->pygobject = (PyGObject *) obj;
+        gprops->gtype = pyg_type_from_object(obj);
+    }
+    return (PyObject *) gprops;
+}
+
+/**
+ * pygobject_register_class:
+ * @dict: the module dictionary.  A reference to the type will be stored here.
+ * @type_name: not used ?
+ * @gtype: the GType of the GObject subclass.
+ * @type: the Python type object for this wrapper.
+ * @static_bases: a tuple of Python type objects that are the bases of
+ * this type
+ *
+ * This function is used to register a Python type as the wrapper for
+ * a particular GObject subclass.  It will also insert a reference to
+ * the wrapper class into the module dictionary passed as a reference,
+ * which simplifies initialisation.
+ */
+void
+pygobject_register_class(PyObject *dict, const gchar *type_name,
+                        GType gtype, PyTypeObject *type,
+                        PyObject *static_bases)
+{
+    PyObject *o;
+    const char *class_name, *s;
+    PyObject *runtime_bases;
+    PyObject *bases_list, *bases, *mod_name;
+    int i;
+    
+    class_name = type->tp_name;
+    s = strrchr(class_name, '.');
+    if (s != NULL)
+       class_name = s + 1;
+
+    runtime_bases = pyg_type_get_bases(gtype);
+    if (static_bases) {
+        PyTypeObject *py_parent_type = (PyTypeObject *) PyTuple_GET_ITEM(static_bases, 0);
+        bases_list = PySequence_List(static_bases);
+          /* we start at index 1 because we want to skip the primary
+           * base, otherwise we might get MRO conflict */
+        for (i = 1; i < PyTuple_GET_SIZE(runtime_bases); ++i)
+        {
+            PyObject *base = PyTuple_GET_ITEM(runtime_bases, i);
+            int contains = PySequence_Contains(bases_list, base);
+            if (contains < 0)
+                PyErr_Print();
+            else if (!contains) {
+                if (!PySequence_Contains(py_parent_type->tp_mro, base)) {
+#if 0
+                    g_message("Adding missing base %s to type %s",
+                              ((PyTypeObject *)base)->tp_name, type->tp_name);
+#endif
+                    PyList_Append(bases_list, base);
+                }
+            }
+        }
+        bases = PySequence_Tuple(bases_list);
+        Py_DECREF(bases_list);
+        Py_DECREF(runtime_bases);
+    } else
+        bases = runtime_bases;
+
+    Py_TYPE(type) = PyGObject_MetaType;
+    type->tp_bases = bases;
+    if (G_LIKELY(bases)) {
+        type->tp_base = (PyTypeObject *)PyTuple_GetItem(bases, 0);
+        Py_INCREF(type->tp_base);
+    }
+
+    pygobject_inherit_slots(type, bases, TRUE);
+
+    if (PyType_Ready(type) < 0) {
+       g_warning ("couldn't make the type `%s' ready", type->tp_name);
+       return;
+    }
+
+    /* Set type.__module__ to the name of the module,
+     * otherwise it'll default to 'gobject', see #376099
+     */
+    s = strrchr(type->tp_name, '.');
+    if (s != NULL) {
+       mod_name = PYGLIB_PyUnicode_FromStringAndSize(type->tp_name, (int)(s - type->tp_name));
+       PyDict_SetItemString(type->tp_dict, "__module__", mod_name);
+       Py_DECREF(mod_name);
+    }
+    
+    if (gtype) {
+       o = pyg_type_wrapper_new(gtype);
+       PyDict_SetItemString(type->tp_dict, "__gtype__", o);
+       Py_DECREF(o);
+
+       /* stash a pointer to the python class with the GType */
+       Py_INCREF(type);
+       g_type_set_qdata(gtype, pygobject_class_key, type);
+    }
+
+    /* set up __doc__ descriptor on type */
+    PyDict_SetItemString(type->tp_dict, "__doc__",
+                        pyg_object_descr_doc_get());
+
+    PyDict_SetItemString(dict, (char *)class_name, (PyObject *)type);
+}
+
+static void
+pyg_toggle_notify (gpointer data, GObject *object, gboolean is_last_ref)
+{
+    PyGObject *self = (PyGObject*) data;
+    PyGILState_STATE state;
+
+    state = pyglib_gil_state_ensure();
+
+    if (is_last_ref)
+       Py_DECREF(self);
+    else
+        Py_INCREF(self);
+
+    pyglib_gil_state_release(state);
+}
+
+  /* Called when the inst_dict is first created; switches the 
+     reference counting strategy to start using toggle ref to keep the
+     wrapper alive while the GObject lives.  In contrast, while
+     inst_dict was NULL the python wrapper is allowed to die at
+     will and is recreated on demand. */
+static inline void
+pygobject_switch_to_toggle_ref(PyGObject *self)
+{
+    g_assert(self->obj->ref_count >= 1);
+
+    if (self->private_flags.flags & PYGOBJECT_USING_TOGGLE_REF)
+        return; /* already using toggle ref */
+    self->private_flags.flags |= PYGOBJECT_USING_TOGGLE_REF;
+      /* Note that add_toggle_ref will never immediately call back into 
+         pyg_toggle_notify */
+    Py_INCREF((PyObject *) self);
+    g_object_add_toggle_ref(self->obj, pyg_toggle_notify, self);
+    g_object_unref(self->obj);
+}
+
+/**
+ * pygobject_register_wrapper:
+ * @self: the wrapper instance
+ *
+ * In the constructor of PyGTK wrappers, this function should be
+ * called after setting the obj member.  It will tie the wrapper
+ * instance to the GObject so that the same wrapper instance will
+ * always be used for this GObject instance.
+ */
+void
+pygobject_register_wrapper(PyObject *self)
+{
+    PyGObject *gself;
+
+    g_return_if_fail(self != NULL);
+    g_return_if_fail(PyObject_TypeCheck(self, &PyGObject_Type));
+
+    gself = (PyGObject *)self;
+
+    pygobject_sink(gself->obj);
+    g_assert(gself->obj->ref_count >= 1);
+      /* save wrapper pointer so we can access it later */
+    g_object_set_qdata_full(gself->obj, pygobject_wrapper_key, gself, NULL);
+    if (gself->inst_dict)
+        pygobject_switch_to_toggle_ref(gself);
+}
+
+static PyObject *
+pyg_type_get_bases(GType gtype)
+{
+    GType *interfaces, parent_type, interface_type;
+    guint n_interfaces;
+    PyTypeObject *py_parent_type, *py_interface_type;
+    PyObject *bases;
+    int i;
+    
+    if (G_UNLIKELY(gtype == G_TYPE_OBJECT))
+        return NULL;
+
+    /* Lookup the parent type */
+    parent_type = g_type_parent(gtype);
+    py_parent_type = pygobject_lookup_class(parent_type);
+    interfaces = g_type_interfaces(gtype, &n_interfaces);
+    bases = PyTuple_New(n_interfaces + 1);
+    /* We will always put the parent at the first position in bases */
+    Py_INCREF(py_parent_type); /* PyTuple_SetItem steals a reference */
+    PyTuple_SetItem(bases, 0, (PyObject *) py_parent_type);
+
+    /* And traverse interfaces */
+    if (n_interfaces) {
+       for (i = 0; i < n_interfaces; i++) {
+           interface_type = interfaces[i];
+           py_interface_type = pygobject_lookup_class(interface_type);
+            Py_INCREF(py_interface_type); /* PyTuple_SetItem steals a reference */
+           PyTuple_SetItem(bases, i + 1, (PyObject *) py_interface_type);
+       }
+    }
+    g_free(interfaces);
+    return bases;
+}
+
+/**
+ * pygobject_new_with_interfaces
+ * @gtype: the GType of the GObject subclass.
+ *
+ * Creates a new PyTypeObject from the given GType with interfaces attached in
+ * bases.
+ *
+ * Returns: a PyTypeObject for the new type or NULL if it couldn't be created
+ */
+PyTypeObject *
+pygobject_new_with_interfaces(GType gtype)
+{
+    PyGILState_STATE state;
+    PyObject *o;
+    PyTypeObject *type;
+    PyObject *dict;
+    PyTypeObject *py_parent_type;
+    PyObject *bases;
+    PyObject *modules, *module;
+    gchar *type_name, *mod_name, *gtype_name;
+
+    state = pyglib_gil_state_ensure();
+
+    bases = pyg_type_get_bases(gtype);
+    py_parent_type = (PyTypeObject *) PyTuple_GetItem(bases, 0);
+
+    dict = PyDict_New();
+    
+    o = pyg_type_wrapper_new(gtype);
+    PyDict_SetItemString(dict, "__gtype__", o);
+    Py_DECREF(o);
+
+    /* set up __doc__ descriptor on type */
+    PyDict_SetItemString(dict, "__doc__", pyg_object_descr_doc_get());
+
+    /* generate the pygtk module name and extract the base type name */
+    gtype_name = (gchar*)g_type_name(gtype);
+    if (g_str_has_prefix(gtype_name, "Gtk")) {
+       mod_name = "gtk";
+       gtype_name += 3;
+       type_name = g_strconcat(mod_name, ".", gtype_name, NULL);
+    } else if (g_str_has_prefix(gtype_name, "Gdk")) {
+       mod_name = "gtk.gdk";
+       gtype_name += 3;
+       type_name = g_strconcat(mod_name, ".", gtype_name, NULL);
+    } else if (g_str_has_prefix(gtype_name, "Atk")) {
+       mod_name = "atk";
+       gtype_name += 3;
+       type_name = g_strconcat(mod_name, ".", gtype_name, NULL);
+    } else if (g_str_has_prefix(gtype_name, "Pango")) {
+       mod_name = "pango";
+       gtype_name += 5;
+       type_name = g_strconcat(mod_name, ".", gtype_name, NULL);
+    } else {
+       mod_name = "__main__";
+       type_name = g_strconcat(mod_name, ".", gtype_name, NULL);
+    }
+
+    type = (PyTypeObject*)PyObject_CallFunction((PyObject *) Py_TYPE(py_parent_type),
+                                                "sNN", type_name, bases, dict);
+    g_free(type_name);
+
+    if (type == NULL) {
+       PyErr_Print();
+        pyglib_gil_state_release(state);
+       return NULL;
+    }
+
+      /* Workaround python tp_(get|set)attr slot inheritance bug.
+       * Fixes bug #144135. */
+    if (!type->tp_getattr && py_parent_type->tp_getattr) {
+        type->tp_getattro = NULL;
+        type->tp_getattr = py_parent_type->tp_getattr;
+    }
+    if (!type->tp_setattr && py_parent_type->tp_setattr) {
+        type->tp_setattro = NULL;
+        type->tp_setattr = py_parent_type->tp_setattr;
+    }
+      /* override more python stupid hacks behind our back */
+    type->tp_dealloc = py_parent_type->tp_dealloc;
+    type->tp_alloc = py_parent_type->tp_alloc;
+    type->tp_free = py_parent_type->tp_free;
+    type->tp_traverse = py_parent_type->tp_traverse;
+    type->tp_clear = py_parent_type->tp_clear;
+
+    pygobject_inherit_slots(type, bases, FALSE);
+
+    if (PyType_Ready(type) < 0) {
+       g_warning ("couldn't make the type `%s' ready", type->tp_name);
+        pyglib_gil_state_release(state);
+       return NULL;
+    }
+    /* insert type name in module dict */
+    modules = PyImport_GetModuleDict();
+    if ((module = PyDict_GetItemString(modules, mod_name)) != NULL) {
+        if (PyObject_SetAttrString(module, gtype_name, (PyObject *)type) < 0)
+            PyErr_Clear();
+    }
+
+    /* stash a pointer to the python class with the GType */
+    Py_INCREF(type);
+    g_type_set_qdata(gtype, pygobject_class_key, type);
+
+    pyglib_gil_state_release(state);
+
+    return type;
+}
+
+/* Pick appropriate value for given slot (at slot_offset inside
+ * PyTypeObject structure).  It must be a pointer, e.g. a pointer to a
+ * function.  We use the following heuristic:
+ *
+ * - Scan all types listed as bases of the type.
+ * - If for exactly one base type slot value is non-NULL and
+ *   different from that of 'object' and 'GObject', set current type
+ *   slot into that value.
+ * - Otherwise (if there is more than one such base type or none at
+ *   all) don't touch it and live with Python default.
+ *
+ * The intention here is to propagate slot from custom wrappers to
+ * wrappers created at runtime when appropriate.  We prefer to be on
+ * the safe side, so if there is potential collision (more than one
+ * custom slot value), we discard custom overrides altogether.
+ *
+ * When registering type with pygobject_register_class(), i.e. a type
+ * that has been manually created (likely with Codegen help),
+ * `check_for_present' should be set to TRUE.  In this case, the
+ * function will never overwrite any non-NULL slots already present in
+ * the type.  If `check_for_present' is FALSE, such non-NULL slots are
+ * though to be set by Python interpreter and so will be overwritten
+ * if heuristic above says so.
+ */
+static void
+pygobject_inherit_slots(PyTypeObject *type, PyObject *bases, gboolean check_for_present)
+{
+    static int slot_offsets[] = { offsetof(PyTypeObject, tp_richcompare),
+#if PY_VERSION_HEX < 0x03000000
+                                  offsetof(PyTypeObject, tp_compare),
+#endif
+                                  offsetof(PyTypeObject, tp_richcompare),
+                                  offsetof(PyTypeObject, tp_hash),
+                                  offsetof(PyTypeObject, tp_iter),
+                                  offsetof(PyTypeObject, tp_repr),
+                                  offsetof(PyTypeObject, tp_str),
+                                  offsetof(PyTypeObject, tp_print) };
+    int i;
+
+    /* Happens when registering gobject.GObject itself, at least. */
+    if (!bases)
+       return;
+
+    for (i = 0; i < G_N_ELEMENTS(slot_offsets); ++i)
+       pygobject_find_slot_for(type, bases, slot_offsets[i], check_for_present);
+}
+
+static void
+pygobject_find_slot_for(PyTypeObject *type, PyObject *bases, int slot_offset,
+                       gboolean check_for_present)
+{
+#define TYPE_SLOT(type)  (* (void **) (((char *) (type)) + slot_offset))
+
+    void *found_slot = NULL;
+    int num_bases = PyTuple_Size(bases);
+    int i;
+
+    if (check_for_present && TYPE_SLOT(type) != NULL) {
+       /* We are requested to check if there is any custom slot value
+        * in this type already and there actually is.  Don't
+        * overwrite it.
+        */
+       return;
+    }
+
+    for (i = 0; i < num_bases; ++i) {
+       PyTypeObject *base_type = (PyTypeObject *) PyTuple_GetItem(bases, i);
+       void *slot = TYPE_SLOT(base_type);
+
+       if (slot == NULL)
+           continue;
+       if (slot == TYPE_SLOT(&PyGObject_Type) ||
+           slot == TYPE_SLOT(&PyBaseObject_Type))
+           continue;
+
+       if (found_slot != NULL && found_slot != slot) {
+           /* We have a conflict: more than one base use different
+            * custom slots.  To be on the safe side, we bail out.
+            */
+           return;
+       }
+
+       found_slot = slot;
+    }
+
+    /* Only perform the final assignment if at least one base has a
+     * custom value.  Otherwise just leave this type's slot untouched.
+     */
+    if (found_slot != NULL)
+       TYPE_SLOT(type) = found_slot;
+
+#undef TYPE_SLOT
+}
+
+/**
+ * pygobject_lookup_class:
+ * @gtype: the GType of the GObject subclass.
+ *
+ * This function looks up the wrapper class used to represent
+ * instances of a GObject represented by @gtype.  If no wrapper class
+ * or interface has been registered for the given GType, then a new
+ * type will be created.
+ *
+ * Returns: The wrapper class for the GObject or NULL if the
+ *          GType has no registered type and a new type couldn't be created
+ */
+PyTypeObject *
+pygobject_lookup_class(GType gtype)
+{
+    PyTypeObject *py_type;
+
+    if (gtype == G_TYPE_INTERFACE)
+       return &PyGInterface_Type;
+    
+    py_type = pyg_type_get_custom(g_type_name(gtype));
+    if (py_type)
+       return py_type;
+
+    py_type = g_type_get_qdata(gtype, pygobject_class_key);
+    if (py_type == NULL) {
+       py_type = g_type_get_qdata(gtype, pyginterface_type_key);
+
+    if (py_type == NULL)
+        py_type = (PyTypeObject *)pygi_type_import_by_g_type(gtype);
+
+       if (py_type == NULL) {
+           py_type = pygobject_new_with_interfaces(gtype);
+           g_type_set_qdata(gtype, pyginterface_type_key, py_type);
+       }
+    }
+    
+    return py_type;
+}
+
+/**
+ * pygobject_new_full:
+ * @obj: a GObject instance.
+ * @sink: whether to sink any floating reference found on the GObject. DEPRECATED.
+ * @g_class: the GObjectClass
+ *
+ * This function gets a reference to a wrapper for the given GObject
+ * instance.  If a wrapper has already been created, a new reference
+ * to that wrapper will be returned.  Otherwise, a wrapper instance
+ * will be created.
+ *
+ * Returns: a reference to the wrapper for the GObject.
+ */
+PyObject *
+pygobject_new_full(GObject *obj, gboolean sink, gpointer g_class)
+{
+    PyGObject *self;
+
+    if (obj == NULL) {
+       Py_INCREF(Py_None);
+       return Py_None;
+    }
+
+    /* we already have a wrapper for this object -- return it. */
+    self = (PyGObject *)g_object_get_qdata(obj, pygobject_wrapper_key);
+    if (self != NULL) {
+       Py_INCREF(self);
+    } else {
+       /* create wrapper */
+        PyGObjectData *inst_data = pyg_object_peek_inst_data(obj);
+       PyTypeObject *tp;
+        if (inst_data)
+            tp = inst_data->type;
+        else {
+            if (g_class)
+                tp = pygobject_lookup_class(G_OBJECT_CLASS_TYPE(g_class));
+            else
+                tp = pygobject_lookup_class(G_OBJECT_TYPE(obj));
+        }
+        g_assert(tp != NULL);
+        
+        /* need to bump type refcount if created with
+           pygobject_new_with_interfaces(). fixes bug #141042 */
+        if (tp->tp_flags & Py_TPFLAGS_HEAPTYPE)
+            Py_INCREF(tp);
+       self = PyObject_GC_New(PyGObject, tp);
+       if (self == NULL)
+           return NULL;
+        self->inst_dict = NULL;
+       self->weakreflist = NULL;
+       self->private_flags.flags = 0;
+       self->obj = obj;
+       g_object_ref(obj);
+       pygobject_register_wrapper((PyObject *)self);
+       PyObject_GC_Track((PyObject *)self);
+    }
+
+    return (PyObject *)self;
+}
+
+
+PyObject *
+pygobject_new(GObject *obj)
+{
+    return pygobject_new_full(obj, TRUE, NULL);
+}
+
+PyObject *
+pygobject_new_sunk(GObject *obj)
+{
+    g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1));
+    return pygobject_new_full(obj, TRUE, NULL);
+}
+
+static void
+pygobject_unwatch_closure(gpointer data, GClosure *closure)
+{
+    PyGObjectData *inst_data = data;
+
+    inst_data->closures = g_slist_remove (inst_data->closures, closure);
+}
+
+/**
+ * pygobject_watch_closure:
+ * @self: a GObject wrapper instance
+ * @closure: a GClosure to watch
+ *
+ * Adds a closure to the list of watched closures for the wrapper.
+ * The closure must be one returned by pyg_closure_new().  When the
+ * cycle GC traverses the wrapper instance, it will enumerate the
+ * references to Python objects stored in watched closures.  If the
+ * cycle GC tells the wrapper to clear itself, the watched closures
+ * will be invalidated.
+ */
+void
+pygobject_watch_closure(PyObject *self, GClosure *closure)
+{
+    PyGObject *gself;
+    PyGObjectData *data;
+
+    g_return_if_fail(self != NULL);
+    g_return_if_fail(PyObject_TypeCheck(self, &PyGObject_Type));
+    g_return_if_fail(closure != NULL);
+
+    gself = (PyGObject *)self;
+    data = pygobject_get_inst_data(gself);
+    g_return_if_fail(g_slist_find(data->closures, closure) == NULL);
+    data->closures = g_slist_prepend(data->closures, closure);
+    g_closure_add_invalidate_notifier(closure, data, pygobject_unwatch_closure);
+}
+
+/* -------------- PyGObject behaviour ----------------- */
+
+PYGLIB_DEFINE_TYPE("gobject.GObject", PyGObject_Type, PyGObject);
+
+static void
+pygobject_dealloc(PyGObject *self)
+{
+    /* Untrack must be done first. This is because followup calls such as
+     * ClearWeakRefs could call into Python and cause new allocations to
+     * happen, which could in turn could trigger the garbage collector,
+     * which would then get confused as it is tracking this half-deallocated
+     * object. */
+    PyObject_GC_UnTrack((PyObject *)self);
+
+    PyObject_ClearWeakRefs((PyObject *)self);
+      /* this forces inst_data->type to be updated, which could prove
+       * important if a new wrapper has to be created and it is of a
+       * unregistered type */
+    pygobject_get_inst_data(self);
+    pygobject_clear(self);
+    /* the following causes problems with subclassed types */
+    /* Py_TYPE(self)->tp_free((PyObject *)self); */
+    PyObject_GC_Del(self);
+}
+
+static PyObject*
+pygobject_richcompare(PyObject *self, PyObject *other, int op)
+{
+    int isinst;
+
+    isinst = PyObject_IsInstance(self, (PyObject*)&PyGObject_Type);
+    if (isinst == -1)
+        return NULL;
+    if (!isinst) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+    isinst = PyObject_IsInstance(other, (PyObject*)&PyGObject_Type);
+    if (isinst == -1)
+        return NULL;
+    if (!isinst) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+
+    return _pyglib_generic_ptr_richcompare(((PyGObject*)self)->obj,
+                                           ((PyGObject*)other)->obj,
+                                           op);
+}
+
+static long
+pygobject_hash(PyGObject *self)
+{
+    return (long)self->obj;
+}
+
+static PyObject *
+pygobject_repr(PyGObject *self)
+{
+    gchar buf[256];
+
+    g_snprintf(buf, sizeof(buf),
+              "<%s object at 0x%lx (%s at 0x%lx)>",
+              Py_TYPE(self)->tp_name,
+              (long)self,
+              self->obj ? G_OBJECT_TYPE_NAME(self->obj) : "uninitialized",
+               (long)self->obj);
+    return PYGLIB_PyUnicode_FromString(buf);
+}
+
+
+static int
+pygobject_traverse(PyGObject *self, visitproc visit, void *arg)
+{
+    int ret = 0;
+    GSList *tmp;
+    PyGObjectData *data = pygobject_get_inst_data(self);
+
+    if (self->inst_dict) ret = visit(self->inst_dict, arg);
+    if (ret != 0) return ret;
+
+    if (data) {
+
+        for (tmp = data->closures; tmp != NULL; tmp = tmp->next) {
+            PyGClosure *closure = tmp->data;
+
+            if (closure->callback) ret = visit(closure->callback, arg);
+            if (ret != 0) return ret;
+
+            if (closure->extra_args) ret = visit(closure->extra_args, arg);
+            if (ret != 0) return ret;
+
+            if (closure->swap_data) ret = visit(closure->swap_data, arg);
+            if (ret != 0) return ret;
+        }
+    }
+    return ret;
+}
+
+static inline int
+pygobject_clear(PyGObject *self)
+{
+    if (self->obj) {
+        g_object_set_qdata_full(self->obj, pygobject_wrapper_key, NULL, NULL);
+        if (self->inst_dict) {
+            g_object_remove_toggle_ref(self->obj, pyg_toggle_notify, self);
+            self->private_flags.flags &= ~PYGOBJECT_USING_TOGGLE_REF;
+        } else {
+            pyg_begin_allow_threads;
+            g_object_unref(self->obj);
+            pyg_end_allow_threads;
+        }
+        self->obj = NULL;
+    }
+    Py_CLEAR(self->inst_dict);
+    return 0;
+}
+
+static void
+pygobject_free(PyObject *op)
+{
+    PyObject_GC_Del(op);
+}
+
+gboolean
+pygobject_prepare_construct_properties(GObjectClass *class, PyObject *kwargs,
+                                       guint *n_params, GParameter **params)
+{
+    *n_params = 0;
+    *params = NULL;
+
+    if (kwargs) {
+        Py_ssize_t pos = 0;
+        PyObject *key;
+        PyObject *value;
+
+        *params = g_new0(GParameter, PyDict_Size(kwargs));
+        while (PyDict_Next(kwargs, &pos, &key, &value)) {
+            GParamSpec *pspec;
+            GParameter *param = &(*params)[*n_params];
+            const gchar *key_str = PYGLIB_PyUnicode_AsString(key);
+
+            pspec = g_object_class_find_property(class, key_str);
+            if (!pspec) {
+                PyErr_Format(PyExc_TypeError,
+                             "gobject `%s' doesn't support property `%s'",
+                             G_OBJECT_CLASS_NAME(class), key_str);
+                return FALSE;
+            }
+            g_value_init(&param->value, G_PARAM_SPEC_VALUE_TYPE(pspec));
+            if (pyg_param_gvalue_from_pyobject(&param->value, value, pspec) < 0) {
+                PyErr_Format(PyExc_TypeError,
+                             "could not convert value for property `%s' from %s to %s",
+                             key_str, Py_TYPE(value)->tp_name,
+                             g_type_name(G_PARAM_SPEC_VALUE_TYPE(pspec)));
+                return FALSE;
+            }
+            param->name = g_strdup(key_str);
+            ++(*n_params);
+        }
+    }
+    return TRUE;
+}
+
+/* ---------------- PyGObject methods ----------------- */
+
+static int
+pygobject_init(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    GType object_type;
+    guint n_params = 0, i;
+    GParameter *params = NULL;
+    GObjectClass *class;
+
+    if (!PyArg_ParseTuple(args, ":GObject.__init__", &object_type))
+       return -1;
+
+    object_type = pyg_type_from_object((PyObject *)self);
+    if (!object_type)
+       return -1;
+
+    if (G_TYPE_IS_ABSTRACT(object_type)) {
+       PyErr_Format(PyExc_TypeError, "cannot create instance of abstract "
+                    "(non-instantiable) type `%s'", g_type_name(object_type));
+       return -1;
+    }
+
+    if ((class = g_type_class_ref (object_type)) == NULL) {
+       PyErr_SetString(PyExc_TypeError,
+                       "could not get a reference to type class");
+       return -1;
+    }
+
+    if (!pygobject_prepare_construct_properties (class, kwargs, &n_params, &params))
+        goto cleanup;
+
+    if (pygobject_constructv(self, n_params, params))
+       PyErr_SetString(PyExc_RuntimeError, "could not create object");
+          
+ cleanup:
+    for (i = 0; i < n_params; i++) {
+       g_free((gchar *) params[i].name);
+       g_value_unset(&params[i].value);
+    }
+    g_free(params);
+    g_type_class_unref(class);
+    
+    return (self->obj) ? 0 : -1;
+}
+
+static PyObject *
+pygobject__gobject_init__(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    if (pygobject_init(self, args, kwargs) < 0)
+       return NULL;
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+#define CHECK_GOBJECT(self) \
+    if (!G_IS_OBJECT(self->obj)) {                                           \
+       PyErr_Format(PyExc_TypeError,                                        \
+                     "object at %p of type %s is not initialized",          \
+                     self, Py_TYPE(self)->tp_name);                         \
+       return NULL;                                                         \
+    }
+
+static PyObject *
+pygobject_get_property(PyGObject *self, PyObject *args)
+{
+    gchar *param_name;
+    GParamSpec *pspec;
+    GValue value = { 0, };
+    PyObject *ret;
+
+    if (!PyArg_ParseTuple(args, "s:GObject.get_property", &param_name))
+       return NULL;
+
+    CHECK_GOBJECT(self);
+    
+    pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(self->obj),
+                                        param_name);
+    if (!pspec) {
+       PyErr_Format(PyExc_TypeError,
+                    "object of type `%s' does not have property `%s'",
+                    g_type_name(G_OBJECT_TYPE(self->obj)), param_name);
+       return NULL;
+    }
+    if (!(pspec->flags & G_PARAM_READABLE)) {
+       PyErr_Format(PyExc_TypeError, "property %s is not readable",
+                    param_name);
+       return NULL;
+    }
+    g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
+    pyg_begin_allow_threads;
+    g_object_get_property(self->obj, param_name, &value);
+    pyg_end_allow_threads;
+    ret = pyg_param_gvalue_as_pyobject(&value, TRUE, pspec);
+    g_value_unset(&value);
+    return ret;
+}
+
+static PyObject *
+pygobject_get_properties(PyGObject *self, PyObject *args)
+{
+    GObjectClass *class;
+    int len, i;
+    PyObject *tuple;
+
+    if ((len = PyTuple_Size(args)) < 1) {
+        PyErr_SetString(PyExc_TypeError, "requires at least one argument");
+        return NULL;
+    }
+
+    tuple = PyTuple_New(len);
+    class = G_OBJECT_GET_CLASS(self->obj);
+    for (i = 0; i < len; i++) {
+        PyObject *py_property = PyTuple_GetItem(args, i);
+        gchar *property_name;
+        GParamSpec *pspec;
+        GValue value = { 0 };
+        PyObject *item;
+
+        if (!PYGLIB_PyUnicode_Check(py_property)) {
+            PyErr_SetString(PyExc_TypeError,
+                            "Expected string argument for property.");
+            return NULL;
+        }
+
+        property_name = PYGLIB_PyUnicode_AsString(py_property);
+
+        pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(self->obj),
+                                        property_name);
+        if (!pspec) {
+           PyErr_Format(PyExc_TypeError,
+                        "object of type `%s' does not have property `%s'",
+                        g_type_name(G_OBJECT_TYPE(self->obj)), property_name);
+       return NULL;
+        }
+        if (!(pspec->flags & G_PARAM_READABLE)) {
+           PyErr_Format(PyExc_TypeError, "property %s is not readable",
+                       property_name);
+           return NULL;
+        }
+        g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
+
+        pyg_begin_allow_threads;
+        g_object_get_property(self->obj, property_name, &value);
+        pyg_end_allow_threads;
+
+        item = pyg_value_as_pyobject(&value, TRUE);
+        PyTuple_SetItem(tuple, i, item);
+
+        g_value_unset(&value);
+    }
+
+    return tuple;
+}
+
+static PyObject *
+pygobject_set_property(PyGObject *self, PyObject *args)
+{
+    gchar *param_name;
+    GParamSpec *pspec;
+    PyObject *pvalue;
+
+    if (!PyArg_ParseTuple(args, "sO:GObject.set_property", &param_name,
+                         &pvalue))
+       return NULL;
+    
+    CHECK_GOBJECT(self);
+    
+    pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(self->obj),
+                                        param_name);
+    if (!pspec) {
+       PyErr_Format(PyExc_TypeError,
+                    "object of type `%s' does not have property `%s'",
+                    g_type_name(G_OBJECT_TYPE(self->obj)), param_name);
+       return NULL;
+    }
+    
+    if (!set_property_from_pspec(self->obj, param_name, pspec, pvalue))
+       return NULL;
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pygobject_set_properties(PyGObject *self, PyObject *args, PyObject *kwargs)
+{    
+    GObjectClass    *class;
+    Py_ssize_t      pos;
+    PyObject        *value;
+    PyObject        *key;
+    PyObject        *result = NULL;
+
+    CHECK_GOBJECT(self);
+
+    class = G_OBJECT_GET_CLASS(self->obj);
+    
+    g_object_freeze_notify (G_OBJECT(self->obj));
+    pos = 0;
+
+    while (kwargs && PyDict_Next (kwargs, &pos, &key, &value)) {
+       gchar *key_str = PYGLIB_PyUnicode_AsString(key);
+       GParamSpec *pspec;
+
+       pspec = g_object_class_find_property(class, key_str);
+       if (!pspec) {
+           gchar buf[512];
+
+           g_snprintf(buf, sizeof(buf),
+                      "object `%s' doesn't support property `%s'",
+                      g_type_name(G_OBJECT_TYPE(self->obj)), key_str);
+           PyErr_SetString(PyExc_TypeError, buf);
+           goto exit;
+       }
+
+       if (!set_property_from_pspec(G_OBJECT(self->obj), key_str, pspec, value))
+           goto exit;
+    }
+
+    result = Py_None;
+
+ exit:
+    g_object_thaw_notify (G_OBJECT(self->obj));
+    Py_XINCREF(result);
+    return result;
+}
+
+static PyObject *
+pygobject_freeze_notify(PyGObject *self, PyObject *args)
+{
+    if (!PyArg_ParseTuple(args, ":GObject.freeze_notify"))
+       return NULL;
+    
+    CHECK_GOBJECT(self);
+    
+    g_object_freeze_notify(self->obj);
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pygobject_notify(PyGObject *self, PyObject *args)
+{
+    char *property_name;
+
+    if (!PyArg_ParseTuple(args, "s:GObject.notify", &property_name))
+       return NULL;
+    
+    CHECK_GOBJECT(self);
+    
+    g_object_notify(self->obj, property_name);
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pygobject_thaw_notify(PyGObject *self, PyObject *args)
+{
+    if (!PyArg_ParseTuple(args, ":GObject.thaw_notify"))
+       return NULL;
+    
+    CHECK_GOBJECT(self);
+    
+    g_object_thaw_notify(self->obj);
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pygobject_get_data(PyGObject *self, PyObject *args)
+{
+    char *key;
+    GQuark quark;
+    PyObject *data;
+
+    if (!PyArg_ParseTuple(args, "s:GObject.get_data", &key))
+       return NULL;
+    
+    CHECK_GOBJECT(self);
+    
+    quark = g_quark_from_string(key);
+    data = g_object_get_qdata(self->obj, quark);
+    if (!data) data = Py_None;
+    Py_INCREF(data);
+    return data;
+}
+
+static PyObject *
+pygobject_set_data(PyGObject *self, PyObject *args)
+{
+    char *key;
+    GQuark quark;
+    PyObject *data;
+
+    if (!PyArg_ParseTuple(args, "sO:GObject.set_data", &key, &data))
+       return NULL;
+    
+    CHECK_GOBJECT(self);
+    
+    quark = g_quark_from_string(key);
+    Py_INCREF(data);
+    g_object_set_qdata_full(self->obj, quark, data, pyg_destroy_notify);
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pygobject_connect(PyGObject *self, PyObject *args)
+{
+    PyObject *first, *callback, *extra_args;
+    gchar *name;
+    guint sigid, len;
+    gulong handlerid;
+    GQuark detail = 0;
+    GClosure *closure;
+
+    len = PyTuple_Size(args);
+    if (len < 2) {
+       PyErr_SetString(PyExc_TypeError,
+                       "GObject.connect requires at least 2 arguments");
+       return NULL;
+    }
+    first = PySequence_GetSlice(args, 0, 2);
+    if (!PyArg_ParseTuple(first, "sO:GObject.connect", &name, &callback)) {
+       Py_DECREF(first);
+       return NULL;
+    }
+    Py_DECREF(first);
+    if (!PyCallable_Check(callback)) {
+       PyErr_SetString(PyExc_TypeError, "second argument must be callable");
+       return NULL;
+    }
+    
+    CHECK_GOBJECT(self);
+    
+    if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+                            &sigid, &detail, TRUE)) {
+       PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+                    name);
+       return NULL;
+    }
+    extra_args = PySequence_GetSlice(args, 2, len);
+    if (extra_args == NULL)
+       return NULL;
+
+    closure = pygi_signal_closure_new(self, name, callback, extra_args, NULL);
+    if (closure == NULL)
+        closure = pyg_closure_new(callback, extra_args, NULL);
+
+    pygobject_watch_closure((PyObject *)self, closure);
+    handlerid = g_signal_connect_closure_by_id(self->obj, sigid, detail,
+                                              closure, FALSE);
+    Py_DECREF(extra_args);
+    return PyLong_FromUnsignedLong(handlerid);
+}
+
+static PyObject *
+pygobject_connect_after(PyGObject *self, PyObject *args)
+{
+    PyObject *first, *callback, *extra_args;
+    gchar *name;
+    guint sigid;
+    gulong handlerid;
+    Py_ssize_t len;
+    GQuark detail;
+    GClosure *closure;
+
+    len = PyTuple_Size(args);
+    if (len < 2) {
+       PyErr_SetString(PyExc_TypeError,
+                       "GObject.connect_after requires at least 2 arguments");
+       return NULL;
+    }
+    first = PySequence_GetSlice(args, 0, 2);
+    if (!PyArg_ParseTuple(first, "sO:GObject.connect_after",
+                         &name, &callback)) {
+       Py_DECREF(first);
+       return NULL;
+    }
+    Py_DECREF(first);
+    if (!PyCallable_Check(callback)) {
+       PyErr_SetString(PyExc_TypeError, "second argument must be callable");
+       return NULL;
+    }
+    
+    CHECK_GOBJECT(self);
+    
+    if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+                            &sigid, &detail, TRUE)) {
+       PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+                    name);
+       return NULL;
+    }
+    extra_args = PySequence_GetSlice(args, 2, len);
+    if (extra_args == NULL)
+       return NULL;
+
+    closure = pygi_signal_closure_new(self, name, callback, extra_args, NULL);
+    if (closure == NULL)
+        closure = pyg_closure_new(callback, extra_args, NULL);
+
+    pygobject_watch_closure((PyObject *)self, closure);
+    handlerid = g_signal_connect_closure_by_id(self->obj, sigid, detail,
+                                              closure, TRUE);
+    Py_DECREF(extra_args);
+    return PyLong_FromUnsignedLong(handlerid);
+}
+
+static PyObject *
+pygobject_connect_object(PyGObject *self, PyObject *args)
+{
+    PyObject *first, *callback, *extra_args, *object;
+    gchar *name;
+    guint sigid;
+    gulong handlerid;
+    Py_ssize_t len;
+    GQuark detail;
+    GClosure *closure;
+
+    len = PyTuple_Size(args);
+    if (len < 3) {
+       PyErr_SetString(PyExc_TypeError,
+               "GObject.connect_object requires at least 3 arguments");
+       return NULL;
+    }
+    first = PySequence_GetSlice(args, 0, 3);
+    if (!PyArg_ParseTuple(first, "sOO:GObject.connect_object",
+                         &name, &callback, &object)) {
+       Py_DECREF(first);
+       return NULL;
+    }
+    Py_DECREF(first);
+    if (!PyCallable_Check(callback)) {
+       PyErr_SetString(PyExc_TypeError, "second argument must be callable");
+       return NULL;
+    }
+    
+    CHECK_GOBJECT(self);
+    
+    if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+                            &sigid, &detail, TRUE)) {
+       PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+                    name);
+       return NULL;
+    }
+    extra_args = PySequence_GetSlice(args, 3, len);
+    if (extra_args == NULL)
+       return NULL;
+
+    closure = pygi_signal_closure_new(self, name, callback, extra_args, object);
+    if (closure == NULL)
+        closure = pyg_closure_new(callback, extra_args, object);
+
+    pygobject_watch_closure((PyObject *)self, closure);
+    handlerid = g_signal_connect_closure_by_id(self->obj, sigid, detail,
+                                              closure, FALSE);
+    Py_DECREF(extra_args);
+    return PyLong_FromUnsignedLong(handlerid);
+}
+
+static PyObject *
+pygobject_connect_object_after(PyGObject *self, PyObject *args)
+{
+    PyObject *first, *callback, *extra_args, *object;
+    gchar *name;
+    guint sigid;
+    gulong handlerid;
+    Py_ssize_t len;
+    GQuark detail;
+    GClosure *closure;
+
+    len = PyTuple_Size(args);
+    if (len < 3) {
+       PyErr_SetString(PyExc_TypeError,
+               "GObject.connect_object_after requires at least 3 arguments");
+       return NULL;
+    }
+    first = PySequence_GetSlice(args, 0, 3);
+    if (!PyArg_ParseTuple(first, "sOO:GObject.connect_object_after",
+                         &name, &callback, &object)) {
+       Py_DECREF(first);
+       return NULL;
+    }
+    Py_DECREF(first);
+    if (!PyCallable_Check(callback)) {
+       PyErr_SetString(PyExc_TypeError, "second argument must be callable");
+       return NULL;
+    }
+    
+    CHECK_GOBJECT(self);
+    
+    if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+                            &sigid, &detail, TRUE)) {
+       PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+                    name);
+       return NULL;
+    }
+    extra_args = PySequence_GetSlice(args, 3, len);
+    if (extra_args == NULL)
+       return NULL;
+
+    closure = pygi_signal_closure_new(self, name, callback, extra_args, object);
+    if (closure == NULL)
+        closure = pyg_closure_new(callback, extra_args, object);
+
+    pygobject_watch_closure((PyObject *)self, closure);
+    handlerid = g_signal_connect_closure_by_id(self->obj, sigid, detail,
+                                              closure, TRUE);
+    Py_DECREF(extra_args);
+    return PyLong_FromUnsignedLong(handlerid);
+}
+
+static PyObject *
+pygobject_disconnect(PyGObject *self, PyObject *args)
+{
+    gulong handler_id;
+
+    if (!PyArg_ParseTuple(args, "k:GObject.disconnect", &handler_id))
+       return NULL;
+    
+    CHECK_GOBJECT(self);
+    
+    g_signal_handler_disconnect(self->obj, handler_id);
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pygobject_handler_is_connected(PyGObject *self, PyObject *args)
+{
+    gulong handler_id;
+
+    if (!PyArg_ParseTuple(args, "k:GObject.handler_is_connected", &handler_id))
+       return NULL;
+
+    
+    CHECK_GOBJECT(self);
+    
+    return PyBool_FromLong(g_signal_handler_is_connected(self->obj, handler_id));
+}
+
+static PyObject *
+pygobject_handler_block(PyGObject *self, PyObject *args)
+{
+    gulong handler_id;
+
+    if (!PyArg_ParseTuple(args, "k:GObject.handler_block", &handler_id))
+       return NULL;
+    
+    CHECK_GOBJECT(self);
+    
+    g_signal_handler_block(self->obj, handler_id);
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pygobject_handler_unblock(PyGObject *self, PyObject *args)
+{
+    gulong handler_id;
+
+    if (!PyArg_ParseTuple(args, "k:GObject.handler_unblock", &handler_id))
+       return NULL;
+    g_signal_handler_unblock(self->obj, handler_id);
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pygobject_emit(PyGObject *self, PyObject *args)
+{
+    guint signal_id, i;
+    Py_ssize_t len;
+    GQuark detail;
+    PyObject *first, *py_ret;
+    gchar *name;
+    GSignalQuery query;
+    GValue *params, ret = { 0, };
+    
+    len = PyTuple_Size(args);
+    if (len < 1) {
+       PyErr_SetString(PyExc_TypeError,"GObject.emit needs at least one arg");
+       return NULL;
+    }
+    first = PySequence_GetSlice(args, 0, 1);
+    if (!PyArg_ParseTuple(first, "s:GObject.emit", &name)) {
+       Py_DECREF(first);
+       return NULL;
+    }
+    Py_DECREF(first);
+    
+    CHECK_GOBJECT(self);
+    
+    if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+                            &signal_id, &detail, TRUE)) {
+       PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+                    name);
+       return NULL;
+    }
+    g_signal_query(signal_id, &query);
+    if (len != query.n_params + 1) {
+       gchar buf[128];
+
+       g_snprintf(buf, sizeof(buf),
+                  "%d parameters needed for signal %s; %ld given",
+                  query.n_params, name, (long int) (len - 1));
+       PyErr_SetString(PyExc_TypeError, buf);
+       return NULL;
+    }
+
+    params = g_new0(GValue, query.n_params + 1);
+    g_value_init(&params[0], G_OBJECT_TYPE(self->obj));
+    g_value_set_object(&params[0], G_OBJECT(self->obj));
+
+    for (i = 0; i < query.n_params; i++)
+       g_value_init(&params[i + 1],
+                    query.param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE);
+    for (i = 0; i < query.n_params; i++) {
+       PyObject *item = PyTuple_GetItem(args, i+1);
+
+       if (pyg_value_from_pyobject(&params[i+1], item) < 0) {
+           gchar buf[128];
+           g_snprintf(buf, sizeof(buf),
+                      "could not convert type %s to %s required for parameter %d",
+                      Py_TYPE(item)->tp_name,
+               g_type_name(G_VALUE_TYPE(&params[i+1])), i);
+           PyErr_SetString(PyExc_TypeError, buf);
+
+           for (i = 0; i < query.n_params + 1; i++)
+               g_value_unset(&params[i]);
+
+           g_free(params);
+           return NULL;
+       }
+    }    
+
+    if (query.return_type != G_TYPE_NONE)
+       g_value_init(&ret, query.return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE);
+    
+    g_signal_emitv(params, signal_id, detail, &ret);
+
+    for (i = 0; i < query.n_params + 1; i++)
+       g_value_unset(&params[i]);
+    
+    g_free(params);
+    if ((query.return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE) != G_TYPE_NONE) {
+       py_ret = pyg_value_as_pyobject(&ret, TRUE);
+       g_value_unset(&ret);
+    } else {
+       Py_INCREF(Py_None);
+       py_ret = Py_None;
+    }
+
+    return py_ret;
+}
+
+static PyObject *
+pygobject_stop_emission(PyGObject *self, PyObject *args)
+{
+    gchar *signal;
+    guint signal_id;
+    GQuark detail;
+
+    if (!PyArg_ParseTuple(args, "s:GObject.stop_emission", &signal))
+       return NULL;
+    
+    CHECK_GOBJECT(self);
+    
+    if (!g_signal_parse_name(signal, G_OBJECT_TYPE(self->obj),
+                            &signal_id, &detail, TRUE)) {
+       PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s",
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)self)),
+                    signal);
+       return NULL;
+    }
+    g_signal_stop_emission(self->obj, signal_id, detail);
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+pygobject_chain_from_overridden(PyGObject *self, PyObject *args)
+{
+    GSignalInvocationHint *ihint;
+    guint signal_id, i;
+    Py_ssize_t len;
+    PyObject *py_ret;
+    const gchar *name;
+    GSignalQuery query;
+    GValue *params, ret = { 0, };
+    
+    CHECK_GOBJECT(self);
+    
+    ihint = g_signal_get_invocation_hint(self->obj);
+    if (!ihint) {
+       PyErr_SetString(PyExc_TypeError, "could not find signal invocation "
+                       "information for this object.");
+       return NULL;
+    }
+
+    signal_id = ihint->signal_id;
+    name = g_signal_name(signal_id);
+
+    len = PyTuple_Size(args);
+    if (signal_id == 0) {
+       PyErr_SetString(PyExc_TypeError, "unknown signal name");
+       return NULL;
+    }
+    g_signal_query(signal_id, &query);
+    if (len != query.n_params) {
+       gchar buf[128];
+
+       g_snprintf(buf, sizeof(buf),
+                  "%d parameters needed for signal %s; %ld given",
+                  query.n_params, name, (long int) len);
+       PyErr_SetString(PyExc_TypeError, buf);
+       return NULL;
+    }
+    params = g_new0(GValue, query.n_params + 1);
+    g_value_init(&params[0], G_OBJECT_TYPE(self->obj));
+    g_value_set_object(&params[0], G_OBJECT(self->obj));
+
+    for (i = 0; i < query.n_params; i++)
+       g_value_init(&params[i + 1],
+                    query.param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE);
+    for (i = 0; i < query.n_params; i++) {
+       PyObject *item = PyTuple_GetItem(args, i);
+
+       if (pyg_boxed_check(item, (query.param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE))) {
+           g_value_set_static_boxed(&params[i+1], pyg_boxed_get(item, void));
+       }
+       else if (pyg_value_from_pyobject(&params[i+1], item) < 0) {
+           gchar buf[128];
+
+           g_snprintf(buf, sizeof(buf),
+                      "could not convert type %s to %s required for parameter %d",
+                      Py_TYPE(item)->tp_name,
+                      g_type_name(G_VALUE_TYPE(&params[i+1])), i);
+           PyErr_SetString(PyExc_TypeError, buf);
+           for (i = 0; i < query.n_params + 1; i++)
+               g_value_unset(&params[i]);
+           g_free(params);
+           return NULL;
+       }
+    }
+    if (query.return_type != G_TYPE_NONE)
+       g_value_init(&ret, query.return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE);
+    g_signal_chain_from_overridden(params, &ret);
+    for (i = 0; i < query.n_params + 1; i++)
+       g_value_unset(&params[i]);
+    g_free(params);
+    if (query.return_type != G_TYPE_NONE) {
+       py_ret = pyg_value_as_pyobject(&ret, TRUE);
+       g_value_unset(&ret);
+    } else {
+       Py_INCREF(Py_None);
+       py_ret = Py_None;
+    }
+    return py_ret;
+}
+
+
+static PyObject *
+pygobject_weak_ref(PyGObject *self, PyObject *args)
+{
+    int len;
+    PyObject *callback = NULL, *user_data = NULL;
+    PyObject *retval;
+
+    CHECK_GOBJECT(self);
+
+    if ((len = PySequence_Length(args)) >= 1) {
+        callback = PySequence_ITEM(args, 0);
+        user_data = PySequence_GetSlice(args, 1, len);
+    }
+    retval = pygobject_weak_ref_new(self->obj, callback, user_data);
+    Py_XDECREF(callback);
+    Py_XDECREF(user_data);
+    return retval;
+}
+
+
+static PyObject *
+pygobject_copy(PyGObject *self)
+{
+    PyErr_SetString(PyExc_TypeError,
+                   "gobject.GObject descendants' instances are non-copyable");
+    return NULL;
+}
+
+static PyObject *
+pygobject_deepcopy(PyGObject *self, PyObject *args)
+{
+    PyErr_SetString(PyExc_TypeError,
+                   "gobject.GObject descendants' instances are non-copyable");
+    return NULL;
+}
+
+
+static PyObject *
+pygobject_disconnect_by_func(PyGObject *self, PyObject *args)
+{
+    PyObject *pyfunc = NULL;
+    GClosure *closure = NULL;
+    guint retval;
+    
+    CHECK_GOBJECT(self);
+
+    if (!PyArg_ParseTuple(args, "O:GObject.disconnect_by_func", &pyfunc))
+       return NULL;
+
+    if (!PyCallable_Check(pyfunc)) {
+       PyErr_SetString(PyExc_TypeError, "first argument must be callable");
+       return NULL;
+    }
+
+    closure = gclosure_from_pyfunc(self, pyfunc);
+    if (!closure) {
+       PyErr_Format(PyExc_TypeError, "nothing connected to %s",
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)pyfunc)));
+       return NULL;
+    }
+    
+    retval = g_signal_handlers_disconnect_matched(self->obj,
+                                                 G_SIGNAL_MATCH_CLOSURE,
+                                                 0, 0,
+                                                 closure,
+                                                 NULL, NULL);
+    return PYGLIB_PyLong_FromLong(retval);
+}
+
+static PyObject *
+pygobject_handler_block_by_func(PyGObject *self, PyObject *args)
+{
+    PyObject *pyfunc = NULL;
+    GClosure *closure = NULL;
+    guint retval;
+    
+    CHECK_GOBJECT(self);
+
+    if (!PyArg_ParseTuple(args, "O:GObject.handler_block_by_func", &pyfunc))
+       return NULL;
+
+    if (!PyCallable_Check(pyfunc)) {
+       PyErr_SetString(PyExc_TypeError, "first argument must be callable");
+       return NULL;
+    }
+
+    closure = gclosure_from_pyfunc(self, pyfunc);
+    if (!closure) {
+       PyErr_Format(PyExc_TypeError, "nothing connected to %s",
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)pyfunc)));
+       return NULL;
+    }
+    
+    retval = g_signal_handlers_block_matched(self->obj,
+                                            G_SIGNAL_MATCH_CLOSURE,
+                                            0, 0,
+                                            closure,
+                                            NULL, NULL);
+    return PYGLIB_PyLong_FromLong(retval);
+}
+
+static PyObject *
+pygobject_handler_unblock_by_func(PyGObject *self, PyObject *args)
+{
+    PyObject *pyfunc = NULL;
+    GClosure *closure = NULL;
+    guint retval;
+    
+    CHECK_GOBJECT(self);
+
+    if (!PyArg_ParseTuple(args, "O:GObject.handler_unblock_by_func", &pyfunc))
+       return NULL;
+
+    if (!PyCallable_Check(pyfunc)) {
+       PyErr_SetString(PyExc_TypeError, "first argument must be callable");
+       return NULL;
+    }
+
+    closure = gclosure_from_pyfunc(self, pyfunc);
+    if (!closure) {
+       PyErr_Format(PyExc_TypeError, "nothing connected to %s",
+                    PYGLIB_PyUnicode_AsString(PyObject_Repr((PyObject*)pyfunc)));
+       return NULL;
+    }
+    
+    retval = g_signal_handlers_unblock_matched(self->obj,
+                                              G_SIGNAL_MATCH_CLOSURE,
+                                              0, 0,
+                                              closure,
+                                              NULL, NULL);
+    return PYGLIB_PyLong_FromLong(retval);
+}
+
+static PyMethodDef pygobject_methods[] = {
+    { "__gobject_init__", (PyCFunction)pygobject__gobject_init__,
+      METH_VARARGS|METH_KEYWORDS },
+    { "get_property", (PyCFunction)pygobject_get_property, METH_VARARGS },
+    { "get_properties", (PyCFunction)pygobject_get_properties, METH_VARARGS },
+    { "set_property", (PyCFunction)pygobject_set_property, METH_VARARGS },
+    { "set_properties", (PyCFunction)pygobject_set_properties, METH_VARARGS|METH_KEYWORDS },
+    { "freeze_notify", (PyCFunction)pygobject_freeze_notify, METH_VARARGS },
+    { "notify", (PyCFunction)pygobject_notify, METH_VARARGS },
+    { "thaw_notify", (PyCFunction)pygobject_thaw_notify, METH_VARARGS },
+    { "get_data", (PyCFunction)pygobject_get_data, METH_VARARGS },
+    { "set_data", (PyCFunction)pygobject_set_data, METH_VARARGS },
+    { "connect", (PyCFunction)pygobject_connect, METH_VARARGS },
+    { "connect_after", (PyCFunction)pygobject_connect_after, METH_VARARGS },
+    { "connect_object", (PyCFunction)pygobject_connect_object, METH_VARARGS },
+    { "connect_object_after", (PyCFunction)pygobject_connect_object_after, METH_VARARGS },
+    { "disconnect", (PyCFunction)pygobject_disconnect, METH_VARARGS },
+    { "disconnect_by_func", (PyCFunction)pygobject_disconnect_by_func, METH_VARARGS },
+    { "handler_disconnect", (PyCFunction)pygobject_disconnect, METH_VARARGS },
+    { "handler_is_connected", (PyCFunction)pygobject_handler_is_connected, METH_VARARGS },
+    { "handler_block", (PyCFunction)pygobject_handler_block, METH_VARARGS },
+    { "handler_unblock", (PyCFunction)pygobject_handler_unblock,METH_VARARGS },
+    { "handler_block_by_func", (PyCFunction)pygobject_handler_block_by_func, METH_VARARGS },
+    { "handler_unblock_by_func", (PyCFunction)pygobject_handler_unblock_by_func, METH_VARARGS },
+    { "emit", (PyCFunction)pygobject_emit, METH_VARARGS },
+    { "stop_emission", (PyCFunction)pygobject_stop_emission, METH_VARARGS },
+    { "emit_stop_by_name", (PyCFunction)pygobject_stop_emission,METH_VARARGS },
+    { "chain", (PyCFunction)pygobject_chain_from_overridden,METH_VARARGS },
+    { "weak_ref", (PyCFunction)pygobject_weak_ref, METH_VARARGS },
+    { "__copy__", (PyCFunction)pygobject_copy, METH_NOARGS },
+    { "__deepcopy__", (PyCFunction)pygobject_deepcopy, METH_VARARGS },
+    { NULL, NULL, 0 }
+};
+
+
+static PyObject *
+pygobject_get_dict(PyGObject *self, void *closure)
+{
+    if (self->inst_dict == NULL) {
+       self->inst_dict = PyDict_New();
+       if (self->inst_dict == NULL)
+           return NULL;
+        if (G_LIKELY(self->obj))
+            pygobject_switch_to_toggle_ref(self);
+    }
+    Py_INCREF(self->inst_dict);
+    return self->inst_dict;
+}
+
+static PyObject *
+pygobject_get_refcount(PyGObject *self, void *closure)
+{
+    return PYGLIB_PyLong_FromLong(self->obj->ref_count);
+}
+
+static int
+pygobject_setattro(PyObject *self, PyObject *name, PyObject *value)
+{
+    int res;
+    PyGObject *gself = (PyGObject *) self;
+    PyObject *inst_dict_before = gself->inst_dict;
+      /* call parent type's setattro */
+    res = PyGObject_Type.tp_base->tp_setattro(self, name, value);
+    if (inst_dict_before == NULL && gself->inst_dict != NULL) {
+        if (G_LIKELY(gself->obj))
+            pygobject_switch_to_toggle_ref(gself);
+    }
+    return res;
+}
+
+static PyGetSetDef pygobject_getsets[] = {
+    { "__dict__", (getter)pygobject_get_dict, (setter)0 },
+    { "__grefcount__", (getter)pygobject_get_refcount, (setter)0, },
+    { NULL, 0, 0 }
+};
+
+/* ------------------------------------ */
+/* ****** GObject weak reference ****** */
+/* ------------------------------------ */
+
+typedef struct {
+    PyObject_HEAD
+    GObject *obj;
+    PyObject *callback;
+    PyObject *user_data;
+    gboolean have_floating_ref;
+} PyGObjectWeakRef;
+
+PYGLIB_DEFINE_TYPE("gobject.GObjectWeakRef", PyGObjectWeakRef_Type, PyGObjectWeakRef);
+
+static int
+pygobject_weak_ref_traverse(PyGObjectWeakRef *self, visitproc visit, void *arg)
+{
+    if (self->callback && visit(self->callback, arg) < 0)
+        return -1;
+    if (self->user_data && visit(self->user_data, arg) < 0)
+        return -1;
+    return 0;
+}
+
+static void
+pygobject_weak_ref_notify(PyGObjectWeakRef *self, GObject *dummy)
+{
+    self->obj = NULL;
+    if (self->callback) {
+        PyObject *retval;
+        PyGILState_STATE state = pyglib_gil_state_ensure();
+        retval = PyObject_Call(self->callback, self->user_data, NULL);
+        if (retval) {
+            if (retval != Py_None)
+                PyErr_Format(PyExc_TypeError,
+                             "GObject weak notify callback returned a value"
+                             " of type %s, should return None",
+                             Py_TYPE(retval)->tp_name);
+            Py_DECREF(retval);
+            PyErr_Print();
+        } else
+            PyErr_Print();
+        Py_CLEAR(self->callback);
+        Py_CLEAR(self->user_data);
+        if (self->have_floating_ref) {
+            self->have_floating_ref = FALSE;
+            Py_DECREF((PyObject *) self);
+        }
+        pyglib_gil_state_release(state);
+    }
+}
+
+static inline int
+pygobject_weak_ref_clear(PyGObjectWeakRef *self)
+{
+    Py_CLEAR(self->callback);
+    Py_CLEAR(self->user_data);
+    if (self->obj) {
+        g_object_weak_unref(self->obj, (GWeakNotify) pygobject_weak_ref_notify, self);
+        self->obj = NULL;
+    }
+    return 0;
+}
+
+static void
+pygobject_weak_ref_dealloc(PyGObjectWeakRef *self)
+{
+    PyObject_GC_UnTrack((PyObject *)self);
+    pygobject_weak_ref_clear(self);
+    PyObject_GC_Del(self);
+}
+
+static PyObject *
+pygobject_weak_ref_new(GObject *obj, PyObject *callback, PyObject *user_data)
+{
+    PyGObjectWeakRef *self;
+
+    self = PyObject_GC_New(PyGObjectWeakRef, &PyGObjectWeakRef_Type);
+    self->callback = callback;
+    self->user_data = user_data;
+    Py_XINCREF(self->callback);
+    Py_XINCREF(self->user_data);
+    self->obj = obj;
+    g_object_weak_ref(self->obj, (GWeakNotify) pygobject_weak_ref_notify, self);
+    if (callback != NULL) {
+          /* when we have a callback, we should INCREF the weakref
+           * object to make it stay alive even if it goes out of scope */
+        self->have_floating_ref = TRUE;
+        Py_INCREF((PyObject *) self);
+    }
+    return (PyObject *) self;
+}
+
+static PyObject *
+pygobject_weak_ref_unref(PyGObjectWeakRef *self, PyObject *args)
+{
+    if (!self->obj) {
+        PyErr_SetString(PyExc_ValueError, "weak ref already unreffed");
+        return NULL;
+    }
+    g_object_weak_unref(self->obj, (GWeakNotify) pygobject_weak_ref_notify, self);
+    self->obj = NULL;
+    if (self->have_floating_ref) {
+        self->have_floating_ref = FALSE;
+        Py_DECREF(self);
+    }
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyMethodDef pygobject_weak_ref_methods[] = {
+    { "unref", (PyCFunction)pygobject_weak_ref_unref, METH_NOARGS},
+    { NULL, NULL, 0}
+};
+
+static PyObject *
+pygobject_weak_ref_call(PyGObjectWeakRef *self, PyObject *args, PyObject *kw)
+{
+    static char *argnames[] = {NULL};
+
+    if (!PyArg_ParseTupleAndKeywords(args, kw, ":__call__", argnames))
+        return NULL;
+
+    if (self->obj)
+        return pygobject_new_full(self->obj, FALSE, NULL);
+    else {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+
+static gpointer
+pyobject_copy(gpointer boxed)
+{
+    PyObject *object = boxed;
+
+    Py_INCREF(object);
+    return object;
+}
+
+static void
+pyobject_free(gpointer boxed)
+{
+    PyObject *object = boxed;
+    PyGILState_STATE state;
+
+    state = pyglib_gil_state_ensure();
+    Py_DECREF(object);
+    pyglib_gil_state_release(state);
+}
+
+void
+pygobject_object_register_types(PyObject *d)
+{
+    PyObject *o, *descr;
+
+    pygobject_class_key = g_quark_from_static_string("PyGObject::class");
+    pygobject_class_init_key = g_quark_from_static_string("PyGObject::class-init");
+    pygobject_wrapper_key = g_quark_from_static_string("PyGObject::wrapper");
+    pygobject_has_updated_constructor_key =
+        g_quark_from_static_string("PyGObject::has-updated-constructor");
+    pygobject_instance_data_key = g_quark_from_static_string("PyGObject::instance-data");
+    pygobject_ref_sunk_key = g_quark_from_static_string("PyGObject::ref-sunk");
+
+    /* GObject */
+    if (!PY_TYPE_OBJECT)
+       PY_TYPE_OBJECT = g_boxed_type_register_static("PyObject",
+                                                     pyobject_copy,
+                                                     pyobject_free);
+    PyGObject_Type.tp_dealloc = (destructor)pygobject_dealloc;
+    PyGObject_Type.tp_richcompare = pygobject_richcompare;
+    PyGObject_Type.tp_repr = (reprfunc)pygobject_repr;
+    PyGObject_Type.tp_hash = (hashfunc)pygobject_hash;
+    PyGObject_Type.tp_setattro = (setattrofunc)pygobject_setattro;
+    PyGObject_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
+                              Py_TPFLAGS_HAVE_GC);
+    PyGObject_Type.tp_traverse = (traverseproc)pygobject_traverse;
+    PyGObject_Type.tp_clear = (inquiry)pygobject_clear;
+    PyGObject_Type.tp_weaklistoffset = offsetof(PyGObject, weakreflist);
+    PyGObject_Type.tp_methods = pygobject_methods;
+    PyGObject_Type.tp_getset = pygobject_getsets;
+    PyGObject_Type.tp_dictoffset = offsetof(PyGObject, inst_dict);
+    PyGObject_Type.tp_init = (initproc)pygobject_init;
+    PyGObject_Type.tp_free = (freefunc)pygobject_free;
+    PyGObject_Type.tp_alloc = PyType_GenericAlloc;
+    PyGObject_Type.tp_new = PyType_GenericNew;
+    pygobject_register_class(d, "GObject", G_TYPE_OBJECT,
+                            &PyGObject_Type, NULL);
+    PyDict_SetItemString(PyGObject_Type.tp_dict, "__gdoc__",
+                        pyg_object_descr_doc_get());
+    pyg_set_object_has_new_constructor(G_TYPE_OBJECT);
+
+    /* GProps */
+    PyGProps_Type.tp_dealloc = (destructor)PyGProps_dealloc;
+    PyGProps_Type.tp_as_sequence = (PySequenceMethods*)&_PyGProps_as_sequence;
+    PyGProps_Type.tp_getattro = (getattrofunc)PyGProps_getattro;
+    PyGProps_Type.tp_setattro = (setattrofunc)PyGProps_setattro;
+    PyGProps_Type.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC;
+    PyGProps_Type.tp_doc = "The properties of the GObject accessible as "
+       "Python attributes.";
+    PyGProps_Type.tp_traverse = (traverseproc)pygobject_props_traverse;
+    PyGProps_Type.tp_iter = (getiterfunc)pygobject_props_get_iter;
+    if (PyType_Ready(&PyGProps_Type) < 0)
+        return;
+
+    /* GPropsDescr */
+    PyGPropsDescr_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+    PyGPropsDescr_Type.tp_descr_get = pyg_props_descr_descr_get;
+    if (PyType_Ready(&PyGPropsDescr_Type) < 0)
+        return;
+    descr = PyObject_New(PyObject, &PyGPropsDescr_Type);
+    PyDict_SetItemString(PyGObject_Type.tp_dict, "props", descr);
+    PyDict_SetItemString(PyGObject_Type.tp_dict, "__module__",
+                        o=PYGLIB_PyUnicode_FromString("gobject._gobject"));
+    Py_DECREF(o);
+
+    /* GPropsIter */
+    PyGPropsIter_Type.tp_dealloc = (destructor)pyg_props_iter_dealloc;
+    PyGPropsIter_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+    PyGPropsIter_Type.tp_doc = "GObject properties iterator";
+    PyGPropsIter_Type.tp_iternext = (iternextfunc)pygobject_props_iter_next;
+    if (PyType_Ready(&PyGPropsIter_Type) < 0)
+        return;
+
+    PyGObjectWeakRef_Type.tp_dealloc = (destructor)pygobject_weak_ref_dealloc;
+    PyGObjectWeakRef_Type.tp_call = (ternaryfunc)pygobject_weak_ref_call;
+    PyGObjectWeakRef_Type.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC;
+    PyGObjectWeakRef_Type.tp_doc = "A GObject weak reference";
+    PyGObjectWeakRef_Type.tp_traverse = (traverseproc)pygobject_weak_ref_traverse;
+    PyGObjectWeakRef_Type.tp_clear = (inquiry)pygobject_weak_ref_clear;
+    PyGObjectWeakRef_Type.tp_methods = pygobject_weak_ref_methods;
+    if (PyType_Ready(&PyGObjectWeakRef_Type) < 0)
+        return;
+    PyDict_SetItemString(d, "GObjectWeakRef", (PyObject *) &PyGObjectWeakRef_Type);
+}
diff --git a/gobject/pygobject.h b/gobject/pygobject.h
new file mode 100644 (file)
index 0000000..21743ba
--- /dev/null
@@ -0,0 +1,667 @@
+/* -*- Mode: C; c-basic-offset: 4 -*- */
+#ifndef _PYGOBJECT_H_
+#define _PYGOBJECT_H_
+
+#include <Python.h>
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+/* This is deprecated, don't use */
+#define PYGIL_API_IS_BUGGY FALSE
+
+  /* PyGClosure is a _private_ structure */
+typedef void (* PyClosureExceptionHandler) (GValue *ret, guint n_param_values, const GValue *params);
+typedef struct _PyGClosure PyGClosure;
+typedef struct _PyGObjectData PyGObjectData;
+
+struct _PyGClosure {
+    GClosure closure;
+    PyObject *callback;
+    PyObject *extra_args; /* tuple of extra args to pass to callback */
+    PyObject *swap_data; /* other object for gtk_signal_connect__object */
+    PyClosureExceptionHandler exception_handler;
+};
+
+typedef enum {
+    PYGOBJECT_USING_TOGGLE_REF = 1 << 0
+} PyGObjectFlags;
+
+  /* closures is just an alias for what is found in the
+   * PyGObjectData */
+typedef struct {
+    PyObject_HEAD
+    GObject *obj;
+    PyObject *inst_dict; /* the instance dictionary -- must be last */
+    PyObject *weakreflist; /* list of weak references */
+    
+      /*< private >*/
+      /* using union to preserve ABI compatibility (structure size
+       * must not change) */
+    union {
+        GSList *closures; /* stale field; no longer updated DO-NOT-USE! */
+        PyGObjectFlags flags;
+    } private_flags;
+
+} PyGObject;
+
+#define pygobject_get(v) (((PyGObject *)(v))->obj)
+#define pygobject_check(v,base) (PyObject_TypeCheck(v,base))
+
+typedef struct {
+    PyObject_HEAD
+    gpointer boxed;
+    GType gtype;
+    gboolean free_on_dealloc;
+} PyGBoxed;
+
+#define pyg_boxed_get(v,t)      ((t *)((PyGBoxed *)(v))->boxed)
+#define pyg_boxed_check(v,typecode) (PyObject_TypeCheck(v, &PyGBoxed_Type) && ((PyGBoxed *)(v))->gtype == typecode)
+
+typedef struct {
+    PyObject_HEAD
+    gpointer pointer;
+    GType gtype;
+} PyGPointer;
+
+#define pyg_pointer_get(v,t)      ((t *)((PyGPointer *)(v))->pointer)
+#define pyg_pointer_check(v,typecode) (PyObject_TypeCheck(v, &PyGPointer_Type) && ((PyGPointer *)(v))->gtype == typecode)
+
+typedef void (*PyGFatalExceptionFunc) (void);
+typedef void (*PyGThreadBlockFunc) (void);
+
+typedef struct {
+    PyObject_HEAD
+    GParamSpec *pspec;
+} PyGParamSpec;
+
+#define PyGParamSpec_Get(v) (((PyGParamSpec *)v)->pspec)
+#define PyGParamSpec_Check(v) (PyObject_TypeCheck(v, &PyGParamSpec_Type))
+
+typedef int (*PyGClassInitFunc) (gpointer gclass, PyTypeObject *pyclass);
+typedef PyTypeObject * (*PyGTypeRegistrationFunction) (const gchar *name,
+                                                      gpointer data);
+
+struct _PyGObject_Functions {
+    /* 
+     * All field names in here are considered private,
+     * use the macros below instead, which provides stability
+     */
+    void (* register_class)(PyObject *dict, const gchar *class_name,
+                           GType gtype, PyTypeObject *type, PyObject *bases);
+    void (* register_wrapper)(PyObject *self);
+    void (* register_sinkfunc)(GType type,
+                              void (* sinkfunc)(GObject *object));
+    PyTypeObject *(* lookup_class)(GType type);
+    PyObject *(* newgobj)(GObject *obj);
+
+    GClosure *(* closure_new)(PyObject *callback, PyObject *extra_args,
+                             PyObject *swap_data);
+    void      (* object_watch_closure)(PyObject *self, GClosure *closure);
+    GDestroyNotify destroy_notify;
+
+    GType (* type_from_object)(PyObject *obj);
+    PyObject *(* type_wrapper_new)(GType type);
+
+    gint (* enum_get_value)(GType enum_type, PyObject *obj, gint *val);
+    gint (* flags_get_value)(GType flag_type, PyObject *obj, gint *val);
+    void (* register_gtype_custom)(GType gtype,
+                           PyObject *(* from_func)(const GValue *value),
+                           int (* to_func)(GValue *value, PyObject *obj));
+    int (* value_from_pyobject)(GValue *value, PyObject *obj);
+    PyObject *(* value_as_pyobject)(const GValue *value, gboolean copy_boxed);
+
+    void (* register_interface)(PyObject *dict, const gchar *class_name,
+                               GType gtype, PyTypeObject *type);
+
+    PyTypeObject *boxed_type;
+    void (* register_boxed)(PyObject *dict, const gchar *class_name,
+                           GType boxed_type, PyTypeObject *type);
+    PyObject *(* boxed_new)(GType boxed_type, gpointer boxed,
+                           gboolean copy_boxed, gboolean own_ref);
+
+    PyTypeObject *pointer_type;
+    void (* register_pointer)(PyObject *dict, const gchar *class_name,
+                             GType pointer_type, PyTypeObject *type);
+    PyObject *(* pointer_new)(GType boxed_type, gpointer pointer);
+
+    void (* enum_add_constants)(PyObject *module, GType enum_type,
+                               const gchar *strip_prefix);
+    void (* flags_add_constants)(PyObject *module, GType flags_type,
+                                const gchar *strip_prefix);
+
+    const gchar *(* constant_strip_prefix)(const gchar *name,
+                                    const gchar *strip_prefix);
+
+    gboolean (* error_check)(GError **error);
+
+    /* hooks to register handlers for getting GDK threads to cooperate
+     * with python threading */
+    void (* set_thread_block_funcs) (PyGThreadBlockFunc block_threads_func,
+                                    PyGThreadBlockFunc unblock_threads_func);
+    PyGThreadBlockFunc block_threads;
+    PyGThreadBlockFunc unblock_threads;
+    PyTypeObject *paramspec_type;
+    PyObject *(* paramspec_new)(GParamSpec *spec);
+    GParamSpec *(*paramspec_get)(PyObject *tuple);
+    int (*pyobj_to_unichar_conv)(PyObject *pyobj, void* ptr);
+    gboolean (*parse_constructor_args)(GType        obj_type,
+                                       char       **arg_names,
+                                       char       **prop_names,
+                                       GParameter  *params,
+                                       guint       *nparams,
+                                       PyObject   **py_args);
+    PyObject *(* param_gvalue_as_pyobject) (const GValue* gvalue, 
+                                            gboolean copy_boxed,
+                                           const GParamSpec* pspec);
+    int (* gvalue_from_param_pyobject) (GValue* value, 
+                                        PyObject* py_obj, 
+                                       const GParamSpec* pspec);
+    PyTypeObject *enum_type;
+    PyObject *(*enum_add)(PyObject *module,
+                         const char *type_name_,
+                         const char *strip_prefix,
+                         GType gtype);
+    PyObject* (*enum_from_gtype)(GType gtype, int value);
+    
+    PyTypeObject *flags_type;
+    PyObject *(*flags_add)(PyObject *module,
+                          const char *type_name_,
+                          const char *strip_prefix,
+                          GType gtype);
+    PyObject* (*flags_from_gtype)(GType gtype, int value);
+
+    gboolean threads_enabled;
+    int       (*enable_threads) (void);
+
+    int       (*gil_state_ensure) (void);
+    void      (*gil_state_release) (int flag);
+    
+    void      (*register_class_init) (GType gtype, PyGClassInitFunc class_init);
+    void      (*register_interface_info) (GType gtype, const GInterfaceInfo *info);
+    void      (*closure_set_exception_handler) (GClosure *closure, PyClosureExceptionHandler handler);
+    int       (*pygobject_constructv) (PyGObject  *self,
+                                       guint       n_parameters,
+                                       GParameter *parameters);
+    int       (*pygobject_construct) (PyGObject  *self,
+                                      const char *first_property_name,
+                                      ...);
+    void      (*set_object_has_new_constructor) (GType type);
+
+    void      (*add_warning_redirection) (const char *domain,
+                                          PyObject   *warning);
+    void      (*disable_warning_redirections) (void);
+    void      (*type_register_custom)(const gchar *type_name,
+                                     PyGTypeRegistrationFunction callback,
+                                     gpointer data);
+    gboolean  (*gerror_exception_check) (GError **error);
+    PyObject* (*option_group_new) (GOptionGroup *group);
+    GType (* type_from_object_strict) (PyObject *obj, gboolean strict);    
+};
+
+#ifndef _INSIDE_PYGOBJECT_
+
+#if defined(NO_IMPORT) || defined(NO_IMPORT_PYGOBJECT)
+extern struct _PyGObject_Functions *_PyGObject_API;
+#else
+struct _PyGObject_Functions *_PyGObject_API;
+#endif
+
+#define pygobject_register_class    (_PyGObject_API->register_class)
+#define pygobject_register_wrapper  (_PyGObject_API->register_wrapper)
+/* This is deprecated, sinkfuncs are not needed anymore */
+#define pygobject_register_sinkfunc (_PyGObject_API->register_sinkfunc)
+#define pygobject_lookup_class      (_PyGObject_API->lookup_class)
+#define pygobject_new               (_PyGObject_API->newgobj)
+#define pyg_closure_new             (_PyGObject_API->closure_new)
+#define pygobject_watch_closure     (_PyGObject_API->object_watch_closure)
+#define pyg_closure_set_exception_handler (_PyGObject_API->closure_set_exception_handler)
+#define pyg_destroy_notify          (_PyGObject_API->destroy_notify)
+#define pyg_type_from_object_strict   (_PyGObject_API->type_from_object_strict)
+#define pyg_type_from_object        (_PyGObject_API->type_from_object)
+#define pyg_type_wrapper_new        (_PyGObject_API->type_wrapper_new)
+#define pyg_enum_get_value          (_PyGObject_API->enum_get_value)
+#define pyg_flags_get_value         (_PyGObject_API->flags_get_value)
+/* This is deprecated, call pyg_register_gtype_custom directly instead */
+#define pyg_register_boxed_custom   pyg_register_gtype_custom
+#define pyg_register_gtype_custom   (_PyGObject_API->register_gtype_custom)
+#define pyg_value_from_pyobject     (_PyGObject_API->value_from_pyobject)
+#define pyg_value_as_pyobject       (_PyGObject_API->value_as_pyobject)
+#define pyg_register_interface      (_PyGObject_API->register_interface)
+#define PyGBoxed_Type               (*_PyGObject_API->boxed_type)
+#define pyg_register_boxed          (_PyGObject_API->register_boxed)
+#define pyg_boxed_new               (_PyGObject_API->boxed_new)
+#define PyGPointer_Type             (*_PyGObject_API->pointer_type)
+#define pyg_register_pointer        (_PyGObject_API->register_pointer)
+#define pyg_pointer_new             (_PyGObject_API->pointer_new)
+#define pyg_enum_add_constants      (_PyGObject_API->enum_add_constants)
+#define pyg_flags_add_constants     (_PyGObject_API->flags_add_constants)
+#define pyg_constant_strip_prefix   (_PyGObject_API->constant_strip_prefix)
+#define pyg_error_check             (_PyGObject_API->error_check)
+#define pyg_set_thread_block_funcs  (_PyGObject_API->set_thread_block_funcs)
+#define PyGParamSpec_Type           (*_PyGObject_API->paramspec_type)
+#define pyg_param_spec_new          (_PyGObject_API->paramspec_new)
+#define pyg_param_spec_from_object  (_PyGObject_API->paramspec_get)
+#define pyg_pyobj_to_unichar_conv   (_PyGObject_API->pyobj_to_unichar_conv)
+#define pyg_parse_constructor_args  (_PyGObject_API->parse_constructor_args)
+#define pyg_param_gvalue_as_pyobject   (_PyGObject_API->value_as_pyobject)
+#define pyg_param_gvalue_from_pyobject (_PyGObject_API->gvalue_from_param_pyobject)
+#define PyGEnum_Type                (*_PyGObject_API->enum_type)
+#define pyg_enum_add                (_PyGObject_API->enum_add)
+#define pyg_enum_from_gtype         (_PyGObject_API->enum_from_gtype)
+#define PyGFlags_Type               (*_PyGObject_API->flags_type)
+#define pyg_flags_add               (_PyGObject_API->flags_add)
+#define pyg_flags_from_gtype        (_PyGObject_API->flags_from_gtype)
+#define pyg_enable_threads          (_PyGObject_API->enable_threads)
+#define pyg_gil_state_ensure        (_PyGObject_API->gil_state_ensure)
+#define pyg_gil_state_release       (_PyGObject_API->gil_state_release)
+#define pyg_register_class_init     (_PyGObject_API->register_class_init)
+#define pyg_register_interface_info (_PyGObject_API->register_interface_info)
+#define pygobject_construct         (_PyGObject_API->pygobject_construct)
+#define pygobject_constructv        (_PyGObject_API->pygobject_constructv)
+#define pyg_set_object_has_new_constructor (_PyGObject_API->set_object_has_new_constructor)
+#define pyg_add_warning_redirection   (_PyGObject_API->add_warning_redirection)
+#define pyg_disable_warning_redirections (_PyGObject_API->disable_warning_redirections)
+#define pyg_type_register_custom_callback (_PyGObject_API->type_register_custom)
+#define pyg_gerror_exception_check (_PyGObject_API->gerror_exception_check)
+#define pyg_option_group_new       (_PyGObject_API->option_group_new)
+
+#define pyg_block_threads()   G_STMT_START {   \
+    if (_PyGObject_API->block_threads != NULL) \
+      (* _PyGObject_API->block_threads)();     \
+  } G_STMT_END
+#define pyg_unblock_threads() G_STMT_START {     \
+    if (_PyGObject_API->unblock_threads != NULL) \
+      (* _PyGObject_API->unblock_threads)();     \
+  } G_STMT_END
+
+#define pyg_threads_enabled (_PyGObject_API->threads_enabled)
+
+#define pyg_begin_allow_threads                 \
+    G_STMT_START {                              \
+        PyThreadState *_save = NULL;            \
+        if (_PyGObject_API->threads_enabled)    \
+            _save = PyEval_SaveThread();
+#define pyg_end_allow_threads                   \
+        if (_PyGObject_API->threads_enabled)    \
+            PyEval_RestoreThread(_save);        \
+    } G_STMT_END
+
+
+/**
+ * pygobject_init:
+ * @req_major: minimum version major number, or -1
+ * @req_minor: minimum version minor number, or -1
+ * @req_micro: minimum version micro number, or -1
+ * 
+ * Imports and initializes the 'gobject' python module.  Can
+ * optionally check for a required minimum version if @req_major,
+ * @req_minor, and @req_micro are all different from -1.
+ * 
+ * Returns: a new reference to the gobject module on success, NULL in
+ * case of failure (and raises ImportError).
+ **/
+static inline PyObject *
+pygobject_init(int req_major, int req_minor, int req_micro)
+{
+    PyObject *gobject, *cobject;
+    
+    gobject = PyImport_ImportModule("gobject");
+    if (!gobject) {
+        if (PyErr_Occurred())
+        {
+            PyObject *type, *value, *traceback;
+            PyObject *py_orig_exc;
+            PyErr_Fetch(&type, &value, &traceback);
+            py_orig_exc = PyObject_Repr(value);
+            Py_XDECREF(type);
+            Py_XDECREF(value);
+            Py_XDECREF(traceback);
+
+
+#if PY_VERSION_HEX < 0x03000000
+            PyErr_Format(PyExc_ImportError,
+                         "could not import gobject (error was: %s)",
+                         PyString_AsString(py_orig_exc));
+#else
+            {
+                /* Can not use PyErr_Format because it doesn't have
+                 * a format string for dealing with PyUnicode objects
+                 * like PyUnicode_FromFormat has
+                 */
+                PyObject *errmsg = PyUnicode_FromFormat("could not import gobject (error was: %U)",
+                                                        py_orig_exc);
+
+                if (errmsg) {
+                   PyErr_SetObject(PyExc_ImportError,
+                                   errmsg);
+                   Py_DECREF(errmsg);
+                }
+                /* if errmsg is NULL then we might have OOM
+                 * PyErr should already be set and trying to
+                 * return our own error would be futile
+                 */
+            }
+#endif
+            Py_DECREF(py_orig_exc);
+        } else {
+            PyErr_SetString(PyExc_ImportError,
+                            "could not import gobject (no error given)");
+        }
+        return NULL;
+    }
+
+    cobject = PyObject_GetAttrString(gobject, "_PyGObject_API");
+#if PY_VERSION_HEX >= 0x03000000
+    if (cobject && PyCapsule_CheckExact(cobject))
+        _PyGObject_API = (struct _PyGObject_Functions *) PyCapsule_GetPointer(cobject, "gobject._PyGObject_API");
+
+#else
+    if (cobject && PyCObject_Check(cobject))
+        _PyGObject_API = (struct _PyGObject_Functions *) PyCObject_AsVoidPtr(cobject);
+#endif
+    else {
+        PyErr_SetString(PyExc_ImportError,
+                        "could not import gobject (could not find _PyGObject_API object)");
+        Py_DECREF(gobject);
+        return NULL;
+    }
+
+    if (req_major != -1)
+    {
+        int found_major, found_minor, found_micro;
+        PyObject *version;
+
+        version = PyObject_GetAttrString(gobject, "pygobject_version");
+        if (!version)
+            version = PyObject_GetAttrString(gobject, "pygtk_version");
+        if (!version) {
+            PyErr_SetString(PyExc_ImportError,
+                            "could not import gobject (version too old)");
+            Py_DECREF(gobject);
+            return NULL;
+        }
+        if (!PyArg_ParseTuple(version, "iii",
+                              &found_major, &found_minor, &found_micro)) {
+            PyErr_SetString(PyExc_ImportError,
+                            "could not import gobject (version has invalid format)");
+            Py_DECREF(version);
+            Py_DECREF(gobject);
+            return NULL;
+        }
+        Py_DECREF(version);
+        if (req_major != found_major ||
+            req_minor >  found_minor ||
+            (req_minor == found_minor && req_micro > found_micro)) {
+            PyErr_Format(PyExc_ImportError,
+                         "could not import gobject (version mismatch, %d.%d.%d is required, "
+                         "found %d.%d.%d)", req_major, req_minor, req_micro,
+                         found_major, found_minor, found_micro);
+            Py_DECREF(gobject);
+            return NULL;
+        }
+    }
+    return gobject;
+}
+
+/* deprecated macro, use pygobject_init() instead. */
+#define init_pygobject() G_STMT_START {         \
+    if (!pygobject_init(-1, -1, -1))            \
+        return;                                 \
+} G_STMT_END
+
+/* deprecated macro, use pygobject_init() instead. */
+#define init_pygobject_check(req_major, req_minor, req_micro) G_STMT_START {    \
+    if (!pygobject_init(req_major, req_minor, req_micro))                       \
+        return;                                                                 \
+} G_STMT_END
+
+/**
+ * PYLIST_FROMGLIBLIST:
+ * @type: the type of the GLib list e.g. #GList or #GSList
+ * @prefix: the prefix of functions that manipulate a list of the type
+ * given by type.
+ *
+ * A macro that creates a type specific code block which converts a GLib
+ * list (#GSList or #GList) to a Python list. The first two args of the macro
+ * are used to specify the type and list function prefix so that the type
+ * specific macros can be generated.
+ *
+ * The rest of the args are for the standard args for the type specific
+ * macro(s) created from this macro.
+ */
+ #define PYLIST_FROMGLIBLIST(type,prefix,py_list,list,item_convert_func,\
+                            list_free,list_item_free)  \
+G_STMT_START \
+{ \
+    gint i, len; \
+    PyObject *item; \
+    void (*glib_list_free)(type*) = list_free; \
+    GFunc glib_list_item_free = (GFunc)list_item_free;  \
+ \
+    len = prefix##_length(list); \
+    py_list = PyList_New(len); \
+    for (i = 0; i < len; i++) { \
+        gpointer list_item = prefix##_nth_data(list, i); \
+ \
+        item = item_convert_func; \
+        PyList_SetItem(py_list, i, item); \
+    } \
+    if (glib_list_item_free != NULL) \
+        prefix##_foreach(list, glib_list_item_free, NULL); \
+    if (glib_list_free != NULL) \
+        glib_list_free(list); \
+} G_STMT_END
+
+/**
+ * PYLIST_FROMGLIST:
+ * @py_list: the name of the Python list
+ *
+ * @list: the #GList to be converted to a Python list
+ *
+ * @item_convert_func: the function that converts a list item to a Python
+ * object. The function must refer to the list item using "@list_item" and
+ * must return a #PyObject* object. An example conversion function is:
+ * [[
+ * PyString_FromString(list_item)
+ * ]]
+ * A more elaborate function is:
+ * [[
+ * pyg_boxed_new(GTK_TYPE_RECENT_INFO, list_item, TRUE, TRUE)
+ * ]]
+ * @list_free: the name of a function that takes a single arg (the list) and
+ * frees its memory. Can be NULL if the list should not be freed. An example
+ * is:
+ * [[
+ * g_list_free
+ * ]]
+ * @list_item_free: the name of a #GFunc function that frees the memory used
+ * by the items in the list or %NULL if the list items do not have to be
+ * freed. A simple example is:
+ * [[
+ * g_free
+ * ]]
+ *
+ * A macro that adds code that converts a #GList to a Python list.
+ *
+ */
+#define PYLIST_FROMGLIST(py_list,list,item_convert_func,list_free,\
+                         list_item_free) \
+        PYLIST_FROMGLIBLIST(GList,g_list,py_list,list,item_convert_func,\
+                            list_free,list_item_free)
+
+/**
+ * PYLIST_FROMGSLIST:
+ * @py_list: the name of the Python list
+ *
+ * @list: the #GSList to be converted to a Python list
+ *
+ * @item_convert_func: the function that converts a list item to a Python
+ * object. The function must refer to the list item using "@list_item" and
+ * must return a #PyObject* object. An example conversion function is:
+ * [[
+ * PyString_FromString(list_item)
+ * ]]
+ * A more elaborate function is:
+ * [[
+ * pyg_boxed_new(GTK_TYPE_RECENT_INFO, list_item, TRUE, TRUE)
+ * ]]
+ * @list_free: the name of a function that takes a single arg (the list) and
+ * frees its memory. Can be %NULL if the list should not be freed. An example
+ * is:
+ * [[
+ * g_list_free
+ * ]]
+ * @list_item_free: the name of a #GFunc function that frees the memory used
+ * by the items in the list or %NULL if the list items do not have to be
+ * freed. A simple example is:
+ * [[
+ * g_free
+ * ]]
+ *
+ * A macro that adds code that converts a #GSList to a Python list.
+ *
+ */
+#define PYLIST_FROMGSLIST(py_list,list,item_convert_func,list_free,\
+                          list_item_free) \
+        PYLIST_FROMGLIBLIST(GSList,g_slist,py_list,list,item_convert_func,\
+                            list_free,list_item_free)
+
+/**
+ * PYLIST_ASGLIBLIST
+ * @type: the type of the GLib list e.g. GList or GSList
+ * @prefix: the prefix of functions that manipulate a list of the type
+ * given by type e.g. g_list or g_slist
+ *
+ * A macro that creates a type specific code block to be used to convert a
+ * Python list to a GLib list (GList or GSList). The first two args of the
+ * macro are used to specify the type and list function prefix so that the
+ * type specific macros can be generated.
+ *
+ * The rest of the args are for the standard args for the type specific
+ * macro(s) created from this macro.
+ */
+#define PYLIST_ASGLIBLIST(type,prefix,py_list,list,check_func,\
+                           convert_func,child_free_func,errormsg,errorreturn) \
+G_STMT_START \
+{ \
+    Py_ssize_t i, n_list; \
+    GFunc glib_child_free_func = (GFunc)child_free_func;        \
+ \
+    if (!(py_list = PySequence_Fast(py_list, ""))) { \
+        errormsg; \
+        return errorreturn; \
+    } \
+    n_list = PySequence_Fast_GET_SIZE(py_list); \
+    for (i = 0; i < n_list; i++) { \
+        PyObject *py_item = PySequence_Fast_GET_ITEM(py_list, i); \
+ \
+        if (!check_func) { \
+            if (glib_child_free_func) \
+                    prefix##_foreach(list, glib_child_free_func, NULL); \
+            prefix##_free(list); \
+            Py_DECREF(py_list); \
+            errormsg; \
+            return errorreturn; \
+        } \
+        list = prefix##_prepend(list, convert_func); \
+    }; \
+        Py_DECREF(py_list); \
+        list =  prefix##_reverse(list); \
+} \
+G_STMT_END
+/**
+ * PYLIST_ASGLIST
+ * @py_list: the Python list to be converted
+ * @list: the #GList list to be converted
+ * @check_func: the expression that takes a #PyObject* arg (must be named
+ * @py_item) and returns an int value indicating if the Python object matches
+ * the required list item type (0 - %False or 1 - %True). An example is:
+ * [[
+ * (PyString_Check(py_item)||PyUnicode_Check(py_item))
+ * ]]
+ * @convert_func: the function that takes a #PyObject* arg (must be named
+ * py_item) and returns a pointer to the converted list object. An example
+ * is:
+ * [[
+ * pygobject_get(py_item)
+ * ]]
+ * @child_free_func: the name of a #GFunc function that frees a GLib list
+ * item or %NULL if the list item does not have to be freed. This function is
+ * used to help free the items in a partially created list if there is an
+ * error. An example is:
+ * [[
+ * g_free
+ * ]]
+ * @errormsg: a function that sets up a Python error message. An example is:
+ * [[
+ * PyErr_SetString(PyExc_TypeError, "strings must be a sequence of" "strings
+ * or unicode objects")
+ * ]]
+ * @errorreturn: the value to return if an error occurs, e.g.:
+ * [[
+ * %NULL
+ * ]]
+ *
+ * A macro that creates code that converts a Python list to a #GList. The
+ * returned list must be freed using the appropriate list free function when
+ * it's no longer needed. If an error occurs the child_free_func is used to
+ * release the memory used by the list items and then the list memory is
+ * freed.
+ */
+#define PYLIST_ASGLIST(py_list,list,check_func,convert_func,child_free_func,\
+                       errormsg,errorreturn) \
+        PYLIST_ASGLIBLIST(GList,g_list,py_list,list,check_func,convert_func,\
+                          child_free_func,errormsg,errorreturn)
+
+/**
+ * PYLIST_ASGSLIST
+ * @py_list: the Python list to be converted
+ * @list: the #GSList list to be converted
+ * @check_func: the expression that takes a #PyObject* arg (must be named
+ * @py_item) and returns an int value indicating if the Python object matches
+ * the required list item type (0 - %False or 1 - %True). An example is:
+ * [[
+ * (PyString_Check(py_item)||PyUnicode_Check(py_item))
+ * ]]
+ * @convert_func: the function that takes a #PyObject* arg (must be named
+ * py_item) and returns a pointer to the converted list object. An example
+ * is:
+ * [[
+ * pygobject_get(py_item)
+ * ]]
+ * @child_free_func: the name of a #GFunc function that frees a GLib list
+ * item or %NULL if the list item does not have to be freed. This function is
+ * used to help free the items in a partially created list if there is an
+ * error. An example is:
+ * [[
+ * g_free
+ * ]]
+ * @errormsg: a function that sets up a Python error message. An example is:
+ * [[
+ * PyErr_SetString(PyExc_TypeError, "strings must be a sequence of" "strings
+ * or unicode objects")
+ * ]]
+ * @errorreturn: the value to return if an error occurs, e.g.:
+ * [[
+ * %NULL
+ * ]]
+ *
+ * A macro that creates code that converts a Python list to a #GSList. The
+ * returned list must be freed using the appropriate list free function when
+ * it's no longer needed. If an error occurs the child_free_func is used to
+ * release the memory used by the list items and then the list memory is
+ * freed.
+ */
+#define PYLIST_ASGSLIST(py_list,list,check_func,convert_func,child_free_func,\
+                        errormsg,errorreturn) \
+        PYLIST_ASGLIBLIST(GSList,g_slist,py_list,list,check_func,convert_func,\
+                          child_free_func,errormsg,errorreturn)
+
+#endif /* !_INSIDE_PYGOBJECT_ */
+
+G_END_DECLS
+
+#endif /* !_PYGOBJECT_H_ */
diff --git a/gobject/pygparamspec.c b/gobject/pygparamspec.c
new file mode 100644 (file)
index 0000000..7743629
--- /dev/null
@@ -0,0 +1,404 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ * Copyright (C) 2004       Johan Dahlin
+ *
+ *   pygenum.c: GEnum and GFlag wrappers
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <pyglib.h>
+
+#include "pygobject-private.h"
+#include "pygparamspec.h"
+
+PYGLIB_DEFINE_TYPE("gobject.GParamSpec", PyGParamSpec_Type, PyGParamSpec);
+
+static PyObject*
+pyg_param_spec_richcompare(PyObject *self, PyObject *other, int op)
+{
+    if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGParamSpec_Type)
+        return _pyglib_generic_ptr_richcompare(((PyGParamSpec*)self)->pspec,
+                                               ((PyGParamSpec*)other)->pspec,
+                                               op);
+    else {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+}
+
+static long
+pyg_param_spec_hash(PyGParamSpec *self)
+{
+    return (long)self->pspec;
+}
+
+static PyObject *
+pyg_param_spec_repr(PyGParamSpec *self)
+{
+    char buf[80];
+
+    g_snprintf(buf, sizeof(buf), "<%s '%s'>",
+              G_PARAM_SPEC_TYPE_NAME(self->pspec),
+              g_param_spec_get_name(self->pspec));
+    return PYGLIB_PyUnicode_FromString(buf);
+}
+
+static void
+pyg_param_spec_dealloc(PyGParamSpec *self)
+{
+    g_param_spec_unref(self->pspec);
+    PyObject_DEL(self);
+}
+
+
+static PyObject *
+pygenum_from_pspec(GParamSpec *pspec)
+{
+    PyObject *pyclass;
+    GParamSpecEnum *enum_pspec;
+    GType enum_type;
+    
+    enum_pspec = G_PARAM_SPEC_ENUM(pspec);
+    enum_type = G_ENUM_CLASS_TYPE(enum_pspec->enum_class);
+    pyclass = (PyObject*)g_type_get_qdata(enum_type, pygenum_class_key);
+    if (pyclass == NULL) {
+       pyclass = pyg_enum_add(NULL, g_type_name(enum_type), NULL, enum_type);
+       if (pyclass == NULL)
+           pyclass = Py_None;
+    }
+    
+    Py_INCREF(pyclass);
+    return pyclass;
+}
+
+static PyObject *
+pygflags_from_pspec(GParamSpec *pspec)
+{
+    PyObject *pyclass;
+    GParamSpecFlags *flag_pspec;
+    GType flag_type;
+
+    flag_pspec = G_PARAM_SPEC_FLAGS(pspec);
+    flag_type = G_FLAGS_CLASS_TYPE(flag_pspec->flags_class);
+    pyclass = (PyObject*)g_type_get_qdata(flag_type, pygflags_class_key);
+    if (pyclass == NULL) {
+       pyclass = pyg_flags_add(NULL, g_type_name(flag_type), NULL, flag_type);
+       if (pyclass == NULL)
+           pyclass = Py_None;
+    }
+    Py_INCREF(pyclass);
+    return pyclass;
+}    
+
+static PyObject *
+pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr)
+{
+    GParamSpec *pspec;
+
+    pspec = self->pspec;
+    
+    /* common attributes */
+    if (!strcmp(attr, "__gtype__")) {
+       return pyg_type_wrapper_new(G_PARAM_SPEC_TYPE(pspec));
+    } else if (!strcmp(attr, "name")) {
+       return Py_BuildValue("s", g_param_spec_get_name(pspec));
+    } else if (!strcmp(attr, "nick")) {
+       return Py_BuildValue("s", g_param_spec_get_nick(pspec));
+    } else if (!strcmp(attr, "blurb") || !strcmp(attr, "__doc__")) {
+       return Py_BuildValue("s", g_param_spec_get_blurb(pspec));
+    } else if (!strcmp(attr, "flags")) {
+       return PYGLIB_PyLong_FromLong(pspec->flags);
+    } else if (!strcmp(attr, "value_type")) {
+       return pyg_type_wrapper_new(pspec->value_type);
+    } else if (!strcmp(attr, "owner_type")) {
+       return pyg_type_wrapper_new(pspec->owner_type);
+    }
+
+    if (G_IS_PARAM_SPEC_CHAR(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+                                "blurb", "default_value", "flags",
+                                "maximum", "minimum", "name", "nick",
+                                "owner_type", "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return PYGLIB_PyUnicode_FromFormat(
+               "%c", G_PARAM_SPEC_CHAR(pspec)->default_value);
+       } else if (!strcmp(attr, "minimum")) {
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_CHAR(pspec)->minimum);
+       } else if (!strcmp(attr, "maximum")) {
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_CHAR(pspec)->maximum);
+       }
+    } else if (G_IS_PARAM_SPEC_UCHAR(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+                                "blurb", "default_value",
+                                "flags", "maximum", "minimum", 
+                                "name", "nick", "owner_type",
+                                "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return PYGLIB_PyUnicode_FromFormat(
+               "%c", G_PARAM_SPEC_UCHAR(pspec)->default_value);
+       } else if (!strcmp(attr, "minimum")) {
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_UCHAR(pspec)->minimum);
+       } else if (!strcmp(attr, "maximum")) {
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_UCHAR(pspec)->maximum);
+       }
+    } else if (G_IS_PARAM_SPEC_BOOLEAN(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[sssssssss]", "__doc__", "__gtype__",
+                                "blurb", "default_value",
+                                "flags", "name", "nick", "owner_type",
+                                "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return PyBool_FromLong(G_PARAM_SPEC_BOOLEAN(pspec)->default_value);
+       }
+    } else if (G_IS_PARAM_SPEC_INT(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+                                "blurb", "default_value",
+                                "flags", "maximum", "minimum", "name",
+                                "nick", "owner_type", "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->default_value);
+       } else if (!strcmp(attr, "minimum")) {
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->minimum);
+       } else if (!strcmp(attr, "maximum")) {
+           return PYGLIB_PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->maximum);
+       }
+    } else if (G_IS_PARAM_SPEC_UINT(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+                                "blurb", "default_value",
+                                "flags", "maximum", "minimum",
+                                "name", "nick", "owner_type",
+                                "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return PyLong_FromUnsignedLong(G_PARAM_SPEC_UINT(pspec)->default_value);
+       } else if (!strcmp(attr, "minimum")) {
+           return PyLong_FromUnsignedLong(G_PARAM_SPEC_UINT(pspec)->minimum);
+       } else if (!strcmp(attr, "maximum")) {
+           return PyLong_FromUnsignedLong(G_PARAM_SPEC_UINT(pspec)->maximum);
+       }
+    } else if (G_IS_PARAM_SPEC_LONG(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+                                "blurb", "default_value",
+                                "flags", "maximum", "minimum", "name",
+                                "nick", "owner_type", "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return PyLong_FromLong(G_PARAM_SPEC_LONG(pspec)->default_value);
+       } else if (!strcmp(attr, "minimum")) {
+           return PyLong_FromLong(G_PARAM_SPEC_LONG(pspec)->minimum);
+       } else if (!strcmp(attr, "maximum")) {
+           return PyLong_FromLong(G_PARAM_SPEC_LONG(pspec)->maximum);
+       }
+    } else if (G_IS_PARAM_SPEC_ULONG(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+                                "blurb", "default_value",
+                                "flags", "maximum", "minimum", "name",
+                                "nick", "owner_type", "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return PyLong_FromUnsignedLong(G_PARAM_SPEC_ULONG(pspec)->default_value);
+       } else if (!strcmp(attr, "minimum")) {
+           return PyLong_FromUnsignedLong(G_PARAM_SPEC_ULONG(pspec)->minimum);
+       } else if (!strcmp(attr, "maximum")) {
+           return PyLong_FromUnsignedLong(G_PARAM_SPEC_ULONG(pspec)->maximum);
+       }
+    } else if (G_IS_PARAM_SPEC_INT64(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+                                "blurb", "default_value",
+                                "flags", "maximum", "minimum", "name",
+                                "nick", "owner_type", "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return PyLong_FromLongLong(G_PARAM_SPEC_INT64(pspec)->default_value);
+       } else if (!strcmp(attr, "minimum")) {
+           return PyLong_FromLongLong(G_PARAM_SPEC_INT64(pspec)->minimum);
+       } else if (!strcmp(attr, "maximum")) {
+           return PyLong_FromLongLong(G_PARAM_SPEC_INT64(pspec)->maximum);
+       }
+    } else if (G_IS_PARAM_SPEC_UINT64(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[sssssssssss]", "__doc__", "__gtype__",
+                                "blurb", "default_value",
+                                "flags", "maximum", "minimum",
+                                "name", "nick", "owner_type",
+                                "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return PyLong_FromUnsignedLongLong(G_PARAM_SPEC_UINT64(pspec)->default_value);
+       } else if (!strcmp(attr, "minimum")) {
+           return PyLong_FromUnsignedLongLong(G_PARAM_SPEC_UINT64(pspec)->minimum);
+       } else if (!strcmp(attr, "maximum")) {
+           return PyLong_FromUnsignedLongLong(G_PARAM_SPEC_UINT64(pspec)->maximum);
+       }
+    } else if (G_IS_PARAM_SPEC_UNICHAR(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[sssssssss]", "__doc__", "__gtype__",
+                                "blurb", "default_value",
+                                "flags", "name", "nick", "owner_type",
+                                "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return PYGLIB_PyUnicode_FromFormat(
+               "%c", G_PARAM_SPEC_UNICHAR(pspec)->default_value);
+       }
+    } else if (G_IS_PARAM_SPEC_ENUM(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[ssssssssss]", "__doc__", "__gtype__",
+                                "blurb", "default_value", "enum_class",
+                                "flags", "name", "nick", "owner_type",
+                                "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return pyg_enum_from_gtype(
+               pspec->value_type, G_PARAM_SPEC_ENUM(pspec)->default_value);
+       } else if (!strcmp(attr, "enum_class")) {
+           return pygenum_from_pspec(pspec);
+       }
+    } else if (G_IS_PARAM_SPEC_FLAGS(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[ssssssssss]", "__doc__", "__gtype__",
+                                "blurb", "default_value",
+                                "flags", "flags_class", "name", "nick",
+                                "owner_type", "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return pyg_flags_from_gtype(
+               pspec->value_type, G_PARAM_SPEC_FLAGS(pspec)->default_value);
+       } else if (!strcmp(attr, "flags_class")) {
+           return pygflags_from_pspec(pspec);
+       }
+    } else if (G_IS_PARAM_SPEC_FLOAT(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[ssssssssssss]", "__doc__", "__gtype__",
+                                "blurb", "epsilon",
+                                "flags", "maximum", "minimum", "name", "nick", "owner_type",
+                                "value_type", 
+                                "default_value");
+       } else if (!strcmp(attr, "default_value")) {
+           return PyFloat_FromDouble(G_PARAM_SPEC_FLOAT(pspec)->default_value);
+       } else if (!strcmp(attr, "minimum")) {
+           return PyFloat_FromDouble(G_PARAM_SPEC_FLOAT(pspec)->minimum);
+       } else if (!strcmp(attr, "maximum")) {
+           return PyFloat_FromDouble(G_PARAM_SPEC_FLOAT(pspec)->maximum);
+       } else if (!strcmp(attr, "epsilon")) {
+           return PyFloat_FromDouble(G_PARAM_SPEC_FLOAT(pspec)->epsilon);
+       }
+    } else if (G_IS_PARAM_SPEC_DOUBLE(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[ssssssssssss]", "__doc__", "__gtype__",
+                                "blurb", "default_value", "epsilon",
+                                "flags", "maximum", "minimum", "name", "nick",
+                                "owner_type", "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return PyFloat_FromDouble(
+               G_PARAM_SPEC_DOUBLE(pspec)->default_value);
+       } else if (!strcmp(attr, "minimum")) {
+           return PyFloat_FromDouble(G_PARAM_SPEC_DOUBLE(pspec)->minimum);
+       } else if (!strcmp(attr, "maximum")) {
+           return PyFloat_FromDouble(G_PARAM_SPEC_DOUBLE(pspec)->maximum);
+       } else if (!strcmp(attr, "epsilon")) {
+           return PyFloat_FromDouble(G_PARAM_SPEC_DOUBLE(pspec)->epsilon);
+       }
+    } else if (G_IS_PARAM_SPEC_STRING(pspec)) {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[ssssssssssssss]", "__doc__", "__gtype__",
+                                "blurb", "cset_firth", "cset_nth", "default_value",
+                                "ensure_non_null", "flags", "name", "nick",
+                                "null_fold_if_empty", "owner_type", "substitutor",
+                                "value_type");
+       } else if (!strcmp(attr, "default_value")) {
+           return Py_BuildValue(
+               "s", G_PARAM_SPEC_STRING(pspec)->default_value);
+       } else if (!strcmp(attr, "cset_first")) {
+           return Py_BuildValue(
+               "s", G_PARAM_SPEC_STRING(pspec)->cset_first);
+       } else if (!strcmp(attr, "cset_nth")) {
+           return Py_BuildValue(
+               "s", G_PARAM_SPEC_STRING(pspec)->cset_nth);
+       } else if (!strcmp(attr, "substitutor")) {
+           return Py_BuildValue(
+               "c", G_PARAM_SPEC_STRING(pspec)->substitutor);
+       } else if (!strcmp(attr, "null_fold_if_empty")) {
+           return PyBool_FromLong(
+               G_PARAM_SPEC_STRING(pspec)->null_fold_if_empty);
+       } else if (!strcmp(attr, "ensure_non_null")) {
+           return PyBool_FromLong(
+               G_PARAM_SPEC_STRING(pspec)->ensure_non_null);
+       }
+    } else {
+       if (!strcmp(attr, "__members__")) {
+           return Py_BuildValue("[ssssssss]", "__doc__", "__gtype__", "blurb",
+                                "flags", "name", "nick",
+                                "owner_type", "value_type");
+           
+       /* This is actually not what's exported by GObjects paramspecs,
+        * But we exported this in earlier versions, so it's better to keep it here
+        * compatibility. But don't add it in __members__, to "hide" it.
+        */
+       } else if (!strcmp(attr, "default_value")) {
+           /* XXX: Raise deprecation warning */
+           Py_INCREF(Py_None);
+           return Py_None;
+       }
+    }
+
+    PyErr_SetString(PyExc_AttributeError, attr);
+    return NULL;
+}
+
+/**
+ * pyg_param_spec_new:
+ * @pspec: a GParamSpec.
+ *
+ * Creates a wrapper for a GParamSpec.
+ *
+ * Returns: the GParamSpec wrapper.
+ */
+PyObject *
+pyg_param_spec_new(GParamSpec *pspec)
+{
+    PyGParamSpec *self;
+
+    self = (PyGParamSpec *)PyObject_NEW(PyGParamSpec,
+                                       &PyGParamSpec_Type);
+    if (self == NULL)
+       return NULL;
+
+    self->pspec = g_param_spec_ref(pspec);
+    return (PyObject *)self;
+}
+
+void
+pygobject_paramspec_register_types(PyObject *d)
+{
+    Py_TYPE(&PyGParamSpec_Type) = &PyType_Type;
+    PyGParamSpec_Type.tp_dealloc = (destructor)pyg_param_spec_dealloc;
+    PyGParamSpec_Type.tp_getattr = (getattrfunc)pyg_param_spec_getattr;
+    PyGParamSpec_Type.tp_richcompare = pyg_param_spec_richcompare;
+    PyGParamSpec_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+    PyGParamSpec_Type.tp_repr = (reprfunc)pyg_param_spec_repr;
+    PyGParamSpec_Type.tp_hash = (hashfunc)pyg_param_spec_hash;
+
+
+    if (PyType_Ready(&PyGParamSpec_Type))
+       return;
+    PyDict_SetItemString(d, "GParamSpec", (PyObject *)&PyGParamSpec_Type);
+}
diff --git a/gobject/pygparamspec.h b/gobject/pygparamspec.h
new file mode 100644 (file)
index 0000000..64aab0c
--- /dev/null
@@ -0,0 +1,31 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *   pyginterface.c: wrapper for the gobject 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_PARAMSPEC_H__ 
+#define __PYGOBJECT_PARAMSPEC_H__
+
+extern PyTypeObject PyGParamSpec_Type;
+PyObject * pyg_param_spec_new (GParamSpec *pspec);
+
+void pygobject_paramspec_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_PARAMSPEC_H__ */
diff --git a/gobject/pygpointer.c b/gobject/pygpointer.c
new file mode 100644 (file)
index 0000000..575c751
--- /dev/null
@@ -0,0 +1,198 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *
+ *   pygpointer.c: wrapper for GPointer
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <pyglib.h>
+#include "pygobject-private.h"
+#include "pygpointer.h"
+
+#include "pygi.h"
+
+
+GQuark pygpointer_class_key;
+
+PYGLIB_DEFINE_TYPE("gobject.GPointer", PyGPointer_Type, PyGPointer);
+
+static void
+pyg_pointer_dealloc(PyGPointer *self)
+{
+    Py_TYPE(self)->tp_free((PyObject *)self);
+}
+
+static PyObject*
+pyg_pointer_richcompare(PyObject *self, PyObject *other, int op)
+{
+    if (Py_TYPE(self) == Py_TYPE(other))
+        return _pyglib_generic_ptr_richcompare(((PyGPointer*)self)->pointer,
+                                               ((PyGPointer*)other)->pointer,
+                                               op);
+    else {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+}
+
+static long
+pyg_pointer_hash(PyGPointer *self)
+{
+    return (long)self->pointer;
+}
+
+static PyObject *
+pyg_pointer_repr(PyGPointer *self)
+{
+    gchar buf[128];
+
+    g_snprintf(buf, sizeof(buf), "<%s at 0x%lx>", g_type_name(self->gtype),
+              (long)self->pointer);
+    return PYGLIB_PyUnicode_FromString(buf);
+}
+
+static int
+pyg_pointer_init(PyGPointer *self, PyObject *args, PyObject *kwargs)
+{
+    gchar buf[512];
+
+    if (!PyArg_ParseTuple(args, ":GPointer.__init__"))
+       return -1;
+
+    self->pointer = NULL;
+    self->gtype = 0;
+
+    g_snprintf(buf, sizeof(buf), "%s can not be constructed",
+              Py_TYPE(self)->tp_name);
+    PyErr_SetString(PyExc_NotImplementedError, buf);
+    return -1;
+}
+
+static void
+pyg_pointer_free(PyObject *op)
+{
+  PyObject_FREE(op);
+}
+
+/**
+ * pyg_register_pointer:
+ * @dict: the module dictionary to store the wrapper class.
+ * @class_name: the Python name for the wrapper class.
+ * @pointer_type: the GType of the pointer type being wrapped.
+ * @type: the wrapper class.
+ *
+ * Registers a wrapper for a pointer type.  The wrapper class will be
+ * a subclass of gobject.GPointer, and a reference to the wrapper
+ * class will be stored in the provided module dictionary.
+ */
+void
+pyg_register_pointer(PyObject *dict, const gchar *class_name,
+                    GType pointer_type, PyTypeObject *type)
+{
+    PyObject *o;
+
+    g_return_if_fail(dict != NULL);
+    g_return_if_fail(class_name != NULL);
+    g_return_if_fail(pointer_type != 0);
+
+    if (!type->tp_dealloc) type->tp_dealloc = (destructor)pyg_pointer_dealloc;
+
+    Py_TYPE(type) = &PyType_Type;
+    type->tp_base = &PyGPointer_Type;
+
+    if (PyType_Ready(type) < 0) {
+       g_warning("could not get type `%s' ready", type->tp_name);
+       return;
+    }
+
+    PyDict_SetItemString(type->tp_dict, "__gtype__",
+                        o=pyg_type_wrapper_new(pointer_type));
+    Py_DECREF(o);
+
+    g_type_set_qdata(pointer_type, pygpointer_class_key, type);
+
+    PyDict_SetItemString(dict, (char *)class_name, (PyObject *)type);
+}
+
+/**
+ * pyg_pointer_new:
+ * @pointer_type: the GType of the pointer value.
+ * @pointer: the pointer value.
+ *
+ * Creates a wrapper for a pointer value.  Since G_TYPE_POINTER types
+ * don't register any information about how to copy/free them, there
+ * is no guarantee that the pointer will remain valid, and there is
+ * nothing registered to release the pointer when the pointer goes out
+ * of scope.  This is why we don't recommend people use these types.
+ *
+ * Returns: the boxed wrapper.
+ */
+PyObject *
+pyg_pointer_new(GType pointer_type, gpointer pointer)
+{
+    PyGILState_STATE state;
+    PyGPointer *self;
+    PyTypeObject *tp;
+    g_return_val_if_fail(pointer_type != 0, NULL);
+
+    state = pyglib_gil_state_ensure();
+
+    if (!pointer) {
+       Py_INCREF(Py_None);
+       pyglib_gil_state_release(state);
+       return Py_None;
+    }
+
+    tp = g_type_get_qdata(pointer_type, pygpointer_class_key);
+
+    if (!tp)
+        tp = (PyTypeObject *)pygi_type_import_by_g_type(pointer_type);
+
+    if (!tp)
+       tp = (PyTypeObject *)&PyGPointer_Type; /* fallback */
+    self = PyObject_NEW(PyGPointer, tp);
+
+    pyglib_gil_state_release(state);
+
+    if (self == NULL)
+       return NULL;
+
+    self->pointer = pointer;
+    self->gtype = pointer_type;
+
+    return (PyObject *)self;
+}
+
+void
+pygobject_pointer_register_types(PyObject *d)
+{
+    pygpointer_class_key     = g_quark_from_static_string("PyGPointer::class");
+
+    PyGPointer_Type.tp_dealloc = (destructor)pyg_pointer_dealloc;
+    PyGPointer_Type.tp_richcompare = pyg_pointer_richcompare;
+    PyGPointer_Type.tp_repr = (reprfunc)pyg_pointer_repr;
+    PyGPointer_Type.tp_hash = (hashfunc)pyg_pointer_hash;
+    PyGPointer_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
+    PyGPointer_Type.tp_init = (initproc)pyg_pointer_init;
+    PyGPointer_Type.tp_free = (freefunc)pyg_pointer_free;
+    PYGOBJECT_REGISTER_GTYPE(d, PyGPointer_Type, "GPointer", G_TYPE_POINTER); 
+}
diff --git a/gobject/pygpointer.h b/gobject/pygpointer.h
new file mode 100644 (file)
index 0000000..f2923da
--- /dev/null
@@ -0,0 +1,27 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_POINTER_H__ 
+#define __PYGOBJECT_POINTER_H__
+
+void pygobject_pointer_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_POINTER_H__ */
diff --git a/gobject/pygtype.c b/gobject/pygtype.c
new file mode 100644 (file)
index 0000000..5ee54aa
--- /dev/null
@@ -0,0 +1,1843 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *
+ *   pygtype.c: glue code to wrap the GType code.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <pyglib.h>
+
+#include "pygobject-private.h"
+#include "pygparamspec.h"
+#include "pygtype.h"
+
+/* -------------- __gtype__ objects ---------------------------- */
+
+typedef struct {
+    PyObject_HEAD
+    GType type;
+} PyGTypeWrapper;
+
+PYGLIB_DEFINE_TYPE("gobject.GType", PyGTypeWrapper_Type, PyGTypeWrapper);
+
+static PyObject*
+pyg_type_wrapper_richcompare(PyObject *self, PyObject *other, int op)
+{
+    if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGTypeWrapper_Type)
+        return _pyglib_generic_long_richcompare(((PyGTypeWrapper*)self)->type,
+                                                ((PyGTypeWrapper*)other)->type,
+                                                op);
+    else {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+}
+
+static long
+pyg_type_wrapper_hash(PyGTypeWrapper *self)
+{
+    return (long)self->type;
+}
+
+static PyObject *
+pyg_type_wrapper_repr(PyGTypeWrapper *self)
+{
+    char buf[80];
+    const gchar *name = g_type_name(self->type);
+
+    g_snprintf(buf, sizeof(buf), "<GType %s (%lu)>",
+              name?name:"invalid", (unsigned long int) self->type);
+    return PYGLIB_PyUnicode_FromString(buf);
+}
+
+static void
+pyg_type_wrapper_dealloc(PyGTypeWrapper *self)
+{
+    PyObject_DEL(self);
+}
+
+static GQuark
+_pyg_type_key(GType type) {
+    GQuark key;
+
+    if (g_type_is_a(type, G_TYPE_INTERFACE)) {
+        key = pyginterface_type_key;
+    } else if (g_type_is_a(type, G_TYPE_ENUM)) {
+        key = pygenum_class_key;
+    } else if (g_type_is_a(type, G_TYPE_FLAGS)) {
+        key = pygflags_class_key;
+    } else if (g_type_is_a(type, G_TYPE_POINTER)) {
+        key = pygpointer_class_key;
+    } else if (g_type_is_a(type, G_TYPE_BOXED)) {
+        key = pygboxed_type_key;
+    } else {
+        key = pygobject_class_key;
+    }
+
+    return key;
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_pytype(PyGTypeWrapper *self, void *closure)
+{
+    GQuark key;
+    PyObject *py_type;
+
+    key = _pyg_type_key(self->type);
+
+    py_type = g_type_get_qdata(self->type, key);
+    if (!py_type)
+      py_type = Py_None;
+
+    Py_INCREF(py_type);
+    return py_type;
+}
+
+static int
+_wrap_g_type_wrapper__set_pytype(PyGTypeWrapper *self, PyObject* value, void *closure)
+{
+    GQuark key;
+    PyObject *py_type;
+
+    key = _pyg_type_key(self->type);
+
+    py_type = g_type_get_qdata(self->type, key);
+    Py_CLEAR(py_type);
+    if (value == Py_None)
+       g_type_set_qdata(self->type, key, NULL);
+    else if (PyType_Check(value)) {
+       Py_INCREF(value);
+       g_type_set_qdata(self->type, key, value);
+    } else {
+       PyErr_SetString(PyExc_TypeError, "Value must be None or a type object");
+       return -1;
+    }
+
+    return 0;
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_name(PyGTypeWrapper *self, void *closure)
+{
+   const char *name = g_type_name(self->type);
+   return PYGLIB_PyUnicode_FromString(name ? name : "invalid");
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_parent(PyGTypeWrapper *self, void *closure)
+{
+   return pyg_type_wrapper_new(g_type_parent(self->type));
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_fundamental(PyGTypeWrapper *self, void *closure)
+{
+   return pyg_type_wrapper_new(g_type_fundamental(self->type));
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_children(PyGTypeWrapper *self, void *closure)
+{
+  guint n_children, i;
+  GType *children;
+  PyObject *retval;
+
+  children = g_type_children(self->type, &n_children);
+
+  retval = PyList_New(n_children);
+  for (i = 0; i < n_children; i++)
+      PyList_SetItem(retval, i, pyg_type_wrapper_new(children[i]));
+  g_free(children);
+
+  return retval;
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_interfaces(PyGTypeWrapper *self, void *closure)
+{
+  guint n_interfaces, i;
+  GType *interfaces;
+  PyObject *retval;
+
+  interfaces = g_type_interfaces(self->type, &n_interfaces);
+
+  retval = PyList_New(n_interfaces);
+  for (i = 0; i < n_interfaces; i++)
+      PyList_SetItem(retval, i, pyg_type_wrapper_new(interfaces[i]));
+  g_free(interfaces);
+
+  return retval;
+}
+
+static PyObject *
+_wrap_g_type_wrapper__get_depth(PyGTypeWrapper *self, void *closure)
+{
+  return PYGLIB_PyLong_FromLong(g_type_depth(self->type));
+}
+
+static PyGetSetDef _PyGTypeWrapper_getsets[] = {
+    { "pytype", (getter)_wrap_g_type_wrapper__get_pytype, (setter)_wrap_g_type_wrapper__set_pytype },
+    { "name",  (getter)_wrap_g_type_wrapper__get_name, (setter)0 },
+    { "fundamental",  (getter)_wrap_g_type_wrapper__get_fundamental, (setter)0 },
+    { "parent",  (getter)_wrap_g_type_wrapper__get_parent, (setter)0 },
+    { "children",  (getter)_wrap_g_type_wrapper__get_children, (setter)0 },
+    { "interfaces",  (getter)_wrap_g_type_wrapper__get_interfaces, (setter)0 },
+    { "depth",  (getter)_wrap_g_type_wrapper__get_depth, (setter)0 },
+    { NULL, (getter)0, (setter)0 }
+};
+
+static PyObject*
+_wrap_g_type_is_interface(PyGTypeWrapper *self)
+{
+    return PyBool_FromLong(G_TYPE_IS_INTERFACE(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_classed(PyGTypeWrapper *self)
+{
+    return PyBool_FromLong(G_TYPE_IS_CLASSED(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_instantiatable(PyGTypeWrapper *self)
+{
+    return PyBool_FromLong(G_TYPE_IS_INSTANTIATABLE(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_derivable(PyGTypeWrapper *self)
+{
+    return PyBool_FromLong(G_TYPE_IS_DERIVABLE(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_deep_derivable(PyGTypeWrapper *self)
+{
+    return PyBool_FromLong(G_TYPE_IS_DEEP_DERIVABLE(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_abstract(PyGTypeWrapper *self)
+{
+    return PyBool_FromLong(G_TYPE_IS_ABSTRACT(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_value_abstract(PyGTypeWrapper *self)
+{
+    return PyBool_FromLong(G_TYPE_IS_VALUE_ABSTRACT(self->type));
+}
+
+static PyObject*
+_wrap_g_type_is_value_type(PyGTypeWrapper *self)
+{
+    return PyBool_FromLong(G_TYPE_IS_VALUE_TYPE(self->type));
+}
+
+static PyObject*
+_wrap_g_type_has_value_table(PyGTypeWrapper *self)
+{
+    return PyBool_FromLong(G_TYPE_HAS_VALUE_TABLE(self->type));
+}
+
+static PyObject*
+_wrap_g_type_from_name(PyGTypeWrapper *_, PyObject *args)
+{
+    char *type_name;
+    GType type;
+
+    if (!PyArg_ParseTuple(args, "s:GType.from_name", &type_name))
+       return NULL;
+
+    type = _pyg_type_from_name(type_name);
+    if (type == 0) {
+       PyErr_SetString(PyExc_RuntimeError, "unknown type name");
+       return NULL;
+    }
+
+    return pyg_type_wrapper_new(type);
+}
+
+static PyObject*
+_wrap_g_type_is_a(PyGTypeWrapper *self, PyObject *args)
+{
+    PyObject *gparent;
+    GType parent;
+
+    if (!PyArg_ParseTuple(args, "O:GType.is_a", &gparent))
+       return NULL;
+    else if ((parent = pyg_type_from_object(gparent)) == 0)
+       return NULL;
+
+    return PyBool_FromLong(g_type_is_a(self->type, parent));
+}
+
+static PyMethodDef _PyGTypeWrapper_methods[] = {
+    { "is_interface", (PyCFunction)_wrap_g_type_is_interface, METH_NOARGS },
+    { "is_classed", (PyCFunction)_wrap_g_type_is_classed, METH_NOARGS },
+    { "is_instantiatable", (PyCFunction)_wrap_g_type_is_instantiatable, METH_NOARGS },
+    { "is_derivable", (PyCFunction)_wrap_g_type_is_derivable, METH_NOARGS },
+    { "is_deep_derivable", (PyCFunction)_wrap_g_type_is_deep_derivable, METH_NOARGS },
+    { "is_abstract", (PyCFunction)_wrap_g_type_is_abstract, METH_NOARGS },
+    { "is_value_abstract", (PyCFunction)_wrap_g_type_is_value_abstract, METH_NOARGS },
+    { "is_value_type", (PyCFunction)_wrap_g_type_is_value_type, METH_NOARGS },
+    { "has_value_table", (PyCFunction)_wrap_g_type_has_value_table, METH_NOARGS },
+    { "from_name", (PyCFunction)_wrap_g_type_from_name, METH_VARARGS | METH_STATIC },
+    { "is_a", (PyCFunction)_wrap_g_type_is_a, METH_VARARGS },
+    { NULL,  0, 0 }
+};
+
+static int
+pyg_type_wrapper_init(PyGTypeWrapper *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "object", NULL };
+    PyObject *py_object;
+    GType type;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                    "O:GType.__init__",
+                                    kwlist, &py_object))
+        return -1;
+
+    if (!(type = pyg_type_from_object(py_object)))
+       return -1;
+
+    self->type = type;
+
+    return 0;
+}
+
+/**
+ * pyg_type_wrapper_new:
+ * type: a GType
+ *
+ * Creates a Python wrapper for a GType.
+ *
+ * Returns: the Python wrapper.
+ */
+PyObject *
+pyg_type_wrapper_new(GType type)
+{
+    PyGTypeWrapper *self;
+
+    self = (PyGTypeWrapper *)PyObject_NEW(PyGTypeWrapper,
+                                         &PyGTypeWrapper_Type);
+    if (self == NULL)
+       return NULL;
+
+    self->type = type;
+    return (PyObject *)self;
+}
+
+/**
+ * pyg_type_from_object_strict:
+ * obj: a Python object
+ * strict: if set to TRUE, raises an exception if it can't perform the
+ *         conversion
+ *
+ * converts a python object to a GType.  If strict is set, raises an 
+ * exception if it can't perform the conversion, otherwise returns
+ * PY_TYPE_OBJECT.
+ *
+ * Returns: the corresponding GType, or 0 on error.
+ */
+
+GType
+pyg_type_from_object_strict(PyObject *obj, gboolean strict)
+{
+    PyObject *gtype;
+    GType type;
+
+    /* NULL check */
+    if (!obj) {
+       PyErr_SetString(PyExc_TypeError, "can't get type from NULL object");
+       return 0;
+    }
+
+    /* map some standard types to primitive GTypes ... */
+    if (obj == Py_None)
+       return G_TYPE_NONE;
+    if (PyType_Check(obj)) {
+       PyTypeObject *tp = (PyTypeObject *)obj;
+
+       if (tp == &PYGLIB_PyLong_Type)
+           return G_TYPE_INT;
+       else if (tp == &PyBool_Type)
+           return G_TYPE_BOOLEAN;
+       else if (tp == &PyLong_Type)
+           return G_TYPE_LONG;
+       else if (tp == &PyFloat_Type)
+           return G_TYPE_DOUBLE;
+       else if (tp == &PYGLIB_PyUnicode_Type)
+           return G_TYPE_STRING;
+       else if (tp == &PyBaseObject_Type)
+           return PY_TYPE_OBJECT;
+    }
+
+    if (Py_TYPE(obj) == &PyGTypeWrapper_Type) {
+       return ((PyGTypeWrapper *)obj)->type;
+    }
+
+    /* handle strings */
+    if (PYGLIB_PyUnicode_Check(obj)) {
+       gchar *name = PYGLIB_PyUnicode_AsString(obj);
+
+       type = _pyg_type_from_name(name);
+       if (type != 0) {
+           return type;
+       }
+    }
+
+    /* finally, look for a __gtype__ attribute on the object */
+    gtype = PyObject_GetAttrString(obj, "__gtype__");
+
+    if (gtype) {
+       if (Py_TYPE(gtype) == &PyGTypeWrapper_Type) {
+           type = ((PyGTypeWrapper *)gtype)->type;
+           Py_DECREF(gtype);
+           return type;
+       }
+       Py_DECREF(gtype);
+    }
+
+    PyErr_Clear();
+
+    /* Some API like those that take GValues can hold a python object as
+     * a pointer.  This is potentially dangerous becuase everything is 
+     * passed in as a PyObject so we can't actually type check it.  Only
+     * fallback to PY_TYPE_OBJECT if strict checking is disabled
+     */
+    if (!strict)
+        return PY_TYPE_OBJECT;
+
+    PyErr_SetString(PyExc_TypeError, "could not get typecode from object");
+    return 0;
+}
+
+/**
+ * pyg_type_from_object:
+ * obj: a Python object
+ *
+ * converts a python object to a GType.  Raises an exception if it
+ * can't perform the conversion.
+ *
+ * Returns: the corresponding GType, or 0 on error.
+ */
+GType
+pyg_type_from_object(PyObject *obj)
+{
+    /* Legacy call always defaults to strict type checking */
+    return pyg_type_from_object_strict(obj, TRUE);
+}
+
+/* -------------- GValue marshalling ------------------ */
+
+/**
+ * pyg_enum_get_value:
+ * @enum_type: the GType of the flag.
+ * @obj: a Python object representing the flag value
+ * @val: a pointer to the location to store the integer representation of the flag.
+ *
+ * Converts a Python object to the integer equivalent.  The conversion
+ * will depend on the type of the Python object.  If the object is an
+ * integer, it is passed through directly.  If it is a string, it will
+ * be treated as a full or short enum name as defined in the GType.
+ *
+ * Returns: 0 on success or -1 on failure
+ */
+gint
+pyg_enum_get_value(GType enum_type, PyObject *obj, gint *val)
+{
+    GEnumClass *eclass = NULL;
+    gint res = -1;
+
+    g_return_val_if_fail(val != NULL, -1);
+    if (!obj) {
+       *val = 0;
+       res = 0;
+    } else if (PYGLIB_PyLong_Check(obj)) {
+       *val = PYGLIB_PyLong_AsLong(obj);
+       res = 0;
+
+       if (PyObject_TypeCheck(obj, &PyGEnum_Type) && ((PyGEnum *) obj)->gtype != enum_type) {
+           g_warning("expected enumeration type %s, but got %s instead",
+                     g_type_name(enum_type),
+                     g_type_name(((PyGEnum *) obj)->gtype));
+       }
+    /* Dumb code duplication, but probably not worth it to have yet another macro. */
+    } else if (PyLong_Check(obj)) {
+       *val = PyLong_AsLong(obj);
+       res = 0;
+
+       if (PyObject_TypeCheck(obj, &PyGEnum_Type) && ((PyGEnum *) obj)->gtype != enum_type) {
+           g_warning("expected enumeration type %s, but got %s instead",
+                     g_type_name(enum_type),
+                     g_type_name(((PyGEnum *) obj)->gtype));
+       }
+    } else if (PYGLIB_PyUnicode_Check(obj)) {
+       GEnumValue *info;
+       char *str = PYGLIB_PyUnicode_AsString(obj);
+
+       if (enum_type != G_TYPE_NONE)
+           eclass = G_ENUM_CLASS(g_type_class_ref(enum_type));
+       else {
+           PyErr_SetString(PyExc_TypeError, "could not convert string to enum because there is no GType associated to look up the value");
+           res = -1;
+       }
+       info = g_enum_get_value_by_name(eclass, str);
+       g_type_class_unref(eclass);
+
+       if (!info)
+           info = g_enum_get_value_by_nick(eclass, str);
+       if (info) {
+           *val = info->value;
+           res = 0;
+       } else {
+           PyErr_SetString(PyExc_TypeError, "could not convert string");
+           res = -1;
+       }
+    } else {
+       PyErr_SetString(PyExc_TypeError,"enum values must be strings or ints");
+       res = -1;
+    }
+    return res;
+}
+
+/**
+ * pyg_flags_get_value:
+ * @flag_type: the GType of the flag.
+ * @obj: a Python object representing the flag value
+ * @val: a pointer to the location to store the integer representation of the flag.
+ *
+ * Converts a Python object to the integer equivalent.  The conversion
+ * will depend on the type of the Python object.  If the object is an
+ * integer, it is passed through directly.  If it is a string, it will
+ * be treated as a full or short flag name as defined in the GType.
+ * If it is a tuple, then the items are treated as strings and ORed
+ * together.
+ *
+ * Returns: 0 on success or -1 on failure
+ */
+gint
+pyg_flags_get_value(GType flag_type, PyObject *obj, gint *val)
+{
+    GFlagsClass *fclass = NULL;
+    gint res = -1;
+
+    g_return_val_if_fail(val != NULL, -1);
+    if (!obj) {
+       *val = 0;
+       res = 0;
+    } else if (PYGLIB_PyLong_Check(obj)) {
+       *val = PYGLIB_PyLong_AsLong(obj);
+       res = 0;
+    } else if (PyLong_Check(obj)) {
+        *val = PyLong_AsLongLong(obj);
+        res = 0;
+    } else if (PYGLIB_PyUnicode_Check(obj)) {
+       GFlagsValue *info;
+       char *str = PYGLIB_PyUnicode_AsString(obj);
+
+       if (flag_type != G_TYPE_NONE)
+           fclass = G_FLAGS_CLASS(g_type_class_ref(flag_type));
+       else {
+           PyErr_SetString(PyExc_TypeError, "could not convert string to flag because there is no GType associated to look up the value");
+           res = -1;
+       }
+       info = g_flags_get_value_by_name(fclass, str);
+       g_type_class_unref(fclass);
+
+       if (!info)
+           info = g_flags_get_value_by_nick(fclass, str);
+       if (info) {
+           *val = info->value;
+           res = 0;
+       } else {
+           PyErr_SetString(PyExc_TypeError, "could not convert string");
+           res = -1;
+       }
+    } else if (PyTuple_Check(obj)) {
+       int i, len;
+
+       len = PyTuple_Size(obj);
+       *val = 0;
+       res = 0;
+
+       if (flag_type != G_TYPE_NONE)
+           fclass = G_FLAGS_CLASS(g_type_class_ref(flag_type));
+       else {
+           PyErr_SetString(PyExc_TypeError, "could not convert string to flag because there is no GType associated to look up the value");
+           res = -1;
+       }
+
+       for (i = 0; i < len; i++) {
+           PyObject *item = PyTuple_GetItem(obj, i);
+           char *str = PYGLIB_PyUnicode_AsString(item);
+           GFlagsValue *info = g_flags_get_value_by_name(fclass, str);
+
+           if (!info)
+               info = g_flags_get_value_by_nick(fclass, str);
+           if (info) {
+               *val |= info->value;
+           } else {
+               PyErr_SetString(PyExc_TypeError, "could not convert string");
+               res = -1;
+               break;
+           }
+       }
+       g_type_class_unref(fclass);
+    } else {
+       PyErr_SetString(PyExc_TypeError,
+                       "flag values must be strings, ints, longs, or tuples");
+       res = -1;
+    }
+    return res;
+}
+
+typedef struct {
+    fromvaluefunc fromvalue;
+    tovaluefunc tovalue;
+} PyGTypeMarshal;
+static GQuark pyg_type_marshal_key = 0;
+
+static PyGTypeMarshal *
+pyg_type_lookup(GType type)
+{
+    GType      ptype = type;
+    PyGTypeMarshal     *tm = NULL;
+
+    /* recursively lookup types */
+    while (ptype) {
+       if ((tm = g_type_get_qdata(ptype, pyg_type_marshal_key)) != NULL)
+           break;
+       ptype = g_type_parent(ptype);
+    }
+    return tm;
+}
+
+/**
+ * pyg_register_gtype_custom:
+ * @gtype: the GType for the new type
+ * @from_func: a function to convert GValues to Python objects
+ * @to_func: a function to convert Python objects to GValues
+ *
+ * In order to handle specific conversion of gboxed types or new
+ * fundamental types, you may use this function to register conversion
+ * handlers.
+ */
+
+void
+pyg_register_gtype_custom(GType gtype,
+                         fromvaluefunc from_func,
+                          tovaluefunc to_func)
+{
+    PyGTypeMarshal *tm;
+
+    if (!pyg_type_marshal_key)
+        pyg_type_marshal_key = g_quark_from_static_string("PyGType::marshal");
+
+    tm = g_new(PyGTypeMarshal, 1);
+    tm->fromvalue = from_func;
+    tm->tovalue = to_func;
+    g_type_set_qdata(gtype, pyg_type_marshal_key, tm);
+}
+
+static int
+pyg_value_array_from_pyobject(GValue *value,
+                             PyObject *obj,
+                             const GParamSpecValueArray *pspec)
+{
+    int len;
+    GValueArray *value_array;
+    int i;
+
+    len = PySequence_Length(obj);
+    if (len == -1) {
+       PyErr_Clear();
+       return -1;
+    }
+
+    if (pspec && pspec->fixed_n_elements > 0 && len != pspec->fixed_n_elements)
+       return -1;
+
+    value_array = g_value_array_new(len);
+
+    for (i = 0; i < len; ++i) {
+       PyObject *item = PySequence_GetItem(obj, i);
+       GType type;
+       GValue item_value = { 0, };
+       int status;
+
+       if (! item) {
+           PyErr_Clear();
+           g_value_array_free(value_array);
+           return -1;
+       }
+
+       if (pspec && pspec->element_spec)
+           type = G_PARAM_SPEC_VALUE_TYPE(pspec->element_spec);
+       else if (item == Py_None)
+           type = G_TYPE_POINTER; /* store None as NULL */
+       else {
+           type = pyg_type_from_object((PyObject*)Py_TYPE(item));
+           if (! type) {
+               PyErr_Clear();
+               g_value_array_free(value_array);
+               Py_DECREF(item);
+               return -1;
+           }
+       }
+
+       g_value_init(&item_value, type);
+       status = (pspec && pspec->element_spec)
+           ? pyg_param_gvalue_from_pyobject(&item_value, item, pspec->element_spec)
+           : pyg_value_from_pyobject(&item_value, item);
+       Py_DECREF(item);
+
+       if (status == -1) {
+           g_value_array_free(value_array);
+           g_value_unset(&item_value);
+           return -1;
+       }
+
+       g_value_array_append(value_array, &item_value);
+       g_value_unset(&item_value);
+    }
+
+    g_value_take_boxed(value, value_array);
+    return 0;
+}
+
+/**
+ * pyg_value_from_pyobject:
+ * @value: the GValue object to store the converted value in.
+ * @obj: the Python object to convert.
+ *
+ * This function converts a Python object and stores the result in a
+ * GValue.  The GValue must be initialised in advance with
+ * g_value_init().  If the Python object can't be converted to the
+ * type of the GValue, then an error is returned.
+ *
+ * Returns: 0 on success, -1 on error.
+ */
+int
+pyg_value_from_pyobject(GValue *value, PyObject *obj)
+{
+    PyObject *tmp;
+
+    switch (G_TYPE_FUNDAMENTAL(G_VALUE_TYPE(value))) {
+    case G_TYPE_INTERFACE:
+       /* we only handle interface types that have a GObject prereq */
+       if (g_type_is_a(G_VALUE_TYPE(value), G_TYPE_OBJECT)) {
+           if (obj == Py_None)
+               g_value_set_object(value, NULL);
+           else {
+               if (!PyObject_TypeCheck(obj, &PyGObject_Type)) {
+                   return -1;
+               }
+               if (!G_TYPE_CHECK_INSTANCE_TYPE(pygobject_get(obj),
+                                               G_VALUE_TYPE(value))) {
+                   return -1;
+               }
+               g_value_set_object(value, pygobject_get(obj));
+           }
+       } else {
+           return -1;
+       }
+       break;
+    case G_TYPE_CHAR:
+#if PY_VERSION_HEX < 0x03000000
+       if (PyString_Check(obj)) {
+           g_value_set_char(value, PyString_AsString(obj)[0]);
+       } else
+#endif
+       if (PyUnicode_Check(obj)) {
+           tmp = PyUnicode_AsUTF8String(obj);
+           g_value_set_char(value, PYGLIB_PyBytes_AsString(tmp)[0]);
+           Py_DECREF(tmp);
+       } else {
+           PyErr_Clear();
+           return -1;
+       }
+
+       break;
+    case G_TYPE_UCHAR:
+       if (PYGLIB_PyLong_Check(obj)) {
+           glong val;
+           val = PYGLIB_PyLong_AsLong(obj);
+           if (val >= 0 && val <= 255)
+             g_value_set_uchar(value, (guchar)PYGLIB_PyLong_AsLong (obj));
+           else
+             return -1;
+#if PY_VERSION_HEX < 0x03000000
+       } else if (PyString_Check(obj)) {
+           g_value_set_uchar(value, PyString_AsString(obj)[0]);
+#endif
+       } else if (PyUnicode_Check(obj)) {
+           tmp = PyUnicode_AsUTF8String(obj);
+           g_value_set_uchar(value, PYGLIB_PyBytes_AsString(tmp)[0]);
+           Py_DECREF(tmp);
+       } else {
+           PyErr_Clear();
+           return -1;
+       }
+       break;
+    case G_TYPE_BOOLEAN:
+       g_value_set_boolean(value, PyObject_IsTrue(obj));
+       break;
+    case G_TYPE_INT:
+       g_value_set_int(value, PYGLIB_PyLong_AsLong(obj));
+       break;
+    case G_TYPE_UINT:
+       {
+           if (PYGLIB_PyLong_Check(obj)) {
+               glong val;
+
+               val = PYGLIB_PyLong_AsLong(obj);
+               if (val >= 0 && val <= G_MAXUINT)
+                   g_value_set_uint(value, (guint)val);
+               else
+                   return -1;
+           } else {
+               g_value_set_uint(value, PyLong_AsUnsignedLong(obj));
+           }
+       }
+       break;
+    case G_TYPE_LONG:
+       g_value_set_long(value, PYGLIB_PyLong_AsLong(obj));
+       break;
+    case G_TYPE_ULONG:
+#if PY_VERSION_HEX < 0x03000000
+       if (PyInt_Check(obj)) {
+            long val;
+
+            val = PYGLIB_PyLong_AsLong(obj);
+            if (val < 0) {
+                PyErr_SetString(PyExc_OverflowError, "negative value not allowed for uint64 property");
+                return -1;
+            }
+            g_value_set_ulong(value, (gulong)val);
+        } else
+#endif
+        if (PyLong_Check(obj))
+           g_value_set_ulong(value, PyLong_AsUnsignedLong(obj));
+        else
+            return -1;
+        break;
+    case G_TYPE_INT64:
+       g_value_set_int64(value, PyLong_AsLongLong(obj));
+       break;
+    case G_TYPE_UINT64:
+#if PY_VERSION_HEX < 0x03000000
+        if (PyInt_Check(obj)) {
+            long v = PyInt_AsLong(obj);
+            if (v < 0) {
+                PyErr_SetString(PyExc_OverflowError, "negative value not allowed for uint64 property");
+                return -1;
+            }
+            g_value_set_uint64(value, v);
+        } else
+#endif
+        if (PyLong_Check(obj))
+            g_value_set_uint64(value, PyLong_AsUnsignedLongLong(obj));
+        else
+            return -1;
+       break;
+    case G_TYPE_ENUM:
+       {
+           gint val = 0;
+           if (pyg_enum_get_value(G_VALUE_TYPE(value), obj, &val) < 0) {
+               PyErr_Clear();
+               return -1;
+           }
+           g_value_set_enum(value, val);
+       }
+       break;
+    case G_TYPE_FLAGS:
+       {
+           gint val = 0;
+           if (pyg_flags_get_value(G_VALUE_TYPE(value), obj, &val) < 0) {
+               PyErr_Clear();
+               return -1;
+           }
+           g_value_set_flags(value, val);
+       }
+       break;
+    case G_TYPE_FLOAT:
+       g_value_set_float(value, PyFloat_AsDouble(obj));
+       break;
+    case G_TYPE_DOUBLE:
+       g_value_set_double(value, PyFloat_AsDouble(obj));
+       break;
+    case G_TYPE_STRING:
+       if (obj == Py_None) {
+           g_value_set_string(value, NULL);
+       } else {
+           PyObject* tmp_str = PyObject_Str(obj);
+           if (tmp_str == NULL) {
+               PyErr_Clear();
+               if (PyUnicode_Check(obj)) {
+                   tmp = PyUnicode_AsUTF8String(obj);
+                   g_value_set_string(value, PYGLIB_PyBytes_AsString(tmp));
+                   Py_DECREF(tmp);
+               } else {
+                   return -1;
+               }
+           } else {
+#if PY_VERSION_HEX < 0x03000000
+              g_value_set_string(value, PyString_AsString(tmp_str));
+#else
+              tmp = PyUnicode_AsUTF8String(tmp_str);
+              g_value_set_string(value, PyBytes_AsString(tmp));
+              Py_DECREF(tmp);
+#endif
+           }
+           Py_XDECREF(tmp_str);
+       }
+       break;
+    case G_TYPE_POINTER:
+       if (obj == Py_None)
+           g_value_set_pointer(value, NULL);
+       else if (PyObject_TypeCheck(obj, &PyGPointer_Type) &&
+                  G_VALUE_HOLDS(value, ((PyGPointer *)obj)->gtype))
+           g_value_set_pointer(value, pyg_pointer_get(obj, gpointer));
+       else if (PYGLIB_CPointer_Check(obj))
+           g_value_set_pointer(value, PYGLIB_CPointer_GetPointer(obj, NULL));
+       else
+           return -1;
+       break;
+    case G_TYPE_BOXED: {
+       PyGTypeMarshal *bm;
+
+       if (obj == Py_None)
+           g_value_set_boxed(value, NULL);
+       else if (G_VALUE_HOLDS(value, PY_TYPE_OBJECT))
+           g_value_set_boxed(value, obj);
+       else if (PyObject_TypeCheck(obj, &PyGBoxed_Type) &&
+                  G_VALUE_HOLDS(value, ((PyGBoxed *)obj)->gtype))
+           g_value_set_boxed(value, pyg_boxed_get(obj, gpointer));
+        else if (G_VALUE_HOLDS(value, G_TYPE_VALUE)) {
+            GType type;
+            GValue *n_value;
+
+            type = pyg_type_from_object((PyObject*)Py_TYPE(obj));
+            if (G_UNLIKELY (! type)) {
+                PyErr_Clear();
+                return -1;
+            }
+            n_value = g_new0 (GValue, 1);
+            g_value_init (n_value, type);
+            g_value_take_boxed (value, n_value);
+            return pyg_value_from_pyobject (n_value, obj);
+        }
+        else if (PySequence_Check(obj) &&
+                  G_VALUE_HOLDS(value, G_TYPE_VALUE_ARRAY))
+           return pyg_value_array_from_pyobject(value, obj, NULL);
+       else if (PYGLIB_PyUnicode_Check(obj) &&
+                 G_VALUE_HOLDS(value, G_TYPE_GSTRING)) {
+            GString *string;
+            char *buffer;
+            Py_ssize_t len;
+            if (PYGLIB_PyUnicode_AsStringAndSize(obj, &buffer, &len))
+                return -1;
+            string = g_string_new_len(buffer, len);
+           g_value_set_boxed(value, string);
+           g_string_free (string, TRUE);
+            break;
+        }
+       else if ((bm = pyg_type_lookup(G_VALUE_TYPE(value))) != NULL)
+           return bm->tovalue(value, obj);
+       else if (PYGLIB_CPointer_Check(obj))
+           g_value_set_boxed(value, PYGLIB_CPointer_GetPointer(obj, NULL));
+       else
+           return -1;
+       break;
+    }
+    case G_TYPE_PARAM:
+       if (PyGParamSpec_Check(obj))
+           g_value_set_param(value, PYGLIB_CPointer_GetPointer(obj, NULL));
+       else
+           return -1;
+       break;
+    case G_TYPE_OBJECT:
+       if (obj == Py_None) {
+           g_value_set_object(value, NULL);
+       } else if (PyObject_TypeCheck(obj, &PyGObject_Type) &&
+                  G_TYPE_CHECK_INSTANCE_TYPE(pygobject_get(obj),
+                                             G_VALUE_TYPE(value))) {
+           g_value_set_object(value, pygobject_get(obj));
+       } else
+           return -1;
+       break;
+    default:
+       {
+           PyGTypeMarshal *bm;
+           if ((bm = pyg_type_lookup(G_VALUE_TYPE(value))) != NULL)
+               return bm->tovalue(value, obj);
+           break;
+       }
+    }
+    if (PyErr_Occurred()) {
+        g_value_unset(value);
+        PyErr_Clear();
+        return -1;
+    }
+    return 0;
+}
+
+/**
+ * pyg_value_as_pyobject:
+ * @value: the GValue object.
+ * @copy_boxed: true if boxed values should be copied.
+ *
+ * This function creates/returns a Python wrapper object that
+ * represents the GValue passed as an argument.
+ *
+ * Returns: a PyObject representing the value.
+ */
+PyObject *
+pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed)
+{
+    gchar buf[128];
+
+    switch (G_TYPE_FUNDAMENTAL(G_VALUE_TYPE(value))) {
+    case G_TYPE_INTERFACE:
+       if (g_type_is_a(G_VALUE_TYPE(value), G_TYPE_OBJECT))
+           return pygobject_new_sunk(g_value_get_object(value));
+       else
+           break;
+    case G_TYPE_CHAR: {
+       gint8 val = g_value_get_char(value);
+       return PYGLIB_PyUnicode_FromStringAndSize((char *)&val, 1);
+    }
+    case G_TYPE_UCHAR: {
+       guint8 val = g_value_get_uchar(value);
+       return PYGLIB_PyBytes_FromStringAndSize((char *)&val, 1);
+    }
+    case G_TYPE_BOOLEAN: {
+       return PyBool_FromLong(g_value_get_boolean(value));
+    }
+    case G_TYPE_INT:
+       return PYGLIB_PyLong_FromLong(g_value_get_int(value));
+    case G_TYPE_UINT:
+       {
+           /* in Python, the Int object is backed by a long.  If a
+              long can hold the whole value of an unsigned int, use
+              an Int.  Otherwise, use a Long object to avoid overflow.
+              This matches the ULongArg behavior in codegen/argtypes.h */
+#if (G_MAXUINT <= G_MAXLONG)
+           return PYGLIB_PyLong_FromLong((glong) g_value_get_uint(value));
+#else
+           return PyLong_FromUnsignedLong((gulong) g_value_get_uint(value));
+#endif
+       }
+    case G_TYPE_LONG:
+       return PYGLIB_PyLong_FromLong(g_value_get_long(value));
+    case G_TYPE_ULONG:
+       {
+           gulong val = g_value_get_ulong(value);
+
+           if (val <= G_MAXLONG)
+               return PYGLIB_PyLong_FromLong((glong) val);
+           else
+               return PyLong_FromUnsignedLong(val);
+       }
+    case G_TYPE_INT64:
+       {
+           gint64 val = g_value_get_int64(value);
+
+           if (G_MINLONG <= val && val <= G_MAXLONG)
+               return PYGLIB_PyLong_FromLong((glong) val);
+           else
+               return PyLong_FromLongLong(val);
+       }
+    case G_TYPE_UINT64:
+       {
+           guint64 val = g_value_get_uint64(value);
+
+           if (val <= G_MAXLONG)
+               return PYGLIB_PyLong_FromLong((glong) val);
+           else
+               return PyLong_FromUnsignedLongLong(val);
+       }
+    case G_TYPE_ENUM:
+       return pyg_enum_from_gtype(G_VALUE_TYPE(value), g_value_get_enum(value));
+    case G_TYPE_FLAGS:
+       return pyg_flags_from_gtype(G_VALUE_TYPE(value), g_value_get_flags(value));
+    case G_TYPE_FLOAT:
+       return PyFloat_FromDouble(g_value_get_float(value));
+    case G_TYPE_DOUBLE:
+       return PyFloat_FromDouble(g_value_get_double(value));
+    case G_TYPE_STRING:
+       {
+           const gchar *str = g_value_get_string(value);
+
+           if (str)
+               return PYGLIB_PyUnicode_FromString(str);
+           Py_INCREF(Py_None);
+           return Py_None;
+       }
+    case G_TYPE_POINTER:
+       return pyg_pointer_new(G_VALUE_TYPE(value),
+                              g_value_get_pointer(value));
+    case G_TYPE_BOXED: {
+       PyGTypeMarshal *bm;
+
+       if (G_VALUE_HOLDS(value, PY_TYPE_OBJECT)) {
+           PyObject *ret = (PyObject *)g_value_dup_boxed(value);
+           if (ret == NULL) {
+               Py_INCREF(Py_None);
+               return Py_None;
+           }
+           return ret;
+        } else if (G_VALUE_HOLDS(value, G_TYPE_VALUE)) {
+            GValue *n_value = g_value_get_boxed (value);
+            return pyg_value_as_pyobject(n_value, copy_boxed);
+        } else if (G_VALUE_HOLDS(value, G_TYPE_VALUE_ARRAY)) {
+           GValueArray *array = (GValueArray *) g_value_get_boxed(value);
+           PyObject *ret = PyList_New(array->n_values);
+           int i;
+           for (i = 0; i < array->n_values; ++i)
+               PyList_SET_ITEM(ret, i, pyg_value_as_pyobject
+                                (array->values + i, copy_boxed));
+           return ret;
+       } else if (G_VALUE_HOLDS(value, G_TYPE_GSTRING)) {
+           GString *string = (GString *) g_value_get_boxed(value);
+           PyObject *ret = PYGLIB_PyUnicode_FromStringAndSize(string->str, string->len);
+           return ret;
+       }
+       bm = pyg_type_lookup(G_VALUE_TYPE(value));
+       if (bm) {
+           return bm->fromvalue(value);
+       } else {
+           if (copy_boxed)
+               return pyg_boxed_new(G_VALUE_TYPE(value),
+                                    g_value_get_boxed(value), TRUE, TRUE);
+           else
+               return pyg_boxed_new(G_VALUE_TYPE(value),
+                                    g_value_get_boxed(value),FALSE,FALSE);
+       }
+    }
+    case G_TYPE_PARAM:
+       return pyg_param_spec_new(g_value_get_param(value));
+    case G_TYPE_OBJECT:
+       return pygobject_new_sunk(g_value_get_object(value));
+    default:
+       {
+           PyGTypeMarshal *bm;
+           if ((bm = pyg_type_lookup(G_VALUE_TYPE(value))))
+               return bm->fromvalue(value);
+           break;
+       }
+    }
+    g_snprintf(buf, sizeof(buf), "unknown type %s",
+              g_type_name(G_VALUE_TYPE(value)));
+    PyErr_SetString(PyExc_TypeError, buf);
+    return NULL;
+}
+
+/* -------------- PyGClosure ----------------- */
+
+static void
+pyg_closure_invalidate(gpointer data, GClosure *closure)
+{
+    PyGClosure *pc = (PyGClosure *)closure;
+    PyGILState_STATE state;
+
+    state = pyglib_gil_state_ensure();
+    Py_XDECREF(pc->callback);
+    Py_XDECREF(pc->extra_args);
+    Py_XDECREF(pc->swap_data);
+    pyglib_gil_state_release(state);
+
+    pc->callback = NULL;
+    pc->extra_args = NULL;
+    pc->swap_data = NULL;
+}
+
+static void
+pyg_closure_marshal(GClosure *closure,
+                   GValue *return_value,
+                   guint n_param_values,
+                   const GValue *param_values,
+                   gpointer invocation_hint,
+                   gpointer marshal_data)
+{
+    PyGILState_STATE state;
+    PyGClosure *pc = (PyGClosure *)closure;
+    PyObject *params, *ret;
+    guint i;
+
+    state = pyglib_gil_state_ensure();
+
+    /* construct Python tuple for the parameter values */
+    params = PyTuple_New(n_param_values);
+    for (i = 0; i < n_param_values; i++) {
+       /* swap in a different initial data for connect_object() */
+       if (i == 0 && G_CCLOSURE_SWAP_DATA(closure)) {
+           g_return_if_fail(pc->swap_data != NULL);
+           Py_INCREF(pc->swap_data);
+           PyTuple_SetItem(params, 0, pc->swap_data);
+       } else {
+           PyObject *item = pyg_value_as_pyobject(&param_values[i], FALSE);
+
+           /* error condition */
+           if (!item) {
+               goto out;
+           }
+           PyTuple_SetItem(params, i, item);
+       }
+    }
+    /* params passed to function may have extra arguments */
+    if (pc->extra_args) {
+       PyObject *tuple = params;
+       params = PySequence_Concat(tuple, pc->extra_args);
+       Py_DECREF(tuple);
+    }
+    ret = PyObject_CallObject(pc->callback, params);
+    if (ret == NULL) {
+       if (pc->exception_handler)
+           pc->exception_handler(return_value, n_param_values, param_values);
+       else
+           PyErr_Print();
+       goto out;
+    }
+
+    if (return_value && pyg_value_from_pyobject(return_value, ret) != 0) {
+       PyErr_SetString(PyExc_TypeError,
+                       "can't convert return value to desired type");
+
+       if (pc->exception_handler)
+           pc->exception_handler(return_value, n_param_values, param_values);
+       else
+           PyErr_Print();
+    }
+    Py_DECREF(ret);
+
+ out:
+    Py_DECREF(params);
+    pyglib_gil_state_release(state);
+}
+
+/**
+ * pyg_closure_new:
+ * callback: a Python callable object
+ * extra_args: a tuple of extra arguments, or None/NULL.
+ * swap_data: an alternative python object to pass first.
+ *
+ * Creates a GClosure wrapping a Python callable and optionally a set
+ * of additional function arguments.  This is needed to attach python
+ * handlers to signals, for instance.
+ *
+ * Returns: the new closure.
+ */
+GClosure *
+pyg_closure_new(PyObject *callback, PyObject *extra_args, PyObject *swap_data)
+{
+    GClosure *closure;
+
+    g_return_val_if_fail(callback != NULL, NULL);
+    closure = g_closure_new_simple(sizeof(PyGClosure), NULL);
+    g_closure_add_invalidate_notifier(closure, NULL, pyg_closure_invalidate);
+    g_closure_set_marshal(closure, pyg_closure_marshal);
+    Py_INCREF(callback);
+    ((PyGClosure *)closure)->callback = callback;
+    if (extra_args && extra_args != Py_None) {
+       Py_INCREF(extra_args);
+       if (!PyTuple_Check(extra_args)) {
+           PyObject *tmp = PyTuple_New(1);
+           PyTuple_SetItem(tmp, 0, extra_args);
+           extra_args = tmp;
+       }
+       ((PyGClosure *)closure)->extra_args = extra_args;
+    }
+    if (swap_data) {
+       Py_INCREF(swap_data);
+       ((PyGClosure *)closure)->swap_data = swap_data;
+       closure->derivative_flag = TRUE;
+    }
+    return closure;
+}
+
+/**
+ * pyg_closure_set_exception_handler:
+ * @closure: a closure created with pyg_closure_new()
+ * @handler: the handler to call when an exception occurs or NULL for none
+ *
+ * Sets the handler to call when an exception occurs during closure invocation.
+ * The handler is responsible for providing a proper return value to the
+ * closure invocation. If @handler is %NULL, the default handler will be used.
+ * The default handler prints the exception to stderr and doesn't touch the
+ * closure's return value.
+ */
+void
+pyg_closure_set_exception_handler(GClosure *closure,
+                                 PyClosureExceptionHandler handler)
+{
+    PyGClosure *pygclosure;
+
+    g_return_if_fail(closure != NULL);
+
+    pygclosure = (PyGClosure *)closure;
+    pygclosure->exception_handler = handler;
+}
+/* -------------- PySignalClassClosure ----------------- */
+/* a closure used for the `class closure' of a signal.  As this gets
+ * all the info from the first argument to the closure and the
+ * invocation hint, we can have a single closure that handles all
+ * class closure cases.  We call a method by the name of the signal
+ * with "do_" prepended.
+ *
+ *  We also remove the first argument from the * param list, as it is
+ *  the instance object, which is passed * implicitly to the method
+ *  object. */
+
+static void
+pyg_signal_class_closure_marshal(GClosure *closure,
+                                GValue *return_value,
+                                guint n_param_values,
+                                const GValue *param_values,
+                                gpointer invocation_hint,
+                                gpointer marshal_data)
+{
+    PyGILState_STATE state;
+    GObject *object;
+    PyObject *object_wrapper;
+    GSignalInvocationHint *hint = (GSignalInvocationHint *)invocation_hint;
+    gchar *method_name, *tmp;
+    PyObject *method;
+    PyObject *params, *ret;
+    guint i, len;
+
+    state = pyglib_gil_state_ensure();
+
+    g_return_if_fail(invocation_hint != NULL);
+    /* get the object passed as the first argument to the closure */
+    object = g_value_get_object(&param_values[0]);
+    g_return_if_fail(object != NULL && G_IS_OBJECT(object));
+
+    /* get the wrapper for this object */
+    object_wrapper = pygobject_new_sunk(object);
+    g_return_if_fail(object_wrapper != NULL);
+
+    /* construct method name for this class closure */
+    method_name = g_strconcat("do_", g_signal_name(hint->signal_id), NULL);
+
+    /* convert dashes to underscores.  For some reason, g_signal_name
+     * seems to convert all the underscores in the signal name to
+       dashes??? */
+    for (tmp = method_name; *tmp != '\0'; tmp++)
+       if (*tmp == '-') *tmp = '_';
+
+    method = PyObject_GetAttrString(object_wrapper, method_name);
+    g_free(method_name);
+
+    if (!method) {
+       PyErr_Clear();
+       Py_DECREF(object_wrapper);
+       pyglib_gil_state_release(state);
+       return;
+    }
+    Py_DECREF(object_wrapper);
+
+    /* construct Python tuple for the parameter values; don't copy boxed values
+       initially because we'll check after the call to see if a copy is needed. */
+    params = PyTuple_New(n_param_values - 1);
+    for (i = 1; i < n_param_values; i++) {
+       PyObject *item = pyg_value_as_pyobject(&param_values[i], FALSE);
+
+       /* error condition */
+       if (!item) {
+           Py_DECREF(params);
+           pyglib_gil_state_release(state);
+           return;
+       }
+       PyTuple_SetItem(params, i - 1, item);
+    }
+
+    ret = PyObject_CallObject(method, params);
+
+    /* Copy boxed values if others ref them, this needs to be done regardless of
+       exception status. */
+    len = PyTuple_Size(params);
+    for (i = 0; i < len; i++) {
+       PyObject *item = PyTuple_GetItem(params, i);
+       if (item != NULL && PyObject_TypeCheck(item, &PyGBoxed_Type)
+           && item->ob_refcnt != 1) {
+           PyGBoxed* boxed_item = (PyGBoxed*)item;
+           if (!boxed_item->free_on_dealloc) {
+               boxed_item->boxed = g_boxed_copy(boxed_item->gtype, boxed_item->boxed);
+               boxed_item->free_on_dealloc = TRUE;
+           }
+       }
+    }
+
+    if (ret == NULL) {
+       PyErr_Print();
+       Py_DECREF(method);
+       Py_DECREF(params);
+       pyglib_gil_state_release(state);
+       return;
+    }
+    Py_DECREF(method);
+    Py_DECREF(params);
+    if (return_value)
+       pyg_value_from_pyobject(return_value, ret);
+    Py_DECREF(ret);
+    pyglib_gil_state_release(state);
+}
+
+/**
+ * pyg_signal_class_closure_get:
+ *
+ * Returns the GClosure used for the class closure of signals.  When
+ * called, it will invoke the method do_signalname (for the signal
+ * "signalname").
+ *
+ * Returns: the closure.
+ */
+GClosure *
+pyg_signal_class_closure_get(void)
+{
+    static GClosure *closure;
+
+    if (closure == NULL) {
+       closure = g_closure_new_simple(sizeof(GClosure), NULL);
+       g_closure_set_marshal(closure, pyg_signal_class_closure_marshal);
+
+       g_closure_ref(closure);
+       g_closure_sink(closure);
+    }
+    return closure;
+}
+
+GClosure *
+gclosure_from_pyfunc(PyGObject *object, PyObject *func)
+{
+    GSList *l;
+    PyGObjectData *inst_data;
+    inst_data = pyg_object_peek_inst_data(object->obj);
+    if (inst_data) {
+        for (l = inst_data->closures; l; l = l->next) {
+            PyGClosure *pyclosure = l->data;
+            int res = PyObject_RichCompareBool(pyclosure->callback, func, Py_EQ);
+            if (res == -1) {
+                PyErr_Clear(); // Is there anything else to do?
+            } else if (res) {
+                return (GClosure*)pyclosure;
+            }
+        }
+    }
+    return NULL;
+}
+
+/* ----- __doc__ descriptor for GObject and GInterface ----- */
+
+static void
+object_doc_dealloc(PyObject *self)
+{
+    PyObject_FREE(self);
+}
+
+/* append information about signals of a particular gtype */
+static void
+add_signal_docs(GType gtype, GString *string)
+{
+    GTypeClass *class = NULL;
+    guint *signal_ids, n_ids = 0, i;
+
+    if (G_TYPE_IS_CLASSED(gtype))
+       class = g_type_class_ref(gtype);
+    signal_ids = g_signal_list_ids(gtype, &n_ids);
+
+    if (n_ids > 0) {
+       g_string_append_printf(string, "Signals from %s:\n",
+                              g_type_name(gtype));
+
+       for (i = 0; i < n_ids; i++) {
+           GSignalQuery query;
+           guint j;
+
+           g_signal_query(signal_ids[i], &query);
+
+           g_string_append(string, "  ");
+           g_string_append(string, query.signal_name);
+           g_string_append(string, " (");
+           for (j = 0; j < query.n_params; j++) {
+               g_string_append(string, g_type_name(query.param_types[j]));
+               if (j != query.n_params - 1)
+                   g_string_append(string, ", ");
+           }
+           g_string_append(string, ")");
+           if (query.return_type && query.return_type != G_TYPE_NONE) {
+               g_string_append(string, " -> ");
+               g_string_append(string, g_type_name(query.return_type));
+           }
+           g_string_append(string, "\n");
+       }
+       g_free(signal_ids);
+       g_string_append(string, "\n");
+    }
+    if (class)
+       g_type_class_unref(class);
+}
+
+static void
+add_property_docs(GType gtype, GString *string)
+{
+    GObjectClass *class;
+    GParamSpec **props;
+    guint n_props = 0, i;
+    gboolean has_prop = FALSE;
+    G_CONST_RETURN gchar *blurb=NULL;
+
+    class = g_type_class_ref(gtype);
+    props = g_object_class_list_properties(class, &n_props);
+
+    for (i = 0; i < n_props; i++) {
+       if (props[i]->owner_type != gtype)
+           continue; /* these are from a parent type */
+
+       /* print out the heading first */
+       if (!has_prop) {
+           g_string_append_printf(string, "Properties from %s:\n",
+                                  g_type_name(gtype));
+           has_prop = TRUE;
+       }
+       g_string_append_printf(string, "  %s -> %s: %s\n",
+                              g_param_spec_get_name(props[i]),
+                              g_type_name(props[i]->value_type),
+                              g_param_spec_get_nick(props[i]));
+
+       /* g_string_append_printf crashes on win32 if the third
+          argument is NULL. */
+       blurb=g_param_spec_get_blurb(props[i]);
+       if (blurb)
+           g_string_append_printf(string, "    %s\n",blurb);
+    }
+    g_free(props);
+    if (has_prop)
+       g_string_append(string, "\n");
+    g_type_class_unref(class);
+}
+
+static PyObject *
+object_doc_descr_get(PyObject *self, PyObject *obj, PyObject *type)
+{
+    GType gtype = 0;
+    GString *string;
+    PyObject *pystring;
+
+    if (obj && pygobject_check(obj, &PyGObject_Type)) {
+       gtype = G_OBJECT_TYPE(pygobject_get(obj));
+       if (!gtype)
+           PyErr_SetString(PyExc_RuntimeError, "could not get object type");
+    } else {
+       gtype = pyg_type_from_object(type);
+    }
+    if (!gtype)
+       return NULL;
+
+    string = g_string_new_len(NULL, 512);
+
+    if (g_type_is_a(gtype, G_TYPE_INTERFACE))
+       g_string_append_printf(string, "Interface %s\n\n", g_type_name(gtype));
+    else if (g_type_is_a(gtype, G_TYPE_OBJECT))
+       g_string_append_printf(string, "Object %s\n\n", g_type_name(gtype));
+    else
+       g_string_append_printf(string, "%s\n\n", g_type_name(gtype));
+
+    if (((PyTypeObject *) type)->tp_doc)
+        g_string_append_printf(string, "%s\n\n", ((PyTypeObject *) type)->tp_doc);
+
+    if (g_type_is_a(gtype, G_TYPE_OBJECT)) {
+       GType parent = G_TYPE_OBJECT;
+        GArray *parents = g_array_new(FALSE, FALSE, sizeof(GType));
+        int iparent;
+
+        while (parent) {
+            g_array_append_val(parents, parent);
+            parent = g_type_next_base(gtype, parent);
+        }
+
+        for (iparent = parents->len - 1; iparent >= 0; --iparent) {
+           GType *interfaces;
+           guint n_interfaces, i;
+
+            parent = g_array_index(parents, GType, iparent);
+           add_signal_docs(parent, string);
+           add_property_docs(parent, string);
+
+           /* add docs for implemented interfaces */
+           interfaces = g_type_interfaces(parent, &n_interfaces);
+           for (i = 0; i < n_interfaces; i++)
+               add_signal_docs(interfaces[i], string);
+           g_free(interfaces);
+       }
+        g_array_free(parents, TRUE);
+    }
+
+    pystring = PYGLIB_PyUnicode_FromStringAndSize(string->str, string->len);
+    g_string_free(string, TRUE);
+    return pystring;
+}
+
+PYGLIB_DEFINE_TYPE("gobject.GObject.__doc__", PyGObjectDoc_Type, PyObject);
+
+/**
+ * pyg_object_descr_doc_get:
+ *
+ * Returns an object intended to be the __doc__ attribute of GObject
+ * wrappers.  When read in the context of the object it will return
+ * some documentation about the signals and properties of the object.
+ *
+ * Returns: the descriptor.
+ */
+PyObject *
+pyg_object_descr_doc_get(void)
+{
+    static PyObject *doc_descr = NULL;
+
+    if (!doc_descr) {
+       Py_TYPE(&PyGObjectDoc_Type) = &PyType_Type;
+       if (PyType_Ready(&PyGObjectDoc_Type))
+           return NULL;
+
+       doc_descr = PyObject_NEW(PyObject, &PyGObjectDoc_Type);
+       if (doc_descr == NULL)
+           return NULL;
+    }
+    return doc_descr;
+}
+
+
+/**
+ * pyg_pyobj_to_unichar_conv:
+ *
+ * Converts PyObject value to a unichar and write result to memory
+ * pointed to by ptr.  Follows the calling convention of a ParseArgs
+ * converter (O& format specifier) so it may be used to convert function
+ * arguments.
+ *
+ * Returns: 1 if the conversion succeeds and 0 otherwise.  If the conversion
+ *          did not succeesd, a Python exception is raised
+ */
+int pyg_pyobj_to_unichar_conv(PyObject* py_obj, void* ptr)
+{
+    gunichar* u = ptr;
+    const Py_UNICODE* uni_buffer;
+    PyObject* tmp_uni = NULL;
+
+    if (PyUnicode_Check(py_obj)) {
+       tmp_uni = py_obj;
+       Py_INCREF(tmp_uni);
+    }
+    else {
+       tmp_uni = PyUnicode_FromObject(py_obj);
+       if (tmp_uni == NULL)
+           goto failure;
+    }
+
+    if ( PyUnicode_GetSize(tmp_uni) != 1) {
+       PyErr_SetString(PyExc_ValueError, "unicode character value must be 1 character uniode string");
+       goto failure;
+    }
+    uni_buffer = PyUnicode_AsUnicode(tmp_uni);
+    if ( uni_buffer == NULL)
+       goto failure;
+    *u = uni_buffer[0];
+
+    Py_DECREF(tmp_uni);
+    return 1;
+
+  failure:
+    Py_XDECREF(tmp_uni);
+    return 0;
+}
+
+
+int
+pyg_param_gvalue_from_pyobject(GValue* value,
+                               PyObject* py_obj,
+                              const GParamSpec* pspec)
+{
+    if (G_IS_PARAM_SPEC_UNICHAR(pspec)) {
+       gunichar u;
+
+       if (!pyg_pyobj_to_unichar_conv(py_obj, &u)) {
+           PyErr_Clear();
+           return -1;
+       }
+        g_value_set_uint(value, u);
+       return 0;
+    }
+    else if (G_IS_PARAM_SPEC_VALUE_ARRAY(pspec))
+       return pyg_value_array_from_pyobject(value, py_obj,
+                                            G_PARAM_SPEC_VALUE_ARRAY(pspec));
+    else {
+       return pyg_value_from_pyobject(value, py_obj);
+    }
+}
+
+PyObject*
+pyg_param_gvalue_as_pyobject(const GValue* gvalue,
+                             gboolean copy_boxed,
+                            const GParamSpec* pspec)
+{
+    if (G_IS_PARAM_SPEC_UNICHAR(pspec)) {
+       gunichar u;
+       Py_UNICODE uni_buffer[2] = { 0, 0 };
+
+       u = g_value_get_uint(gvalue);
+       uni_buffer[0] = u;
+       return PyUnicode_FromUnicode(uni_buffer, 1);
+    }
+    else {
+       return pyg_value_as_pyobject(gvalue, copy_boxed);
+    }
+}
+
+/**
+ * pyg_type_registration_callback
+ * @gtypename: type name
+ * @callback: function to run
+ *
+ */
+typedef struct {
+    PyGTypeRegistrationFunction callback;
+    gpointer data;
+} CustomTypeData;
+
+void
+pyg_type_register_custom_callback(const gchar *typename,
+                                 PyGTypeRegistrationFunction callback,
+                                 gpointer user_data)
+{
+    CustomTypeData *data;
+
+    if (!custom_type_registration)
+       custom_type_registration = g_hash_table_new_full (g_str_hash, g_str_equal,
+                                                         g_free, g_free);
+
+    data = g_new (CustomTypeData, 1);
+    data->callback = callback;
+    data->data = user_data;
+
+    g_hash_table_insert(custom_type_registration,
+                       g_strdup(typename),
+                       data);
+}
+
+PyTypeObject *
+pyg_type_get_custom(const gchar *name)
+{
+    CustomTypeData *data;
+    PyTypeObject *retval;
+
+    if (!custom_type_registration)
+       return NULL;
+
+    data = g_hash_table_lookup(custom_type_registration, name);
+    if (!data)
+       return NULL;
+
+    retval = data->callback(name, data->data);
+
+    g_hash_table_remove(custom_type_registration, name);
+
+    return retval;
+}
+
+GType
+_pyg_type_from_name(const gchar *name)
+{
+    GType type;
+
+    type = g_type_from_name(name);
+    if (type == G_TYPE_INVALID) {
+       pyg_type_get_custom(name);
+       type = g_type_from_name(name);
+    }
+
+    return type;
+}
+
+static PyObject *
+_pyg_strv_from_gvalue(const GValue *value)
+{
+    gchar    **argv = (gchar **) g_value_get_boxed(value);
+    int        argc = 0, i;
+    PyObject  *py_argv;
+
+    if (argv) {
+        while (argv[argc])
+            argc++;
+    }
+    py_argv = PyList_New(argc);
+    for (i = 0; i < argc; ++i)
+       PyList_SET_ITEM(py_argv, i, PYGLIB_PyUnicode_FromString(argv[i]));
+    return py_argv;
+}
+
+static int
+_pyg_strv_to_gvalue(GValue *value, PyObject *obj)
+{
+    Py_ssize_t argc, i;
+    gchar **argv;
+
+    if (!(PyTuple_Check(obj) || PyList_Check(obj)))
+        return -1;
+
+    argc = PySequence_Length(obj);
+    for (i = 0; i < argc; ++i)
+       if (!PYGLIB_PyUnicode_Check(PySequence_Fast_GET_ITEM(obj, i)))
+           return -1;
+    argv = g_new(gchar *, argc + 1);
+    for (i = 0; i < argc; ++i)
+       argv[i] = g_strdup(PYGLIB_PyUnicode_AsString(PySequence_Fast_GET_ITEM(obj, i)));
+    argv[i] = NULL;
+    g_value_take_boxed(value, argv);
+    return 0;
+}
+
+void
+pygobject_type_register_types(PyObject *d)
+{
+    PyGTypeWrapper_Type.tp_dealloc = (destructor)pyg_type_wrapper_dealloc;
+    PyGTypeWrapper_Type.tp_richcompare = pyg_type_wrapper_richcompare;
+    PyGTypeWrapper_Type.tp_repr = (reprfunc)pyg_type_wrapper_repr;
+    PyGTypeWrapper_Type.tp_hash = (hashfunc)pyg_type_wrapper_hash;
+    PyGTypeWrapper_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+    PyGTypeWrapper_Type.tp_methods = _PyGTypeWrapper_methods;
+    PyGTypeWrapper_Type.tp_getset = _PyGTypeWrapper_getsets;
+    PyGTypeWrapper_Type.tp_init = (initproc)pyg_type_wrapper_init;
+    PYGLIB_REGISTER_TYPE(d, PyGTypeWrapper_Type, "GType");
+
+    /* This type lazily registered in pyg_object_descr_doc_get */
+    PyGObjectDoc_Type.tp_dealloc = (destructor)object_doc_dealloc;
+    PyGObjectDoc_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+    PyGObjectDoc_Type.tp_descr_get = (descrgetfunc)object_doc_descr_get;
+
+    pyg_register_gtype_custom(G_TYPE_STRV,
+                             _pyg_strv_from_gvalue,
+                             _pyg_strv_to_gvalue);
+}
diff --git a/gobject/pygtype.h b/gobject/pygtype.h
new file mode 100644 (file)
index 0000000..2f9e7ad
--- /dev/null
@@ -0,0 +1,28 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 1998-2003  James Henstridge
+ *               2004-2008  Johan Dahlin
+ *   pyginterface.c: wrapper for the gobject 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGOBJECT_TYPE_H__ 
+#define __PYGOBJECT_TYPE_H__
+
+void pygobject_type_register_types(PyObject *d);
+
+#endif /* __PYGOBJECT_TYPE_H__ */
diff --git a/install-sh b/install-sh
new file mode 100755 (executable)
index 0000000..6781b98
--- /dev/null
@@ -0,0 +1,520 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2009-04-28.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""       $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+       shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+       shift;;
+
+    -o) chowncmd="$chownprog $2"
+       shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+       shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)        shift
+       break;;
+
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+       echo "$0: $dst_arg: Is a directory" >&2
+       exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+       # Create intermediate dirs using mode 755 as modified by the umask.
+       # This is like FreeBSD 'install' as of 1997-10-28.
+       umask=`umask`
+       case $stripcmd.$umask in
+         # Optimize common cases.
+         *[2367][2367]) mkdir_umask=$umask;;
+         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+         *[0-7])
+           mkdir_umask=`expr $umask + 22 \
+             - $umask % 100 % 40 + $umask % 20 \
+             - $umask % 10 % 4 + $umask % 2
+           `;;
+         *) mkdir_umask=$umask,go-w;;
+       esac
+
+       # With -d, create the new directory with the user-specified mode.
+       # Otherwise, rely on $mkdir_umask.
+       if test -n "$dir_arg"; then
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       fi
+
+       posix_mkdir=false
+       case $umask in
+         *[123567][0-7][0-7])
+           # POSIX mkdir -p sets u+wx bits regardless of umask, which
+           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+           ;;
+         *)
+           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+           if (umask $mkdir_umask &&
+               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+           then
+             if test -z "$dir_arg" || {
+                  # Check for POSIX incompatibilities with -m.
+                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                  # other-writeable bit of parent directory when it shouldn't.
+                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                  case $ls_ld_tmpdir in
+                    d????-?r-*) different_mode=700;;
+                    d????-?--*) different_mode=755;;
+                    *) false;;
+                  esac &&
+                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                  }
+                }
+             then posix_mkdir=:
+             fi
+             rmdir "$tmpdir/d" "$tmpdir"
+           else
+             # Remove any dirs left behind by ancient mkdir implementations.
+             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+           fi
+           trap '' 0;;
+       esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+       /*) prefix='/';;
+       -*) prefix='./';;
+       *)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test -z "$d" && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (umask=$mkdir_umask &&
+            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+           # Don't fail if two instances are running concurrently.
+           test -d "$prefix" || exit 1
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+       # Now remove or move aside any old file at destination location.
+       # We try this two ways since rm can't unlink itself on some
+       # systems and the destination file might be busy for other
+       # reasons.  In this case, the final cleanup might fail but the new
+       # file should still install successfully.
+       {
+         test ! -f "$dst" ||
+         $doit $rmcmd -f "$dst" 2>/dev/null ||
+         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+         } ||
+         { echo "$0: cannot unlink or rename $dst" >&2
+           (exit 1); exit 1
+         }
+       } &&
+
+       # Now rename the file to the real destination.
+       $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100755 (executable)
index 0000000..aa5624c
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,9636 @@
+
+# libtool (GNU libtool) 2.4
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool 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 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+#       --config             show all configuration variables
+#       --debug              enable verbose shell tracing
+#   -n, --dry-run            display commands without modifying any files
+#       --features           display basic configuration information and exit
+#       --mode=MODE          use operation mode MODE
+#       --preserve-dup-deps  don't remove duplicate dependency libraries
+#       --quiet, --silent    don't print informational messages
+#       --no-quiet, --no-silent
+#                            print informational messages (default)
+#       --tag=TAG            use configuration variables from tag TAG
+#   -v, --verbose            print more informational messages than default
+#       --no-verbose         don't print the extra informational messages
+#       --version            print version information
+#   -h, --help, --help-all   print short, long, or detailed help message
+#
+# MODE must be one of the following:
+#
+#         clean              remove files from the build directory
+#         compile            compile a source file into a libtool object
+#         execute            automatically set library path, then run a program
+#         finish             complete the installation of libtool libraries
+#         install            install libraries or executables
+#         link               create a library or an executable
+#         uninstall          remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.  When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+#         host-triplet:        $host
+#         shell:               $SHELL
+#         compiler:            $LTCC
+#         compiler flags:              $LTCFLAGS
+#         linker:              $LD (gnu? $with_gnu_ld)
+#         $progname:   (GNU libtool) 2.4
+#         automake:    $automake_version
+#         autoconf:    $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4
+TIMESTAMP=""
+package_revision=1.3293
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# NLS nuisances: We save the old values to restore during execute mode.
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+          save_$lt_var=\$$lt_var
+          $lt_var=C
+         export $lt_var
+         lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+         lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+       fi"
+done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+$lt_unset CDPATH
+
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+
+
+: ${CP="cp -f"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${EGREP="/bin/grep -E"}
+: ${FGREP="/bin/grep -F"}
+: ${GREP="/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/bin/sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77     # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS="  $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+    # Extract subdirectory from the argument.
+    func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+    func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+    case ${2} in
+      .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+    esac
+} # func_stripname may be replaced by extended shell implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+               s@/\./@/@g
+               t dotsl
+               s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+#             value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+  # Start from root dir and reassemble the path.
+  func_normal_abspath_result=
+  func_normal_abspath_tpath=$1
+  func_normal_abspath_altnamespace=
+  case $func_normal_abspath_tpath in
+    "")
+      # Empty path, that just means $cwd.
+      func_stripname '' '/' "`pwd`"
+      func_normal_abspath_result=$func_stripname_result
+      return
+    ;;
+    # The next three entries are used to spot a run of precisely
+    # two leading slashes without using negated character classes;
+    # we take advantage of case's first-match behaviour.
+    ///*)
+      # Unusual form of absolute path, do nothing.
+    ;;
+    //*)
+      # Not necessarily an ordinary path; POSIX reserves leading '//'
+      # and for example Cygwin uses it to access remote file shares
+      # over CIFS/SMB, so we conserve a leading double slash if found.
+      func_normal_abspath_altnamespace=/
+    ;;
+    /*)
+      # Absolute path, do nothing.
+    ;;
+    *)
+      # Relative path, prepend $cwd.
+      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+    ;;
+  esac
+  # Cancel out all the simple stuff to save iterations.  We also want
+  # the path to end with a slash for ease of parsing, so make sure
+  # there is one (and only one) here.
+  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+  while :; do
+    # Processed it all yet?
+    if test "$func_normal_abspath_tpath" = / ; then
+      # If we ascended to the root using ".." the result may be empty now.
+      if test -z "$func_normal_abspath_result" ; then
+        func_normal_abspath_result=/
+      fi
+      break
+    fi
+    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcar"`
+    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcdr"`
+    # Figure out what to do with it
+    case $func_normal_abspath_tcomponent in
+      "")
+        # Trailing empty path component, ignore it.
+      ;;
+      ..)
+        # Parent dir; strip last assembled component from result.
+        func_dirname "$func_normal_abspath_result"
+        func_normal_abspath_result=$func_dirname_result
+      ;;
+      *)
+        # Actual path component, append it.
+        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+      ;;
+    esac
+  done
+  # Restore leading double-slash if one was found on entry.
+  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+#             value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+  func_relative_path_result=
+  func_normal_abspath "$1"
+  func_relative_path_tlibdir=$func_normal_abspath_result
+  func_normal_abspath "$2"
+  func_relative_path_tbindir=$func_normal_abspath_result
+
+  # Ascend the tree starting from libdir
+  while :; do
+    # check if we have found a prefix of bindir
+    case $func_relative_path_tbindir in
+      $func_relative_path_tlibdir)
+        # found an exact match
+        func_relative_path_tcancelled=
+        break
+        ;;
+      $func_relative_path_tlibdir*)
+        # found a matching prefix
+        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+        func_relative_path_tcancelled=$func_stripname_result
+        if test -z "$func_relative_path_result"; then
+          func_relative_path_result=.
+        fi
+        break
+        ;;
+      *)
+        func_dirname $func_relative_path_tlibdir
+        func_relative_path_tlibdir=${func_dirname_result}
+        if test "x$func_relative_path_tlibdir" = x ; then
+          # Have to descend all the way to the root!
+          func_relative_path_result=../$func_relative_path_result
+          func_relative_path_tcancelled=$func_relative_path_tbindir
+          break
+        fi
+        func_relative_path_result=../$func_relative_path_result
+        ;;
+    esac
+  done
+
+  # Now calculate path; take care to avoid doubling-up slashes.
+  func_stripname '' '/' "$func_relative_path_result"
+  func_relative_path_result=$func_stripname_result
+  func_stripname '/' '/' "$func_relative_path_tcancelled"
+  if test "x$func_stripname_result" != x ; then
+    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+  fi
+
+  # Normalisation. If bindir is libdir, return empty string,
+  # else relative path ending with a slash; either way, target
+  # file name can be directly appended.
+  if test ! -z "$func_relative_path_result"; then
+    func_stripname './' '' "$func_relative_path_result/"
+    func_relative_path_result=$func_stripname_result
+  fi
+}
+
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+  [\\/]*|[A-Za-z]:\\*) ;;
+  *[\\/]*)
+     progdir=$func_dirname_result
+     progdir=`cd "$progdir" && pwd`
+     progpath="$progdir/$progname"
+     ;;
+  *)
+     save_IFS="$IFS"
+     IFS=:
+     for progdir in $PATH; do
+       IFS="$save_IFS"
+       test -x "$progdir/$progname" && break
+     done
+     IFS="$save_IFS"
+     test -n "$progdir" || progdir=`pwd`
+     progpath="$progdir/$progname"
+     ;;
+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 that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes.  A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+  s/$bs4/&\\
+/g
+  s/^$bs2$dollar/$bs&/
+  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+  s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+    $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $opt_verbose && func_echo ${1+"$@"}
+
+    # A bug in bash halts the script if the last line of a function
+    # fails when set -e is in force, so we need another command to
+    # work around that:
+    :
+}
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*"
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+
+    # bash bug again:
+    :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    func_error ${1+"$@"}
+    func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information."  ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+    $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+    my_directory_path="$1"
+    my_dir_list=
+
+    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+      # Protect directory names starting with `-'
+      case $my_directory_path in
+        -*) my_directory_path="./$my_directory_path" ;;
+      esac
+
+      # While some portion of DIR does not yet exist...
+      while test ! -d "$my_directory_path"; do
+        # ...make a list in topmost first order.  Use a colon delimited
+       # list incase some portion of path contains whitespace.
+        my_dir_list="$my_directory_path:$my_dir_list"
+
+        # If the last portion added has no slash in it, the list is done
+        case $my_directory_path in */*) ;; *) break ;; esac
+
+        # ...otherwise throw away the child directory and loop
+        my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+      done
+      my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+
+      save_mkdir_p_IFS="$IFS"; IFS=':'
+      for my_dir in $my_dir_list; do
+       IFS="$save_mkdir_p_IFS"
+        # mkdir can fail with a `File exist' error if two processes
+        # try to create one of the directories concurrently.  Don't
+        # stop in that case!
+        $MKDIR "$my_dir" 2>/dev/null || :
+      done
+      IFS="$save_mkdir_p_IFS"
+
+      # Bail out if we (or some other process) failed to create a directory.
+      test -d "$my_directory_path" || \
+        func_fatal_error "Failed to create \`$1'"
+    fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+    if test "$opt_dry_run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+        # Failing that, at least try and use $RANDOM to avoid a race
+        my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+        save_mktempdir_umask=`umask`
+        umask 0077
+        $MKDIR "$my_tmpdir"
+        umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || \
+        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+    fi
+
+    $ECHO "$my_tmpdir"
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+    case $1 in
+      *[\\\`\"\$]*)
+       func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
+      *)
+        func_quote_for_eval_unquoted_result="$1" ;;
+    esac
+
+    case $func_quote_for_eval_unquoted_result in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting, command substitution and and variable
+      # expansion for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+        ;;
+      *)
+        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+    esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+    case $1 in
+      *[\\\`\"]*)
+       my_arg=`$ECHO "$1" | $SED \
+           -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+      *)
+        my_arg="$1" ;;
+    esac
+
+    case $my_arg in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting and command substitution for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+        my_arg="\"$my_arg\""
+        ;;
+    esac
+
+    func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
+
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$my_cmd"
+      my_status=$?
+      if test "$my_status" -eq 0; then :; else
+       eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.  Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
+
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$lt_user_locale
+           $my_cmd"
+      my_status=$?
+      eval "$lt_safe_locale"
+      if test "$my_status" -eq 0; then :; else
+       eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
+}
+
+# func_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result.  All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+  case $1 in
+  [0-9]* | *[!a-zA-Z0-9_]*)
+    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+    ;;
+  * )
+    func_tr_sh_result=$1
+    ;;
+  esac
+}
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $opt_debug
+
+    $SED -n '/(C)/!b go
+       :more
+       /\./!{
+         N
+         s/\n# / /
+         b more
+       }
+       :go
+       /^# '$PROGRAM' (GNU /,/# warranty; / {
+        s/^# //
+       s/^# *$//
+        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+        p
+     }' < "$progpath"
+     exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+    $opt_debug
+
+    $SED -n '/^# Usage:/,/^#  *.*--help/ {
+        s/^# //
+       s/^# *$//
+       s/\$progname/'$progname'/
+       p
+    }' < "$progpath"
+    echo
+    $ECHO "run \`$progname --help | more' for full usage"
+    exit $?
+}
+
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
+func_help ()
+{
+    $opt_debug
+
+    $SED -n '/^# Usage:/,/# Report bugs to/ {
+       :print
+        s/^# //
+       s/^# *$//
+       s*\$progname*'$progname'*
+       s*\$host*'"$host"'*
+       s*\$SHELL*'"$SHELL"'*
+       s*\$LTCC*'"$LTCC"'*
+       s*\$LTCFLAGS*'"$LTCFLAGS"'*
+       s*\$LD*'"$LD"'*
+       s/\$with_gnu_ld/'"$with_gnu_ld"'/
+       s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+       s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+       p
+       d
+     }
+     /^# .* home page:/b print
+     /^# General help using/b print
+     ' < "$progpath"
+    ret=$?
+    if test -z "$1"; then
+      exit $ret
+    fi
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    $opt_debug
+
+    func_error "missing argument for $1."
+    exit_cmd=exit
+}
+
+
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+
+    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+    my_sed_long_arg='1s/^--[^=]*=//'
+
+    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
+
+
+
+
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+    eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+    func_quote_for_eval "${2}"
+    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+    func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+    func_error ${1+"$@"}
+    func_error "See the $PACKAGE documentation for more information."
+    func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+    re_begincf='^# ### BEGIN LIBTOOL'
+    re_endcf='^# ### END LIBTOOL'
+
+    # Default configuration.
+    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+    done
+
+    exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+    echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      echo "enable shared libraries"
+    else
+      echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      echo "enable static libraries"
+    else
+      echo "disable static libraries"
+    fi
+
+    exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+  # Global variable:
+  tagname="$1"
+
+  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+  sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+  # Validate tagname.
+  case $tagname in
+    *[!-_A-Za-z0-9,/]*)
+      func_fatal_error "invalid tag name: $tagname"
+      ;;
+  esac
+
+  # Don't test for the "default" C tag, as we know it's
+  # there but not specially marked.
+  case $tagname in
+    CC) ;;
+    *)
+      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+       taglist="$taglist $tagname"
+
+       # Evaluate the configuration.  Be careful to quote the path
+       # and the sed script, to avoid splitting on whitespace, but
+       # also don't use non-portable quotes within backquotes within
+       # quotes we have to do it in 2 steps:
+       extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+       eval "$extractedcf"
+      else
+       func_error "ignoring unknown tag $tagname"
+      fi
+      ;;
+  esac
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      else
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      fi
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+    fi
+
+    exit $EXIT_MISMATCH
+  fi
+}
+
+
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+  shift; set dummy --mode clean ${1+"$@"}; shift
+  ;;
+compile|compil|compi|comp|com|co|c)
+  shift; set dummy --mode compile ${1+"$@"}; shift
+  ;;
+execute|execut|execu|exec|exe|ex|e)
+  shift; set dummy --mode execute ${1+"$@"}; shift
+  ;;
+finish|finis|fini|fin|fi|f)
+  shift; set dummy --mode finish ${1+"$@"}; shift
+  ;;
+install|instal|insta|inst|ins|in|i)
+  shift; set dummy --mode install ${1+"$@"}; shift
+  ;;
+link|lin|li|l)
+  shift; set dummy --mode link ${1+"$@"}; shift
+  ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+  shift; set dummy --mode uninstall ${1+"$@"}; shift
+  ;;
+esac
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
+
+
+# Parse options once, thoroughly.  This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+  # this just eases exit handling
+  while test $# -gt 0; do
+    opt="$1"
+    shift
+    case $opt in
+      --debug|-x)      opt_debug='set -x'
+                       func_echo "enabling shell trace mode"
+                       $opt_debug
+                       ;;
+      --dry-run|--dryrun|-n)
+                       opt_dry_run=:
+                       ;;
+      --config)
+                       opt_config=:
+func_config
+                       ;;
+      --dlopen|-dlopen)
+                       optarg="$1"
+                       opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+                       shift
+                       ;;
+      --preserve-dup-deps)
+                       opt_preserve_dup_deps=:
+                       ;;
+      --features)
+                       opt_features=:
+func_features
+                       ;;
+      --finish)
+                       opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+                       ;;
+      --help)
+                       opt_help=:
+                       ;;
+      --help-all)
+                       opt_help_all=:
+opt_help=': help-all'
+                       ;;
+      --mode)
+                       test $# = 0 && func_missing_arg $opt && break
+                       optarg="$1"
+                       opt_mode="$optarg"
+case $optarg in
+  # Valid mode arguments:
+  clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+  # Catch anything else as an error
+  *) func_error "invalid argument for $opt"
+     exit_cmd=exit
+     break
+     ;;
+esac
+                       shift
+                       ;;
+      --no-silent|--no-quiet)
+                       opt_silent=false
+func_append preserve_args " $opt"
+                       ;;
+      --no-verbose)
+                       opt_verbose=false
+func_append preserve_args " $opt"
+                       ;;
+      --silent|--quiet)
+                       opt_silent=:
+func_append preserve_args " $opt"
+        opt_verbose=false
+                       ;;
+      --verbose|-v)
+                       opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+                       ;;
+      --tag)
+                       test $# = 0 && func_missing_arg $opt && break
+                       optarg="$1"
+                       opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
+                       shift
+                       ;;
+
+      -\?|-h)          func_usage                              ;;
+      --help)          func_help                               ;;
+      --version)       func_version                            ;;
+
+      # Separate optargs to long options:
+      --*=*)
+                       func_split_long_opt "$opt"
+                       set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+                       shift
+                       ;;
+
+      # Separate non-argument short options:
+      -\?*|-h*|-n*|-v*)
+                       func_split_short_opt "$opt"
+                       set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+                       shift
+                       ;;
+
+      --)              break                                   ;;
+      -*)              func_fatal_help "unrecognized option \`$opt'" ;;
+      *)               set dummy "$opt" ${1+"$@"};     shift; break  ;;
+    esac
+  done
+
+  # Validate options:
+
+  # save first non-option argument
+  if test "$#" -gt 0; then
+    nonopt="$opt"
+    shift
+  fi
+
+  # preserve --debug
+  test "$opt_debug" = : || func_append preserve_args " --debug"
+
+  case $host in
+    *cygwin* | *mingw* | *pw32* | *cegcc*)
+      # don't eliminate duplications in $postdeps and $predeps
+      opt_duplicate_compiler_generated_deps=:
+      ;;
+    *)
+      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+      ;;
+  esac
+
+  $opt_help || {
+    # Sanity checks first:
+    func_check_version_match
+
+    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+      func_fatal_configuration "not configured to build any kind of library"
+    fi
+
+    # Darwin sucks
+    eval std_shrext=\"$shrext_cmds\"
+
+    # Only execute mode is allowed to have -dlopen flags.
+    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+      func_error "unrecognized option \`-dlopen'"
+      $ECHO "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Change the help message to a mode-specific one.
+    generic_help="$help"
+    help="Try \`$progname --help --mode=$opt_mode' for more information."
+  }
+
+
+  # Bail if the options were screwed
+  $exit_cmd $EXIT_FAILURE
+}
+
+
+
+
+## ----------- ##
+##    Main.    ##
+## ----------- ##
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+    test -f "$1" &&
+      $SED -e 4q "$1" 2>/dev/null \
+        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs.  To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway.  Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+    lalib_p=no
+    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+       for lalib_p_l in 1 2 3 4
+       do
+           read lalib_p_line
+           case "$lalib_p_line" in
+               \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+           esac
+       done
+       exec 0<&5 5<&-
+    fi
+    test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+    func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+    func_ltwrapper_exec_suffix=
+    case $1 in
+    *.exe) ;;
+    *) func_ltwrapper_exec_suffix=.exe ;;
+    esac
+    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+    func_dirname_and_basename "$1" "" "."
+    func_stripname '' '.exe' "$func_basename_result"
+    func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+    $opt_debug
+    save_ifs=$IFS; IFS='~'
+    for cmd in $1; do
+      IFS=$save_ifs
+      eval cmd=\"$cmd\"
+      func_show_eval "$cmd" "${2-:}"
+    done
+    IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)!  Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+    $opt_debug
+    case $1 in
+    */* | *\\*)        . "$1" ;;
+    *)         . "./$1" ;;
+    esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot.  Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+  func_resolve_sysroot_result=$1
+  case $func_resolve_sysroot_result in
+  =*)
+    func_stripname '=' '' "$func_resolve_sysroot_result"
+    func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+    ;;
+  esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+  case "$lt_sysroot:$1" in
+  ?*:"$lt_sysroot"*)
+    func_stripname "$lt_sysroot" '' "$1"
+    func_replace_sysroot_result="=$func_stripname_result"
+    ;;
+  *)
+    # Including no sysroot.
+    func_replace_sysroot_result=$1
+    ;;
+  esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    $opt_debug
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+       func_append_quoted CC_quoted "$arg"
+      done
+      CC_expanded=`func_echo_all $CC`
+      CC_quoted_expanded=`func_echo_all $CC_quoted`
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+      " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+       for z in $available_tags; do
+         if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+           # Evaluate the configuration.
+           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+           CC_quoted=
+           for arg in $CC; do
+             # Double-quote args containing other shell metacharacters.
+             func_append_quoted CC_quoted "$arg"
+           done
+           CC_expanded=`func_echo_all $CC`
+           CC_quoted_expanded=`func_echo_all $CC_quoted`
+           case "$@ " in
+           " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+           " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+             # The compiler in the base compile command matches
+             # the one in the tagged configuration.
+             # Assume this is the tagged configuration we want.
+             tagname=$z
+             break
+             ;;
+           esac
+         fi
+       done
+       # If $tagname still isn't set, then no tagged configuration
+       # was found and let the user know that the "--tag" command
+       # line option must be used.
+       if test -z "$tagname"; then
+         func_echo "unable to infer tagged configuration"
+         func_fatal_error "specify a tag with \`--tag'"
+#      else
+#        func_verbose "using $tagname tagged configuration"
+       fi
+       ;;
+      esac
+    fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+    write_libobj=${1}
+    if test "$build_libtool_libs" = yes; then
+      write_lobj=\'${2}\'
+    else
+      write_lobj=none
+    fi
+
+    if test "$build_old_libs" = yes; then
+      write_oldobj=\'${3}\'
+    else
+      write_oldobj=none
+    fi
+
+    $opt_dry_run || {
+      cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+      $MV "${write_libobj}T" "${write_libobj}"
+    }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+  $opt_debug
+  func_convert_core_file_wine_to_w32_result="$1"
+  if test -n "$1"; then
+    # Unfortunately, winepath does not exit with a non-zero error code, so we
+    # are forced to check the contents of stdout. On the other hand, if the
+    # command is not found, the shell will set an exit code of 127 and print
+    # *an error message* to stdout. So we must check for both error code of
+    # zero AND non-empty stdout, which explains the odd construction:
+    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+        $SED -e "$lt_sed_naive_backslashify"`
+    else
+      func_convert_core_file_wine_to_w32_result=
+    fi
+  fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+  $opt_debug
+  # unfortunately, winepath doesn't convert paths, only file names
+  func_convert_core_path_wine_to_w32_result=""
+  if test -n "$1"; then
+    oldIFS=$IFS
+    IFS=:
+    for func_convert_core_path_wine_to_w32_f in $1; do
+      IFS=$oldIFS
+      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+        if test -z "$func_convert_core_path_wine_to_w32_result"; then
+          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+        else
+          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+        fi
+      fi
+    done
+    IFS=$oldIFS
+  fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+  $opt_debug
+  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+    if test "$?" -ne 0; then
+      # on failure, ensure result is empty
+      func_cygpath_result=
+    fi
+  else
+    func_cygpath_result=
+    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+  fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format.  Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+  $opt_debug
+  # awkward: cmd appends spaces to result
+  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+  $opt_debug
+  if test -z "$2" && test -n "$1" ; then
+    func_error "Could not determine host file name corresponding to"
+    func_error "  \`$1'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback:
+    func_to_host_file_result="$1"
+  fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+  $opt_debug
+  if test -z "$4" && test -n "$3"; then
+    func_error "Could not determine the host path corresponding to"
+    func_error "  \`$3'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback.  This is a deliberately simplistic "conversion" and
+    # should not be "improved".  See libtool.info.
+    if test "x$1" != "x$2"; then
+      lt_replace_pathsep_chars="s|$1|$2|g"
+      func_to_host_path_result=`echo "$3" |
+        $SED -e "$lt_replace_pathsep_chars"`
+    else
+      func_to_host_path_result="$3"
+    fi
+  fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+  $opt_debug
+  case $4 in
+  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+    ;;
+  esac
+  case $4 in
+  $2 ) func_append func_to_host_path_result "$3"
+    ;;
+  esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+  $opt_debug
+  $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result.  If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+  $opt_debug
+  case ,$2, in
+    *,"$to_tool_file_cmd",*)
+      func_to_tool_file_result=$1
+      ;;
+    *)
+      $to_tool_file_cmd "$1"
+      func_to_tool_file_result=$func_to_host_file_result
+      ;;
+  esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+  func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+    # LT_CYGPATH in this case.
+    func_to_host_file_result=`cygpath -m "$1"`
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format.  Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_file_wine_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_msys_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+    func_convert_core_file_wine_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format.  If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+#   file name conversion function    : func_convert_file_X_to_Y ()
+#   path conversion function         : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same.  If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+  $opt_debug
+  if test -z "$to_host_path_cmd"; then
+    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+    to_host_path_cmd="func_convert_path_${func_stripname_result}"
+  fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+  $opt_debug
+  func_init_to_host_path_cmd
+  $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+  func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from ARG.  MSYS
+    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+    # and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format.  Requires a wine environment and
+# a working winepath.  Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from
+    # ARG. msys behavior is inconsistent here, cygpath turns them
+    # into '.;' and ';.', and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+    $opt_debug
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+    pie_flag=
+
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+       # do not "continue".  Instead, add this to base_compile
+       lastarg="$arg"
+       arg_mode=normal
+       ;;
+
+      target )
+       libobj="$arg"
+       arg_mode=normal
+       continue
+       ;;
+
+      normal )
+       # Accept any command-line options.
+       case $arg in
+       -o)
+         test -n "$libobj" && \
+           func_fatal_error "you cannot specify \`-o' more than once"
+         arg_mode=target
+         continue
+         ;;
+
+       -pie | -fpie | -fPIE)
+          func_append pie_flag " $arg"
+         continue
+         ;;
+
+       -shared | -static | -prefer-pic | -prefer-non-pic)
+         func_append later " $arg"
+         continue
+         ;;
+
+       -no-suppress)
+         suppress_opt=no
+         continue
+         ;;
+
+       -Xcompiler)
+         arg_mode=arg  #  the next one goes into the "base_compile" arg list
+         continue      #  The current "srcfile" will either be retained or
+         ;;            #  replaced later.  I would guess that would be a bug.
+
+       -Wc,*)
+         func_stripname '-Wc,' '' "$arg"
+         args=$func_stripname_result
+         lastarg=
+         save_ifs="$IFS"; IFS=','
+         for arg in $args; do
+           IFS="$save_ifs"
+           func_append_quoted lastarg "$arg"
+         done
+         IFS="$save_ifs"
+         func_stripname ' ' '' "$lastarg"
+         lastarg=$func_stripname_result
+
+         # Add the arguments to base_compile.
+         func_append base_compile " $lastarg"
+         continue
+         ;;
+
+       *)
+         # Accept the current argument as the source file.
+         # The previous "srcfile" becomes the current argument.
+         #
+         lastarg="$srcfile"
+         srcfile="$arg"
+         ;;
+       esac  #  case $arg
+       ;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      func_append_quoted base_compile "$lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      func_fatal_error "you must specify an argument for -Xcompile"
+      ;;
+    target)
+      func_fatal_error "you must specify a target with \`-o'"
+      ;;
+    *)
+      # Get the name of the library object.
+      test -z "$libobj" && {
+       func_basename "$srcfile"
+       libobj="$func_basename_result"
+      }
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    case $libobj in
+    *.[cCFSifmso] | \
+    *.ada | *.adb | *.ads | *.asm | \
+    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+    *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+      func_xform "$libobj"
+      libobj=$func_xform_result
+      ;;
+    esac
+
+    case $libobj in
+    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+    *)
+      func_fatal_error "cannot determine name of library object from \`$libobj'"
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -shared)
+       test "$build_libtool_libs" != yes && \
+         func_fatal_configuration "can not build a shared library"
+       build_old_libs=no
+       continue
+       ;;
+
+      -static)
+       build_libtool_libs=no
+       build_old_libs=yes
+       continue
+       ;;
+
+      -prefer-pic)
+       pic_mode=yes
+       continue
+       ;;
+
+      -prefer-non-pic)
+       pic_mode=no
+       continue
+       ;;
+      esac
+    done
+
+    func_quote_for_eval "$libobj"
+    test "X$libobj" != "X$func_quote_for_eval_result" \
+      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'   &()|`$[]' \
+      && func_warning "libobj name \`$libobj' may not contain shell special characters."
+    func_dirname_and_basename "$obj" "/" ""
+    objname="$func_basename_result"
+    xdir="$func_dirname_result"
+    lobj=${xdir}$objdir/$objname
+
+    test -z "$base_compile" && \
+      func_fatal_help "you must specify a compilation command"
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2* | cegcc*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+       func_echo "Waiting for $lockfile to be removed"
+       sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+       $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $opt_dry_run || $RM $removelist
+       exit $EXIT_FAILURE
+      fi
+      func_append removelist " $output_obj"
+      $ECHO "$srcfile" > "$lockfile"
+    fi
+
+    $opt_dry_run || $RM $removelist
+    func_append removelist " $lockfile"
+    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+    srcfile=$func_to_tool_file_result
+    func_quote_for_eval "$srcfile"
+    qsrcfile=$func_quote_for_eval_result
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+       command="$base_compile $qsrcfile $pic_flag"
+      else
+       # Don't build PIC code
+       command="$base_compile $qsrcfile"
+      fi
+
+      func_mkdir_p "$xdir$objdir"
+
+      if test -z "$output_obj"; then
+       # Place PIC objects in $objdir
+       func_append command " -o $lobj"
+      fi
+
+      func_show_eval_locale "$command" \
+          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+      if test "$need_locks" = warn &&
+        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+       $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $opt_dry_run || $RM $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+       func_show_eval '$MV "$output_obj" "$lobj"' \
+         'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+       suppress_output=' >/dev/null 2>&1'
+      fi
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+       # Don't build PIC code
+       command="$base_compile $qsrcfile$pie_flag"
+      else
+       command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+       func_append command " -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      func_append command "$suppress_output"
+      func_show_eval_locale "$command" \
+        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+      if test "$need_locks" = warn &&
+        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+       $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $opt_dry_run || $RM $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+       func_show_eval '$MV "$output_obj" "$obj"' \
+         'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+    fi
+
+    $opt_dry_run || {
+      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+      # Unlock the critical section if it was locked
+      if test "$need_locks" != no; then
+       removelist=$lockfile
+        $RM "$lockfile"
+      fi
+    }
+
+    exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+  test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+    # We need to display help for each of the modes.
+    case $opt_mode in
+      "")
+        # Generic help is extracted from the usage comments
+        # at the start of this file.
+        func_help
+        ;;
+
+      clean)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+        ;;
+
+      compile)
+      $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -no-suppress      do not suppress compiler output for multiple passes
+  -prefer-pic       try to build PIC objects only
+  -prefer-non-pic   try to build non-PIC objects only
+  -shared           do not build a \`.o' file suitable for static linking
+  -static           only build a \`.o' file suitable for static linking
+  -Wc,FLAG          pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+        ;;
+
+      execute)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+        ;;
+
+      finish)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+        ;;
+
+      install)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+  -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+        ;;
+
+      link)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -bindir BINDIR    specify path to binaries directory (for systems where
+                    libraries must be found in the PATH setting at runtime)
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+                    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -shared           only do dynamic linking of libtool libraries
+  -shrext SUFFIX    override the standard shared library file extension
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+                    specify library version info [each variable defaults to 0]
+  -weak LIBNAME     declare that the target provides the LIBNAME interface
+  -Wc,FLAG
+  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
+  -Wl,FLAG
+  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
+  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+        ;;
+
+      uninstall)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+        ;;
+
+      *)
+        func_fatal_help "invalid operation mode \`$opt_mode'"
+        ;;
+    esac
+
+    echo
+    $ECHO "Try \`$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+  if test "$opt_help" = :; then
+    func_mode_help
+  else
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+       func_mode_help
+      done
+    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+       echo
+       func_mode_help
+      done
+    } |
+    sed '1d
+      /^When reporting/,/^Report/{
+       H
+       d
+      }
+      $x
+      /information about other modes/d
+      /more detailed .*MODE/d
+      s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+  fi
+  exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+    $opt_debug
+    # The first argument is the command name.
+    cmd="$nonopt"
+    test -z "$cmd" && \
+      func_fatal_help "you must specify a COMMAND"
+
+    # Handle -dlopen flags immediately.
+    for file in $opt_dlopen; do
+      test -f "$file" \
+       || func_fatal_help "\`$file' is not a file"
+
+      dir=
+      case $file in
+      *.la)
+       func_resolve_sysroot "$file"
+       file=$func_resolve_sysroot_result
+
+       # Check to see that this really is a libtool archive.
+       func_lalib_unsafe_p "$file" \
+         || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+       # Read the libtool library.
+       dlname=
+       library_names=
+       func_source "$file"
+
+       # Skip this library if it cannot be dlopened.
+       if test -z "$dlname"; then
+         # Warn if it was a shared library.
+         test -n "$library_names" && \
+           func_warning "\`$file' was not linked with \`-export-dynamic'"
+         continue
+       fi
+
+       func_dirname "$file" "" "."
+       dir="$func_dirname_result"
+
+       if test -f "$dir/$objdir/$dlname"; then
+         func_append dir "/$objdir"
+       else
+         if test ! -f "$dir/$dlname"; then
+           func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+         fi
+       fi
+       ;;
+
+      *.lo)
+       # Just add the directory containing the .lo file.
+       func_dirname "$file" "" "."
+       dir="$func_dirname_result"
+       ;;
+
+      *)
+       func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+       continue
+       ;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+       eval "$shlibpath_var=\"\$dir\""
+      else
+       eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -* | *.la | *.lo ) ;;
+      *)
+       # Do a test to see if this is really a libtool program.
+       if func_ltwrapper_script_p "$file"; then
+         func_source "$file"
+         # Transform arg to wrapped name.
+         file="$progdir/$program"
+       elif func_ltwrapper_executable_p "$file"; then
+         func_ltwrapper_scriptname "$file"
+         func_source "$func_ltwrapper_scriptname_result"
+         # Transform arg to wrapped name.
+         file="$progdir/$program"
+       fi
+       ;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      func_append_quoted args "$file"
+    done
+
+    if test "X$opt_dry_run" = Xfalse; then
+      if test -n "$shlibpath_var"; then
+       # Export the shlibpath_var.
+       eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+       eval "if test \"\${save_$lt_var+set}\" = set; then
+                $lt_var=\$save_$lt_var; export $lt_var
+             else
+               $lt_unset $lt_var
+             fi"
+      done
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+       eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+       echo "export $shlibpath_var"
+      fi
+      $ECHO "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+}
+
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $opt_debug
+    libs=
+    libdirs=
+    admincmds=
+
+    for opt in "$nonopt" ${1+"$@"}
+    do
+      if test -d "$opt"; then
+       func_append libdirs " $opt"
+
+      elif test -f "$opt"; then
+       if func_lalib_unsafe_p "$opt"; then
+         func_append libs " $opt"
+       else
+         func_warning "\`$opt' is not a valid libtool archive"
+       fi
+
+      else
+       func_fatal_error "invalid argument \`$opt'"
+      fi
+    done
+
+    if test -n "$libs"; then
+      if test -n "$lt_sysroot"; then
+        sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+        sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+      else
+        sysroot_cmd=
+      fi
+
+      # Remove sysroot references
+      if $opt_dry_run; then
+        for lib in $libs; do
+          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+        done
+      else
+        tmpdir=`func_mktempdir`
+        for lib in $libs; do
+         sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+           > $tmpdir/tmp-la
+         mv -f $tmpdir/tmp-la $lib
+       done
+        ${RM}r "$tmpdir"
+      fi
+    fi
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for libdir in $libdirs; do
+       if test -n "$finish_cmds"; then
+         # Do each command in the finish commands.
+         func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+       fi
+       if test -n "$finish_eval"; then
+         # Do the single finish_eval.
+         eval cmds=\"$finish_eval\"
+         $opt_dry_run || eval "$cmds" || func_append admincmds "
+       $cmds"
+       fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    $opt_silent && exit $EXIT_SUCCESS
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      echo "----------------------------------------------------------------------"
+      echo "Libraries have been installed in:"
+      for libdir in $libdirs; do
+       $ECHO "   $libdir"
+      done
+      echo
+      echo "If you ever happen to want to link against installed libraries"
+      echo "in a given directory, LIBDIR, you must either use libtool, and"
+      echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+      echo "flag during linking and do at least one of the following:"
+      if test -n "$shlibpath_var"; then
+       echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+       echo "     during execution"
+      fi
+      if test -n "$runpath_var"; then
+       echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+       echo "     during linking"
+      fi
+      if test -n "$hardcode_libdir_flag_spec"; then
+       libdir=LIBDIR
+       eval flag=\"$hardcode_libdir_flag_spec\"
+
+       $ECHO "   - use the \`$flag' linker flag"
+      fi
+      if test -n "$admincmds"; then
+       $ECHO "   - have your system administrator run these commands:$admincmds"
+      fi
+      if test -f /etc/ld.so.conf; then
+       echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+      fi
+      echo
+
+      echo "See any operating system documentation about shared libraries for"
+      case $host in
+       solaris2.[6789]|solaris2.1[0-9])
+         echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+         echo "pages."
+         ;;
+       *)
+         echo "more information, such as the ld(1) and ld.so(8) manual pages."
+         ;;
+      esac
+      echo "----------------------------------------------------------------------"
+    fi
+    exit $EXIT_SUCCESS
+}
+
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+    $opt_debug
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       case $nonopt in *shtool*) :;; *) false;; esac; then
+      # Aesthetically quote it.
+      func_quote_for_eval "$nonopt"
+      install_prog="$func_quote_for_eval_result "
+      arg=$1
+      shift
+    else
+      install_prog=
+      arg=$nonopt
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    func_quote_for_eval "$arg"
+    func_append install_prog "$func_quote_for_eval_result"
+    install_shared_prog=$install_prog
+    case " $install_prog " in
+      *[\\\ /]cp\ *) install_cp=: ;;
+      *) install_cp=false ;;
+    esac
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    no_mode=:
+    for arg
+    do
+      arg2=
+      if test -n "$dest"; then
+       func_append files " $dest"
+       dest=$arg
+       continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f)
+       if $install_cp; then :; else
+         prev=$arg
+       fi
+       ;;
+      -g | -m | -o)
+       prev=$arg
+       ;;
+      -s)
+       stripme=" -s"
+       continue
+       ;;
+      -*)
+       ;;
+      *)
+       # If the previous option needed an argument, then skip it.
+       if test -n "$prev"; then
+         if test "x$prev" = x-m && test -n "$install_override_mode"; then
+           arg2=$install_override_mode
+           no_mode=false
+         fi
+         prev=
+       else
+         dest=$arg
+         continue
+       fi
+       ;;
+      esac
+
+      # Aesthetically quote the argument.
+      func_quote_for_eval "$arg"
+      func_append install_prog " $func_quote_for_eval_result"
+      if test -n "$arg2"; then
+       func_quote_for_eval "$arg2"
+      fi
+      func_append install_shared_prog " $func_quote_for_eval_result"
+    done
+
+    test -z "$install_prog" && \
+      func_fatal_help "you must specify an install program"
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prev' option requires an argument"
+
+    if test -n "$install_override_mode" && $no_mode; then
+      if $install_cp; then :; else
+       func_quote_for_eval "$install_override_mode"
+       func_append install_shared_prog " -m $func_quote_for_eval_result"
+      fi
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+       func_fatal_help "no file or destination specified"
+      else
+       func_fatal_help "you must specify a destination"
+      fi
+    fi
+
+    # Strip any trailing slash from the destination.
+    func_stripname '' '/' "$dest"
+    dest=$func_stripname_result
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      func_dirname_and_basename "$dest" "" "."
+      destdir="$func_dirname_result"
+      destname="$func_basename_result"
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files; shift
+      test "$#" -gt 1 && \
+       func_fatal_help "\`$dest' is not a directory"
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+       case $file in
+       *.lo) ;;
+       *)
+         func_fatal_help "\`$destdir' must be an absolute directory name"
+         ;;
+       esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+       # Do the static libraries later.
+       func_append staticlibs " $file"
+       ;;
+
+      *.la)
+       func_resolve_sysroot "$file"
+       file=$func_resolve_sysroot_result
+
+       # Check to see that this really is a libtool archive.
+       func_lalib_unsafe_p "$file" \
+         || func_fatal_help "\`$file' is not a valid libtool archive"
+
+       library_names=
+       old_library=
+       relink_command=
+       func_source "$file"
+
+       # Add the libdir to current_libdirs if it is the destination.
+       if test "X$destdir" = "X$libdir"; then
+         case "$current_libdirs " in
+         *" $libdir "*) ;;
+         *) func_append current_libdirs " $libdir" ;;
+         esac
+       else
+         # Note the libdir as a future libdir.
+         case "$future_libdirs " in
+         *" $libdir "*) ;;
+         *) func_append future_libdirs " $libdir" ;;
+         esac
+       fi
+
+       func_dirname "$file" "/" ""
+       dir="$func_dirname_result"
+       func_append dir "$objdir"
+
+       if test -n "$relink_command"; then
+         # Determine the prefix the user has applied to our future dir.
+         inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+         # Don't allow the user to place us outside of our expected
+         # location b/c this prevents finding dependent libraries that
+         # are installed to the same prefix.
+         # At present, this check doesn't affect windows .dll's that
+         # are installed into $libdir/../bin (currently, that works fine)
+         # but it's something to keep an eye on.
+         test "$inst_prefix_dir" = "$destdir" && \
+           func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+         if test -n "$inst_prefix_dir"; then
+           # Stick the inst_prefix_dir data into the link command.
+           relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+         else
+           relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+         fi
+
+         func_warning "relinking \`$file'"
+         func_show_eval "$relink_command" \
+           'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+       fi
+
+       # See the names of the shared library.
+       set dummy $library_names; shift
+       if test -n "$1"; then
+         realname="$1"
+         shift
+
+         srcname="$realname"
+         test -n "$relink_command" && srcname="$realname"T
+
+         # Install the shared library and build the symlinks.
+         func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+             'exit $?'
+         tstripme="$stripme"
+         case $host_os in
+         cygwin* | mingw* | pw32* | cegcc*)
+           case $realname in
+           *.dll.a)
+             tstripme=""
+             ;;
+           esac
+           ;;
+         esac
+         if test -n "$tstripme" && test -n "$striplib"; then
+           func_show_eval "$striplib $destdir/$realname" 'exit $?'
+         fi
+
+         if test "$#" -gt 0; then
+           # Delete the old symlinks, and create new ones.
+           # Try `ln -sf' first, because the `ln' binary might depend on
+           # the symlink we replace!  Solaris /bin/ln does not understand -f,
+           # so we also need to try rm && ln -s.
+           for linkname
+           do
+             test "$linkname" != "$realname" \
+               && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+           done
+         fi
+
+         # Do each command in the postinstall commands.
+         lib="$destdir/$realname"
+         func_execute_cmds "$postinstall_cmds" 'exit $?'
+       fi
+
+       # Install the pseudo-library for information purposes.
+       func_basename "$file"
+       name="$func_basename_result"
+       instname="$dir/$name"i
+       func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+       # Maybe install the static library, too.
+       test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+       ;;
+
+      *.lo)
+       # Install (i.e. copy) a libtool object.
+
+       # Figure out destination file name, if it wasn't already specified.
+       if test -n "$destname"; then
+         destfile="$destdir/$destname"
+       else
+         func_basename "$file"
+         destfile="$func_basename_result"
+         destfile="$destdir/$destfile"
+       fi
+
+       # Deduce the name of the destination old-style object file.
+       case $destfile in
+       *.lo)
+         func_lo2o "$destfile"
+         staticdest=$func_lo2o_result
+         ;;
+       *.$objext)
+         staticdest="$destfile"
+         destfile=
+         ;;
+       *)
+         func_fatal_help "cannot copy a libtool object to \`$destfile'"
+         ;;
+       esac
+
+       # Install the libtool object if requested.
+       test -n "$destfile" && \
+         func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+       # Install the old object if enabled.
+       if test "$build_old_libs" = yes; then
+         # Deduce the name of the old-style object file.
+         func_lo2o "$file"
+         staticobj=$func_lo2o_result
+         func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+       fi
+       exit $EXIT_SUCCESS
+       ;;
+
+      *)
+       # Figure out destination file name, if it wasn't already specified.
+       if test -n "$destname"; then
+         destfile="$destdir/$destname"
+       else
+         func_basename "$file"
+         destfile="$func_basename_result"
+         destfile="$destdir/$destfile"
+       fi
+
+       # If the file is missing, and there is a .exe on the end, strip it
+       # because it is most likely a libtool script we actually want to
+       # install
+       stripped_ext=""
+       case $file in
+         *.exe)
+           if test ! -f "$file"; then
+             func_stripname '' '.exe' "$file"
+             file=$func_stripname_result
+             stripped_ext=".exe"
+           fi
+           ;;
+       esac
+
+       # Do a test to see if this is really a libtool program.
+       case $host in
+       *cygwin* | *mingw*)
+           if func_ltwrapper_executable_p "$file"; then
+             func_ltwrapper_scriptname "$file"
+             wrapper=$func_ltwrapper_scriptname_result
+           else
+             func_stripname '' '.exe' "$file"
+             wrapper=$func_stripname_result
+           fi
+           ;;
+       *)
+           wrapper=$file
+           ;;
+       esac
+       if func_ltwrapper_script_p "$wrapper"; then
+         notinst_deplibs=
+         relink_command=
+
+         func_source "$wrapper"
+
+         # Check the variables that should have been set.
+         test -z "$generated_by_libtool_version" && \
+           func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+         finalize=yes
+         for lib in $notinst_deplibs; do
+           # Check to see that each library is installed.
+           libdir=
+           if test -f "$lib"; then
+             func_source "$lib"
+           fi
+           libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
+           if test -n "$libdir" && test ! -f "$libfile"; then
+             func_warning "\`$lib' has not been installed in \`$libdir'"
+             finalize=no
+           fi
+         done
+
+         relink_command=
+         func_source "$wrapper"
+
+         outputname=
+         if test "$fast_install" = no && test -n "$relink_command"; then
+           $opt_dry_run || {
+             if test "$finalize" = yes; then
+               tmpdir=`func_mktempdir`
+               func_basename "$file$stripped_ext"
+               file="$func_basename_result"
+               outputname="$tmpdir/$file"
+               # Replace the output file specification.
+               relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+               $opt_silent || {
+                 func_quote_for_expand "$relink_command"
+                 eval "func_echo $func_quote_for_expand_result"
+               }
+               if eval "$relink_command"; then :
+                 else
+                 func_error "error: relink \`$file' with the above command before installing it"
+                 $opt_dry_run || ${RM}r "$tmpdir"
+                 continue
+               fi
+               file="$outputname"
+             else
+               func_warning "cannot relink \`$file'"
+             fi
+           }
+         else
+           # Install the binary that we compiled earlier.
+           file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+         fi
+       fi
+
+       # remove .exe since cygwin /usr/bin/install will append another
+       # one anyway
+       case $install_prog,$host in
+       */usr/bin/install*,*cygwin*)
+         case $file:$destfile in
+         *.exe:*.exe)
+           # this is ok
+           ;;
+         *.exe:*)
+           destfile=$destfile.exe
+           ;;
+         *:*.exe)
+           func_stripname '' '.exe' "$destfile"
+           destfile=$func_stripname_result
+           ;;
+         esac
+         ;;
+       esac
+       func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+       $opt_dry_run || if test -n "$outputname"; then
+         ${RM}r "$tmpdir"
+       fi
+       ;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      func_basename "$file"
+      name="$func_basename_result"
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+       func_show_eval "$old_striplib $oldlib" 'exit $?'
+      fi
+
+      # Do each command in the postinstall commands.
+      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+    done
+
+    test -n "$future_libdirs" && \
+      func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      $opt_dry_run && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+}
+
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+    $opt_debug
+    my_outputname="$1"
+    my_originator="$2"
+    my_pic_p="${3-no}"
+    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+    my_dlsyms=
+
+    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+      if test -n "$NM" && test -n "$global_symbol_pipe"; then
+       my_dlsyms="${my_outputname}S.c"
+      else
+       func_error "not configured to extract global symbols from dlpreopened files"
+      fi
+    fi
+
+    if test -n "$my_dlsyms"; then
+      case $my_dlsyms in
+      "") ;;
+      *.c)
+       # Discover the nlist of each of the dlfiles.
+       nlist="$output_objdir/${my_outputname}.nm"
+
+       func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+       # Parse the name list into a source file.
+       func_verbose "creating $output_objdir/$my_dlsyms"
+
+       $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+       if test "$dlself" = yes; then
+         func_verbose "generating symbol list for \`$output'"
+
+         $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+         # Add our own program objects to the symbol list.
+         progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+         for progfile in $progfiles; do
+           func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+           func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+           $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+         done
+
+         if test -n "$exclude_expsyms"; then
+           $opt_dry_run || {
+             eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+           }
+         fi
+
+         if test -n "$export_symbols_regex"; then
+           $opt_dry_run || {
+             eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+           }
+         fi
+
+         # Prepare the list of exported symbols
+         if test -z "$export_symbols"; then
+           export_symbols="$output_objdir/$outputname.exp"
+           $opt_dry_run || {
+             $RM $export_symbols
+             eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+             case $host in
+             *cygwin* | *mingw* | *cegcc* )
+                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+               ;;
+             esac
+           }
+         else
+           $opt_dry_run || {
+             eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+             eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+             case $host in
+               *cygwin* | *mingw* | *cegcc* )
+                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+                 ;;
+             esac
+           }
+         fi
+       fi
+
+       for dlprefile in $dlprefiles; do
+         func_verbose "extracting global C symbols from \`$dlprefile'"
+         func_basename "$dlprefile"
+         name="$func_basename_result"
+          case $host in
+           *cygwin* | *mingw* | *cegcc* )
+             # if an import library, we need to obtain dlname
+             if func_win32_import_lib_p "$dlprefile"; then
+               func_tr_sh "$dlprefile"
+               eval "curr_lafile=\$libfile_$func_tr_sh_result"
+               dlprefile_dlbasename=""
+               if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+                 # Use subshell, to avoid clobbering current variable values
+                 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+                 if test -n "$dlprefile_dlname" ; then
+                   func_basename "$dlprefile_dlname"
+                   dlprefile_dlbasename="$func_basename_result"
+                 else
+                   # no lafile. user explicitly requested -dlpreopen <import library>.
+                   $sharedlib_from_linklib_cmd "$dlprefile"
+                   dlprefile_dlbasename=$sharedlib_from_linklib_result
+                 fi
+               fi
+               $opt_dry_run || {
+                 if test -n "$dlprefile_dlbasename" ; then
+                   eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+                 else
+                   func_warning "Could not compute DLL name from $name"
+                   eval '$ECHO ": $name " >> "$nlist"'
+                 fi
+                 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+                 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+                   $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+               }
+             else # not an import lib
+               $opt_dry_run || {
+                 eval '$ECHO ": $name " >> "$nlist"'
+                 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+                 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+               }
+             fi
+           ;;
+           *)
+             $opt_dry_run || {
+               eval '$ECHO ": $name " >> "$nlist"'
+               func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+               eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+             }
+           ;;
+          esac
+       done
+
+       $opt_dry_run || {
+         # Make sure we have at least an empty file.
+         test -f "$nlist" || : > "$nlist"
+
+         if test -n "$exclude_expsyms"; then
+           $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+           $MV "$nlist"T "$nlist"
+         fi
+
+         # Try sorting and uniquifying the output.
+         if $GREP -v "^: " < "$nlist" |
+             if sort -k 3 </dev/null >/dev/null 2>&1; then
+               sort -k 3
+             else
+               sort +2
+             fi |
+             uniq > "$nlist"S; then
+           :
+         else
+           $GREP -v "^: " < "$nlist" > "$nlist"S
+         fi
+
+         if test -f "$nlist"S; then
+           eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+         else
+           echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+         fi
+
+         echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols.  */
+typedef struct {
+  const char *name;
+  void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+  { \"$my_originator\", (void *) 0 },"
+
+         case $need_lib_prefix in
+         no)
+           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+           ;;
+         *)
+           eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+           ;;
+         esac
+         echo >> "$output_objdir/$my_dlsyms" "\
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+       } # !$opt_dry_run
+
+       pic_flag_for_symtable=
+       case "$compile_command " in
+       *" -static "*) ;;
+       *)
+         case $host in
+         # compiling the symbol table file with pic_flag works around
+         # a FreeBSD bug that causes programs to crash when -lm is
+         # linked before any other PIC object.  But we must not use
+         # pic_flag when linking with -static.  The problem exists in
+         # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+         *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+           pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+         *-*-hpux*)
+           pic_flag_for_symtable=" $pic_flag"  ;;
+         *)
+           if test "X$my_pic_p" != Xno; then
+             pic_flag_for_symtable=" $pic_flag"
+           fi
+           ;;
+         esac
+         ;;
+       esac
+       symtab_cflags=
+       for arg in $LTCFLAGS; do
+         case $arg in
+         -pie | -fpie | -fPIE) ;;
+         *) func_append symtab_cflags " $arg" ;;
+         esac
+       done
+
+       # Now compile the dynamic symbol file.
+       func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+       # Clean up the generated files.
+       func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+       # Transform the symbol file into the correct name.
+       symfileobj="$output_objdir/${my_outputname}S.$objext"
+       case $host in
+       *cygwin* | *mingw* | *cegcc* )
+         if test -f "$output_objdir/$my_outputname.def"; then
+           compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+           finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+         else
+           compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+           finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+         fi
+         ;;
+       *)
+         compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+         finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+         ;;
+       esac
+       ;;
+      *)
+       func_fatal_error "unknown suffix for \`$my_dlsyms'"
+       ;;
+      esac
+    else
+      # We keep going just in case the user didn't refer to
+      # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+      # really was required.
+
+      # Nullify the symbol file.
+      compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+      finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+    fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+  $opt_debug
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+       $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+      func_to_tool_file "$1" func_convert_file_msys_to_w32
+      win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+       $SED -n -e '
+           1,100{
+               / I /{
+                   s,.*,import,
+                   p
+                   q
+               }
+           }'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+  $opt_debug
+  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+  $opt_debug
+  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+    $SED '/^Contents of section '"$match_literal"':/{
+      # Place marker at beginning of archive member dllname section
+      s/.*/====MARK====/
+      p
+      d
+    }
+    # These lines can sometimes be longer than 43 characters, but
+    # are always uninteresting
+    /:[         ]*file format pe[i]\{,1\}-/d
+    /^In archive [^:]*:/d
+    # Ensure marker is printed
+    /^====MARK====/p
+    # Remove all lines with less than 43 characters
+    /^.\{43\}/!d
+    # From remaining lines, remove first 43 characters
+    s/^.\{43\}//' |
+    $SED -n '
+      # Join marker and all lines until next marker into a single line
+      /^====MARK====/ b para
+      H
+      $ b para
+      b
+      :para
+      x
+      s/\n//g
+      # Remove the marker
+      s/^====MARK====//
+      # Remove trailing dots and whitespace
+      s/[\. \t]*$//
+      # Print
+      /./p' |
+    # we now have a list, one entry per line, of the stringified
+    # contents of the appropriate section of all members of the
+    # archive which possess that section. Heuristic: eliminate
+    # all those which have a first or second character that is
+    # a '.' (that is, objdump's representation of an unprintable
+    # character.) This should work for all archives with less than
+    # 0x302f exports -- but will fail for DLLs whose name actually
+    # begins with a literal '.' or a single character followed by
+    # a '.'.
+    #
+    # Of those that remain, print the first one.
+    $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+  test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+  $opt_debug
+  if func_cygming_gnu_implib_p "$1" ; then
+    # binutils import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+  elif func_cygming_ms_implib_p "$1" ; then
+    # ms-generated import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+  else
+    # unknown
+    sharedlib_from_linklib_result=""
+  fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    $opt_debug
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+    if test "$lock_old_archive_extraction" = yes; then
+      lockfile=$f_ex_an_ar_oldlib.lock
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+       func_echo "Waiting for $lockfile to be removed"
+       sleep 2
+      done
+    fi
+    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+                  'stat=$?; rm -f "$lockfile"; exit $stat'
+    if test "$lock_old_archive_extraction" = yes; then
+      $opt_dry_run || rm -f "$lockfile"
+    fi
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+    fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    $opt_debug
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+       [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+       *) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      func_basename "$my_xlib"
+      my_xlib="$func_basename_result"
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+       *" $my_xlib_u "*)
+         func_arith $extracted_serial + 1
+         extracted_serial=$func_arith_result
+         my_xlib_u=lt$extracted_serial-$my_xlib ;;
+       *) break ;;
+       esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
+
+      func_mkdir_p "$my_xdir"
+
+      case $host in
+      *-darwin*)
+       func_verbose "Extracting $my_xabs"
+       # Do not bother doing anything if just a dry run
+       $opt_dry_run || {
+         darwin_orig_dir=`pwd`
+         cd $my_xdir || exit $?
+         darwin_archive=$my_xabs
+         darwin_curdir=`pwd`
+         darwin_base_archive=`basename "$darwin_archive"`
+         darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+         if test -n "$darwin_arches"; then
+           darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+           darwin_arch=
+           func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+           for darwin_arch in  $darwin_arches ; do
+             func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+             $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+             cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+             func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+             cd "$darwin_curdir"
+             $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+           done # $darwin_arches
+            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+           darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+           darwin_file=
+           darwin_files=
+           for darwin_file in $darwin_filelist; do
+             darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+             $LIPO -create -output "$darwin_file" $darwin_files
+           done # $darwin_filelist
+           $RM -rf unfat-$$
+           cd "$darwin_orig_dir"
+         else
+           cd $darwin_orig_dir
+           func_extract_an_archive "$my_xdir" "$my_xabs"
+         fi # $darwin_arches
+       } # !$opt_dry_run
+       ;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+       ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+    done
+
+    func_extract_archives_result="$my_oldobjs"
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable.  Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take.  If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory.  This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+       func_emit_wrapper_arg1=${1-no}
+
+       $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# 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
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variables:
+  generated_by_libtool_version='$macro_version'
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$ECHO are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    file=\"\$0\""
+
+    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+    $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+    ECHO=\"$qECHO\"
+  fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+  lt_script_arg0=\$0
+  shift
+  for lt_opt
+  do
+    case \"\$lt_opt\" in
+    --lt-debug) lt_option_debug=1 ;;
+    --lt-dump-script)
+        lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+        test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+        lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+        cat \"\$lt_dump_D/\$lt_dump_F\"
+        exit 0
+      ;;
+    --lt-*)
+        \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+        exit 1
+      ;;
+    esac
+  done
+
+  # Print the debug banner immediately:
+  if test -n \"\$lt_option_debug\"; then
+    echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+  fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+  lt_dump_args_N=1;
+  for lt_arg
+  do
+    \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+    lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+  done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+  case $host in
+  # Backslashes separate directories on plain windows
+  *-*-mingw | *-*-os2* | *-cegcc*)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+    ;;
+
+  *)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+    ;;
+  esac
+  $ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+      exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+  for lt_wr_arg
+  do
+    case \$lt_wr_arg in
+    --lt-*) ;;
+    *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+    esac
+    shift
+  done
+  func_exec_program_core \${1+\"\$@\"}
+}
+
+  # Parse options
+  func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+  done
+
+  # Usually 'no', except on cygwin/mingw when embedded into
+  # the cwrapper.
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+    # special case for '.'
+    if test \"\$thisdir\" = \".\"; then
+      thisdir=\`pwd\`
+    fi
+    # remove .libs from thisdir
+    case \"\$thisdir\" in
+    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+    $objdir )   thisdir=. ;;
+    esac
+  fi
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+       if test "$fast_install" = yes; then
+         $ECHO "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" ||
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $MKDIR \"\$progdir\"
+    else
+      $RM \"\$progdir/\$file\"
+    fi"
+
+         $ECHO "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+       $ECHO \"\$relink_command_output\" >&2
+       $RM \"\$progdir/\$file\"
+       exit 1
+      fi
+    fi
+
+    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $RM \"\$progdir/\$program\";
+      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $RM \"\$progdir/\$file\"
+  fi"
+       else
+         $ECHO "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+       fi
+
+       $ECHO "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+       # fixup the dll searchpath if we need to.
+       #
+       # Fix the DLL searchpath if we need to.  Do this before prepending
+       # to shlibpath, because on Windows, both are PATH and uninstalled
+       # libraries must come first.
+       if test -n "$dllsearchpath"; then
+         $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+       fi
+
+       # Export our shlibpath_var if we have one.
+       if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+         $ECHO "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+       fi
+
+       $ECHO "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+      func_exec_program \${1+\"\$@\"}
+    fi
+  else
+    # The program doesn't exist.
+    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+    \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit 1
+  fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+       cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+*/
+EOF
+           cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+#  include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* declarations of non-ANSI functions */
+#if defined(__MINGW32__)
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined(__CYGWIN__)
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined (other platforms) ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined(_MSC_VER)
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+# define S_IXUSR _S_IEXEC
+# ifndef _INTPTR_T_DEFINED
+#  define _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#elif defined(__MINGW32__)
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+#elif defined(__CYGWIN__)
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined (other platforms) ... */
+#endif
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+       (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#if defined(LT_DEBUGWRAPPER)
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+           cat <<EOF
+volatile const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+           if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+              func_to_host_path "$temp_rpath"
+             cat <<EOF
+const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
+EOF
+           else
+             cat <<"EOF"
+const char * LIB_PATH_VALUE   = "";
+EOF
+           fi
+
+           if test -n "$dllsearchpath"; then
+              func_to_host_path "$dllsearchpath:"
+             cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE   = "$func_to_host_path_result";
+EOF
+           else
+             cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE   = "";
+EOF
+           fi
+
+           if test "$fast_install" = yes; then
+             cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+           else
+             cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+           fi
+
+
+           cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX         "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt            = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int  newargc;
+  char *tmp_pathspec;
+  char *actual_cwrapper_path;
+  char *actual_cwrapper_name;
+  char *target_name;
+  char *lt_argv_zero;
+  intptr_t rval = 127;
+
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  newargz = XMALLOC (char *, argc + 1);
+
+  /* very simple arg parsing; don't want to rely on getopt
+   * also, copy all non cwrapper options to newargz, except
+   * argz[0], which is handled differently
+   */
+  newargc=0;
+  for (i = 1; i < argc; i++)
+    {
+      if (strcmp (argv[i], dumpscript_opt) == 0)
+       {
+EOF
+           case "$host" in
+             *mingw* | *cygwin* )
+               # make stdout use "unix" line endings
+               echo "          setmode(1,_O_BINARY);"
+               ;;
+             esac
+
+           cat <<"EOF"
+         lt_dump_script (stdout);
+         return 0;
+       }
+      if (strcmp (argv[i], debug_opt) == 0)
+       {
+          lt_debug = 1;
+          continue;
+       }
+      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal (__FILE__, __LINE__,
+                   "unrecognized %s option: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
+    }
+  newargz[++newargc] = NULL;
+
+EOF
+           cat <<EOF
+  /* The GNU banner must be the first non-error debug message */
+  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+EOF
+           cat <<"EOF"
+  lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+  tmp_pathspec = find_executable (argv[0]);
+  if (tmp_pathspec == NULL)
+    lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (before symlink chase) at: %s\n",
+                 tmp_pathspec);
+
+  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (after symlink chase) at: %s\n",
+                 actual_cwrapper_path);
+  XFREE (tmp_pathspec);
+
+  actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+  strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+  /* wrapper name transforms */
+  strendzap (actual_cwrapper_name, ".exe");
+  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+  XFREE (actual_cwrapper_name);
+  actual_cwrapper_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  /* target_name transforms -- use actual target program name; might have lt- prefix */
+  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+  strendzap (target_name, ".exe");
+  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+  XFREE (target_name);
+  target_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  lt_debugprintf (__FILE__, __LINE__,
+                 "(main) libtool target name: %s\n",
+                 target_name);
+EOF
+
+           cat <<EOF
+  newargz[0] =
+    XMALLOC (char, (strlen (actual_cwrapper_path) +
+                   strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+  strcpy (newargz[0], actual_cwrapper_path);
+  strcat (newargz[0], "$objdir");
+  strcat (newargz[0], "/");
+EOF
+
+           cat <<"EOF"
+  /* stop here, and copy so we don't have to do this twice */
+  tmp_pathspec = xstrdup (newargz[0]);
+
+  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+  strcat (newargz[0], actual_cwrapper_name);
+
+  /* DO want the lt- prefix here if it exists, so use target_name */
+  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+  XFREE (tmp_pathspec);
+  tmp_pathspec = NULL;
+EOF
+
+           case $host_os in
+             mingw*)
+           cat <<"EOF"
+  {
+    char* p;
+    while ((p = strchr (newargz[0], '\\')) != NULL)
+      {
+       *p = '/';
+      }
+    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+      {
+       *p = '/';
+      }
+  }
+EOF
+           ;;
+           esac
+
+           cat <<"EOF"
+  XFREE (target_name);
+  XFREE (actual_cwrapper_path);
+  XFREE (actual_cwrapper_name);
+
+  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
+  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must
+     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+     because on Windows, both *_VARNAMEs are PATH but uninstalled
+     libraries must come first. */
+  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+  lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+                 nonnull (lt_argv_zero));
+  for (i = 0; i < newargc; i++)
+    {
+      lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+                     i, nonnull (newargz[i]));
+    }
+
+EOF
+
+           case $host_os in
+             mingw*)
+               cat <<"EOF"
+  /* execv doesn't actually work on mingw as expected on unix */
+  newargz = prepare_spawn (newargz);
+  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  if (rval == -1)
+    {
+      /* failed to start process */
+      lt_debugprintf (__FILE__, __LINE__,
+                     "(main) failed to launch target \"%s\": %s\n",
+                     lt_argv_zero, nonnull (strerror (errno)));
+      return 127;
+    }
+  return rval;
+EOF
+               ;;
+             *)
+               cat <<"EOF"
+  execv (lt_argv_zero, newargz);
+  return rval; /* =127, but avoids unused variable warning */
+EOF
+               ;;
+           esac
+
+           cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void *p = (void *) malloc (num);
+  if (!p)
+    lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+                         string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable (const char *path)
+{
+  struct stat st;
+
+  lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+                  nonempty (path));
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0)
+      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+    return 1;
+  else
+    return 0;
+}
+
+int
+make_executable (const char *path)
+{
+  int rval = 0;
+  struct stat st;
+
+  lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+                  nonempty (path));
+  if ((!path) || (!*path))
+    return 0;
+
+  if (stat (path, &st) >= 0)
+    {
+      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+    }
+  return rval;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise
+   Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+  int has_slash = 0;
+  const char *p;
+  const char *p_next;
+  /* static buffer for getcwd */
+  char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char *concat_name;
+
+  lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+                  nonempty (wrapper));
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable (concat_name))
+       return concat_name;
+      XFREE (concat_name);
+    }
+  else
+    {
+#endif
+      if (IS_DIR_SEPARATOR (wrapper[0]))
+       {
+         concat_name = xstrdup (wrapper);
+         if (check_executable (concat_name))
+           return concat_name;
+         XFREE (concat_name);
+       }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+    }
+#endif
+
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+      {
+       has_slash = 1;
+       break;
+      }
+  if (!has_slash)
+    {
+      /* no slashes; search PATH */
+      const char *path = getenv ("PATH");
+      if (path != NULL)
+       {
+         for (p = path; *p; p = p_next)
+           {
+             const char *q;
+             size_t p_len;
+             for (q = p; *q; q++)
+               if (IS_PATH_SEPARATOR (*q))
+                 break;
+             p_len = q - p;
+             p_next = (*q == '\0' ? q : q + 1);
+             if (p_len == 0)
+               {
+                 /* empty path: current directory */
+                 if (getcwd (tmp, LT_PATHMAX) == NULL)
+                   lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+                              nonnull (strerror (errno)));
+                 tmp_len = strlen (tmp);
+                 concat_name =
+                   XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+                 memcpy (concat_name, tmp, tmp_len);
+                 concat_name[tmp_len] = '/';
+                 strcpy (concat_name + tmp_len + 1, wrapper);
+               }
+             else
+               {
+                 concat_name =
+                   XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+                 memcpy (concat_name, p, p_len);
+                 concat_name[p_len] = '/';
+                 strcpy (concat_name + p_len + 1, wrapper);
+               }
+             if (check_executable (concat_name))
+               return concat_name;
+             XFREE (concat_name);
+           }
+       }
+      /* not found in PATH; assume curdir */
+    }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+              nonnull (strerror (errno)));
+  tmp_len = strlen (tmp);
+  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable (concat_name))
+    return concat_name;
+  XFREE (concat_name);
+  return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+  return xstrdup (pathspec);
+#else
+  char buf[LT_PATHMAX];
+  struct stat s;
+  char *tmp_pathspec = xstrdup (pathspec);
+  char *p;
+  int has_symlinks = 0;
+  while (strlen (tmp_pathspec) && !has_symlinks)
+    {
+      lt_debugprintf (__FILE__, __LINE__,
+                     "checking path component for symlinks: %s\n",
+                     tmp_pathspec);
+      if (lstat (tmp_pathspec, &s) == 0)
+       {
+         if (S_ISLNK (s.st_mode) != 0)
+           {
+             has_symlinks = 1;
+             break;
+           }
+
+         /* search backwards for last DIR_SEPARATOR */
+         p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+         while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+           p--;
+         if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+           {
+             /* no more DIR_SEPARATORS left */
+             break;
+           }
+         *p = '\0';
+       }
+      else
+       {
+         lt_fatal (__FILE__, __LINE__,
+                   "error accessing file \"%s\": %s",
+                   tmp_pathspec, nonnull (strerror (errno)));
+       }
+    }
+  XFREE (tmp_pathspec);
+
+  if (!has_symlinks)
+    {
+      return xstrdup (pathspec);
+    }
+
+  tmp_pathspec = realpath (pathspec, buf);
+  if (tmp_pathspec == 0)
+    {
+      lt_fatal (__FILE__, __LINE__,
+               "could not follow symlinks for %s", pathspec);
+    }
+  return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert (str != NULL);
+  assert (pat != NULL);
+
+  len = strlen (str);
+  patlen = strlen (pat);
+
+  if (patlen <= len)
+    {
+      str += len - patlen;
+      if (strcmp (str, pat) == 0)
+       *str = '\0';
+    }
+  return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+  va_list args;
+  if (lt_debug)
+    {
+      (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+      va_start (args, fmt);
+      (void) vfprintf (stderr, fmt, args);
+      va_end (args);
+    }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+              int line, const char *mode,
+              const char *message, va_list ap)
+{
+  fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+  va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+  return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+  return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+  lt_debugprintf (__FILE__, __LINE__,
+                 "(lt_setenv) setting '%s' to '%s'\n",
+                  nonnull (name), nonnull (value));
+  {
+#ifdef HAVE_SETENV
+    /* always make a copy, for consistency with !HAVE_SETENV */
+    char *str = xstrdup (value);
+    setenv (name, str, 1);
+#else
+    int len = strlen (name) + 1 + strlen (value) + 1;
+    char *str = XMALLOC (char, len);
+    sprintf (str, "%s=%s", name, value);
+    if (putenv (str) != EXIT_SUCCESS)
+      {
+        XFREE (str);
+      }
+#endif
+  }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+  char *new_value;
+  if (orig_value && *orig_value)
+    {
+      int orig_value_len = strlen (orig_value);
+      int add_len = strlen (add);
+      new_value = XMALLOC (char, add_len + orig_value_len + 1);
+      if (to_end)
+        {
+          strcpy (new_value, orig_value);
+          strcpy (new_value + orig_value_len, add);
+        }
+      else
+        {
+          strcpy (new_value, add);
+          strcpy (new_value + add_len, orig_value);
+        }
+    }
+  else
+    {
+      new_value = xstrdup (add);
+    }
+  return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+  lt_debugprintf (__FILE__, __LINE__,
+                 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      /* some systems can't cope with a ':'-terminated path #' */
+      int len = strlen (new_value);
+      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+        {
+          new_value[len-1] = '\0';
+        }
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+  lt_debugprintf (__FILE__, __LINE__,
+                 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+EOF
+           case $host_os in
+             mingw*)
+               cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+   Note that spawn() does not by itself call the command interpreter
+     (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+      ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+         GetVersionEx(&v);
+         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+      }) ? "cmd.exe" : "command.com").
+   Instead it simply concatenates the arguments, separated by ' ', and calls
+   CreateProcess().  We must quote the arguments since Win32 CreateProcess()
+   interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+   special way:
+   - Space and tab are interpreted as delimiters. They are not treated as
+     delimiters if they are surrounded by double quotes: "...".
+   - Unescaped double quotes are removed from the input. Their only effect is
+     that within double quotes, space and tab are treated like normal
+     characters.
+   - Backslashes not followed by double quotes are not special.
+   - But 2*n+1 backslashes followed by a double quote become
+     n backslashes followed by a double quote (n >= 0):
+       \" -> "
+       \\\" -> \"
+       \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+  size_t argc;
+  char **new_argv;
+  size_t i;
+
+  /* Count number of arguments.  */
+  for (argc = 0; argv[argc] != NULL; argc++)
+    ;
+
+  /* Allocate new argument vector.  */
+  new_argv = XMALLOC (char *, argc + 1);
+
+  /* Put quoted arguments into the new argument vector.  */
+  for (i = 0; i < argc; i++)
+    {
+      const char *string = argv[i];
+
+      if (string[0] == '\0')
+       new_argv[i] = xstrdup ("\"\"");
+      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+       {
+         int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+         size_t length;
+         unsigned int backslashes;
+         const char *s;
+         char *quoted_string;
+         char *p;
+
+         length = 0;
+         backslashes = 0;
+         if (quote_around)
+           length++;
+         for (s = string; *s != '\0'; s++)
+           {
+             char c = *s;
+             if (c == '"')
+               length += backslashes + 1;
+             length++;
+             if (c == '\\')
+               backslashes++;
+             else
+               backslashes = 0;
+           }
+         if (quote_around)
+           length += backslashes + 1;
+
+         quoted_string = XMALLOC (char, length + 1);
+
+         p = quoted_string;
+         backslashes = 0;
+         if (quote_around)
+           *p++ = '"';
+         for (s = string; *s != '\0'; s++)
+           {
+             char c = *s;
+             if (c == '"')
+               {
+                 unsigned int j;
+                 for (j = backslashes + 1; j > 0; j--)
+                   *p++ = '\\';
+               }
+             *p++ = c;
+             if (c == '\\')
+               backslashes++;
+             else
+               backslashes = 0;
+           }
+         if (quote_around)
+           {
+             unsigned int j;
+             for (j = backslashes; j > 0; j--)
+               *p++ = '\\';
+             *p++ = '"';
+           }
+         *p = '\0';
+
+         new_argv[i] = quoted_string;
+       }
+      else
+       new_argv[i] = (char *) string;
+    }
+  new_argv[argc] = NULL;
+
+  return new_argv;
+}
+EOF
+               ;;
+           esac
+
+            cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+           func_emit_wrapper yes |
+              $SED -e 's/\([\\"]\)/\\\1/g' \
+                  -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
+
+            cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+    $opt_debug
+    case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+    *import*) : ;;
+    *) false ;;
+    esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+    $opt_debug
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args=$nonopt
+    base_compile="$nonopt $@"
+    compile_command=$nonopt
+    finalize_command=$nonopt
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+    new_inherited_linker_flags=
+
+    avoid_version=no
+    bindir=
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+    weak_libs=
+    single_module="${wl}-single_module"
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -shared)
+       test "$build_libtool_libs" != yes && \
+         func_fatal_configuration "can not build a shared library"
+       build_old_libs=no
+       break
+       ;;
+      -all-static | -static | -static-libtool-libs)
+       case $arg in
+       -all-static)
+         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+           func_warning "complete static linking is impossible in this configuration"
+         fi
+         if test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=yes
+         ;;
+       -static)
+         if test -z "$pic_flag" && test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=built
+         ;;
+       -static-libtool-libs)
+         if test -z "$pic_flag" && test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=yes
+         ;;
+       esac
+       build_libtool_libs=no
+       build_old_libs=yes
+       break
+       ;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      func_quote_for_eval "$arg"
+      qarg=$func_quote_for_eval_unquoted_result
+      func_append libtool_args " $func_quote_for_eval_result"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+       case $prev in
+       output)
+         func_append compile_command " @OUTPUT@"
+         func_append finalize_command " @OUTPUT@"
+         ;;
+       esac
+
+       case $prev in
+       bindir)
+         bindir="$arg"
+         prev=
+         continue
+         ;;
+       dlfiles|dlprefiles)
+         if test "$preload" = no; then
+           # Add the symbol object into the linking commands.
+           func_append compile_command " @SYMFILE@"
+           func_append finalize_command " @SYMFILE@"
+           preload=yes
+         fi
+         case $arg in
+         *.la | *.lo) ;;  # We handle these cases below.
+         force)
+           if test "$dlself" = no; then
+             dlself=needless
+             export_dynamic=yes
+           fi
+           prev=
+           continue
+           ;;
+         self)
+           if test "$prev" = dlprefiles; then
+             dlself=yes
+           elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+             dlself=yes
+           else
+             dlself=needless
+             export_dynamic=yes
+           fi
+           prev=
+           continue
+           ;;
+         *)
+           if test "$prev" = dlfiles; then
+             func_append dlfiles " $arg"
+           else
+             func_append dlprefiles " $arg"
+           fi
+           prev=
+           continue
+           ;;
+         esac
+         ;;
+       expsyms)
+         export_symbols="$arg"
+         test -f "$arg" \
+           || func_fatal_error "symbol file \`$arg' does not exist"
+         prev=
+         continue
+         ;;
+       expsyms_regex)
+         export_symbols_regex="$arg"
+         prev=
+         continue
+         ;;
+       framework)
+         case $host in
+           *-*-darwin*)
+             case "$deplibs " in
+               *" $qarg.ltframework "*) ;;
+               *) func_append deplibs " $qarg.ltframework" # this is fixed later
+                  ;;
+             esac
+             ;;
+         esac
+         prev=
+         continue
+         ;;
+       inst_prefix)
+         inst_prefix_dir="$arg"
+         prev=
+         continue
+         ;;
+       objectlist)
+         if test -f "$arg"; then
+           save_arg=$arg
+           moreargs=
+           for fil in `cat "$save_arg"`
+           do
+#            func_append moreargs " $fil"
+             arg=$fil
+             # A libtool-controlled object.
+
+             # Check to see that this really is a libtool object.
+             if func_lalib_unsafe_p "$arg"; then
+               pic_object=
+               non_pic_object=
+
+               # Read the .lo file
+               func_source "$arg"
+
+               if test -z "$pic_object" ||
+                  test -z "$non_pic_object" ||
+                  test "$pic_object" = none &&
+                  test "$non_pic_object" = none; then
+                 func_fatal_error "cannot find name of object for \`$arg'"
+               fi
+
+               # Extract subdirectory from the argument.
+               func_dirname "$arg" "/" ""
+               xdir="$func_dirname_result"
+
+               if test "$pic_object" != none; then
+                 # Prepend the subdirectory the object is found in.
+                 pic_object="$xdir$pic_object"
+
+                 if test "$prev" = dlfiles; then
+                   if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+                     func_append dlfiles " $pic_object"
+                     prev=
+                     continue
+                   else
+                     # If libtool objects are unsupported, then we need to preload.
+                     prev=dlprefiles
+                   fi
+                 fi
+
+                 # CHECK ME:  I think I busted this.  -Ossama
+                 if test "$prev" = dlprefiles; then
+                   # Preload the old-style object.
+                   func_append dlprefiles " $pic_object"
+                   prev=
+                 fi
+
+                 # A PIC object.
+                 func_append libobjs " $pic_object"
+                 arg="$pic_object"
+               fi
+
+               # Non-PIC object.
+               if test "$non_pic_object" != none; then
+                 # Prepend the subdirectory the object is found in.
+                 non_pic_object="$xdir$non_pic_object"
+
+                 # A standard non-PIC object
+                 func_append non_pic_objects " $non_pic_object"
+                 if test -z "$pic_object" || test "$pic_object" = none ; then
+                   arg="$non_pic_object"
+                 fi
+               else
+                 # If the PIC object exists, use it instead.
+                 # $xdir was prepended to $pic_object above.
+                 non_pic_object="$pic_object"
+                 func_append non_pic_objects " $non_pic_object"
+               fi
+             else
+               # Only an error if not doing a dry-run.
+               if $opt_dry_run; then
+                 # Extract subdirectory from the argument.
+                 func_dirname "$arg" "/" ""
+                 xdir="$func_dirname_result"
+
+                 func_lo2o "$arg"
+                 pic_object=$xdir$objdir/$func_lo2o_result
+                 non_pic_object=$xdir$func_lo2o_result
+                 func_append libobjs " $pic_object"
+                 func_append non_pic_objects " $non_pic_object"
+               else
+                 func_fatal_error "\`$arg' is not a valid libtool object"
+               fi
+             fi
+           done
+         else
+           func_fatal_error "link input file \`$arg' does not exist"
+         fi
+         arg=$save_arg
+         prev=
+         continue
+         ;;
+       precious_regex)
+         precious_files_regex="$arg"
+         prev=
+         continue
+         ;;
+       release)
+         release="-$arg"
+         prev=
+         continue
+         ;;
+       rpath | xrpath)
+         # We need an absolute path.
+         case $arg in
+         [\\/]* | [A-Za-z]:[\\/]*) ;;
+         *)
+           func_fatal_error "only absolute run-paths are allowed"
+           ;;
+         esac
+         if test "$prev" = rpath; then
+           case "$rpath " in
+           *" $arg "*) ;;
+           *) func_append rpath " $arg" ;;
+           esac
+         else
+           case "$xrpath " in
+           *" $arg "*) ;;
+           *) func_append xrpath " $arg" ;;
+           esac
+         fi
+         prev=
+         continue
+         ;;
+       shrext)
+         shrext_cmds="$arg"
+         prev=
+         continue
+         ;;
+       weak)
+         func_append weak_libs " $arg"
+         prev=
+         continue
+         ;;
+       xcclinker)
+         func_append linker_flags " $qarg"
+         func_append compiler_flags " $qarg"
+         prev=
+         func_append compile_command " $qarg"
+         func_append finalize_command " $qarg"
+         continue
+         ;;
+       xcompiler)
+         func_append compiler_flags " $qarg"
+         prev=
+         func_append compile_command " $qarg"
+         func_append finalize_command " $qarg"
+         continue
+         ;;
+       xlinker)
+         func_append linker_flags " $qarg"
+         func_append compiler_flags " $wl$qarg"
+         prev=
+         func_append compile_command " $wl$qarg"
+         func_append finalize_command " $wl$qarg"
+         continue
+         ;;
+       *)
+         eval "$prev=\"\$arg\""
+         prev=
+         continue
+         ;;
+       esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+       if test -n "$link_static_flag"; then
+         # See comment for -static flag below, for more details.
+         func_append compile_command " $link_static_flag"
+         func_append finalize_command " $link_static_flag"
+       fi
+       continue
+       ;;
+
+      -allow-undefined)
+       # FIXME: remove this flag sometime in the future.
+       func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+       ;;
+
+      -avoid-version)
+       avoid_version=yes
+       continue
+       ;;
+
+      -bindir)
+       prev=bindir
+       continue
+       ;;
+
+      -dlopen)
+       prev=dlfiles
+       continue
+       ;;
+
+      -dlpreopen)
+       prev=dlprefiles
+       continue
+       ;;
+
+      -export-dynamic)
+       export_dynamic=yes
+       continue
+       ;;
+
+      -export-symbols | -export-symbols-regex)
+       if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+         func_fatal_error "more than one -exported-symbols argument is not allowed"
+       fi
+       if test "X$arg" = "X-export-symbols"; then
+         prev=expsyms
+       else
+         prev=expsyms_regex
+       fi
+       continue
+       ;;
+
+      -framework)
+       prev=framework
+       continue
+       ;;
+
+      -inst-prefix-dir)
+       prev=inst_prefix
+       continue
+       ;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+       case $with_gcc/$host in
+       no/*-*-irix* | /*-*-irix*)
+         func_append compile_command " $arg"
+         func_append finalize_command " $arg"
+         ;;
+       esac
+       continue
+       ;;
+
+      -L*)
+       func_stripname "-L" '' "$arg"
+       if test -z "$func_stripname_result"; then
+         if test "$#" -gt 0; then
+           func_fatal_error "require no space between \`-L' and \`$1'"
+         else
+           func_fatal_error "need path for \`-L' option"
+         fi
+       fi
+       func_resolve_sysroot "$func_stripname_result"
+       dir=$func_resolve_sysroot_result
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       *)
+         absdir=`cd "$dir" && pwd`
+         test -z "$absdir" && \
+           func_fatal_error "cannot determine absolute directory name of \`$dir'"
+         dir="$absdir"
+         ;;
+       esac
+       case "$deplibs " in
+       *" -L$dir "* | *" $arg "*)
+         # Will only happen for absolute or sysroot arguments
+         ;;
+       *)
+         # Preserve sysroot, but never include relative directories
+         case $dir in
+           [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+           *) func_append deplibs " -L$dir" ;;
+         esac
+         func_append lib_search_path " $dir"
+         ;;
+       esac
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+         testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$dir:"*) ;;
+         ::) dllsearchpath=$dir;;
+         *) func_append dllsearchpath ":$dir";;
+         esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         ::) dllsearchpath=$testbindir;;
+         *) func_append dllsearchpath ":$testbindir";;
+         esac
+         ;;
+       esac
+       continue
+       ;;
+
+      -l*)
+       if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+         case $host in
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+           # These systems don't actually have a C or math library (as such)
+           continue
+           ;;
+         *-*-os2*)
+           # These systems don't actually have a C library (as such)
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+           # Do not include libc due to us having libc/libc_r.
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C and math libraries are in the System framework
+           func_append deplibs " System.ltframework"
+           continue
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+           # Causes problems with __ctype
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+           # Compiler inserts libc in the correct place for threads to work
+           test "X$arg" = "X-lc" && continue
+           ;;
+         esac
+       elif test "X$arg" = "X-lc_r"; then
+        case $host in
+        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+          # Do not include libc_r directly, use -pthread flag.
+          continue
+          ;;
+        esac
+       fi
+       func_append deplibs " $arg"
+       continue
+       ;;
+
+      -module)
+       module=yes
+       continue
+       ;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      # Darwin uses the -arch flag to determine output architecture.
+      -model|-arch|-isysroot|--sysroot)
+       func_append compiler_flags " $arg"
+       func_append compile_command " $arg"
+       func_append finalize_command " $arg"
+       prev=xcompiler
+       continue
+       ;;
+
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+       func_append compiler_flags " $arg"
+       func_append compile_command " $arg"
+       func_append finalize_command " $arg"
+       case "$new_inherited_linker_flags " in
+           *" $arg "*) ;;
+           * ) func_append new_inherited_linker_flags " $arg" ;;
+       esac
+       continue
+       ;;
+
+      -multi_module)
+       single_module="${wl}-multi_module"
+       continue
+       ;;
+
+      -no-fast-install)
+       fast_install=no
+       continue
+       ;;
+
+      -no-install)
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+         # The PATH hackery in wrapper scripts is required on Windows
+         # and Darwin in order for the loader to find any dlls it needs.
+         func_warning "\`-no-install' is ignored for $host"
+         func_warning "assuming \`-no-fast-install' instead"
+         fast_install=no
+         ;;
+       *) no_install=yes ;;
+       esac
+       continue
+       ;;
+
+      -no-undefined)
+       allow_undefined=no
+       continue
+       ;;
+
+      -objectlist)
+       prev=objectlist
+       continue
+       ;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+       prev=precious_regex
+       continue
+       ;;
+
+      -release)
+       prev=release
+       continue
+       ;;
+
+      -rpath)
+       prev=rpath
+       continue
+       ;;
+
+      -R)
+       prev=xrpath
+       continue
+       ;;
+
+      -R*)
+       func_stripname '-R' '' "$arg"
+       dir=$func_stripname_result
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       =*)
+         func_stripname '=' '' "$dir"
+         dir=$lt_sysroot$func_stripname_result
+         ;;
+       *)
+         func_fatal_error "only absolute run-paths are allowed"
+         ;;
+       esac
+       case "$xrpath " in
+       *" $dir "*) ;;
+       *) func_append xrpath " $dir" ;;
+       esac
+       continue
+       ;;
+
+      -shared)
+       # The effects of -shared are defined in a previous loop.
+       continue
+       ;;
+
+      -shrext)
+       prev=shrext
+       continue
+       ;;
+
+      -static | -static-libtool-libs)
+       # The effects of -static are defined in a previous loop.
+       # We used to do the same as -all-static on platforms that
+       # didn't have a PIC flag, but the assumption that the effects
+       # would be equivalent was wrong.  It would break on at least
+       # Digital Unix and AIX.
+       continue
+       ;;
+
+      -thread-safe)
+       thread_safe=yes
+       continue
+       ;;
+
+      -version-info)
+       prev=vinfo
+       continue
+       ;;
+
+      -version-number)
+       prev=vinfo
+       vinfo_number=yes
+       continue
+       ;;
+
+      -weak)
+        prev=weak
+       continue
+       ;;
+
+      -Wc,*)
+       func_stripname '-Wc,' '' "$arg"
+       args=$func_stripname_result
+       arg=
+       save_ifs="$IFS"; IFS=','
+       for flag in $args; do
+         IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+         func_append arg " $func_quote_for_eval_result"
+         func_append compiler_flags " $func_quote_for_eval_result"
+       done
+       IFS="$save_ifs"
+       func_stripname ' ' '' "$arg"
+       arg=$func_stripname_result
+       ;;
+
+      -Wl,*)
+       func_stripname '-Wl,' '' "$arg"
+       args=$func_stripname_result
+       arg=
+       save_ifs="$IFS"; IFS=','
+       for flag in $args; do
+         IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+         func_append arg " $wl$func_quote_for_eval_result"
+         func_append compiler_flags " $wl$func_quote_for_eval_result"
+         func_append linker_flags " $func_quote_for_eval_result"
+       done
+       IFS="$save_ifs"
+       func_stripname ' ' '' "$arg"
+       arg=$func_stripname_result
+       ;;
+
+      -Xcompiler)
+       prev=xcompiler
+       continue
+       ;;
+
+      -Xlinker)
+       prev=xlinker
+       continue
+       ;;
+
+      -XCClinker)
+       prev=xcclinker
+       continue
+       ;;
+
+      # -msg_* for osf cc
+      -msg_*)
+       func_quote_for_eval "$arg"
+       arg="$func_quote_for_eval_result"
+       ;;
+
+      # Flags to be passed through unchanged, with rationale:
+      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler
+      # -r[0-9][0-9]*        specify processor for the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+      # +DA*, +DD*           enable 64-bit mode for the HP compiler
+      # -q*                  compiler args for the IBM compiler
+      # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+      # -F/path              path to uninstalled frameworks, gcc on darwin
+      # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
+      # @file                GCC response files
+      # -tp=*                Portland pgcc target processor selection
+      # --sysroot=*          for sysroot support
+      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
+        func_quote_for_eval "$arg"
+       arg="$func_quote_for_eval_result"
+        func_append compile_command " $arg"
+        func_append finalize_command " $arg"
+        func_append compiler_flags " $arg"
+        continue
+        ;;
+
+      # Some other compiler flag.
+      -* | +*)
+        func_quote_for_eval "$arg"
+       arg="$func_quote_for_eval_result"
+       ;;
+
+      *.$objext)
+       # A standard object.
+       func_append objs " $arg"
+       ;;
+
+      *.lo)
+       # A libtool-controlled object.
+
+       # Check to see that this really is a libtool object.
+       if func_lalib_unsafe_p "$arg"; then
+         pic_object=
+         non_pic_object=
+
+         # Read the .lo file
+         func_source "$arg"
+
+         if test -z "$pic_object" ||
+            test -z "$non_pic_object" ||
+            test "$pic_object" = none &&
+            test "$non_pic_object" = none; then
+           func_fatal_error "cannot find name of object for \`$arg'"
+         fi
+
+         # Extract subdirectory from the argument.
+         func_dirname "$arg" "/" ""
+         xdir="$func_dirname_result"
+
+         if test "$pic_object" != none; then
+           # Prepend the subdirectory the object is found in.
+           pic_object="$xdir$pic_object"
+
+           if test "$prev" = dlfiles; then
+             if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+               func_append dlfiles " $pic_object"
+               prev=
+               continue
+             else
+               # If libtool objects are unsupported, then we need to preload.
+               prev=dlprefiles
+             fi
+           fi
+
+           # CHECK ME:  I think I busted this.  -Ossama
+           if test "$prev" = dlprefiles; then
+             # Preload the old-style object.
+             func_append dlprefiles " $pic_object"
+             prev=
+           fi
+
+           # A PIC object.
+           func_append libobjs " $pic_object"
+           arg="$pic_object"
+         fi
+
+         # Non-PIC object.
+         if test "$non_pic_object" != none; then
+           # Prepend the subdirectory the object is found in.
+           non_pic_object="$xdir$non_pic_object"
+
+           # A standard non-PIC object
+           func_append non_pic_objects " $non_pic_object"
+           if test -z "$pic_object" || test "$pic_object" = none ; then
+             arg="$non_pic_object"
+           fi
+         else
+           # If the PIC object exists, use it instead.
+           # $xdir was prepended to $pic_object above.
+           non_pic_object="$pic_object"
+           func_append non_pic_objects " $non_pic_object"
+         fi
+       else
+         # Only an error if not doing a dry-run.
+         if $opt_dry_run; then
+           # Extract subdirectory from the argument.
+           func_dirname "$arg" "/" ""
+           xdir="$func_dirname_result"
+
+           func_lo2o "$arg"
+           pic_object=$xdir$objdir/$func_lo2o_result
+           non_pic_object=$xdir$func_lo2o_result
+           func_append libobjs " $pic_object"
+           func_append non_pic_objects " $non_pic_object"
+         else
+           func_fatal_error "\`$arg' is not a valid libtool object"
+         fi
+       fi
+       ;;
+
+      *.$libext)
+       # An archive.
+       func_append deplibs " $arg"
+       func_append old_deplibs " $arg"
+       continue
+       ;;
+
+      *.la)
+       # A libtool-controlled library.
+
+       func_resolve_sysroot "$arg"
+       if test "$prev" = dlfiles; then
+         # This library was specified with -dlopen.
+         func_append dlfiles " $func_resolve_sysroot_result"
+         prev=
+       elif test "$prev" = dlprefiles; then
+         # The library was specified with -dlpreopen.
+         func_append dlprefiles " $func_resolve_sysroot_result"
+         prev=
+       else
+         func_append deplibs " $func_resolve_sysroot_result"
+       fi
+       continue
+       ;;
+
+      # Some other compiler argument.
+      *)
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       func_quote_for_eval "$arg"
+       arg="$func_quote_for_eval_result"
+       ;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+       func_append compile_command " $arg"
+       func_append finalize_command " $arg"
+      fi
+    done # argument parsing loop
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prevarg' option requires an argument"
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      func_append compile_command " $arg"
+      func_append finalize_command " $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    func_basename "$output"
+    outputname="$func_basename_result"
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    func_dirname "$output" "/" ""
+    output_objdir="$func_dirname_result$objdir"
+    func_to_tool_file "$output_objdir/"
+    tool_output_objdir=$func_to_tool_file_result
+    # Create the object directory.
+    func_mkdir_p "$output_objdir"
+
+    # Determine the type of output
+    case $output in
+    "")
+      func_fatal_help "you must specify an output file"
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if $opt_preserve_dup_deps ; then
+       case "$libs " in
+       *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+       esac
+      fi
+      func_append libs " $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if $opt_duplicate_compiler_generated_deps; then
+       for pre_post_dep in $predeps $postdeps; do
+         case "$pre_post_deps " in
+         *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+         esac
+         func_append pre_post_deps " $pre_post_dep"
+       done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
+
+    case $linkmode in
+    lib)
+       passes="conv dlpreopen link"
+       for file in $dlfiles $dlprefiles; do
+         case $file in
+         *.la) ;;
+         *)
+           func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+           ;;
+         esac
+       done
+       ;;
+    prog)
+       compile_deplibs=
+       finalize_deplibs=
+       alldeplibs=no
+       newdlfiles=
+       newdlprefiles=
+       passes="conv scan dlopen dlpreopen link"
+       ;;
+    *)  passes="conv"
+       ;;
+    esac
+
+    for pass in $passes; do
+      # The preopen pass in lib mode reverses $deplibs; put it back here
+      # so that -L comes before libs that need it for instance...
+      if test "$linkmode,$pass" = "lib,link"; then
+       ## FIXME: Find the place where the list is rebuilt in the wrong
+       ##        order, and fix it there properly
+        tmp_deplibs=
+       for deplib in $deplibs; do
+         tmp_deplibs="$deplib $tmp_deplibs"
+       done
+       deplibs="$tmp_deplibs"
+      fi
+
+      if test "$linkmode,$pass" = "lib,link" ||
+        test "$linkmode,$pass" = "prog,scan"; then
+       libs="$deplibs"
+       deplibs=
+      fi
+      if test "$linkmode" = prog; then
+       case $pass in
+       dlopen) libs="$dlfiles" ;;
+       dlpreopen) libs="$dlprefiles" ;;
+       link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+       esac
+      fi
+      if test "$linkmode,$pass" = "lib,dlpreopen"; then
+       # Collect and forward deplibs of preopened libtool libs
+       for lib in $dlprefiles; do
+         # Ignore non-libtool-libs
+         dependency_libs=
+         func_resolve_sysroot "$lib"
+         case $lib in
+         *.la) func_source "$func_resolve_sysroot_result" ;;
+         esac
+
+         # Collect preopened libtool deplibs, except any this library
+         # has declared as weak libs
+         for deplib in $dependency_libs; do
+           func_basename "$deplib"
+            deplib_base=$func_basename_result
+           case " $weak_libs " in
+           *" $deplib_base "*) ;;
+           *) func_append deplibs " $deplib" ;;
+           esac
+         done
+       done
+       libs="$dlprefiles"
+      fi
+      if test "$pass" = dlopen; then
+       # Collect dlpreopened libraries
+       save_deplibs="$deplibs"
+       deplibs=
+      fi
+
+      for deplib in $libs; do
+       lib=
+       found=no
+       case $deplib in
+       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+         if test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$deplib $compile_deplibs"
+           finalize_deplibs="$deplib $finalize_deplibs"
+         else
+           func_append compiler_flags " $deplib"
+           if test "$linkmode" = lib ; then
+               case "$new_inherited_linker_flags " in
+                   *" $deplib "*) ;;
+                   * ) func_append new_inherited_linker_flags " $deplib" ;;
+               esac
+           fi
+         fi
+         continue
+         ;;
+       -l*)
+         if test "$linkmode" != lib && test "$linkmode" != prog; then
+           func_warning "\`-l' is ignored for archives/objects"
+           continue
+         fi
+         func_stripname '-l' '' "$deplib"
+         name=$func_stripname_result
+         if test "$linkmode" = lib; then
+           searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+         else
+           searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+         fi
+         for searchdir in $searchdirs; do
+           for search_ext in .la $std_shrext .so .a; do
+             # Search the libtool library
+             lib="$searchdir/lib${name}${search_ext}"
+             if test -f "$lib"; then
+               if test "$search_ext" = ".la"; then
+                 found=yes
+               else
+                 found=no
+               fi
+               break 2
+             fi
+           done
+         done
+         if test "$found" != yes; then
+           # deplib doesn't seem to be a libtool library
+           if test "$linkmode,$pass" = "prog,link"; then
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             deplibs="$deplib $deplibs"
+             test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+           fi
+           continue
+         else # deplib is a libtool library
+           # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+           # We need to do some special things here, and not later.
+           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+             case " $predeps $postdeps " in
+             *" $deplib "*)
+               if func_lalib_p "$lib"; then
+                 library_names=
+                 old_library=
+                 func_source "$lib"
+                 for l in $old_library $library_names; do
+                   ll="$l"
+                 done
+                 if test "X$ll" = "X$old_library" ; then # only static version available
+                   found=no
+                   func_dirname "$lib" "" "."
+                   ladir="$func_dirname_result"
+                   lib=$ladir/$old_library
+                   if test "$linkmode,$pass" = "prog,link"; then
+                     compile_deplibs="$deplib $compile_deplibs"
+                     finalize_deplibs="$deplib $finalize_deplibs"
+                   else
+                     deplibs="$deplib $deplibs"
+                     test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+                   fi
+                   continue
+                 fi
+               fi
+               ;;
+             *) ;;
+             esac
+           fi
+         fi
+         ;; # -l
+       *.ltframework)
+         if test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$deplib $compile_deplibs"
+           finalize_deplibs="$deplib $finalize_deplibs"
+         else
+           deplibs="$deplib $deplibs"
+           if test "$linkmode" = lib ; then
+               case "$new_inherited_linker_flags " in
+                   *" $deplib "*) ;;
+                   * ) func_append new_inherited_linker_flags " $deplib" ;;
+               esac
+           fi
+         fi
+         continue
+         ;;
+       -L*)
+         case $linkmode in
+         lib)
+           deplibs="$deplib $deplibs"
+           test "$pass" = conv && continue
+           newdependency_libs="$deplib $newdependency_libs"
+           func_stripname '-L' '' "$deplib"
+           func_resolve_sysroot "$func_stripname_result"
+           func_append newlib_search_path " $func_resolve_sysroot_result"
+           ;;
+         prog)
+           if test "$pass" = conv; then
+             deplibs="$deplib $deplibs"
+             continue
+           fi
+           if test "$pass" = scan; then
+             deplibs="$deplib $deplibs"
+           else
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           fi
+           func_stripname '-L' '' "$deplib"
+           func_resolve_sysroot "$func_stripname_result"
+           func_append newlib_search_path " $func_resolve_sysroot_result"
+           ;;
+         *)
+           func_warning "\`-L' is ignored for archives/objects"
+           ;;
+         esac # linkmode
+         continue
+         ;; # -L
+       -R*)
+         if test "$pass" = link; then
+           func_stripname '-R' '' "$deplib"
+           func_resolve_sysroot "$func_stripname_result"
+           dir=$func_resolve_sysroot_result
+           # Make sure the xrpath contains only unique directories.
+           case "$xrpath " in
+           *" $dir "*) ;;
+           *) func_append xrpath " $dir" ;;
+           esac
+         fi
+         deplibs="$deplib $deplibs"
+         continue
+         ;;
+       *.la)
+         func_resolve_sysroot "$deplib"
+         lib=$func_resolve_sysroot_result
+         ;;
+       *.$libext)
+         if test "$pass" = conv; then
+           deplibs="$deplib $deplibs"
+           continue
+         fi
+         case $linkmode in
+         lib)
+           # Linking convenience modules into shared libraries is allowed,
+           # but linking other static libraries is non-portable.
+           case " $dlpreconveniencelibs " in
+           *" $deplib "*) ;;
+           *)
+             valid_a_lib=no
+             case $deplibs_check_method in
+               match_pattern*)
+                 set dummy $deplibs_check_method; shift
+                 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+                 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+                   | $EGREP "$match_pattern_regex" > /dev/null; then
+                   valid_a_lib=yes
+                 fi
+               ;;
+               pass_all)
+                 valid_a_lib=yes
+               ;;
+             esac
+             if test "$valid_a_lib" != yes; then
+               echo
+               $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+               echo "*** I have the capability to make that library automatically link in when"
+               echo "*** you link to this library.  But I can only do this if you have a"
+               echo "*** shared version of the library, which you do not appear to have"
+               echo "*** because the file extensions .$libext of this argument makes me believe"
+               echo "*** that it is just a static archive that I should not use here."
+             else
+               echo
+               $ECHO "*** Warning: Linking the shared library $output against the"
+               $ECHO "*** static library $deplib is not portable!"
+               deplibs="$deplib $deplibs"
+             fi
+             ;;
+           esac
+           continue
+           ;;
+         prog)
+           if test "$pass" != link; then
+             deplibs="$deplib $deplibs"
+           else
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           fi
+           continue
+           ;;
+         esac # linkmode
+         ;; # *.$libext
+       *.lo | *.$objext)
+         if test "$pass" = conv; then
+           deplibs="$deplib $deplibs"
+         elif test "$linkmode" = prog; then
+           if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+             # If there is no dlopen support or we're linking statically,
+             # we need to preload.
+             func_append newdlprefiles " $deplib"
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             func_append newdlfiles " $deplib"
+           fi
+         fi
+         continue
+         ;;
+       %DEPLIBS%)
+         alldeplibs=yes
+         continue
+         ;;
+       esac # case $deplib
+
+       if test "$found" = yes || test -f "$lib"; then :
+       else
+         func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+       fi
+
+       # Check to see that this really is a libtool archive.
+       func_lalib_unsafe_p "$lib" \
+         || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+       func_dirname "$lib" "" "."
+       ladir="$func_dirname_result"
+
+       dlname=
+       dlopen=
+       dlpreopen=
+       libdir=
+       library_names=
+       old_library=
+       inherited_linker_flags=
+       # If the library was installed with an old release of libtool,
+       # it will not redefine variables installed, or shouldnotlink
+       installed=yes
+       shouldnotlink=no
+       avoidtemprpath=
+
+
+       # Read the .la file
+       func_source "$lib"
+
+       # Convert "-framework foo" to "foo.ltframework"
+       if test -n "$inherited_linker_flags"; then
+         tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+         for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+           case " $new_inherited_linker_flags " in
+             *" $tmp_inherited_linker_flag "*) ;;
+             *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+           esac
+         done
+       fi
+       dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+       if test "$linkmode,$pass" = "lib,link" ||
+          test "$linkmode,$pass" = "prog,scan" ||
+          { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+         test -n "$dlopen" && func_append dlfiles " $dlopen"
+         test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+       fi
+
+       if test "$pass" = conv; then
+         # Only check for convenience libraries
+         deplibs="$lib $deplibs"
+         if test -z "$libdir"; then
+           if test -z "$old_library"; then
+             func_fatal_error "cannot find name of link library for \`$lib'"
+           fi
+           # It is a libtool convenience library, so add in its objects.
+           func_append convenience " $ladir/$objdir/$old_library"
+           func_append old_convenience " $ladir/$objdir/$old_library"
+         elif test "$linkmode" != prog && test "$linkmode" != lib; then
+           func_fatal_error "\`$lib' is not a convenience library"
+         fi
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           deplibs="$deplib $deplibs"
+           if $opt_preserve_dup_deps ; then
+             case "$tmp_libs " in
+             *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+             esac
+           fi
+           func_append tmp_libs " $deplib"
+         done
+         continue
+       fi # $pass = conv
+
+
+       # Get the name of the library we link against.
+       linklib=
+       if test -n "$old_library" &&
+          { test "$prefer_static_libs" = yes ||
+            test "$prefer_static_libs,$installed" = "built,no"; }; then
+         linklib=$old_library
+       else
+         for l in $old_library $library_names; do
+           linklib="$l"
+         done
+       fi
+       if test -z "$linklib"; then
+         func_fatal_error "cannot find name of link library for \`$lib'"
+       fi
+
+       # This library was specified with -dlopen.
+       if test "$pass" = dlopen; then
+         if test -z "$libdir"; then
+           func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+         fi
+         if test -z "$dlname" ||
+            test "$dlopen_support" != yes ||
+            test "$build_libtool_libs" = no; then
+           # If there is no dlname, no dlopen support or we're linking
+           # statically, we need to preload.  We also need to preload any
+           # dependent libraries so libltdl's deplib preloader doesn't
+           # bomb out in the load deplibs phase.
+           func_append dlprefiles " $lib $dependency_libs"
+         else
+           func_append newdlfiles " $lib"
+         fi
+         continue
+       fi # $pass = dlopen
+
+       # We need an absolute path.
+       case $ladir in
+       [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+       *)
+         abs_ladir=`cd "$ladir" && pwd`
+         if test -z "$abs_ladir"; then
+           func_warning "cannot determine absolute directory name of \`$ladir'"
+           func_warning "passing it literally to the linker, although it might fail"
+           abs_ladir="$ladir"
+         fi
+         ;;
+       esac
+       func_basename "$lib"
+       laname="$func_basename_result"
+
+       # Find the relevant object directory and library name.
+       if test "X$installed" = Xyes; then
+         if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+           func_warning "library \`$lib' was moved."
+           dir="$ladir"
+           absdir="$abs_ladir"
+           libdir="$abs_ladir"
+         else
+           dir="$lt_sysroot$libdir"
+           absdir="$lt_sysroot$libdir"
+         fi
+         test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+       else
+         if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+           dir="$ladir"
+           absdir="$abs_ladir"
+           # Remove this search path later
+           func_append notinst_path " $abs_ladir"
+         else
+           dir="$ladir/$objdir"
+           absdir="$abs_ladir/$objdir"
+           # Remove this search path later
+           func_append notinst_path " $abs_ladir"
+         fi
+       fi # $installed = yes
+       func_stripname 'lib' '.la' "$laname"
+       name=$func_stripname_result
+
+       # This library was specified with -dlpreopen.
+       if test "$pass" = dlpreopen; then
+         if test -z "$libdir" && test "$linkmode" = prog; then
+           func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+         fi
+         case "$host" in
+           # special handling for platforms with PE-DLLs.
+           *cygwin* | *mingw* | *cegcc* )
+             # Linker will automatically link against shared library if both
+             # static and shared are present.  Therefore, ensure we extract
+             # symbols from the import library if a shared library is present
+             # (otherwise, the dlopen module name will be incorrect).  We do
+             # this by putting the import library name into $newdlprefiles.
+             # We recover the dlopen module name by 'saving' the la file
+             # name in a special purpose variable, and (later) extracting the
+             # dlname from the la file.
+             if test -n "$dlname"; then
+               func_tr_sh "$dir/$linklib"
+               eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+               func_append newdlprefiles " $dir/$linklib"
+             else
+               func_append newdlprefiles " $dir/$old_library"
+               # Keep a list of preopened convenience libraries to check
+               # that they are being used correctly in the link pass.
+               test -z "$libdir" && \
+                 func_append dlpreconveniencelibs " $dir/$old_library"
+             fi
+           ;;
+           * )
+             # Prefer using a static library (so that no silly _DYNAMIC symbols
+             # are required to link).
+             if test -n "$old_library"; then
+               func_append newdlprefiles " $dir/$old_library"
+               # Keep a list of preopened convenience libraries to check
+               # that they are being used correctly in the link pass.
+               test -z "$libdir" && \
+                 func_append dlpreconveniencelibs " $dir/$old_library"
+             # Otherwise, use the dlname, so that lt_dlopen finds it.
+             elif test -n "$dlname"; then
+               func_append newdlprefiles " $dir/$dlname"
+             else
+               func_append newdlprefiles " $dir/$linklib"
+             fi
+           ;;
+         esac
+       fi # $pass = dlpreopen
+
+       if test -z "$libdir"; then
+         # Link the convenience library
+         if test "$linkmode" = lib; then
+           deplibs="$dir/$old_library $deplibs"
+         elif test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$dir/$old_library $compile_deplibs"
+           finalize_deplibs="$dir/$old_library $finalize_deplibs"
+         else
+           deplibs="$lib $deplibs" # used for prog,scan pass
+         fi
+         continue
+       fi
+
+
+       if test "$linkmode" = prog && test "$pass" != link; then
+         func_append newlib_search_path " $ladir"
+         deplibs="$lib $deplibs"
+
+         linkalldeplibs=no
+         if test "$link_all_deplibs" != no || test -z "$library_names" ||
+            test "$build_libtool_libs" = no; then
+           linkalldeplibs=yes
+         fi
+
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           case $deplib in
+           -L*) func_stripname '-L' '' "$deplib"
+                func_resolve_sysroot "$func_stripname_result"
+                func_append newlib_search_path " $func_resolve_sysroot_result"
+                ;;
+           esac
+           # Need to link against all dependency_libs?
+           if test "$linkalldeplibs" = yes; then
+             deplibs="$deplib $deplibs"
+           else
+             # Need to hardcode shared library paths
+             # or/and link against static libraries
+             newdependency_libs="$deplib $newdependency_libs"
+           fi
+           if $opt_preserve_dup_deps ; then
+             case "$tmp_libs " in
+             *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+             esac
+           fi
+           func_append tmp_libs " $deplib"
+         done # for deplib
+         continue
+       fi # $linkmode = prog...
+
+       if test "$linkmode,$pass" = "prog,link"; then
+         if test -n "$library_names" &&
+            { { test "$prefer_static_libs" = no ||
+                test "$prefer_static_libs,$installed" = "built,yes"; } ||
+              test -z "$old_library"; }; then
+           # We need to hardcode the library path
+           if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+             # Make sure the rpath contains only unique directories.
+             case "$temp_rpath:" in
+             *"$absdir:"*) ;;
+             *) func_append temp_rpath "$absdir:" ;;
+             esac
+           fi
+
+           # Hardcode the library path.
+           # Skip directories that are in the system default run-time
+           # search path.
+           case " $sys_lib_dlsearch_path " in
+           *" $absdir "*) ;;
+           *)
+             case "$compile_rpath " in
+             *" $absdir "*) ;;
+             *) func_append compile_rpath " $absdir" ;;
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) func_append finalize_rpath " $libdir" ;;
+             esac
+             ;;
+           esac
+         fi # $linkmode,$pass = prog,link...
+
+         if test "$alldeplibs" = yes &&
+            { test "$deplibs_check_method" = pass_all ||
+              { test "$build_libtool_libs" = yes &&
+                test -n "$library_names"; }; }; then
+           # We only need to search for static libraries
+           continue
+         fi
+       fi
+
+       link_static=no # Whether the deplib will be linked statically
+       use_static_libs=$prefer_static_libs
+       if test "$use_static_libs" = built && test "$installed" = yes; then
+         use_static_libs=no
+       fi
+       if test -n "$library_names" &&
+          { test "$use_static_libs" = no || test -z "$old_library"; }; then
+         case $host in
+         *cygwin* | *mingw* | *cegcc*)
+             # No point in relinking DLLs because paths are not encoded
+             func_append notinst_deplibs " $lib"
+             need_relink=no
+           ;;
+         *)
+           if test "$installed" = no; then
+             func_append notinst_deplibs " $lib"
+             need_relink=yes
+           fi
+           ;;
+         esac
+         # This is a shared library
+
+         # Warn about portability, can't link against -module's on some
+         # systems (darwin).  Don't bleat about dlopened modules though!
+         dlopenmodule=""
+         for dlpremoduletest in $dlprefiles; do
+           if test "X$dlpremoduletest" = "X$lib"; then
+             dlopenmodule="$dlpremoduletest"
+             break
+           fi
+         done
+         if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+           echo
+           if test "$linkmode" = prog; then
+             $ECHO "*** Warning: Linking the executable $output against the loadable module"
+           else
+             $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+           fi
+           $ECHO "*** $linklib is not portable!"
+         fi
+         if test "$linkmode" = lib &&
+            test "$hardcode_into_libs" = yes; then
+           # Hardcode the library path.
+           # Skip directories that are in the system default run-time
+           # search path.
+           case " $sys_lib_dlsearch_path " in
+           *" $absdir "*) ;;
+           *)
+             case "$compile_rpath " in
+             *" $absdir "*) ;;
+             *) func_append compile_rpath " $absdir" ;;
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) func_append finalize_rpath " $libdir" ;;
+             esac
+             ;;
+           esac
+         fi
+
+         if test -n "$old_archive_from_expsyms_cmds"; then
+           # figure out the soname
+           set dummy $library_names
+           shift
+           realname="$1"
+           shift
+           libname=`eval "\\$ECHO \"$libname_spec\""`
+           # use dlname if we got it. it's perfectly good, no?
+           if test -n "$dlname"; then
+             soname="$dlname"
+           elif test -n "$soname_spec"; then
+             # bleh windows
+             case $host in
+             *cygwin* | mingw* | *cegcc*)
+               func_arith $current - $age
+               major=$func_arith_result
+               versuffix="-$major"
+               ;;
+             esac
+             eval soname=\"$soname_spec\"
+           else
+             soname="$realname"
+           fi
+
+           # Make a new name for the extract_expsyms_cmds to use
+           soroot="$soname"
+           func_basename "$soroot"
+           soname="$func_basename_result"
+           func_stripname 'lib' '.dll' "$soname"
+           newlib=libimp-$func_stripname_result.a
+
+           # If the library has no export list, then create one now
+           if test -f "$output_objdir/$soname-def"; then :
+           else
+             func_verbose "extracting exported symbol list from \`$soname'"
+             func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+           fi
+
+           # Create $newlib
+           if test -f "$output_objdir/$newlib"; then :; else
+             func_verbose "generating import library for \`$soname'"
+             func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+           fi
+           # make sure the library variables are pointing to the new library
+           dir=$output_objdir
+           linklib=$newlib
+         fi # test -n "$old_archive_from_expsyms_cmds"
+
+         if test "$linkmode" = prog || test "$opt_mode" != relink; then
+           add_shlibpath=
+           add_dir=
+           add=
+           lib_linked=yes
+           case $hardcode_action in
+           immediate | unsupported)
+             if test "$hardcode_direct" = no; then
+               add="$dir/$linklib"
+               case $host in
+                 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+                 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+                 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+                   *-*-unixware7*) add_dir="-L$dir" ;;
+                 *-*-darwin* )
+                   # if the lib is a (non-dlopened) module then we can not
+                   # link against it, someone is ignoring the earlier warnings
+                   if /usr/bin/file -L $add 2> /dev/null |
+                        $GREP ": [^:]* bundle" >/dev/null ; then
+                     if test "X$dlopenmodule" != "X$lib"; then
+                       $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+                       if test -z "$old_library" ; then
+                         echo
+                         echo "*** And there doesn't seem to be a static archive available"
+                         echo "*** The link will probably fail, sorry"
+                       else
+                         add="$dir/$old_library"
+                       fi
+                     elif test -n "$old_library"; then
+                       add="$dir/$old_library"
+                     fi
+                   fi
+               esac
+             elif test "$hardcode_minus_L" = no; then
+               case $host in
+               *-*-sunos*) add_shlibpath="$dir" ;;
+               esac
+               add_dir="-L$dir"
+               add="-l$name"
+             elif test "$hardcode_shlibpath_var" = no; then
+               add_shlibpath="$dir"
+               add="-l$name"
+             else
+               lib_linked=no
+             fi
+             ;;
+           relink)
+             if test "$hardcode_direct" = yes &&
+                test "$hardcode_direct_absolute" = no; then
+               add="$dir/$linklib"
+             elif test "$hardcode_minus_L" = yes; then
+               add_dir="-L$dir"
+               # Try looking first in the location we're being installed to.
+               if test -n "$inst_prefix_dir"; then
+                 case $libdir in
+                   [\\/]*)
+                     func_append add_dir " -L$inst_prefix_dir$libdir"
+                     ;;
+                 esac
+               fi
+               add="-l$name"
+             elif test "$hardcode_shlibpath_var" = yes; then
+               add_shlibpath="$dir"
+               add="-l$name"
+             else
+               lib_linked=no
+             fi
+             ;;
+           *) lib_linked=no ;;
+           esac
+
+           if test "$lib_linked" != yes; then
+             func_fatal_configuration "unsupported hardcode properties"
+           fi
+
+           if test -n "$add_shlibpath"; then
+             case :$compile_shlibpath: in
+             *":$add_shlibpath:"*) ;;
+             *) func_append compile_shlibpath "$add_shlibpath:" ;;
+             esac
+           fi
+           if test "$linkmode" = prog; then
+             test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+             test -n "$add" && compile_deplibs="$add $compile_deplibs"
+           else
+             test -n "$add_dir" && deplibs="$add_dir $deplibs"
+             test -n "$add" && deplibs="$add $deplibs"
+             if test "$hardcode_direct" != yes &&
+                test "$hardcode_minus_L" != yes &&
+                test "$hardcode_shlibpath_var" = yes; then
+               case :$finalize_shlibpath: in
+               *":$libdir:"*) ;;
+               *) func_append finalize_shlibpath "$libdir:" ;;
+               esac
+             fi
+           fi
+         fi
+
+         if test "$linkmode" = prog || test "$opt_mode" = relink; then
+           add_shlibpath=
+           add_dir=
+           add=
+           # Finalize command for both is simple: just hardcode it.
+           if test "$hardcode_direct" = yes &&
+              test "$hardcode_direct_absolute" = no; then
+             add="$libdir/$linklib"
+           elif test "$hardcode_minus_L" = yes; then
+             add_dir="-L$libdir"
+             add="-l$name"
+           elif test "$hardcode_shlibpath_var" = yes; then
+             case :$finalize_shlibpath: in
+             *":$libdir:"*) ;;
+             *) func_append finalize_shlibpath "$libdir:" ;;
+             esac
+             add="-l$name"
+           elif test "$hardcode_automatic" = yes; then
+             if test -n "$inst_prefix_dir" &&
+                test -f "$inst_prefix_dir$libdir/$linklib" ; then
+               add="$inst_prefix_dir$libdir/$linklib"
+             else
+               add="$libdir/$linklib"
+             fi
+           else
+             # We cannot seem to hardcode it, guess we'll fake it.
+             add_dir="-L$libdir"
+             # Try looking first in the location we're being installed to.
+             if test -n "$inst_prefix_dir"; then
+               case $libdir in
+                 [\\/]*)
+                   func_append add_dir " -L$inst_prefix_dir$libdir"
+                   ;;
+               esac
+             fi
+             add="-l$name"
+           fi
+
+           if test "$linkmode" = prog; then
+             test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+             test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+           else
+             test -n "$add_dir" && deplibs="$add_dir $deplibs"
+             test -n "$add" && deplibs="$add $deplibs"
+           fi
+         fi
+       elif test "$linkmode" = prog; then
+         # Here we assume that one of hardcode_direct or hardcode_minus_L
+         # is not unsupported.  This is valid on all known static and
+         # shared platforms.
+         if test "$hardcode_direct" != unsupported; then
+           test -n "$old_library" && linklib="$old_library"
+           compile_deplibs="$dir/$linklib $compile_deplibs"
+           finalize_deplibs="$dir/$linklib $finalize_deplibs"
+         else
+           compile_deplibs="-l$name -L$dir $compile_deplibs"
+           finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+         fi
+       elif test "$build_libtool_libs" = yes; then
+         # Not a shared library
+         if test "$deplibs_check_method" != pass_all; then
+           # We're trying link a shared library against a static one
+           # but the system doesn't support it.
+
+           # Just print a warning and add the library to dependency_libs so
+           # that the program can be linked against the static library.
+           echo
+           $ECHO "*** Warning: This system can not link to static lib archive $lib."
+           echo "*** I have the capability to make that library automatically link in when"
+           echo "*** you link to this library.  But I can only do this if you have a"
+           echo "*** shared version of the library, which you do not appear to have."
+           if test "$module" = yes; then
+             echo "*** But as you try to build a module library, libtool will still create "
+             echo "*** a static module, that should work as long as the dlopening application"
+             echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+             if test -z "$global_symbol_pipe"; then
+               echo
+               echo "*** However, this would only work if libtool was able to extract symbol"
+               echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+               echo "*** not find such a program.  So, this module is probably useless."
+               echo "*** \`nm' from GNU binutils and a full rebuild may help."
+             fi
+             if test "$build_old_libs" = no; then
+               build_libtool_libs=module
+               build_old_libs=yes
+             else
+               build_libtool_libs=no
+             fi
+           fi
+         else
+           deplibs="$dir/$old_library $deplibs"
+           link_static=yes
+         fi
+       fi # link shared/static library?
+
+       if test "$linkmode" = lib; then
+         if test -n "$dependency_libs" &&
+            { test "$hardcode_into_libs" != yes ||
+              test "$build_old_libs" = yes ||
+              test "$link_static" = yes; }; then
+           # Extract -R from dependency_libs
+           temp_deplibs=
+           for libdir in $dependency_libs; do
+             case $libdir in
+             -R*) func_stripname '-R' '' "$libdir"
+                  temp_xrpath=$func_stripname_result
+                  case " $xrpath " in
+                  *" $temp_xrpath "*) ;;
+                  *) func_append xrpath " $temp_xrpath";;
+                  esac;;
+             *) func_append temp_deplibs " $libdir";;
+             esac
+           done
+           dependency_libs="$temp_deplibs"
+         fi
+
+         func_append newlib_search_path " $absdir"
+         # Link against this library
+         test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+         # ... and its dependency_libs
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           newdependency_libs="$deplib $newdependency_libs"
+           case $deplib in
+              -L*) func_stripname '-L' '' "$deplib"
+                   func_resolve_sysroot "$func_stripname_result";;
+              *) func_resolve_sysroot "$deplib" ;;
+            esac
+           if $opt_preserve_dup_deps ; then
+             case "$tmp_libs " in
+             *" $func_resolve_sysroot_result "*)
+                func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+             esac
+           fi
+           func_append tmp_libs " $func_resolve_sysroot_result"
+         done
+
+         if test "$link_all_deplibs" != no; then
+           # Add the search paths of all dependency libraries
+           for deplib in $dependency_libs; do
+             path=
+             case $deplib in
+             -L*) path="$deplib" ;;
+             *.la)
+               func_resolve_sysroot "$deplib"
+               deplib=$func_resolve_sysroot_result
+               func_dirname "$deplib" "" "."
+               dir=$func_dirname_result
+               # We need an absolute path.
+               case $dir in
+               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+               *)
+                 absdir=`cd "$dir" && pwd`
+                 if test -z "$absdir"; then
+                   func_warning "cannot determine absolute directory name of \`$dir'"
+                   absdir="$dir"
+                 fi
+                 ;;
+               esac
+               if $GREP "^installed=no" $deplib > /dev/null; then
+               case $host in
+               *-*-darwin*)
+                 depdepl=
+                 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+                 if test -n "$deplibrary_names" ; then
+                   for tmp in $deplibrary_names ; do
+                     depdepl=$tmp
+                   done
+                   if test -f "$absdir/$objdir/$depdepl" ; then
+                     depdepl="$absdir/$objdir/$depdepl"
+                     darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+                      if test -z "$darwin_install_name"; then
+                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
+                      fi
+                     func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+                     func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
+                     path=
+                   fi
+                 fi
+                 ;;
+               *)
+                 path="-L$absdir/$objdir"
+                 ;;
+               esac
+               else
+                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+                 test -z "$libdir" && \
+                   func_fatal_error "\`$deplib' is not a valid libtool archive"
+                 test "$absdir" != "$libdir" && \
+                   func_warning "\`$deplib' seems to be moved"
+
+                 path="-L$absdir"
+               fi
+               ;;
+             esac
+             case " $deplibs " in
+             *" $path "*) ;;
+             *) deplibs="$path $deplibs" ;;
+             esac
+           done
+         fi # link_all_deplibs != no
+       fi # linkmode = lib
+      done # for deplib in $libs
+      if test "$pass" = link; then
+       if test "$linkmode" = "prog"; then
+         compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+         finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+       else
+         compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+       fi
+      fi
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+       # Link the dlpreopened libraries before other libraries
+       for deplib in $save_deplibs; do
+         deplibs="$deplib $deplibs"
+       done
+      fi
+      if test "$pass" != dlopen; then
+       if test "$pass" != conv; then
+         # Make sure lib_search_path contains only unique directories.
+         lib_search_path=
+         for dir in $newlib_search_path; do
+           case "$lib_search_path " in
+           *" $dir "*) ;;
+           *) func_append lib_search_path " $dir" ;;
+           esac
+         done
+         newlib_search_path=
+       fi
+
+       if test "$linkmode,$pass" != "prog,link"; then
+         vars="deplibs"
+       else
+         vars="compile_deplibs finalize_deplibs"
+       fi
+       for var in $vars dependency_libs; do
+         # Add libraries to $var in reverse order
+         eval tmp_libs=\"\$$var\"
+         new_libs=
+         for deplib in $tmp_libs; do
+           # FIXME: Pedantically, this is the right thing to do, so
+           #        that some nasty dependency loop isn't accidentally
+           #        broken:
+           #new_libs="$deplib $new_libs"
+           # Pragmatically, this seems to cause very few problems in
+           # practice:
+           case $deplib in
+           -L*) new_libs="$deplib $new_libs" ;;
+           -R*) ;;
+           *)
+             # And here is the reason: when a library appears more
+             # than once as an explicit dependence of a library, or
+             # is implicitly linked in more than once by the
+             # compiler, it is considered special, and multiple
+             # occurrences thereof are not removed.  Compare this
+             # with having the same library being listed as a
+             # dependency of multiple other libraries: in this case,
+             # we know (pedantically, we assume) the library does not
+             # need to be listed more than once, so we keep only the
+             # last copy.  This is not always right, but it is rare
+             # enough that we require users that really mean to play
+             # such unportable linking tricks to link the library
+             # using -Wl,-lname, so that libtool does not consider it
+             # for duplicate removal.
+             case " $specialdeplibs " in
+             *" $deplib "*) new_libs="$deplib $new_libs" ;;
+             *)
+               case " $new_libs " in
+               *" $deplib "*) ;;
+               *) new_libs="$deplib $new_libs" ;;
+               esac
+               ;;
+             esac
+             ;;
+           esac
+         done
+         tmp_libs=
+         for deplib in $new_libs; do
+           case $deplib in
+           -L*)
+             case " $tmp_libs " in
+             *" $deplib "*) ;;
+             *) func_append tmp_libs " $deplib" ;;
+             esac
+             ;;
+           *) func_append tmp_libs " $deplib" ;;
+           esac
+         done
+         eval $var=\"$tmp_libs\"
+       done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+       case " $predeps $postdeps $compiler_lib_search_path " in
+       *" $i "*)
+         i=""
+         ;;
+       esac
+       if test -n "$i" ; then
+         func_append tmp_libs " $i"
+       fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+    fi
+    if test "$linkmode" = prog || test "$linkmode" = lib; then
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       func_warning "\`-dlopen' is ignored for archives"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+       func_warning "\`-l' and \`-L' are ignored for archives" ;;
+      esac
+
+      test -n "$rpath" && \
+       func_warning "\`-rpath' is ignored for archives"
+
+      test -n "$xrpath" && \
+       func_warning "\`-R' is ignored for archives"
+
+      test -n "$vinfo" && \
+       func_warning "\`-version-info/-version-number' is ignored for archives"
+
+      test -n "$release" && \
+       func_warning "\`-release' is ignored for archives"
+
+      test -n "$export_symbols$export_symbols_regex" && \
+       func_warning "\`-export-symbols' is ignored for archives"
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      func_append objs "$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+       func_stripname 'lib' '.la' "$outputname"
+       name=$func_stripname_result
+       eval shared_ext=\"$shrext_cmds\"
+       eval libname=\"$libname_spec\"
+       ;;
+      *)
+       test "$module" = no && \
+         func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+       if test "$need_lib_prefix" != no; then
+         # Add the "lib" prefix for modules if required
+         func_stripname '' '.la' "$outputname"
+         name=$func_stripname_result
+         eval shared_ext=\"$shrext_cmds\"
+         eval libname=\"$libname_spec\"
+       else
+         func_stripname '' '.la' "$outputname"
+         libname=$func_stripname_result
+       fi
+       ;;
+      esac
+
+      if test -n "$objs"; then
+       if test "$deplibs_check_method" != pass_all; then
+         func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+       else
+         echo
+         $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+         $ECHO "*** objects $objs is not portable!"
+         func_append libobjs " $objs"
+       fi
+      fi
+
+      test "$dlself" != no && \
+       func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+      set dummy $rpath
+      shift
+      test "$#" -gt 1 && \
+       func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+      install_libdir="$1"
+
+      oldlibs=
+      if test -z "$rpath"; then
+       if test "$build_libtool_libs" = yes; then
+         # Building a libtool convenience library.
+         # Some compilers have problems with a `.al' extension so
+         # convenience libraries should have the same extension an
+         # archive normally would.
+         oldlibs="$output_objdir/$libname.$libext $oldlibs"
+         build_libtool_libs=convenience
+         build_old_libs=yes
+       fi
+
+       test -n "$vinfo" && \
+         func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+       test -n "$release" && \
+         func_warning "\`-release' is ignored for convenience libraries"
+      else
+
+       # Parse the version information argument.
+       save_ifs="$IFS"; IFS=':'
+       set dummy $vinfo 0 0 0
+       shift
+       IFS="$save_ifs"
+
+       test -n "$7" && \
+         func_fatal_help "too many parameters to \`-version-info'"
+
+       # convert absolute version numbers to libtool ages
+       # this retains compatibility with .la files and attempts
+       # to make the code below a bit more comprehensible
+
+       case $vinfo_number in
+       yes)
+         number_major="$1"
+         number_minor="$2"
+         number_revision="$3"
+         #
+         # There are really only two kinds -- those that
+         # use the current revision as the major version
+         # and those that subtract age and use age as
+         # a minor version.  But, then there is irix
+         # which has an extra 1 added just for fun
+         #
+         case $version_type in
+         darwin|linux|osf|windows|none)
+           func_arith $number_major + $number_minor
+           current=$func_arith_result
+           age="$number_minor"
+           revision="$number_revision"
+           ;;
+         freebsd-aout|freebsd-elf|qnx|sunos)
+           current="$number_major"
+           revision="$number_minor"
+           age="0"
+           ;;
+         irix|nonstopux)
+           func_arith $number_major + $number_minor
+           current=$func_arith_result
+           age="$number_minor"
+           revision="$number_minor"
+           lt_irix_increment=no
+           ;;
+         esac
+         ;;
+       no)
+         current="$1"
+         revision="$2"
+         age="$3"
+         ;;
+       esac
+
+       # Check that each of the things are valid numbers.
+       case $current in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         func_error "CURRENT \`$current' must be a nonnegative integer"
+         func_fatal_error "\`$vinfo' is not valid version information"
+         ;;
+       esac
+
+       case $revision in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         func_error "REVISION \`$revision' must be a nonnegative integer"
+         func_fatal_error "\`$vinfo' is not valid version information"
+         ;;
+       esac
+
+       case $age in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         func_error "AGE \`$age' must be a nonnegative integer"
+         func_fatal_error "\`$vinfo' is not valid version information"
+         ;;
+       esac
+
+       if test "$age" -gt "$current"; then
+         func_error "AGE \`$age' is greater than the current interface number \`$current'"
+         func_fatal_error "\`$vinfo' is not valid version information"
+       fi
+
+       # Calculate the version variables.
+       major=
+       versuffix=
+       verstring=
+       case $version_type in
+       none) ;;
+
+       darwin)
+         # Like Linux, but with the current version available in
+         # verstring for coding it into the library header
+         func_arith $current - $age
+         major=.$func_arith_result
+         versuffix="$major.$age.$revision"
+         # Darwin ld doesn't like 0 for these options...
+         func_arith $current + 1
+         minor_current=$func_arith_result
+         xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+         verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+         ;;
+
+       freebsd-aout)
+         major=".$current"
+         versuffix=".$current.$revision";
+         ;;
+
+       freebsd-elf)
+         major=".$current"
+         versuffix=".$current"
+         ;;
+
+       irix | nonstopux)
+         if test "X$lt_irix_increment" = "Xno"; then
+           func_arith $current - $age
+         else
+           func_arith $current - $age + 1
+         fi
+         major=$func_arith_result
+
+         case $version_type in
+           nonstopux) verstring_prefix=nonstopux ;;
+           *)         verstring_prefix=sgi ;;
+         esac
+         verstring="$verstring_prefix$major.$revision"
+
+         # Add in all the interfaces that we are compatible with.
+         loop=$revision
+         while test "$loop" -ne 0; do
+           func_arith $revision - $loop
+           iface=$func_arith_result
+           func_arith $loop - 1
+           loop=$func_arith_result
+           verstring="$verstring_prefix$major.$iface:$verstring"
+         done
+
+         # Before this point, $major must not contain `.'.
+         major=.$major
+         versuffix="$major.$revision"
+         ;;
+
+       linux)
+         func_arith $current - $age
+         major=.$func_arith_result
+         versuffix="$major.$age.$revision"
+         ;;
+
+       osf)
+         func_arith $current - $age
+         major=.$func_arith_result
+         versuffix=".$current.$age.$revision"
+         verstring="$current.$age.$revision"
+
+         # Add in all the interfaces that we are compatible with.
+         loop=$age
+         while test "$loop" -ne 0; do
+           func_arith $current - $loop
+           iface=$func_arith_result
+           func_arith $loop - 1
+           loop=$func_arith_result
+           verstring="$verstring:${iface}.0"
+         done
+
+         # Make executables depend on our current version.
+         func_append verstring ":${current}.0"
+         ;;
+
+       qnx)
+         major=".$current"
+         versuffix=".$current"
+         ;;
+
+       sunos)
+         major=".$current"
+         versuffix=".$current.$revision"
+         ;;
+
+       windows)
+         # Use '-' rather than '.', since we only want one
+         # extension on DOS 8.3 filesystems.
+         func_arith $current - $age
+         major=$func_arith_result
+         versuffix="-$major"
+         ;;
+
+       *)
+         func_fatal_configuration "unknown library version type \`$version_type'"
+         ;;
+       esac
+
+       # Clear the version info if we defaulted, and they specified a release.
+       if test -z "$vinfo" && test -n "$release"; then
+         major=
+         case $version_type in
+         darwin)
+           # we can't check for "0.0" in archive_cmds due to quoting
+           # problems, so we reset it completely
+           verstring=
+           ;;
+         *)
+           verstring="0.0"
+           ;;
+         esac
+         if test "$need_version" = no; then
+           versuffix=
+         else
+           versuffix=".0.0"
+         fi
+       fi
+
+       # Remove version info from name if versioning should be avoided
+       if test "$avoid_version" = yes && test "$need_version" = no; then
+         major=
+         versuffix=
+         verstring=""
+       fi
+
+       # Check to see if the archive will have undefined symbols.
+       if test "$allow_undefined" = yes; then
+         if test "$allow_undefined_flag" = unsupported; then
+           func_warning "undefined symbols not allowed in $host shared libraries"
+           build_libtool_libs=no
+           build_old_libs=yes
+         fi
+       else
+         # Don't allow undefined symbols.
+         allow_undefined_flag="$no_undefined_flag"
+       fi
+
+      fi
+
+      func_generate_dlsyms "$libname" "$libname" "yes"
+      func_append libobjs " $symfileobj"
+      test "X$libobjs" = "X " && libobjs=
+
+      if test "$opt_mode" != relink; then
+       # Remove our outputs, but don't remove object files since they
+       # may have been created when compiling PIC objects.
+       removelist=
+       tempremovelist=`$ECHO "$output_objdir/*"`
+       for p in $tempremovelist; do
+         case $p in
+           *.$objext | *.gcno)
+              ;;
+           $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+              if test "X$precious_files_regex" != "X"; then
+                if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+                then
+                  continue
+                fi
+              fi
+              func_append removelist " $p"
+              ;;
+           *) ;;
+         esac
+       done
+       test -n "$removelist" && \
+         func_show_eval "${RM}r \$removelist"
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+       func_append oldlibs " $output_objdir/$libname.$libext"
+
+       # Transform .lo files to .o files.
+       oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      #for path in $notinst_path; do
+      #        lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+      #        deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+      #        dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+      #done
+
+      if test -n "$xrpath"; then
+       # If the user specified any rpath flags, then add them.
+       temp_xrpath=
+       for libdir in $xrpath; do
+         func_replace_sysroot "$libdir"
+         func_append temp_xrpath " -R$func_replace_sysroot_result"
+         case "$finalize_rpath " in
+         *" $libdir "*) ;;
+         *) func_append finalize_rpath " $libdir" ;;
+         esac
+       done
+       if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+         dependency_libs="$temp_xrpath $dependency_libs"
+       fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+       case " $dlprefiles $dlfiles " in
+       *" $lib "*) ;;
+       *) func_append dlfiles " $lib" ;;
+       esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+       case "$dlprefiles " in
+       *" $lib "*) ;;
+       *) func_append dlprefiles " $lib" ;;
+       esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+       if test -n "$rpath"; then
+         case $host in
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+           # these systems don't actually have a c library (as such)!
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C library is in the System framework
+           func_append deplibs " System.ltframework"
+           ;;
+         *-*-netbsd*)
+           # Don't link with libc until the a.out ld.so is fixed.
+           ;;
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+           # Do not include libc due to us having libc/libc_r.
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+           # Causes problems with __ctype
+           ;;
+         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+           # Compiler inserts libc in the correct place for threads to work
+           ;;
+         *)
+           # Add libc to deplibs on all other systems if necessary.
+           if test "$build_libtool_need_lc" = "yes"; then
+             func_append deplibs " -lc"
+           fi
+           ;;
+         esac
+       fi
+
+       # Transform deplibs into only deplibs that can be linked in shared.
+       name_save=$name
+       libname_save=$libname
+       release_save=$release
+       versuffix_save=$versuffix
+       major_save=$major
+       # I'm not sure if I'm treating the release correctly.  I think
+       # release should show up in the -l (ie -lgmp5) so we don't want to
+       # add it in twice.  Is that correct?
+       release=""
+       versuffix=""
+       major=""
+       newdeplibs=
+       droppeddeps=no
+       case $deplibs_check_method in
+       pass_all)
+         # Don't check for shared/static.  Everything works.
+         # This might be a little naive.  We might want to check
+         # whether the library exists or not.  But this is on
+         # osf3 & osf4 and I'm not really sure... Just
+         # implementing what was already the behavior.
+         newdeplibs=$deplibs
+         ;;
+       test_compile)
+         # This code stresses the "libraries are programs" paradigm to its
+         # limits. Maybe even breaks it.  We compile a program, linking it
+         # against the deplibs as a proxy for the library.  Then we can check
+         # whether they linked in statically or dynamically with ldd.
+         $opt_dry_run || $RM conftest.c
+         cat > conftest.c <<EOF
+         int main() { return 0; }
+EOF
+         $opt_dry_run || $RM conftest
+         if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+           ldd_output=`ldd conftest`
+           for i in $deplibs; do
+             case $i in
+             -l*)
+               func_stripname -l '' "$i"
+               name=$func_stripname_result
+               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                 case " $predeps $postdeps " in
+                 *" $i "*)
+                   func_append newdeplibs " $i"
+                   i=""
+                   ;;
+                 esac
+               fi
+               if test -n "$i" ; then
+                 libname=`eval "\\$ECHO \"$libname_spec\""`
+                 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+                 set dummy $deplib_matches; shift
+                 deplib_match=$1
+                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                   func_append newdeplibs " $i"
+                 else
+                   droppeddeps=yes
+                   echo
+                   $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+                   echo "*** I have the capability to make that library automatically link in when"
+                   echo "*** you link to this library.  But I can only do this if you have a"
+                   echo "*** shared version of the library, which I believe you do not have"
+                   echo "*** because a test_compile did reveal that the linker did not use it for"
+                   echo "*** its dynamic dependency list that programs get resolved with at runtime."
+                 fi
+               fi
+               ;;
+             *)
+               func_append newdeplibs " $i"
+               ;;
+             esac
+           done
+         else
+           # Error occurred in the first compile.  Let's try to salvage
+           # the situation: Compile a separate program for each library.
+           for i in $deplibs; do
+             case $i in
+             -l*)
+               func_stripname -l '' "$i"
+               name=$func_stripname_result
+               $opt_dry_run || $RM conftest
+               if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+                 ldd_output=`ldd conftest`
+                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                   case " $predeps $postdeps " in
+                   *" $i "*)
+                     func_append newdeplibs " $i"
+                     i=""
+                     ;;
+                   esac
+                 fi
+                 if test -n "$i" ; then
+                   libname=`eval "\\$ECHO \"$libname_spec\""`
+                   deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+                   set dummy $deplib_matches; shift
+                   deplib_match=$1
+                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                     func_append newdeplibs " $i"
+                   else
+                     droppeddeps=yes
+                     echo
+                     $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+                     echo "*** I have the capability to make that library automatically link in when"
+                     echo "*** you link to this library.  But I can only do this if you have a"
+                     echo "*** shared version of the library, which you do not appear to have"
+                     echo "*** because a test_compile did reveal that the linker did not use this one"
+                     echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+                   fi
+                 fi
+               else
+                 droppeddeps=yes
+                 echo
+                 $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
+                 echo "*** make it link in!  You will probably need to install it or some"
+                 echo "*** library that it depends on before this library will be fully"
+                 echo "*** functional.  Installing it before continuing would be even better."
+               fi
+               ;;
+             *)
+               func_append newdeplibs " $i"
+               ;;
+             esac
+           done
+         fi
+         ;;
+       file_magic*)
+         set dummy $deplibs_check_method; shift
+         file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+         for a_deplib in $deplibs; do
+           case $a_deplib in
+           -l*)
+             func_stripname -l '' "$a_deplib"
+             name=$func_stripname_result
+             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 func_append newdeplibs " $a_deplib"
+                 a_deplib=""
+                 ;;
+               esac
+             fi
+             if test -n "$a_deplib" ; then
+               libname=`eval "\\$ECHO \"$libname_spec\""`
+               if test -n "$file_magic_glob"; then
+                 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+               else
+                 libnameglob=$libname
+               fi
+               test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+                 if test "$want_nocaseglob" = yes; then
+                   shopt -s nocaseglob
+                   potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+                   $nocaseglob
+                 else
+                   potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+                 fi
+                 for potent_lib in $potential_libs; do
+                     # Follow soft links.
+                     if ls -lLd "$potent_lib" 2>/dev/null |
+                        $GREP " -> " >/dev/null; then
+                       continue
+                     fi
+                     # The statement above tries to avoid entering an
+                     # endless loop below, in case of cyclic links.
+                     # We might still enter an endless loop, since a link
+                     # loop can be closed while we follow links,
+                     # but so what?
+                     potlib="$potent_lib"
+                     while test -h "$potlib" 2>/dev/null; do
+                       potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+                       case $potliblink in
+                       [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+                       *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
+                       esac
+                     done
+                     if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+                        $SED -e 10q |
+                        $EGREP "$file_magic_regex" > /dev/null; then
+                       func_append newdeplibs " $a_deplib"
+                       a_deplib=""
+                       break 2
+                     fi
+                 done
+               done
+             fi
+             if test -n "$a_deplib" ; then
+               droppeddeps=yes
+               echo
+               $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+               echo "*** I have the capability to make that library automatically link in when"
+               echo "*** you link to this library.  But I can only do this if you have a"
+               echo "*** shared version of the library, which you do not appear to have"
+               echo "*** because I did check the linker path looking for a file starting"
+               if test -z "$potlib" ; then
+                 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+               else
+                 $ECHO "*** with $libname and none of the candidates passed a file format test"
+                 $ECHO "*** using a file magic. Last file checked: $potlib"
+               fi
+             fi
+             ;;
+           *)
+             # Add a -L argument.
+             func_append newdeplibs " $a_deplib"
+             ;;
+           esac
+         done # Gone through all deplibs.
+         ;;
+       match_pattern*)
+         set dummy $deplibs_check_method; shift
+         match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+         for a_deplib in $deplibs; do
+           case $a_deplib in
+           -l*)
+             func_stripname -l '' "$a_deplib"
+             name=$func_stripname_result
+             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 func_append newdeplibs " $a_deplib"
+                 a_deplib=""
+                 ;;
+               esac
+             fi
+             if test -n "$a_deplib" ; then
+               libname=`eval "\\$ECHO \"$libname_spec\""`
+               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+                 for potent_lib in $potential_libs; do
+                   potlib="$potent_lib" # see symlink-check above in file_magic test
+                   if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+                      $EGREP "$match_pattern_regex" > /dev/null; then
+                     func_append newdeplibs " $a_deplib"
+                     a_deplib=""
+                     break 2
+                   fi
+                 done
+               done
+             fi
+             if test -n "$a_deplib" ; then
+               droppeddeps=yes
+               echo
+               $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+               echo "*** I have the capability to make that library automatically link in when"
+               echo "*** you link to this library.  But I can only do this if you have a"
+               echo "*** shared version of the library, which you do not appear to have"
+               echo "*** because I did check the linker path looking for a file starting"
+               if test -z "$potlib" ; then
+                 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+               else
+                 $ECHO "*** with $libname and none of the candidates passed a file format test"
+                 $ECHO "*** using a regex pattern. Last file checked: $potlib"
+               fi
+             fi
+             ;;
+           *)
+             # Add a -L argument.
+             func_append newdeplibs " $a_deplib"
+             ;;
+           esac
+         done # Gone through all deplibs.
+         ;;
+       none | unknown | *)
+         newdeplibs=""
+         tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+           for i in $predeps $postdeps ; do
+             # can't use Xsed below, because $i might contain '/'
+             tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
+           done
+         fi
+         case $tmp_deplibs in
+         *[!\  \ ]*)
+           echo
+           if test "X$deplibs_check_method" = "Xnone"; then
+             echo "*** Warning: inter-library dependencies are not supported in this platform."
+           else
+             echo "*** Warning: inter-library dependencies are not known to be supported."
+           fi
+           echo "*** All declared inter-library dependencies are being dropped."
+           droppeddeps=yes
+           ;;
+         esac
+         ;;
+       esac
+       versuffix=$versuffix_save
+       major=$major_save
+       release=$release_save
+       libname=$libname_save
+       name=$name_save
+
+       case $host in
+       *-*-rhapsody* | *-*-darwin1.[012])
+         # On Rhapsody replace the C library with the System framework
+         newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+         ;;
+       esac
+
+       if test "$droppeddeps" = yes; then
+         if test "$module" = yes; then
+           echo
+           echo "*** Warning: libtool could not satisfy all declared inter-library"
+           $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
+           echo "*** a static module, that should work as long as the dlopening"
+           echo "*** application is linked with the -dlopen flag."
+           if test -z "$global_symbol_pipe"; then
+             echo
+             echo "*** However, this would only work if libtool was able to extract symbol"
+             echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+             echo "*** not find such a program.  So, this module is probably useless."
+             echo "*** \`nm' from GNU binutils and a full rebuild may help."
+           fi
+           if test "$build_old_libs" = no; then
+             oldlibs="$output_objdir/$libname.$libext"
+             build_libtool_libs=module
+             build_old_libs=yes
+           else
+             build_libtool_libs=no
+           fi
+         else
+           echo "*** The inter-library dependencies that have been dropped here will be"
+           echo "*** automatically added whenever a program is linked with this library"
+           echo "*** or is declared to -dlopen it."
+
+           if test "$allow_undefined" = no; then
+             echo
+             echo "*** Since this library must not contain undefined symbols,"
+             echo "*** because either the platform does not support them or"
+             echo "*** it was explicitly requested with -no-undefined,"
+             echo "*** libtool will only create a static version of it."
+             if test "$build_old_libs" = no; then
+               oldlibs="$output_objdir/$libname.$libext"
+               build_libtool_libs=module
+               build_old_libs=yes
+             else
+               build_libtool_libs=no
+             fi
+           fi
+         fi
+       fi
+       # Done checking deplibs!
+       deplibs=$newdeplibs
+      fi
+      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+      case $host in
+       *-*-darwin*)
+         newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+         new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+         deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+         ;;
+      esac
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+       case " $new_libs " in
+       *" -L$path/$objdir "*) ;;
+       *)
+         case " $deplibs " in
+         *" -L$path/$objdir "*)
+           func_append new_libs " -L$path/$objdir" ;;
+         esac
+         ;;
+       esac
+      done
+      for deplib in $deplibs; do
+       case $deplib in
+       -L*)
+         case " $new_libs " in
+         *" $deplib "*) ;;
+         *) func_append new_libs " $deplib" ;;
+         esac
+         ;;
+       *) func_append new_libs " $deplib" ;;
+       esac
+      done
+      deplibs="$new_libs"
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+       if test "$hardcode_into_libs" = yes; then
+         # Hardcode the library paths
+         hardcode_libdirs=
+         dep_rpath=
+         rpath="$finalize_rpath"
+         test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+         for libdir in $rpath; do
+           if test -n "$hardcode_libdir_flag_spec"; then
+             if test -n "$hardcode_libdir_separator"; then
+               func_replace_sysroot "$libdir"
+               libdir=$func_replace_sysroot_result
+               if test -z "$hardcode_libdirs"; then
+                 hardcode_libdirs="$libdir"
+               else
+                 # Just accumulate the unique libdirs.
+                 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+                 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+                   ;;
+                 *)
+                   func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+                   ;;
+                 esac
+               fi
+             else
+               eval flag=\"$hardcode_libdir_flag_spec\"
+               func_append dep_rpath " $flag"
+             fi
+           elif test -n "$runpath_var"; then
+             case "$perm_rpath " in
+             *" $libdir "*) ;;
+             *) func_apped perm_rpath " $libdir" ;;
+             esac
+           fi
+         done
+         # Substitute the hardcoded libdirs into the rpath.
+         if test -n "$hardcode_libdir_separator" &&
+            test -n "$hardcode_libdirs"; then
+           libdir="$hardcode_libdirs"
+           if test -n "$hardcode_libdir_flag_spec_ld"; then
+             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+           else
+             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+           fi
+         fi
+         if test -n "$runpath_var" && test -n "$perm_rpath"; then
+           # We should set the runpath_var.
+           rpath=
+           for dir in $perm_rpath; do
+             func_append rpath "$dir:"
+           done
+           eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+         fi
+         test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+       fi
+
+       shlibpath="$finalize_shlibpath"
+       test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+       if test -n "$shlibpath"; then
+         eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+       fi
+
+       # Get the real and link names of the library.
+       eval shared_ext=\"$shrext_cmds\"
+       eval library_names=\"$library_names_spec\"
+       set dummy $library_names
+       shift
+       realname="$1"
+       shift
+
+       if test -n "$soname_spec"; then
+         eval soname=\"$soname_spec\"
+       else
+         soname="$realname"
+       fi
+       if test -z "$dlname"; then
+         dlname=$soname
+       fi
+
+       lib="$output_objdir/$realname"
+       linknames=
+       for link
+       do
+         func_append linknames " $link"
+       done
+
+       # Use standard objects if they are pic
+       test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+       test "X$libobjs" = "X " && libobjs=
+
+       delfiles=
+       if test -n "$export_symbols" && test -n "$include_expsyms"; then
+         $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+         export_symbols="$output_objdir/$libname.uexp"
+         func_append delfiles " $export_symbols"
+       fi
+
+       orig_export_symbols=
+       case $host_os in
+       cygwin* | mingw* | cegcc*)
+         if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+           # exporting using user supplied symfile
+           if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+             # and it's NOT already a .def file. Must figure out
+             # which of the given symbols are data symbols and tag
+             # them as such. So, trigger use of export_symbols_cmds.
+             # export_symbols gets reassigned inside the "prepare
+             # the list of exported symbols" if statement, so the
+             # include_expsyms logic still works.
+             orig_export_symbols="$export_symbols"
+             export_symbols=
+             always_export_symbols=yes
+           fi
+         fi
+         ;;
+       esac
+
+       # Prepare the list of exported symbols
+       if test -z "$export_symbols"; then
+         if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+           func_verbose "generating symbol list for \`$libname.la'"
+           export_symbols="$output_objdir/$libname.exp"
+           $opt_dry_run || $RM $export_symbols
+           cmds=$export_symbols_cmds
+           save_ifs="$IFS"; IFS='~'
+           for cmd1 in $cmds; do
+             IFS="$save_ifs"
+             # Take the normal branch if the nm_file_list_spec branch
+             # doesn't work or if tool conversion is not needed.
+             case $nm_file_list_spec~$to_tool_file_cmd in
+               *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+                 try_normal_branch=yes
+                 eval cmd=\"$cmd1\"
+                 func_len " $cmd"
+                 len=$func_len_result
+                 ;;
+               *)
+                 try_normal_branch=no
+                 ;;
+             esac
+             if test "$try_normal_branch" = yes \
+                && { test "$len" -lt "$max_cmd_len" \
+                     || test "$max_cmd_len" -le -1; }
+             then
+               func_show_eval "$cmd" 'exit $?'
+               skipped_export=false
+             elif test -n "$nm_file_list_spec"; then
+               func_basename "$output"
+               output_la=$func_basename_result
+               save_libobjs=$libobjs
+               save_output=$output
+               output=${output_objdir}/${output_la}.nm
+               func_to_tool_file "$output"
+               libobjs=$nm_file_list_spec$func_to_tool_file_result
+               func_append delfiles " $output"
+               func_verbose "creating $NM input file list: $output"
+               for obj in $save_libobjs; do
+                 func_to_tool_file "$obj"
+                 $ECHO "$func_to_tool_file_result"
+               done > "$output"
+               eval cmd=\"$cmd1\"
+               func_show_eval "$cmd" 'exit $?'
+               output=$save_output
+               libobjs=$save_libobjs
+               skipped_export=false
+             else
+               # The command line is too long to execute in one step.
+               func_verbose "using reloadable object file for export list..."
+               skipped_export=:
+               # Break out early, otherwise skipped_export may be
+               # set to false by a later but shorter cmd.
+               break
+             fi
+           done
+           IFS="$save_ifs"
+           if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+             func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+             func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+           fi
+         fi
+       fi
+
+       if test -n "$export_symbols" && test -n "$include_expsyms"; then
+         tmp_export_symbols="$export_symbols"
+         test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+         $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+       fi
+
+       if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+         # The given exports_symbols file has to be filtered, so filter it.
+         func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+         # FIXME: $output_objdir/$libname.filter potentially contains lots of
+         # 's' commands which not all seds can handle. GNU sed should be fine
+         # though. Also, the filter scales superlinearly with the number of
+         # global variables. join(1) would be nice here, but unfortunately
+         # isn't a blessed tool.
+         $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+         func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+         export_symbols=$output_objdir/$libname.def
+         $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+       fi
+
+       tmp_deplibs=
+       for test_deplib in $deplibs; do
+         case " $convenience " in
+         *" $test_deplib "*) ;;
+         *)
+           func_append tmp_deplibs " $test_deplib"
+           ;;
+         esac
+       done
+       deplibs="$tmp_deplibs"
+
+       if test -n "$convenience"; then
+         if test -n "$whole_archive_flag_spec" &&
+           test "$compiler_needs_object" = yes &&
+           test -z "$libobjs"; then
+           # extract the archives, so we have objects to list.
+           # TODO: could optimize this to just extract one archive.
+           whole_archive_flag_spec=
+         fi
+         if test -n "$whole_archive_flag_spec"; then
+           save_libobjs=$libobjs
+           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+           test "X$libobjs" = "X " && libobjs=
+         else
+           gentop="$output_objdir/${outputname}x"
+           func_append generated " $gentop"
+
+           func_extract_archives $gentop $convenience
+           func_append libobjs " $func_extract_archives_result"
+           test "X$libobjs" = "X " && libobjs=
+         fi
+       fi
+
+       if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+         eval flag=\"$thread_safe_flag_spec\"
+         func_append linker_flags " $flag"
+       fi
+
+       # Make a backup of the uninstalled library when relinking
+       if test "$opt_mode" = relink; then
+         $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+       fi
+
+       # Do each of the archive commands.
+       if test "$module" = yes && test -n "$module_cmds" ; then
+         if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+           eval test_cmds=\"$module_expsym_cmds\"
+           cmds=$module_expsym_cmds
+         else
+           eval test_cmds=\"$module_cmds\"
+           cmds=$module_cmds
+         fi
+       else
+         if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+           eval test_cmds=\"$archive_expsym_cmds\"
+           cmds=$archive_expsym_cmds
+         else
+           eval test_cmds=\"$archive_cmds\"
+           cmds=$archive_cmds
+         fi
+       fi
+
+       if test "X$skipped_export" != "X:" &&
+          func_len " $test_cmds" &&
+          len=$func_len_result &&
+          test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         :
+       else
+         # The command line is too long to link in one step, link piecewise
+         # or, if using GNU ld and skipped_export is not :, use a linker
+         # script.
+
+         # Save the value of $output and $libobjs because we want to
+         # use them later.  If we have whole_archive_flag_spec, we
+         # want to use save_libobjs as it was before
+         # whole_archive_flag_spec was expanded, because we can't
+         # assume the linker understands whole_archive_flag_spec.
+         # This may have to be revisited, in case too many
+         # convenience libraries get linked in and end up exceeding
+         # the spec.
+         if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+           save_libobjs=$libobjs
+         fi
+         save_output=$output
+         func_basename "$output"
+         output_la=$func_basename_result
+
+         # Clear the reloadable object creation command queue and
+         # initialize k to one.
+         test_cmds=
+         concat_cmds=
+         objlist=
+         last_robj=
+         k=1
+
+         if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+           output=${output_objdir}/${output_la}.lnkscript
+           func_verbose "creating GNU ld script: $output"
+           echo 'INPUT (' > $output
+           for obj in $save_libobjs
+           do
+             func_to_tool_file "$obj"
+             $ECHO "$func_to_tool_file_result" >> $output
+           done
+           echo ')' >> $output
+           func_append delfiles " $output"
+           func_to_tool_file "$output"
+           output=$func_to_tool_file_result
+         elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+           output=${output_objdir}/${output_la}.lnk
+           func_verbose "creating linker input file list: $output"
+           : > $output
+           set x $save_libobjs
+           shift
+           firstobj=
+           if test "$compiler_needs_object" = yes; then
+             firstobj="$1 "
+             shift
+           fi
+           for obj
+           do
+             func_to_tool_file "$obj"
+             $ECHO "$func_to_tool_file_result" >> $output
+           done
+           func_append delfiles " $output"
+           func_to_tool_file "$output"
+           output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+         else
+           if test -n "$save_libobjs"; then
+             func_verbose "creating reloadable object files..."
+             output=$output_objdir/$output_la-${k}.$objext
+             eval test_cmds=\"$reload_cmds\"
+             func_len " $test_cmds"
+             len0=$func_len_result
+             len=$len0
+
+             # Loop over the list of objects to be linked.
+             for obj in $save_libobjs
+             do
+               func_len " $obj"
+               func_arith $len + $func_len_result
+               len=$func_arith_result
+               if test "X$objlist" = X ||
+                  test "$len" -lt "$max_cmd_len"; then
+                 func_append objlist " $obj"
+               else
+                 # The command $test_cmds is almost too long, add a
+                 # command to the queue.
+                 if test "$k" -eq 1 ; then
+                   # The first file doesn't have a previous command to add.
+                   reload_objs=$objlist
+                   eval concat_cmds=\"$reload_cmds\"
+                 else
+                   # All subsequent reloadable object files will link in
+                   # the last one created.
+                   reload_objs="$objlist $last_robj"
+                   eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+                 fi
+                 last_robj=$output_objdir/$output_la-${k}.$objext
+                 func_arith $k + 1
+                 k=$func_arith_result
+                 output=$output_objdir/$output_la-${k}.$objext
+                 objlist=" $obj"
+                 func_len " $last_robj"
+                 func_arith $len0 + $func_len_result
+                 len=$func_arith_result
+               fi
+             done
+             # Handle the remaining objects by creating one last
+             # reloadable object file.  All subsequent reloadable object
+             # files will link in the last one created.
+             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+             reload_objs="$objlist $last_robj"
+             eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
+             if test -n "$last_robj"; then
+               eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+             fi
+             func_append delfiles " $output"
+
+           else
+             output=
+           fi
+
+           if ${skipped_export-false}; then
+             func_verbose "generating symbol list for \`$libname.la'"
+             export_symbols="$output_objdir/$libname.exp"
+             $opt_dry_run || $RM $export_symbols
+             libobjs=$output
+             # Append the command to create the export file.
+             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+             eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+             if test -n "$last_robj"; then
+               eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+             fi
+           fi
+
+           test -n "$save_libobjs" &&
+             func_verbose "creating a temporary reloadable object file: $output"
+
+           # Loop through the commands generated above and execute them.
+           save_ifs="$IFS"; IFS='~'
+           for cmd in $concat_cmds; do
+             IFS="$save_ifs"
+             $opt_silent || {
+                 func_quote_for_expand "$cmd"
+                 eval "func_echo $func_quote_for_expand_result"
+             }
+             $opt_dry_run || eval "$cmd" || {
+               lt_exit=$?
+
+               # Restore the uninstalled library and exit
+               if test "$opt_mode" = relink; then
+                 ( cd "$output_objdir" && \
+                   $RM "${realname}T" && \
+                   $MV "${realname}U" "$realname" )
+               fi
+
+               exit $lt_exit
+             }
+           done
+           IFS="$save_ifs"
+
+           if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+             func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+             func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+           fi
+         fi
+
+          if ${skipped_export-false}; then
+           if test -n "$export_symbols" && test -n "$include_expsyms"; then
+             tmp_export_symbols="$export_symbols"
+             test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+             $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+           fi
+
+           if test -n "$orig_export_symbols"; then
+             # The given exports_symbols file has to be filtered, so filter it.
+             func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+             # FIXME: $output_objdir/$libname.filter potentially contains lots of
+             # 's' commands which not all seds can handle. GNU sed should be fine
+             # though. Also, the filter scales superlinearly with the number of
+             # global variables. join(1) would be nice here, but unfortunately
+             # isn't a blessed tool.
+             $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+             func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+             export_symbols=$output_objdir/$libname.def
+             $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+           fi
+         fi
+
+         libobjs=$output
+         # Restore the value of output.
+         output=$save_output
+
+         if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+           test "X$libobjs" = "X " && libobjs=
+         fi
+         # Expand the library linking commands again to reset the
+         # value of $libobjs for piecewise linking.
+
+         # Do each of the archive commands.
+         if test "$module" = yes && test -n "$module_cmds" ; then
+           if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+             cmds=$module_expsym_cmds
+           else
+             cmds=$module_cmds
+           fi
+         else
+           if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+             cmds=$archive_expsym_cmds
+           else
+             cmds=$archive_cmds
+           fi
+         fi
+       fi
+
+       if test -n "$delfiles"; then
+         # Append the command to remove temporary files to $cmds.
+         eval cmds=\"\$cmds~\$RM $delfiles\"
+       fi
+
+       # Add any objects from preloaded convenience libraries
+       if test -n "$dlprefiles"; then
+         gentop="$output_objdir/${outputname}x"
+         func_append generated " $gentop"
+
+         func_extract_archives $gentop $dlprefiles
+         func_append libobjs " $func_extract_archives_result"
+         test "X$libobjs" = "X " && libobjs=
+       fi
+
+       save_ifs="$IFS"; IFS='~'
+       for cmd in $cmds; do
+         IFS="$save_ifs"
+         eval cmd=\"$cmd\"
+         $opt_silent || {
+           func_quote_for_expand "$cmd"
+           eval "func_echo $func_quote_for_expand_result"
+         }
+         $opt_dry_run || eval "$cmd" || {
+           lt_exit=$?
+
+           # Restore the uninstalled library and exit
+           if test "$opt_mode" = relink; then
+             ( cd "$output_objdir" && \
+               $RM "${realname}T" && \
+               $MV "${realname}U" "$realname" )
+           fi
+
+           exit $lt_exit
+         }
+       done
+       IFS="$save_ifs"
+
+       # Restore the uninstalled library and exit
+       if test "$opt_mode" = relink; then
+         $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+         if test -n "$convenience"; then
+           if test -z "$whole_archive_flag_spec"; then
+             func_show_eval '${RM}r "$gentop"'
+           fi
+         fi
+
+         exit $EXIT_SUCCESS
+       fi
+
+       # Create links to the real library.
+       for linkname in $linknames; do
+         if test "$realname" != "$linkname"; then
+           func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+         fi
+       done
+
+       # If -module or -export-dynamic was specified, set the dlname.
+       if test "$module" = yes || test "$export_dynamic" = yes; then
+         # On all known operating systems, these are identical.
+         dlname="$soname"
+       fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       func_warning "\`-dlopen' is ignored for objects"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+       func_warning "\`-l' and \`-L' are ignored for objects" ;;
+      esac
+
+      test -n "$rpath" && \
+       func_warning "\`-rpath' is ignored for objects"
+
+      test -n "$xrpath" && \
+       func_warning "\`-R' is ignored for objects"
+
+      test -n "$vinfo" && \
+       func_warning "\`-version-info' is ignored for objects"
+
+      test -n "$release" && \
+       func_warning "\`-release' is ignored for objects"
+
+      case $output in
+      *.lo)
+       test -n "$objs$old_deplibs" && \
+         func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+       libobj=$output
+       func_lo2o "$libobj"
+       obj=$func_lo2o_result
+       ;;
+      *)
+       libobj=
+       obj="$output"
+       ;;
+      esac
+
+      # Delete the old objects.
+      $opt_dry_run || $RM $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
+
+      if test -n "$convenience"; then
+       if test -n "$whole_archive_flag_spec"; then
+         eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+         reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+       else
+         gentop="$output_objdir/${obj}x"
+         func_append generated " $gentop"
+
+         func_extract_archives $gentop $convenience
+         reload_conv_objs="$reload_objs $func_extract_archives_result"
+       fi
+      fi
+
+      # If we're not building shared, we need to use non_pic_objs
+      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      func_execute_cmds "$reload_cmds" 'exit $?'
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+       if test -n "$gentop"; then
+         func_show_eval '${RM}r "$gentop"'
+       fi
+
+       exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+       if test -n "$gentop"; then
+         func_show_eval '${RM}r "$gentop"'
+       fi
+
+       # Create an invalid libtool object if no PIC, so that we don't
+       # accidentally link it into a program.
+       # $show "echo timestamp > $libobj"
+       # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+       exit $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+       # Only do commands if we really have different PIC objects.
+       reload_objs="$libobjs $reload_conv_objs"
+       output="$libobj"
+       func_execute_cmds "$reload_cmds" 'exit $?'
+      fi
+
+      if test -n "$gentop"; then
+       func_show_eval '${RM}r "$gentop"'
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+       *cygwin*) func_stripname '' '.exe' "$output"
+                 output=$func_stripname_result.exe;;
+      esac
+      test -n "$vinfo" && \
+       func_warning "\`-version-info' is ignored for programs"
+
+      test -n "$release" && \
+       func_warning "\`-release' is ignored for programs"
+
+      test "$preload" = yes \
+        && test "$dlopen_support" = unknown \
+       && test "$dlopen_self" = unknown \
+       && test "$dlopen_self_static" = unknown && \
+         func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+       # On Rhapsody replace the C library is the System framework
+       compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+       finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+       ;;
+      esac
+
+      case $host in
+      *-*-darwin*)
+       # Don't allow lazy linking, it breaks C++ global constructors
+       # But is supposedly fixed on 10.4 or later (yay!).
+       if test "$tagname" = CXX ; then
+         case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+           10.[0123])
+             func_append compile_command " ${wl}-bind_at_load"
+             func_append finalize_command " ${wl}-bind_at_load"
+           ;;
+         esac
+       fi
+       # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+       compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+       finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+       ;;
+      esac
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+       case " $new_libs " in
+       *" -L$path/$objdir "*) ;;
+       *)
+         case " $compile_deplibs " in
+         *" -L$path/$objdir "*)
+           func_append new_libs " -L$path/$objdir" ;;
+         esac
+         ;;
+       esac
+      done
+      for deplib in $compile_deplibs; do
+       case $deplib in
+       -L*)
+         case " $new_libs " in
+         *" $deplib "*) ;;
+         *) func_append new_libs " $deplib" ;;
+         esac
+         ;;
+       *) func_append new_libs " $deplib" ;;
+       esac
+      done
+      compile_deplibs="$new_libs"
+
+
+      func_append compile_command " $compile_deplibs"
+      func_append finalize_command " $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+       # If the user specified any rpath flags, then add them.
+       for libdir in $rpath $xrpath; do
+         # This is the magic to use -rpath.
+         case "$finalize_rpath " in
+         *" $libdir "*) ;;
+         *) func_append finalize_rpath " $libdir" ;;
+         esac
+       done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+       if test -n "$hardcode_libdir_flag_spec"; then
+         if test -n "$hardcode_libdir_separator"; then
+           if test -z "$hardcode_libdirs"; then
+             hardcode_libdirs="$libdir"
+           else
+             # Just accumulate the unique libdirs.
+             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+               ;;
+             *)
+               func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
+         else
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           func_append rpath " $flag"
+         fi
+       elif test -n "$runpath_var"; then
+         case "$perm_rpath " in
+         *" $libdir "*) ;;
+         *) func_append perm_rpath " $libdir" ;;
+         esac
+       fi
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+         testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$libdir:"*) ;;
+         ::) dllsearchpath=$libdir;;
+         *) func_append dllsearchpath ":$libdir";;
+         esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         ::) dllsearchpath=$testbindir;;
+         *) func_append dllsearchpath ":$testbindir";;
+         esac
+         ;;
+       esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+        test -n "$hardcode_libdirs"; then
+       libdir="$hardcode_libdirs"
+       eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+       if test -n "$hardcode_libdir_flag_spec"; then
+         if test -n "$hardcode_libdir_separator"; then
+           if test -z "$hardcode_libdirs"; then
+             hardcode_libdirs="$libdir"
+           else
+             # Just accumulate the unique libdirs.
+             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+               ;;
+             *)
+               func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
+         else
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           func_append rpath " $flag"
+         fi
+       elif test -n "$runpath_var"; then
+         case "$finalize_perm_rpath " in
+         *" $libdir "*) ;;
+         *) func_append finalize_perm_rpath " $libdir" ;;
+         esac
+       fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+        test -n "$hardcode_libdirs"; then
+       libdir="$hardcode_libdirs"
+       eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+       # Transform all the library objects into standard objects.
+       compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+       finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+      fi
+
+      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+      # template prelinking step
+      if test -n "$prelink_cmds"; then
+       func_execute_cmds "$prelink_cmds" 'exit $?'
+      fi
+
+      wrappers_required=yes
+      case $host in
+      *cegcc* | *mingw32ce*)
+        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
+      *cygwin* | *mingw* )
+        if test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      *)
+        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      esac
+      if test "$wrappers_required" = no; then
+       # Replace the output file specification.
+       compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+       link_command="$compile_command$compile_rpath"
+
+       # We have no uninstalled library dependencies, so finalize right now.
+       exit_status=0
+       func_show_eval "$link_command" 'exit_status=$?'
+
+       if test -n "$postlink_cmds"; then
+         func_to_tool_file "$output"
+         postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+         func_execute_cmds "$postlink_cmds" 'exit $?'
+       fi
+
+       # Delete the generated files.
+       if test -f "$output_objdir/${outputname}S.${objext}"; then
+         func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+       fi
+
+       exit $exit_status
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+       compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+       finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+       if test -n "$perm_rpath"; then
+         # We should set the runpath_var.
+         rpath=
+         for dir in $perm_rpath; do
+           func_append rpath "$dir:"
+         done
+         compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+       fi
+       if test -n "$finalize_perm_rpath"; then
+         # We should set the runpath_var.
+         rpath=
+         for dir in $finalize_perm_rpath; do
+           func_append rpath "$dir:"
+         done
+         finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+       fi
+      fi
+
+      if test "$no_install" = yes; then
+       # We don't need to create a wrapper script.
+       link_command="$compile_var$compile_command$compile_rpath"
+       # Replace the output file specification.
+       link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+       # Delete the old output file.
+       $opt_dry_run || $RM $output
+       # Link the executable and exit
+       func_show_eval "$link_command" 'exit $?'
+
+       if test -n "$postlink_cmds"; then
+         func_to_tool_file "$output"
+         postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+         func_execute_cmds "$postlink_cmds" 'exit $?'
+       fi
+
+       exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+       # Fast installation is not supported
+       link_command="$compile_var$compile_command$compile_rpath"
+       relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+       func_warning "this platform does not like uninstalled shared libraries"
+       func_warning "\`$output' will be relinked during installation"
+      else
+       if test "$fast_install" != no; then
+         link_command="$finalize_var$compile_command$finalize_rpath"
+         if test "$fast_install" = yes; then
+           relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+         else
+           # fast_install is set to needless
+           relink_command=
+         fi
+       else
+         link_command="$compile_var$compile_command$compile_rpath"
+         relink_command="$finalize_var$finalize_command$finalize_rpath"
+       fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      func_show_eval "$link_command" 'exit $?'
+
+      if test -n "$postlink_cmds"; then
+       func_to_tool_file "$output_objdir/$outputname"
+       postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+       func_execute_cmds "$postlink_cmds" 'exit $?'
+      fi
+
+      # Now create the wrapper script.
+      func_verbose "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+       # Preserve any variables that may affect compiler behavior
+       for var in $variables_saved_for_relink; do
+         if eval test -z \"\${$var+set}\"; then
+           relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+         elif eval var_value=\$$var; test -z "$var_value"; then
+           relink_command="$var=; export $var; $relink_command"
+         else
+           func_quote_for_eval "$var_value"
+           relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+         fi
+       done
+       relink_command="(cd `pwd`; $relink_command)"
+       relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if not in dry run mode.
+      $opt_dry_run || {
+       # win32 will think the script is a binary if it has
+       # a .exe suffix, so we strip it off here.
+       case $output in
+         *.exe) func_stripname '' '.exe' "$output"
+                output=$func_stripname_result ;;
+       esac
+       # test for cygwin because mv fails w/o .exe extensions
+       case $host in
+         *cygwin*)
+           exeext=.exe
+           func_stripname '' '.exe' "$outputname"
+           outputname=$func_stripname_result ;;
+         *) exeext= ;;
+       esac
+       case $host in
+         *cygwin* | *mingw* )
+           func_dirname_and_basename "$output" "" "."
+           output_name=$func_basename_result
+           output_path=$func_dirname_result
+           cwrappersource="$output_path/$objdir/lt-$output_name.c"
+           cwrapper="$output_path/$output_name.exe"
+           $RM $cwrappersource $cwrapper
+           trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+           func_emit_cwrapperexe_src > $cwrappersource
+
+           # The wrapper executable is built using the $host compiler,
+           # because it contains $host paths and files. If cross-
+           # compiling, it, like the target executable, must be
+           # executed on the $host or under an emulation environment.
+           $opt_dry_run || {
+             $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+             $STRIP $cwrapper
+           }
+
+           # Now, create the wrapper script for func_source use:
+           func_ltwrapper_scriptname $cwrapper
+           $RM $func_ltwrapper_scriptname_result
+           trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+           $opt_dry_run || {
+             # note: this script will not be executed, so do not chmod.
+             if test "x$build" = "x$host" ; then
+               $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+             else
+               func_emit_wrapper no > $func_ltwrapper_scriptname_result
+             fi
+           }
+         ;;
+         * )
+           $RM $output
+           trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+           func_emit_wrapper no > $output
+           chmod +x $output
+         ;;
+       esac
+      }
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+       oldobjs="$libobjs_save $symfileobj"
+       addlibs="$convenience"
+       build_libtool_libs=no
+      else
+       if test "$build_libtool_libs" = module; then
+         oldobjs="$libobjs_save"
+         build_libtool_libs=no
+       else
+         oldobjs="$old_deplibs $non_pic_objects"
+         if test "$preload" = yes && test -f "$symfileobj"; then
+           func_append oldobjs " $symfileobj"
+         fi
+       fi
+       addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+       gentop="$output_objdir/${outputname}x"
+       func_append generated " $gentop"
+
+       func_extract_archives $gentop $addlibs
+       func_append oldobjs " $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=$old_archive_from_new_cmds
+      else
+
+       # Add any objects from preloaded convenience libraries
+       if test -n "$dlprefiles"; then
+         gentop="$output_objdir/${outputname}x"
+         func_append generated " $gentop"
+
+         func_extract_archives $gentop $dlprefiles
+         func_append oldobjs " $func_extract_archives_result"
+       fi
+
+       # POSIX demands no paths to be encoded in archives.  We have
+       # to avoid creating archives with duplicate basenames if we
+       # might have to extract them afterwards, e.g., when creating a
+       # static archive out of a convenience library, or when linking
+       # the entirety of a libtool archive into another (currently
+       # not supported by libtool).
+       if (for obj in $oldobjs
+           do
+             func_basename "$obj"
+             $ECHO "$func_basename_result"
+           done | sort | sort -uc >/dev/null 2>&1); then
+         :
+       else
+         echo "copying selected object files to avoid basename conflicts..."
+         gentop="$output_objdir/${outputname}x"
+         func_append generated " $gentop"
+         func_mkdir_p "$gentop"
+         save_oldobjs=$oldobjs
+         oldobjs=
+         counter=1
+         for obj in $save_oldobjs
+         do
+           func_basename "$obj"
+           objbase="$func_basename_result"
+           case " $oldobjs " in
+           " ") oldobjs=$obj ;;
+           *[\ /]"$objbase "*)
+             while :; do
+               # Make sure we don't pick an alternate name that also
+               # overlaps.
+               newobj=lt$counter-$objbase
+               func_arith $counter + 1
+               counter=$func_arith_result
+               case " $oldobjs " in
+               *[\ /]"$newobj "*) ;;
+               *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+               esac
+             done
+             func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+             func_append oldobjs " $gentop/$newobj"
+             ;;
+           *) func_append oldobjs " $obj" ;;
+           esac
+         done
+       fi
+       eval cmds=\"$old_archive_cmds\"
+
+       func_len " $cmds"
+       len=$func_len_result
+       if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         cmds=$old_archive_cmds
+       elif test -n "$archiver_list_spec"; then
+         func_verbose "using command file archive linking..."
+         for obj in $oldobjs
+         do
+           func_to_tool_file "$obj"
+           $ECHO "$func_to_tool_file_result"
+         done > $output_objdir/$libname.libcmd
+         func_to_tool_file "$output_objdir/$libname.libcmd"
+         oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+         cmds=$old_archive_cmds
+       else
+         # the command line is too long to link in one step, link in parts
+         func_verbose "using piecewise archive linking..."
+         save_RANLIB=$RANLIB
+         RANLIB=:
+         objlist=
+         concat_cmds=
+         save_oldobjs=$oldobjs
+         oldobjs=
+         # Is there a better way of finding the last object in the list?
+         for obj in $save_oldobjs
+         do
+           last_oldobj=$obj
+         done
+         eval test_cmds=\"$old_archive_cmds\"
+         func_len " $test_cmds"
+         len0=$func_len_result
+         len=$len0
+         for obj in $save_oldobjs
+         do
+           func_len " $obj"
+           func_arith $len + $func_len_result
+           len=$func_arith_result
+           func_append objlist " $obj"
+           if test "$len" -lt "$max_cmd_len"; then
+             :
+           else
+             # the above command should be used before it gets too long
+             oldobjs=$objlist
+             if test "$obj" = "$last_oldobj" ; then
+               RANLIB=$save_RANLIB
+             fi
+             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+             eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+             objlist=
+             len=$len0
+           fi
+         done
+         RANLIB=$save_RANLIB
+         oldobjs=$objlist
+         if test "X$oldobjs" = "X" ; then
+           eval cmds=\"\$concat_cmds\"
+         else
+           eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+         fi
+       fi
+      fi
+      func_execute_cmds "$cmds" 'exit $?'
+    done
+
+    test -n "$generated" && \
+      func_show_eval "${RM}r$generated"
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      func_verbose "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+       if eval test -z \"\${$var+set}\"; then
+         relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+       elif eval var_value=\$$var; test -z "$var_value"; then
+         relink_command="$var=; export $var; $relink_command"
+       else
+         func_quote_for_eval "$var_value"
+         relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+       fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+       relink_command=
+      fi
+
+      # Only create the output if not a dry run.
+      $opt_dry_run || {
+       for installed in no yes; do
+         if test "$installed" = yes; then
+           if test -z "$install_libdir"; then
+             break
+           fi
+           output="$output_objdir/$outputname"i
+           # Replace all uninstalled libtool libraries with the installed ones
+           newdependency_libs=
+           for deplib in $dependency_libs; do
+             case $deplib in
+             *.la)
+               func_basename "$deplib"
+               name="$func_basename_result"
+               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+               test -z "$libdir" && \
+                 func_fatal_error "\`$deplib' is not a valid libtool archive"
+               func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+               ;;
+             -L*)
+               func_stripname -L '' "$deplib"
+               func_replace_sysroot "$func_stripname_result"
+               func_append newdependency_libs " -L$func_replace_sysroot_result"
+               ;;
+             -R*)
+               func_stripname -R '' "$deplib"
+               func_replace_sysroot "$func_stripname_result"
+               func_append newdependency_libs " -R$func_replace_sysroot_result"
+               ;;
+             *) func_append newdependency_libs " $deplib" ;;
+             esac
+           done
+           dependency_libs="$newdependency_libs"
+           newdlfiles=
+
+           for lib in $dlfiles; do
+             case $lib in
+             *.la)
+               func_basename "$lib"
+               name="$func_basename_result"
+               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+               test -z "$libdir" && \
+                 func_fatal_error "\`$lib' is not a valid libtool archive"
+               func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+               ;;
+             *) func_append newdlfiles " $lib" ;;
+             esac
+           done
+           dlfiles="$newdlfiles"
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             case $lib in
+             *.la)
+               # Only pass preopened files to the pseudo-archive (for
+               # eventual linking with the app. that links it) if we
+               # didn't already link the preopened objects directly into
+               # the library:
+               func_basename "$lib"
+               name="$func_basename_result"
+               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+               test -z "$libdir" && \
+                 func_fatal_error "\`$lib' is not a valid libtool archive"
+               func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+               ;;
+             esac
+           done
+           dlprefiles="$newdlprefiles"
+         else
+           newdlfiles=
+           for lib in $dlfiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             func_append newdlfiles " $abs"
+           done
+           dlfiles="$newdlfiles"
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             func_append newdlprefiles " $abs"
+           done
+           dlprefiles="$newdlprefiles"
+         fi
+         $RM $output
+         # place dlname in correct position for cygwin
+         # In fact, it would be nice if we could use this code for all target
+         # systems that can't hard-code library paths into their executables
+         # and that have no shared library path variable independent of PATH,
+         # but it turns out we can't easily determine that from inspecting
+         # libtool variables, so we have to hard-code the OSs to which it
+         # applies here; at the moment, that means platforms that use the PE
+         # object format with DLL files.  See the long comment at the top of
+         # tests/bindir.at for full details.
+         tdlname=$dlname
+         case $host,$output,$installed,$module,$dlname in
+           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+             # If a -bindir argument was supplied, place the dll there.
+             if test "x$bindir" != x ;
+             then
+               func_relative_path "$install_libdir" "$bindir"
+               tdlname=$func_relative_path_result$dlname
+             else
+               # Otherwise fall back on heuristic.
+               tdlname=../bin/$dlname
+             fi
+             ;;
+         esac
+         $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+         if test "$installed" = no && test "$need_relink" = yes; then
+           $ECHO >> $output "\
+relink_command=\"$relink_command\""
+         fi
+       done
+      }
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+}
+
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
+    func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+    $opt_debug
+    RM="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) func_append RM " $arg"; rmforce=yes ;;
+      -*) func_append RM " $arg" ;;
+      *) func_append files " $arg" ;;
+      esac
+    done
+
+    test -z "$RM" && \
+      func_fatal_help "you must specify an RM program"
+
+    rmdirs=
+
+    for file in $files; do
+      func_dirname "$file" "" "."
+      dir="$func_dirname_result"
+      if test "X$dir" = X.; then
+       odir="$objdir"
+      else
+       odir="$dir/$objdir"
+      fi
+      func_basename "$file"
+      name="$func_basename_result"
+      test "$opt_mode" = uninstall && odir="$dir"
+
+      # Remember odir for removal later, being careful to avoid duplicates
+      if test "$opt_mode" = clean; then
+       case " $rmdirs " in
+         *" $odir "*) ;;
+         *) func_append rmdirs " $odir" ;;
+       esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if { test -L "$file"; } >/dev/null 2>&1 ||
+        { test -h "$file"; } >/dev/null 2>&1 ||
+        test -f "$file"; then
+       :
+      elif test -d "$file"; then
+       exit_status=1
+       continue
+      elif test "$rmforce" = yes; then
+       continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+       # Possibly a libtool archive, so verify it.
+       if func_lalib_p "$file"; then
+         func_source $dir/$name
+
+         # Delete the libtool libraries and symlinks.
+         for n in $library_names; do
+           func_append rmfiles " $odir/$n"
+         done
+         test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+         case "$opt_mode" in
+         clean)
+           case " $library_names " in
+           *" $dlname "*) ;;
+           *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+           esac
+           test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+           ;;
+         uninstall)
+           if test -n "$library_names"; then
+             # Do each command in the postuninstall commands.
+             func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+           fi
+
+           if test -n "$old_library"; then
+             # Do each command in the old_postuninstall commands.
+             func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+           fi
+           # FIXME: should reinstall the best remaining shared library.
+           ;;
+         esac
+       fi
+       ;;
+
+      *.lo)
+       # Possibly a libtool object, so verify it.
+       if func_lalib_p "$file"; then
+
+         # Read the .lo file
+         func_source $dir/$name
+
+         # Add PIC object to the list of files to remove.
+         if test -n "$pic_object" &&
+            test "$pic_object" != none; then
+           func_append rmfiles " $dir/$pic_object"
+         fi
+
+         # Add non-PIC object to the list of files to remove.
+         if test -n "$non_pic_object" &&
+            test "$non_pic_object" != none; then
+           func_append rmfiles " $dir/$non_pic_object"
+         fi
+       fi
+       ;;
+
+      *)
+       if test "$opt_mode" = clean ; then
+         noexename=$name
+         case $file in
+         *.exe)
+           func_stripname '' '.exe' "$file"
+           file=$func_stripname_result
+           func_stripname '' '.exe' "$name"
+           noexename=$func_stripname_result
+           # $file with .exe has already been added to rmfiles,
+           # add $file without .exe
+           func_append rmfiles " $file"
+           ;;
+         esac
+         # Do a test to see if this is a libtool program.
+         if func_ltwrapper_p "$file"; then
+           if func_ltwrapper_executable_p "$file"; then
+             func_ltwrapper_scriptname "$file"
+             relink_command=
+             func_source $func_ltwrapper_scriptname_result
+             func_append rmfiles " $func_ltwrapper_scriptname_result"
+           else
+             relink_command=
+             func_source $dir/$noexename
+           fi
+
+           # note $name still contains .exe if it was in $file originally
+           # as does the version of $file that was added into $rmfiles
+           func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
+           if test "$fast_install" = yes && test -n "$relink_command"; then
+             func_append rmfiles " $odir/lt-$name"
+           fi
+           if test "X$noexename" != "X$name" ; then
+             func_append rmfiles " $odir/lt-${noexename}.c"
+           fi
+         fi
+       fi
+       ;;
+      esac
+      func_show_eval "$RM $rmfiles" 'exit_status=1'
+    done
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+       func_show_eval "rmdir $dir >/dev/null 2>&1"
+      fi
+    done
+
+    exit $exit_status
+}
+
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+    func_mode_uninstall ${1+"$@"}
+
+test -z "$opt_mode" && {
+  help="$generic_help"
+  func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+  func_fatal_help "invalid operation mode \`$opt_mode'"
+
+if test -n "$exec_cmd"; then
+  eval exec "$exec_cmd"
+  exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/m4/as-ac-expand.m4 b/m4/as-ac-expand.m4
new file mode 100644 (file)
index 0000000..0c71173
--- /dev/null
@@ -0,0 +1,40 @@
+dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
+dnl
+dnl example
+dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
+dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
+
+AC_DEFUN([AS_AC_EXPAND],
+[
+  EXP_VAR=[$1]
+  FROM_VAR=[$2]
+
+  dnl first expand prefix and exec_prefix if necessary
+  prefix_save=$prefix
+  exec_prefix_save=$exec_prefix
+
+  dnl if no prefix given, then use /usr/local, the default prefix
+  if test "x$prefix" = "xNONE"; then
+    prefix=$ac_default_prefix
+  fi
+  dnl if no exec_prefix given, then use prefix
+  if test "x$exec_prefix" = "xNONE"; then
+    exec_prefix=$prefix
+  fi
+
+  full_var="$FROM_VAR"
+  dnl loop until it doesn't change anymore
+  while true; do
+    new_full_var="`eval echo $full_var`"
+    if test "x$new_full_var"="x$full_var"; then break; fi
+    full_var=$new_full_var
+  done
+
+  dnl clean up
+  full_var=$new_full_var
+  AC_SUBST([$1], "$full_var")
+
+  dnl restore prefix and exec_prefix
+  prefix=$prefix_save
+  exec_prefix=$exec_prefix_save
+])
diff --git a/m4/jhflags.m4 b/m4/jhflags.m4
new file mode 100644 (file)
index 0000000..222e4b0
--- /dev/null
@@ -0,0 +1,21 @@
+dnl
+dnl JH_ADD_CFLAG(FLAG)
+dnl checks whether the C compiler supports the given flag, and if so, adds
+dnl it to $CFLAGS.  If the flag is already present in the list, then the
+dnl check is not performed.
+AC_DEFUN([JH_ADD_CFLAG],
+[
+case " $CFLAGS " in
+*@<:@\ \ @:>@$1@<:@\   \ @:>@*)
+  ;;
+*)
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $1"
+  AC_MSG_CHECKING([whether [$]CC understands $1])
+  AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no])
+  AC_MSG_RESULT($jh_has_option)
+  if test $jh_has_option = no; then
+    CFLAGS="$save_CFLAGS"
+  fi
+  ;;
+esac])
diff --git a/m4/libtool.m4 b/m4/libtool.m4
new file mode 100644 (file)
index 0000000..88de383
--- /dev/null
@@ -0,0 +1,7835 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+#                 Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+# 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.
+
+m4_define([_LT_COPYING], [dnl
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+#                 Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool 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 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 57 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+       [m4_default([$3],
+                  [m4_fatal([Libtool version $1 or higher is required],
+                            63)])],
+       [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+  *\ * | *\    *)
+    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+m4_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 "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+
+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
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    _LT_PATH_MAGIC
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+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 delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME.  Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+       [m4_ifval([$1], [$1], [$2])])
+    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+    m4_ifval([$4],
+       [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+    lt_dict_add_subkey([lt_decl_dict], [$2],
+       [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+  [0], [m4_fatal([$0: too few arguments: $#])],
+  [1], [m4_fatal([$0: too few arguments: $#: $1])],
+  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+     m4_if([$2], [],
+          m4_quote(lt_decl_varnames),
+       m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+                       lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'.  VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly.  In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+#    # Some comment about what VAR is for.
+#    visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+                                          [description])))[]dnl
+m4_pushdef([_libtool_name],
+    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+    [0], [_libtool_name=[$]$1],
+    [1], [_libtool_name=$lt_[]$1],
+    [2], [_libtool_name=$lt_[]$1],
+    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'.  Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+       dnl If the libtool generation code has been placed in $CONFIG_LT,
+       dnl instead of duplicating it all over again into config.status,
+       dnl then we will have config.status run $CONFIG_LT later, so it
+       dnl needs to know what name is stored there:
+        [AC_CONFIG_COMMANDS([libtool],
+            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+    dnl If the libtool generation code is destined for config.status,
+    dnl expand the accumulated commands and init code now:
+    [AC_CONFIG_COMMANDS([libtool],
+        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# 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
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable.  If COMMENT is supplied, it is inserted after the
+# `#!' sequence but before initialization text begins.  After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script.  The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test $lt_write_fail = 0 && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+  echo
+  AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+  -h, --help      print this help, then exit
+  -V, --version   print version number, then exit
+  -q, --quiet     do not print progress messages
+  -d, --debug     don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+  case $[1] in
+    --version | --v* | -V )
+      echo "$lt_cl_version"; exit 0 ;;
+    --help | --h* | -h )
+      echo "$lt_cl_help"; exit 0 ;;
+    --debug | --d* | -d )
+      debug=: ;;
+    --quiet | --q* | --silent | --s* | -q )
+      lt_cl_silent=: ;;
+
+    -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+    *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+  esac
+  shift
+done
+
+if $lt_cl_silent; then
+  exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure.  Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test "$silent" = yes &&
+  lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars.  Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+  m4_if(_LT_TAG, [C], [
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_EOF >> "$cfgfile"
+# 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
+_LT_EOF
+    ;;
+  esac
+
+  _LT_PROG_LTMAIN
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+
+  _LT_PROG_REPLACE_SHELLFNS
+
+   mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+  [C],                 [_LT_LANG(C)],
+  [C++],               [_LT_LANG(CXX)],
+  [Java],              [_LT_LANG(GCJ)],
+  [Fortran 77],                [_LT_LANG(F77)],
+  [Fortran],           [_LT_LANG(FC)],
+  [Windows Resource],  [_LT_LANG(RC)],
+  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+    [_LT_LANG($1)],
+    [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+  [LT_SUPPORTED_TAG([$1])dnl
+  m4_append([_LT_TAGS], [$1 ])dnl
+  m4_define([_LT_LANG_]$1[_enabled], [])dnl
+  _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+  [LT_LANG(CXX)],
+  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+  [LT_LANG(F77)],
+  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+  [LT_LANG(FC)],
+  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+  [LT_LANG(GCJ)],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+    [LT_LANG(GCJ)],
+    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+      [LT_LANG(GCJ)],
+      [m4_ifdef([AC_PROG_GCJ],
+       [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([A][M_PROG_GCJ],
+       [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([LT_PROG_GCJ],
+       [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+  [LT_LANG(RC)],
+  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])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_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$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.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$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 -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+  case $host_os in
+    rhapsody* | darwin*)
+    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+    AC_CHECK_TOOL([LIPO], [lipo], [:])
+    AC_CHECK_TOOL([OTOOL], [otool], [:])
+    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+    _LT_DECL([], [DSYMUTIL], [1],
+      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+    _LT_DECL([], [NMEDIT], [1],
+      [Tool to change global to local symbols on Mac OS X])
+    _LT_DECL([], [LIPO], [1],
+      [Tool to manipulate fat objects and archives on Mac OS X])
+    _LT_DECL([], [OTOOL], [1],
+      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+    _LT_DECL([], [OTOOL64], [1],
+      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+      [lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+       # By default we will add the -single_module flag. You can override
+       # by either setting the environment variable LT_MULTI_MODULE
+       # non-empty at configure time, or by adding -multi_module to the
+       # link flags.
+       rm -rf libconftest.dylib*
+       echo "int foo(void){return 1;}" > conftest.c
+       echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+       $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+         -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+       if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+         lt_cv_apple_cc_single_mod=yes
+       else
+         cat conftest.err >&AS_MESSAGE_LOG_FD
+       fi
+       rm -rf libconftest.dylib*
+       rm -f conftest.*
+      fi])
+    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+      [lt_cv_ld_exported_symbols_list],
+      [lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+       [lt_cv_ld_exported_symbols_list=yes],
+       [lt_cv_ld_exported_symbols_list=no])
+       LDFLAGS="$save_LDFLAGS"
+    ])
+    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+      [lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+       lt_cv_ld_force_load=yes
+      else
+       cat conftest.err >&AS_MESSAGE_LOG_FD
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+    ])
+    case $host_os in
+    rhapsody* | darwin1.[[012]])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+       10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+       10.[[012]]*)
+         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+       10.*)
+         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_automatic, $1)=yes
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  else
+    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  fi
+  _LT_TAGVAR(link_all_deplibs, $1)=yes
+  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=func_echo_all
+    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    m4_if([$1], [CXX],
+[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      _LT_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${_lt_dsymutil}"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
+    fi
+],[])
+  else
+  _LT_TAGVAR(ld_shlibs, $1)=no
+  fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
+# 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.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+  lt_aix_libpath_sed='[
+      /Import File Strings/,/^$/ {
+         /^0/ {
+             s/^0  *\([^ ]*\) *$/\1/
+             p
+         }
+      }]'
+  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi],[])
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+  fi
+  ])
+  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script which will find a shell with a builtin
+# printf (which we can use as an echo command).
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
+else
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*" 
+}
+
+case "$ECHO" in
+  printf*) AC_MSG_RESULT([printf]) ;;
+  print*) AC_MSG_RESULT([print -r]) ;;
+  *) AC_MSG_RESULT([cat]) ;;
+esac
+
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test "X`printf %s $ECHO`" = "X$ECHO" \
+      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
+
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[  --with-sysroot[=DIR] Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted.  We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+   if test "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   AC_MSG_RESULT([${with_sysroot}])
+   AC_MSG_ERROR([The sysroot must be an absolute path.])
+   ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libraries should be installed.])])
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+  [AS_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 '$LINENO' "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-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|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-*kfreebsd*-gnu)
+           LD="${LD-ld} -m elf_i386_fbsd"
+           ;;
+         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-*kfreebsd*-gnu)
+           LD="${LD-ld} -m elf_x86_64_fbsd"
+           ;;
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_x86_64"
+           ;;
+         ppc*-*linux*|powerpc*-*linux*)
+           LD="${LD-ld} -m elf64ppc"
+           ;;
+         s390*-*linux*|s390*-*tpf*)
+           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_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[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" ;;
+      *)
+       if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+         LD="${LD-ld} -64"
+       fi
+       ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+  [lt_cv_ar_at_file=no
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+     [echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([lt_ar_try])
+      if test "$ac_status" -eq 0; then
+       # Ensure the archiver fails upon bogus file names.
+       rm -f conftest.$ac_objext libconftest.a
+       AC_TRY_EVAL([lt_ar_try])
+       if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+     ])
+  ])
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+  [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[_LT_PROG_AR
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+    [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+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
+
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+    [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+    [Whether to use a lock for old archive extraction])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#              [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   echo "$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:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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
+    m4_if([$5], , :, [$5])
+else
+    m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                  [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   echo "$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 "$_lt_linker_boilerplate" | $SED '/^$/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 -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$4], , :, [$4])
+else
+    m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# 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* | cegcc*)
+    # 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;
+    ;;
+
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    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
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      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`
+    else
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # 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.
+      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+                = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+             test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      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`
+    fi
+    ;;
+  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
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+    [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_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 <<_LT_EOF
+[#line $LINENO "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
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 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;
+          else puts (dlerror ());
+       }
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}]
+_LT_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_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_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* | cegcc*)
+    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="-ldld"],
+       [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="-ldld"])
+             ])
+           ])
+         ])
+       ])
+      ])
+    ;;
+  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_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_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
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+        [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+        [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+        [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$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:$LINENO: $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:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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_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 ..
+   $RM -r conftest
+   $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+       [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_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
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_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
+_LT_DECL([], [objdir], [0],
+         [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$_LT_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_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; 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
+_LT_TAGDECL([], [hardcode_action], [0],
+    [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+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"
+      old_striplib="$STRIP -S"
+      AC_MSG_RESULT([yes])
+    else
+      AC_MSG_RESULT([no])
+    fi
+    ;;
+  *)
+    AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+       [], [
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  case $host_os in
+    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
+    *) lt_sed_strip_eq="s,=/,/,g" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+  case $lt_search_path_spec in
+  *\;*)
+    # 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.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+    ;;
+  *)
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+    ;;
+  esac
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+  esac
+  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+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"
+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'
+  ;;
+
+aix[[4-9]]*)
+  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*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    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=`func_echo_all "$lib" | $SED '\''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'
+    ;;
+  esac
+  ;;
+
+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* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
+    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~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    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}'
+m4_if([$1], [],[
+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    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
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec="$LIB"
+      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH.
+        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
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # 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'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
+    ;;
+
+  *)
+    # Assume MSVC wrapper
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
+    ;;
+  esac
+  # 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}${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`'
+m4_if([$1], [],[
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+  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
+  ;;
+
+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
+    ;;
+  *) # from 4.6 on, and DragonFly
+    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
+  ;;
+
+haiku*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  dynamic_linker="$host_os runtime_loader"
+  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=LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  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'
+  # or fails outright, so override atomically:
+  install_override_mode=555
+  ;;
+
+interix[[3-9]]*)
+  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* | k*bsd*-gnu | kopensolaris*-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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+
+  # Some binutils ld are patched to set DT_RUNPATH
+  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+    [lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+        LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+        [lt_cv_shlibpath_overrides_runpath=yes])])
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+    ])
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+  # 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
+
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+  # 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>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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'
+  ;;
+
+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=qnx
+  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='ldqnx.so'
+  ;;
+
+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"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+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
+      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
+  shlibpath_overrides_runpath=yes
+  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'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    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'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/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}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+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
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+    [Variables whose values should be saved in libtool wrapper scripts and
+    restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+    [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+    [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+    [[List of archive names.  First name is the real one, the rest are links.
+    The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+    [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+    [Permission mode override for installation of shared libraries])
+_LT_DECL([], [postinstall_cmds], [2],
+    [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+    [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+    [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+    [[As "finish_cmds", except a single script fragment to be evaled but
+    not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+    [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+    [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+    [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_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="m4_if([$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 <<_LT_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
+
+_LT_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
+_LT_DECL([], [MAGIC_CMD], [0],
+        [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_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
+    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_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])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])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[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
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[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
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
+  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
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize 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
+aix[[4-9]]*)
+  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',
+  # unless we find 'file', for example because we are cross-compiling.
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    # Keep this pattern in sync with the one in func_win32_libid.
+    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+cegcc*)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | 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
+  ;;
+
+haiku*)
+  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])(-bit)?( [LM]SB)? 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
+  ;;
+
+interix[[3-9]]*)
+  # 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* | k*bsd*-gnu | kopensolaris*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  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=pass_all
+  ;;
+
+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
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  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
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
+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
+
+_LT_DECL([], [deplibs_check_method], [1],
+    [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+    [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+    [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (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
+  : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
+  AC_SUBST([DUMPBIN])
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+  [lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+  cat conftest.out >&AS_MESSAGE_LOG_FD
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+    [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+  [lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*])
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-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_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  case $cc_basename in
+  nvcc*)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+  esac
+
+  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+       [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris*)
+  symcode='[[BDRT]]'
+  ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK ['"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx]"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[    ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+       mv -f "$nlist"T "$nlist"
+      else
+       rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+       if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+         cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT@&t@_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+         # Now generate the symbol file.
+         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+         cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+LT@&t@_DLSYM_CONST struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+         cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+         # Now try linking the two files.
+         mv conftest.$ac_objext conftstm.$ac_objext
+         lt_globsym_save_LIBS=$LIBS
+         lt_globsym_save_CFLAGS=$CFLAGS
+         LIBS="conftstm.$ac_objext"
+         CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+         if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+           pipe_works=yes
+         fi
+         LIBS=$lt_globsym_save_LIBS
+         CFLAGS=$lt_globsym_save_CFLAGS
+       else
+         echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+       fi
+      else
+       echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+    [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+    [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+    [lt_cv_sys_global_symbol_to_c_name_address], [1],
+    [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+    [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([], [nm_file_list_spec], [1],
+    [Specify filename containing input files for $NM])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+m4_if([$1], [CXX], [
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+       [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+       ;;
+      *)
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       ;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[[4-9]]*)
+       # All AIX code is PIC.
+       if test "$host_cpu" = ia64; then
+         # AIX 5 now supports IA64 processor
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       else
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+       fi
+       ;;
+      chorus*)
+       case $cc_basename in
+       cxch68*)
+         # Green Hills C++ Compiler
+         # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+         ;;
+       esac
+       ;;
+      mingw* | cygwin* | os2* | pw32* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       m4_if([$1], [GCJ], [],
+         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+       ;;
+      dgux*)
+       case $cc_basename in
+         ec++*)
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           ;;
+         ghcx*)
+           # Green Hills C++ Compiler
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      freebsd* | dragonfly*)
+       # FreeBSD uses GNU C++
+       ;;
+      hpux9* | hpux10* | hpux11*)
+       case $cc_basename in
+         CC*)
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+           if test "$host_cpu" != ia64; then
+             _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+           fi
+           ;;
+         aCC*)
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+           case $host_cpu in
+           hppa*64*|ia64*)
+             # +Z the default
+             ;;
+           *)
+             _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+             ;;
+           esac
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      interix*)
+       # This is c89, which is MS Visual C++ (no shared libs)
+       # Anyone wants to do a port?
+       ;;
+      irix5* | irix6* | nonstopux*)
+       case $cc_basename in
+         CC*)
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+           # CC pic flag -KPIC is the default.
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+       case $cc_basename in
+         KCC*)
+           # KAI C++ Compiler
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+           ;;
+         ecpc* )
+           # old Intel C++ for x86_64 which still supported -KPIC.
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+           ;;
+         icpc* )
+           # Intel C++, used to be incompatible with GCC.
+           # ICC 10 doesn't accept -KPIC any more.
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+           ;;
+         pgCC* | pgcpp*)
+           # Portland Group C++ compiler
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           ;;
+         cxx*)
+           # Compaq C++
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+           ;;
+         xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+           # IBM XL 8.0, 9.0 on PPC and BlueGene
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+           ;;
+         *)
+           case `$CC -V 2>&1 | sed 5q` in
+           *Sun\ C*)
+             # Sun C++ 5.9
+             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+             ;;
+           esac
+           ;;
+       esac
+       ;;
+      lynxos*)
+       ;;
+      m88k*)
+       ;;
+      mvs*)
+       case $cc_basename in
+         cxx*)
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      netbsd*)
+       ;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+       case $cc_basename in
+         KCC*)
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+           ;;
+         RCC*)
+           # Rational C++ 2.4.1
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           ;;
+         cxx*)
+           # Digital/Compaq C++
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      psos*)
+       ;;
+      solaris*)
+       case $cc_basename in
+         CC* | sunCC*)
+           # Sun C++ 4.2, 5.x and Centerline C++
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+           ;;
+         gcx*)
+           # Green Hills C++ Compiler
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      sunos4*)
+       case $cc_basename in
+         CC*)
+           # Sun C++ 4.x
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           ;;
+         lcc*)
+           # Lucid
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+       case $cc_basename in
+         CC*)
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           ;;
+       esac
+       ;;
+      tandem*)
+       case $cc_basename in
+         NCC*)
+           # NonStop-UX NCC 3.20
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      vxworks*)
+       ;;
+      *)
+       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+       ;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+       [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+       # +Z the default
+       ;;
+      *)
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       ;;
+      esac
+      ;;
+
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      m4_if([$1], [GCJ], [],
+       [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+       ;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+       ;;
+      nagfor*)
+       # NAG Fortran compiler
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       ;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      ccc*)
+        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      xl* | bgxl* | bgf* | mpixl*)
+       # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+       ;;
+      *)
+       case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ F* | *Sun*Fortran*)
+         # Sun Fortran 8.3 passes all unrecognized flags to the linker
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+         _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+         ;;
+       *Sun\ C*)
+         # Sun C 5.9
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         ;;
+       esac
+       ;;
+      esac
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    rdos*)
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+       [Additional compiler flags for building library objects])
+
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+       [How to pass a linker flag through the compiler])
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+       [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+  case $host_os in
+  aix[[4-9]]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    # Also, AIX nm treats weak defined symbols like other global defined
+    # symbols, whereas GNU nm marks them as "W".
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+    ;;
+  cygwin* | mingw* | cegcc*)
+    case $cc_basename in
+    cl*) ;;
+    *)
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+      ;;
+    esac
+    ;;
+  *)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+    ;;
+  esac
+], [
+  runpath_var=
+  _LT_TAGVAR(allow_undefined_flag, $1)=
+  _LT_TAGVAR(always_export_symbols, $1)=no
+  _LT_TAGVAR(archive_cmds, $1)=
+  _LT_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_TAGVAR(compiler_needs_object, $1)=no
+  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(hardcode_automatic, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(inherit_rpath, $1)=no
+  _LT_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_TAGVAR(module_cmds, $1)=
+  _LT_TAGVAR(module_expsym_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_TAGVAR(ld_shlibs, $1)=yes
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
+  if test "$with_gnu_ld" = yes; then
+    case $host_os in
+      aix*)
+       # The AIX port of GNU ld has always aspired to compatibility
+       # with the native linker.  However, as the warning in the GNU ld
+       # block says, versions before 2.19.5* couldn't really create working
+       # shared libraries, regardless of the interface used.
+       case `$LD -v 2>&1` in
+         *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+         *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+         *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+         *)
+           lt_use_gnu_ld_interface=yes
+           ;;
+       esac
+       ;;
+      *)
+       lt_use_gnu_ld_interface=yes
+       ;;
+    esac
+  fi
+
+  if test "$lt_use_gnu_ld_interface" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
+      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[[3-9]]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+       _LT_TAGVAR(ld_shlibs, $1)=no
+       cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+       # support --undefined.  This deserves some investigation.  FIXME
+       _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+       _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=no
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $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_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 $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+       _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    haiku*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    interix[[3-9]]*)
+      _LT_TAGVAR(hardcode_direct, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_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_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_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'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+       case $cc_basename in
+         diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
+       esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+        && test "$tmp_diet" = no
+      then
+       tmp_addflag=' $pic_flag'
+       tmp_sharedflag='-shared'
+       case $cc_basename,$host_cpu in
+        pgcc*)                         # Portland Group C compiler
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag'
+         ;;
+       pgf77* | pgf90* | pgf95* | pgfortran*)
+                                       # Portland Group f77 and f90 compilers
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag -Mnomain' ;;
+       ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
+         tmp_addflag=' -i_dynamic' ;;
+       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
+         tmp_addflag=' -i_dynamic -nofor_main' ;;
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
+       lf95*)                          # Lahey Fortran 8.1
+         _LT_TAGVAR(whole_archive_flag_spec, $1)=
+         tmp_sharedflag='--shared' ;;
+       xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+         tmp_sharedflag='-qmkshrobj'
+         tmp_addflag= ;;
+       nvcc*)  # Cuda Compiler Driver 2.2
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         _LT_TAGVAR(compiler_needs_object, $1)=yes
+         ;;
+       esac
+       case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ C*)                       # Sun C 5.9
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         _LT_TAGVAR(compiler_needs_object, $1)=yes
+         tmp_sharedflag='-G' ;;
+       *Sun\ F*)                       # Sun Fortran 8.3
+         tmp_sharedflag='-G' ;;
+       esac
+       _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+           cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+           echo "local: *; };" >> $output_objdir/$libname.ver~
+           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+       case $cc_basename in
+       xlf* | bgf* | bgxlf* | mpixlf*)
+         # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+         _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+         if test "x$supports_anon_versioning" = xyes; then
+           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+             echo "local: *; };" >> $output_objdir/$libname.ver~
+             $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+         fi
+         ;;
+       esac
+      else
+        _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+       _LT_TAGVAR(ld_shlibs, $1)=no
+       cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+       _LT_TAGVAR(ld_shlibs, $1)=no
+       cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+       ;;
+       *)
+         # For security reasons, it is highly recommended that you always
+         # use absolute paths for naming shared libraries, and exclude the
+         # DT_RUNPATH tag from executables and libraries.  But doing so
+         # requires that you compile everything twice, which is a pain.
+         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+         else
+           _LT_TAGVAR(ld_shlibs, $1)=no
+         fi
+       ;;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       _LT_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix[[4-9]]*)
+      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
+       # If we're using GNU nm, then we don't want the "-C" option.
+       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       # Also, AIX nm treats weak defined symbols like other global
+       # defined symbols, whereas GNU nm marks them as "W".
+       if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+       else
+         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+       fi
+       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]].*|aix[[5-9]]*)
+         for ld_flag in $LDFLAGS; do
+         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+           aix_use_runtimelinking=yes
+           break
+         fi
+         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_TAGVAR(archive_cmds, $1)=''
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+      if test "$GCC" = 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
+         :
+         else
+         # We have old collect2
+         _LT_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_TAGVAR(hardcode_minus_L, $1)=yes
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+         _LT_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
+
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_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_TAGVAR(allow_undefined_flag, $1)='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        _LT_SYS_MODULE_PATH_AIX([$1])
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+        _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+       if test "$host_cpu" = ia64; then
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+         _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+         _LT_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_SYS_MODULE_PATH_AIX([$1])
+        _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+         if test "$with_gnu_ld" = yes; then
+           # We only use this code for GNU lds that support --whole-archive.
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+         else
+           # Exported symbols can be pulled into shared objects from archives
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+         fi
+         _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+         # This is similar to how AIX traditionally builds its shared libraries.
+         _LT_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
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[[45]]*)
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      case $cc_basename in
+      cl*)
+       # Native MSVC
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+       _LT_TAGVAR(always_export_symbols, $1)=yes
+       _LT_TAGVAR(file_list_spec, $1)='@'
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=".dll"
+       # FIXME: Setting linknames here is a bad hack.
+       _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+       _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+           sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+         else
+           sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+         fi~
+         $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+         linknames='
+       # The linker will not automatically build a static lib if we build a DLL.
+       # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+       # Don't use ranlib
+       _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+       _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+         lt_tool_outputfile="@TOOL_OUTPUT@"~
+         case $lt_outputfile in
+           *.exe|*.EXE) ;;
+           *)
+             lt_outputfile="$lt_outputfile.exe"
+             lt_tool_outputfile="$lt_tool_outputfile.exe"
+             ;;
+         esac~
+         if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+           $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+           $RM "$lt_outputfile.manifest";
+         fi'
+       ;;
+      *)
+       # Assume MSVC wrapper
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=".dll"
+       # FIXME: Setting linknames here is a bad hack.
+       _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+       # The linker will automatically build a .lib file if we build a DLL.
+       _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+       # FIXME: Should let the user specify the lib program.
+       _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+       ;;
+      esac
+      ;;
+
+    darwin* | rhapsody*)
+      _LT_DARWIN_LINKER_FEATURES($1)
+      ;;
+
+    dgux*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+       _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+       _LT_TAGVAR(hardcode_direct, $1)=yes
+       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+       # hardcode_minus_L: Not really in the search PATH,
+       # but as the default location of the library.
+       _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      else
+       case $host_cpu in
+       hppa*64*)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+       m4_if($1, [], [
+         # Older versions of the 11.00 compiler do not understand -b yet
+         # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+         _LT_LINKER_OPTION([if $CC understands -b],
+           _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+           [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+         [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+         ;;
+       esac
+      fi
+      if test "$with_gnu_ld" = no; then
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+       case $host_cpu in
+       hppa*64*|ia64*)
+         _LT_TAGVAR(hardcode_direct, $1)=no
+         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+         ;;
+       *)
+         _LT_TAGVAR(hardcode_direct, $1)=yes
+         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         _LT_TAGVAR(hardcode_minus_L, $1)=yes
+         ;;
+       esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       # Try to use the -exported_symbol ld option, if it does not
+       # work, assume that -exports_file does not work either and
+       # implicitly export all symbols.
+       # This should be the same for all languages, so no per-tag cache variable.
+       AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+         [lt_cv_irix_exported_symbol],
+         [save_LDFLAGS="$LDFLAGS"
+          LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+          AC_LINK_IFELSE(
+            [AC_LANG_SOURCE(
+               [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+                             [C++], [[int foo (void) { return 0; }]],
+                             [Fortran 77], [[
+      subroutine foo
+      end]],
+                             [Fortran], [[
+      subroutine foo
+      end]])])],
+             [lt_cv_irix_exported_symbol=yes],
+             [lt_cv_irix_exported_symbol=no])
+           LDFLAGS="$save_LDFLAGS"])
+       if test "$lt_cv_irix_exported_symbol" = yes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+       fi
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(inherit_rpath, $1)=yes
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+       _LT_TAGVAR(hardcode_direct, $1)=yes
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+       else
+         case $host_os in
+          openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+            _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+            ;;
+          *)
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+            ;;
+         esac
+       fi
+      else
+       _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    os2*)
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+       _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)     # as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+       _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+       _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+       # Both c and cxx compiler support -rpath directly
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+      if test "$GCC" = yes; then
+       wlarc='${wl}'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+       case `$CC -V 2>&1` in
+       *"Compilers 5.0"*)
+         wlarc=''
+         _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+         ;;
+       *)
+         wlarc='${wl}'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_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} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+         ;;
+       esac
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *)
+       # The compiler driver will combine and reorder linker options,
+       # but understands `-z linker_flag'.  GCC discards it without `$wl',
+       # but is careful enough not to reorder.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+       if test "$GCC" = yes; then
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+       else
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+       fi
+       ;;
+      esac
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+       # Use $CC to link under sequent, because it throws in some extra .o
+       # files that make .init and .fini sections work.
+       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+       sni)
+         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
+         _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+         _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+         _LT_TAGVAR(hardcode_direct, $1)=no
+        ;;
+       motorola)
+         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+       ;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       _LT_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+       ;;
+      esac
+    fi
+  fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+    [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+       [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+       [$RM conftest*
+       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+         soname=conftest
+         lib=conftest
+         libobjs=conftest.$ac_objext
+         deplibs=
+         wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+         pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+         compiler_flags=-v
+         linker_flags=-v
+         verstring=
+         output_objdir=.
+         libname=conftest
+         lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+         _LT_TAGVAR(allow_undefined_flag, $1)=
+         if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+         then
+           lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+         else
+           lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+         fi
+         _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+       else
+         cat conftest.err 1>&5
+       fi
+       $RM conftest*
+       ])
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+    [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+    [enable_shared_with_static_runtimes], [0],
+    [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+    [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+    [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+    [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+    [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+    [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+    [Commands used to build a loadable module if different from building
+    a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+    [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+    [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+    [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+    [Flag to hardcode $libdir into a binary during linking.
+    This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+    [[If ld is used when linking, flag to hardcode $libdir into a binary
+    during linking.  This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+    [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary and the resulting library dependency is
+    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+    library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+    [Set to "yes" if building a shared library automatically hardcodes DIR
+    into the library and all subsequent libraries and executables linked
+    against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+    [Set to yes if linker adds runtime paths of dependent libraries
+    to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+    [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [always_export_symbols], [0],
+    [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+    [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+    [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+    [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+    [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+    [Commands necessary for finishing linking programs])
+_LT_TAGDECL([], [file_list_spec], [1],
+    [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl    [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+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_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_SYS_DYNAMIC_LINKER($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+  LT_SYS_DLOPEN_SELF
+  _LT_CMD_STRIPLIB
+
+  # 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
+    ;;
+
+  aix[[4-9]]*)
+    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])
+
+  _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+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
+else
+  _lt_caught_CXX_error=yes
+fi
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_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_CFLAGS=$CFLAGS
+  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++"}
+  CFLAGS=$CXXFLAGS
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    # We don't want -fno-exception when compiling C++ code, so set the
+    # no_builtin_flag separately
+    if test "$GXX" = yes; then
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+    else
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+      LT_PATH_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_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_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_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          _LT_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_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 -v "^Configured with:" | $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_TAGVAR(ld_shlibs, $1)=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+      aix[[4-9]]*)
+        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]].*|aix[[5-9]]*)
+           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_TAGVAR(archive_cmds, $1)=''
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
+        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+        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
+           :
+         else
+           # We have old collect2
+           _LT_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_TAGVAR(hardcode_minus_L, $1)=yes
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+           _LT_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
+
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+       # export.
+        _LT_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_TAGVAR(allow_undefined_flag, $1)='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          _LT_SYS_MODULE_PATH_AIX([$1])
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+           _LT_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_SYS_MODULE_PATH_AIX([$1])
+           _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+           if test "$with_gnu_ld" = yes; then
+             # We only use this code for GNU lds that support --whole-archive.
+             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+           else
+             # Exported symbols can be pulled into shared objects from archives
+             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+           fi
+           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+           # This is similar to how AIX traditionally builds its shared
+           # libraries.
+           _LT_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_TAGVAR(allow_undefined_flag, $1)=unsupported
+         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+         # support --undefined.  This deserves some investigation.  FIXME
+         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       else
+         _LT_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+         # FIXME: insert proper C++ library support
+         _LT_TAGVAR(ld_shlibs, $1)=no
+         ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+       case $GXX,$cc_basename in
+       ,cl* | no,cl*)
+         # Native MSVC
+         # hardcode_libdir_flag_spec is actually meaningless, as there is
+         # no search path for DLLs.
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+         _LT_TAGVAR(always_export_symbols, $1)=yes
+         _LT_TAGVAR(file_list_spec, $1)='@'
+         # Tell ltmain to make .lib files, not .a files.
+         libext=lib
+         # Tell ltmain to make .dll files, not .so files.
+         shrext_cmds=".dll"
+         # FIXME: Setting linknames here is a bad hack.
+         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+             $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+           else
+             $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+           fi~
+           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+           linknames='
+         # The linker will not automatically build a static lib if we build a DLL.
+         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+         # Don't use ranlib
+         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+           lt_tool_outputfile="@TOOL_OUTPUT@"~
+           case $lt_outputfile in
+             *.exe|*.EXE) ;;
+             *)
+               lt_outputfile="$lt_outputfile.exe"
+               lt_tool_outputfile="$lt_tool_outputfile.exe"
+               ;;
+           esac~
+           func_to_tool_file "$lt_outputfile"~
+           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+             $RM "$lt_outputfile.manifest";
+           fi'
+         ;;
+       *)
+         # g++
+         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+         # as there is no search path for DLLs.
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+         _LT_TAGVAR(always_export_symbols, $1)=no
+         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+         if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+           _LT_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_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_TAGVAR(ld_shlibs, $1)=no
+         fi
+         ;;
+       esac
+       ;;
+      darwin* | rhapsody*)
+        _LT_DARWIN_LINKER_FEATURES($1)
+       ;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          ghcx*)
+           # Green Hills C++ Compiler
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          *)
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+        esac
+        ;;
+
+      freebsd[[12]]*)
+        # C++ shared libraries reported to be fairly broken before
+       # switch to ELF
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      freebsd-elf*)
+        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+        ;;
+
+      gnu*)
+        ;;
+
+      haiku*)
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
+        ;;
+
+      hpux9*)
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_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_TAGVAR(ld_shlibs, $1)=no
+            ;;
+          aCC*)
+            _LT_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) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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_TAGVAR(ld_shlibs, $1)=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            _LT_TAGVAR(hardcode_direct, $1)=no
+            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+            ;;
+          *)
+            _LT_TAGVAR(hardcode_direct, $1)=yes
+            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+            _LT_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_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          aCC*)
+           case $host_cpu in
+             hppa*64*)
+               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               ;;
+             ia64*)
+               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               ;;
+             *)
+               _LT_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; func_echo_all "$list"'
+           ;;
+          *)
+           if test "$GXX" = yes; then
+             if test $with_gnu_ld = no; then
+               case $host_cpu in
+                 hppa*64*)
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   ;;
+                 ia64*)
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   ;;
+                 *)
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${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_TAGVAR(ld_shlibs, $1)=no
+           fi
+           ;;
+        esac
+        ;;
+
+      interix[[3-9]]*)
+       _LT_TAGVAR(hardcode_direct, $1)=no
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+       _LT_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_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_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_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-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_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_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+             else
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+             fi
+           fi
+           _LT_TAGVAR(link_all_deplibs, $1)=yes
+           ;;
+        esac
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(inherit_rpath, $1)=yes
+        ;;
+
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+        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_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_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; func_echo_all "$list"'
+
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+           _LT_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_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+           ;;
+         icpc* | ecpc* )
+           # 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_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+               _LT_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_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+               _LT_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_TAGVAR(archive_cmds_need_lc, $1)=no
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+           ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+           case `$CC -V` in
+           *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
+             _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+             _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+               $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+               $RANLIB $oldlib'
+             _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+             _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+             ;;
+           *) # Version 6 and above use weak symbols
+             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+             _LT_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'
+             ;;
+           esac
+
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+         cxx*)
+           # Compaq C++
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+           _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+           _LT_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=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
+           ;;
+         xl* | mpixl* | bgxl*)
+           # IBM XL 8.0 on PPC, with GNU ld
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+           if test "x$supports_anon_versioning" = xyes; then
+             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+               echo "local: *; };" >> $output_objdir/$libname.ver~
+               $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+           fi
+           ;;
+         *)
+           case `$CC -V 2>&1 | sed 5q` in
+           *Sun\ C*)
+             # Sun C++ 5.9
+             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+             _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+             # Not sure whether something based on
+             # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+             # would be better.
+             output_verbose_link_cmd='func_echo_all'
+
+             # 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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+             ;;
+           esac
+           ;;
+       esac
+       ;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+       _LT_TAGVAR(ld_shlibs, $1)=no
+       ;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+       ;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+         *)
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+       esac
+       ;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+         wlarc=
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+         _LT_TAGVAR(hardcode_direct, $1)=yes
+         _LT_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::"'
+       ;;
+
+      *nto* | *qnx*)
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+       ;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+       _LT_TAGVAR(ld_shlibs, $1)=no
+       ;;
+
+      openbsd*)
+       if test -f /usr/libexec/ld.so; then
+         _LT_TAGVAR(hardcode_direct, $1)=yes
+         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+         _LT_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_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_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+         fi
+         output_verbose_link_cmd=func_echo_all
+       else
+         _LT_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+
+      osf3* | 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_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+           # Archives containing C++ object files must be created using
+           # the KAI C++ compiler.
+           case $host in
+             osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+             *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+           esac
+           ;;
+          RCC*)
+           # Rational C++ 2.4.1
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          cxx*)
+           case $host in
+             osf3*)
+               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+               ;;
+             *)
+               _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+               _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+               ;;
+           esac
+
+           _LT_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=`func_echo_all "$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; func_echo_all "$list"'
+           ;;
+         *)
+           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+             case $host in
+               osf3*)
+                 _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+                 ;;
+               *)
+                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+                 ;;
+             esac
+
+             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+             _LT_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 -v "^Configured with:" | $GREP "\-L"'
+
+           else
+             # FIXME: insert proper C++ library support
+             _LT_TAGVAR(ld_shlibs, $1)=no
+           fi
+           ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+           # Sun C++ 4.x
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          lcc*)
+           # Lucid
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          *)
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          CC* | sunCC*)
+           # Sun C++ 4.2, 5.x and Centerline C++
+            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+           _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+           _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+           case $host_os in
+             solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+             *)
+               # The compiler driver will combine and reorder linker options,
+               # but understands `-z linker_flag'.
+               # Supported since Solaris 2.6 (maybe 2.5.1?)
+               _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+               ;;
+           esac
+           _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+           output_verbose_link_cmd='func_echo_all'
+
+           # 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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+           ;;
+          gcx*)
+           # Green Hills C++ Compiler
+           _LT_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_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+             if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+                 $CC -shared $pic_flag -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 -v "^Configured with:" | $GREP "\-L"'
+             else
+               # g++ 2.7 appears to require `-G' NOT `-shared' on this
+               # platform.
+               _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+               _LT_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_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+             fi
+
+             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+             case $host_os in
+               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+               *)
+                 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+                 ;;
+             esac
+           fi
+           ;;
+        esac
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+      esac
+      ;;
+
+      sysv5* | sco3.2v5* | sco5v6*)
+       # Note: We can NOT use -z defs as we might desire, because we do not
+       # link with -lc, and that would cause any symbols used from libc to
+       # always be unresolved, which means just about no library would
+       # ever link correctly.  If we're not using GNU ld we use -z text
+       # though, which does catch some bad symbols but isn't as heavy-handed
+       # as -z defs.
+       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+       _LT_TAGVAR(link_all_deplibs, $1)=yes
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+       runpath_var='LD_RUN_PATH'
+
+       case $cc_basename in
+          CC*)
+           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+             '"$_LT_TAGVAR(old_archive_cmds, $1)"
+           _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+             '"$_LT_TAGVAR(reload_cmds, $1)"
+           ;;
+         *)
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           ;;
+       esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+           # NonStop-UX NCC 3.20
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          *)
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+    esac
+
+    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+    _LT_TAGVAR(GCC, $1)="$GXX"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+  case ${2} in
+  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+_LT_EOF
+])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+esac
+
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case ${prev}${p} in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+        prev=$p
+        continue
+       fi
+
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
+       if test "$pre_test_object_deps_done" = no; then
+        case ${prev} in
+        -L | -R)
+          # Internal compiler library paths should come after those
+          # provided the user.  The postdeps already come after the
+          # user supplied libs so there is no need to process them.
+          if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+            _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+          else
+            _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+          fi
+          ;;
+        # The "-l" case would never come before the object being
+        # linked, so don't bother handling this case.
+        esac
+       else
+        if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+          _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+        else
+          _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+        fi
+       fi
+       prev=
+       ;;
+
+    *.lto.$objext) ;; # Ignore GCC LTO objects
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+        pre_test_object_deps_done=yes
+        continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+        if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+          _LT_TAGVAR(predep_objects, $1)="$p"
+        else
+          _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+        fi
+       else
+        if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+          _LT_TAGVAR(postdep_objects, $1)="$p"
+        else
+          _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+        fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  _LT_TAGVAR(predep_objects,$1)=
+  _LT_TAGVAR(postdep_objects,$1)=
+  _LT_TAGVAR(postdeps,$1)=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC* | sunCC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+    [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+    [Dependencies to place before and after the objects being linked to
+    create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+    [The library search path used internally by the compiler when linking
+    a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_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_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
+  CC=${F77-"f77"}
+  CFLAGS=$FFLAGS
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+  GCC=$G77
+  if test -n "$compiler"; then
+    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
+        ;;
+      aix[[4-9]]*)
+       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])
+
+    _LT_TAGVAR(GCC, $1)="$G77"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+  CFLAGS="$lt_save_CFLAGS"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_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_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
+  CC=${FC-"f95"}
+  CFLAGS=$FCFLAGS
+  compiler=$CC
+  GCC=$ac_cv_fc_compiler_gnu
+
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    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
+        ;;
+      aix[[4-9]]*)
+       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])
+
+    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_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_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_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_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+  :
+  _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+    [AC_CHECK_TOOL(GCJ, gcj,)
+      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+      AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([    ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
+
+
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+    # positional parameters, so assign one to ordinary parameter first.
+    func_stripname_result=${3}
+    func_stripname_result=${func_stripname_result#"${1}"}
+    func_stripname_result=${func_stripname_result%"${2}"}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+    func_split_long_opt_name=${1%%=*}
+    func_split_long_opt_arg=${1#*=}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+    func_split_short_opt_arg=${1#??}
+    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+    case ${1} in
+      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+      *)    func_lo2o_result=${1} ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
+
+  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
+
+  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+    func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
+
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine which file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
+    ;;
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+         [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
+])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+         [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
new file mode 100644 (file)
index 0000000..17cfd51
--- /dev/null
@@ -0,0 +1,369 @@
+# Helper functions for option handling.                    -*- Autoconf -*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
+#   Inc.
+#   Written by Gary V. Vaughan, 2004
+#
+# 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.
+
+# serial 7 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+        _LT_MANGLE_DEFUN([$1], [$2]),
+    [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+           [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+                     [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME.  If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+    [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+  dnl
+  dnl Simply set some default values (i.e off) if boolean options were not
+  dnl specified:
+  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+  ])
+  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+  ])
+  dnl
+  dnl If no reference was made to various pairs of opposing options, then
+  dnl we run the default mode handler for the pair.  For example, if neither
+  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl archives by default:
+  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+                  [_LT_ENABLE_FAST_INSTALL])
+  ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS],      [1], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+       [build shared libraries @<:@default=]_LT_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=]_LT_ENABLE_SHARED_DEFAULT)
+
+    _LT_DECL([build_libtool_libs], [enable_shared], [0],
+       [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+       [build static libraries @<:@default=]_LT_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=]_LT_ENABLE_STATIC_DEFAULT)
+
+    _LT_DECL([build_old_libs], [enable_static], [0],
+       [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]_LT_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=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+        [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+    [AS_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=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+                [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+                [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+                [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+                [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+                [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
new file mode 100644 (file)
index 0000000..9000a05
--- /dev/null
@@ -0,0 +1,123 @@
+# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# 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.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+       [$#], [2], [[$2]],
+       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+          m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+            [m4_foreach([_Lt_suffix],
+               ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+       [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+         [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+                [lt_append([$1], [$2], [$3])$4],
+                [$5])],
+         [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+       m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+       [$5],
+    [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+  [lt_join(m4_quote(m4_default([$4], [[, ]])),
+           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+                     [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
new file mode 100644 (file)
index 0000000..9c7b5d4
--- /dev/null
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers                      -*- Autoconf -*-
+#
+#   Copyright (C) 2004 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004
+#
+# 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.
+
+# @configure_input@
+
+# serial 3293 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4])
+m4_define([LT_PACKAGE_REVISION], [1.3293])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4'
+macro_revision='1.3293'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
new file mode 100644 (file)
index 0000000..c573da9
--- /dev/null
@@ -0,0 +1,98 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004.
+#
+# 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.
+
+# serial 5 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else.  This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION],  [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP],             [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],        [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT],         [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],    [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN],           [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR],             [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL],    [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN],           [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER],       [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK],               [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],        [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],    [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],    [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR],         [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR],            [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],  [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC],             [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU],            [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG],    [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD],   [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP],          [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED],            [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME],           [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE],  [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE],    [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL],          [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP],          [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN],                [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],     [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG],          [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL],   [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX],           [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77],           [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ],           [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG],      [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG],    [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG],    [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],    [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG],     [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG],         [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C],       [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],        [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP],                [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],        [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH],   [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77],              [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC],               [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX],              [AC_DEFUN([_LT_PROG_CXX])])
diff --git a/m4/python.m4 b/m4/python.m4
new file mode 100644 (file)
index 0000000..523e45a
--- /dev/null
@@ -0,0 +1,229 @@
+## this one is commonly used with AM_PATH_PYTHONDIR ...
+dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
+dnl Check if a module containing a given symbol is visible to python.
+AC_DEFUN([AM_CHECK_PYMOD],
+[AC_REQUIRE([AM_PATH_PYTHON])
+py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
+AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
+AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
+ifelse([$2],[], [prog="
+import sys
+try:
+        import $1
+except ImportError:
+        sys.exit(1)
+except:
+        sys.exit(0)
+sys.exit(0)"], [prog="
+import $1
+$1.$2"])
+if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
+  then
+    eval "py_cv_mod_$py_mod_var=yes"
+  else
+    eval "py_cv_mod_$py_mod_var=no"
+  fi
+])
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
+if test "x$py_val" != xno; then
+  AC_MSG_RESULT(yes)
+  ifelse([$3], [],, [$3
+])dnl
+else
+  AC_MSG_RESULT(no)
+  ifelse([$4], [],, [$4
+])dnl
+fi
+])
+
+dnl a macro to check for ability to create python extensions
+dnl  AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl function also defines PYTHON_INCLUDES
+AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+[AC_REQUIRE([AM_PATH_PYTHON])
+AC_MSG_CHECKING(for headers required to compile python extensions)
+dnl deduce PYTHON_INCLUDES
+py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
+py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
+PYTHON_CONFIG=`which $PYTHON`-config
+if test -x "$PYTHON_CONFIG"; then
+PYTHON_INCLUDES=`$PYTHON_CONFIG --includes 2>/dev/null`
+else
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+  PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+fi
+fi
+AC_SUBST(PYTHON_INCLUDES)
+dnl check if the headers exist:
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+AC_TRY_CPP([#include <Python.h>],dnl
+[AC_MSG_RESULT(found)
+$1],dnl
+[AC_MSG_RESULT(not found)
+$2])
+CPPFLAGS="$save_CPPFLAGS"
+])
+
+# JD_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent.
+# This is similar to AM_PYTHON_CHECK_VERSION, but without python 1.5.x support
+# and with python 3.0 support.
+AC_DEFUN([JD_PYTHON_CHECK_VERSION],
+ [prog="import sys
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex)"
+  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# 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.
+
+# JD_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------------------------
+# Adds support for distributing Python modules and packages.  To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable.  To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+#
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+#
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+#
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement.  MINIMUM-VERSION should consist of
+# numbers and dots only.
+AC_DEFUN([JD_PATH_PYTHON],
+ [
+  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
+  dnl supported
+  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
+                    [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
+python2.1 python2.0])
+
+  m4_if([$1],[],[
+    dnl No version check is needed.
+    # Find any Python interpreter.
+    if test -z "$PYTHON"; then
+      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
+    fi
+    am_display_PYTHON=python
+  ], [
+    dnl A version check is needed.
+    if test -n "$PYTHON"; then
+      # If the user set $PYTHON, use it and don't search something else.
+      AC_MSG_CHECKING([whether $PYTHON version >= $1])
+      JD_PYTHON_CHECK_VERSION([$PYTHON], [$1],
+                             [AC_MSG_RESULT(yes)],
+                             [AC_MSG_ERROR(too old)])
+      am_display_PYTHON=$PYTHON
+    else
+      # Otherwise, try each interpreter until we find one that satisfies
+      # VERSION.
+      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
+       [am_cv_pathless_PYTHON],[
+       for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
+         test "$am_cv_pathless_PYTHON" = none && break
+         JD_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+       done])
+      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+      if test "$am_cv_pathless_PYTHON" = none; then
+       PYTHON=:
+      else
+        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+      fi
+      am_display_PYTHON=$am_cv_pathless_PYTHON
+    fi
+  ])
+
+  if test "$PYTHON" = :; then
+  dnl Run any user-specified action, or abort.
+    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
+  else
+
+  dnl Query Python for its version number.  Getting [:3] seems to be
+  dnl the best way to do this; it's what "site.py" does in the standard
+  dnl library.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
+    [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
+  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+
+  dnl Use the values of $prefix and $exec_prefix for the corresponding
+  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
+  dnl distinct variables so they can be overridden if need be.  However,
+  dnl general consensus is that you shouldn't need this ability.
+
+  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
+  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
+
+  dnl At times (like when building shared libraries) you may want
+  dnl to know which OS platform Python thinks this is.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
+    [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
+  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
+
+
+  dnl Set up 4 directories:
+
+  dnl pythondir -- where to install python scripts.  This is the
+  dnl   site-packages directory, not the python standard library
+  dnl   directory like in previous automake betas.  This behavior
+  dnl   is more consistent with lispdir.m4 for example.
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
+    [am_cv_python_pythondir],
+    [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX'))" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
+  AC_SUBST([pythondir], [$am_cv_python_pythondir])
+
+  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
+  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
+  dnl   more consistent with the rest of automake.
+
+  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+
+  dnl pyexecdir -- directory for installing python extension modules
+  dnl   (shared libraries)
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
+    [am_cv_python_pyexecdir],
+    [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX'))" 2>/dev/null ||
+     echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
+  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
+  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
+
+  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+
+  dnl Run any user-specified action.
+  $2
+  fi
+
+])
diff --git a/missing b/missing
new file mode 100755 (executable)
index 0000000..28055d2
--- /dev/null
+++ b/missing
@@ -0,0 +1,376 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 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, see <http://www.gnu.org/licenses/>.
+
+# 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=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# 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
+  ;;
+
+  -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'
+  autom4te     touch the output file, or create a stub one
+  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]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+  lex*|yacc*)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar*)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+  aclocal*)
+    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*)
+    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*)
+    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*)
+    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*)
+    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 "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    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 test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.y)
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.c
+           fi
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.h
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f y.tab.h; then
+       echo >y.tab.h
+    fi
+    if test ! -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 test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.l)
+           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" lex.yy.c
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f lex.yy.c; then
+       echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man*)
+    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 "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo ".ab help2man is required to generate this page"
+       exit $?
+    fi
+    ;;
+
+  makeinfo*)
+    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."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+       /^@setfilename/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar*)
+    shift
+
+    # 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-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/py-compile b/py-compile
new file mode 100755 (executable)
index 0000000..3f9d05b
--- /dev/null
@@ -0,0 +1,146 @@
+#!/bin/sh
+# py-compile - Compile a Python program
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software
+# Foundation, Inc.
+
+# 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, see <http://www.gnu.org/licenses/>.
+
+# 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.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+if [ -z "$PYTHON" ]; then
+  PYTHON=python
+fi
+
+basedir=
+destdir=
+files=
+while test $# -ne 0; do
+  case "$1" in
+    --basedir)
+      basedir=$2
+      if test -z "$basedir"; then
+        echo "$0: Missing argument to --basedir." 1>&2
+        exit 1
+      fi
+      shift
+      ;;
+    --destdir)
+      destdir=$2
+      if test -z "$destdir"; then
+        echo "$0: Missing argument to --destdir." 1>&2
+        exit 1
+      fi
+      shift
+      ;;
+    -h|--h*)
+      cat <<\EOF
+Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
+
+Byte compile some python scripts FILES.  Use --destdir to specify any
+leading directory path to the FILES that you don't want to include in the
+byte compiled file.  Specify --basedir for any additional path information you
+do want to be shown in the byte compiled file.
+
+Example:
+  py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+      exit $?
+      ;;
+    -v|--v*)
+      echo "py-compile $scriptversion"
+      exit $?
+      ;;
+    *)
+      files="$files $1"
+      ;;
+  esac
+  shift
+done
+
+if test -z "$files"; then
+    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
+    exit 1
+fi
+
+# if basedir was given, then it should be prepended to filenames before
+# byte compilation.
+if [ -z "$basedir" ]; then
+    pathtrans="path = file"
+else
+    pathtrans="path = os.path.join('$basedir', file)"
+fi
+
+# if destdir was given, then it needs to be prepended to the filename to
+# byte compile but not go into the compiled file.
+if [ -z "$destdir" ]; then
+    filetrans="filepath = path"
+else
+    filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
+fi
+
+$PYTHON -c "
+import sys, os, py_compile
+
+files = '''$files'''
+
+sys.stdout.write('Byte-compiling python modules...\n')
+for file in files.split():
+    $pathtrans
+    $filetrans
+    if not os.path.exists(filepath) or not (len(filepath) >= 3
+                                            and filepath[-3:] == '.py'):
+           continue
+    sys.stdout.write(file)
+    sys.stdout.flush()
+    py_compile.compile(filepath, filepath + 'c', path)
+sys.stdout.write('\n')" || exit $?
+
+# this will fail for python < 1.5, but that doesn't matter ...
+$PYTHON -O -c "
+import sys, os, py_compile
+
+files = '''$files'''
+sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
+for file in files.split():
+    $pathtrans
+    $filetrans
+    if not os.path.exists(filepath) or not (len(filepath) >= 3
+                                            and filepath[-3:] == '.py'):
+           continue
+    sys.stdout.write(file)
+    sys.stdout.flush()
+    py_compile.compile(filepath, filepath + 'o', path)
+sys.stdout.write('\n')" 2>/dev/null || :
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/pygobject-2.0-uninstalled.pc.in b/pygobject-2.0-uninstalled.pc.in
new file mode 100644 (file)
index 0000000..3fb6288
--- /dev/null
@@ -0,0 +1,19 @@
+Name: PyGObject
+Description: Python bindings for GObject
+Requires: gobject-2.0
+Requires.private: @LIBFFI_PC@
+Version: @VERSION@
+Cflags: -I${pc_top_builddir}/${pcfiledir}/gobject
+
+# 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=${pc_top_builddir}/${pcfiledir}/gobject
+xslfiles=${pc_top_builddir}/${pcfiledir}/docs/xsl
+
+# same here.  Useful when calling the code generator in addon packages.
+defsdir=${pc_top_builddir}/${pcfiledir}/gio
+fixxref=${pc_top_builddir}/${pcfiledir}/docs/xsl/fixxref.py
+codegendir=${pc_top_builddir}/${pcfiledir}/codegen
+pygdocs=${pc_top_builddir}/${pcfiledir}/docs
+datadir=${pc_top_builddir}/pygobject-@VERSION@
diff --git a/pygobject-2.0.pc.in b/pygobject-2.0.pc.in
new file mode 100644 (file)
index 0000000..a47b685
--- /dev/null
@@ -0,0 +1,23 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+datarootdir=@datarootdir@
+datadir=@datadir@
+libdir=@libdir@
+
+# 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
+fixxref=${datadir}/pygobject/xsl/fixxref.py
+pygdocs=${datadir}/gtk-doc/html/pygobject
+defsdir=${datadir}/pygobject/2.0/defs
+codegendir=${datadir}/pygobject/2.0/codegen
+overridesdir=@pyexecdir@/gi/overrides
+
+Name: PyGObject
+Description: Python bindings for GObject
+Requires: gobject-2.0
+Requires.private: @LIBFFI_PC@
+Version: @VERSION@
+Cflags: -I${pygtkincludedir}
diff --git a/pygobject_postinstall.py b/pygobject_postinstall.py
new file mode 100644 (file)
index 0000000..bd546bf
--- /dev/null
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+
+
+import sys
+
+
+if len(sys.argv) == 2:
+    if sys.argv[1] == '-install':
+        print ('pygobject is now installed on your machine.\n')
diff --git a/pygtk.py b/pygtk.py
new file mode 100644 (file)
index 0000000..e061b88
--- /dev/null
+++ b/pygtk.py
@@ -0,0 +1,95 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# pygtk - Python bindings for the GTK+ widget set.
+# Copyright (C) 1998-2002  James Henstridge
+#
+#   pygtk.py: pygtk version selection code.
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+import fnmatch
+import glob
+import os
+import os.path
+import sys
+
+__all__ = ['require']
+
+_our_dir = os.path.dirname(os.path.abspath(os.path.normpath(__file__)))
+_pygtk_2_0_dir = os.path.normpath('%s/gtk-2.0' % _our_dir)
+
+_pygtk_dir_pat = 'gtk-[0-9].[0-9]'
+
+_pygtk_required_version = None
+
+def _get_available_versions():
+    versions = {}
+    for dir in sys.path:
+        if not dir: 
+            dir = os.getcwd()
+            
+        if not os.path.isdir(dir):
+            continue
+        
+        # if the dir is a pygtk dir, skip it
+        if fnmatch.fnmatchcase(os.path.basename(dir), _pygtk_dir_pat):
+            continue  
+        
+        for filename in glob.glob(os.path.join(dir, _pygtk_dir_pat)):
+            pathname = os.path.join(dir, filename)
+
+            # skip non directories
+            if not os.path.isdir(pathname):
+                continue
+            
+            # skip empty directories
+            if not os.listdir(pathname):
+                continue
+            
+            if not versions.has_key(filename[-3:]):
+                versions[filename[-3:]] = pathname
+    return versions
+
+def require20():
+    if _pygtk_2_0_dir not in sys.path:
+        sys.path.insert(0, _pygtk_2_0_dir)
+
+def require(version):
+    if version == '2.0':
+        return require20()
+    
+    global _pygtk_required_version
+
+    if _pygtk_required_version != None:
+        assert _pygtk_required_version == version, \
+               "a different version of gtk was already required"
+        return
+
+    assert not sys.modules.has_key('gtk'), \
+           "pygtk.require() must be called before importing gtk"
+
+    versions = _get_available_versions()
+    assert versions.has_key(version), \
+           "required version '%s' not found on system" % version
+
+    # remove any pygtk dirs first ...
+    for dir in sys.path:
+        if fnmatch.fnmatchcase(os.path.basename(dir), _pygtk_dir_pat):
+            sys.path.remove(dir)
+
+    # prepend the pygtk path ...
+    sys.path.insert(0, versions[version])
+    
+    _pygtk_required_version = version
diff --git a/setup.py b/setup.py
new file mode 100755 (executable)
index 0000000..74b9141
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,351 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# setup.py - distutils configuration for pygobject
+
+
+'''Python Bindings for GObject.
+
+PyGObject is a set of bindings for the glib, gobject and gio libraries.
+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.pygtk.org/'''
+
+
+import os
+import sys
+import glob
+
+from distutils.command.build import build
+from distutils.command.build_clib import build_clib
+from distutils.command.build_scripts import build_scripts
+from distutils.sysconfig import get_python_inc
+from distutils.extension import Extension
+from distutils.core import setup
+
+from dsextras import GLOBAL_MACROS, GLOBAL_INC, get_m4_define, getoutput, \
+                     have_pkgconfig, pkgc_get_libraries, \
+                     pkgc_get_library_dirs, pkgc_get_include_dirs, \
+                     PkgConfigExtension, TemplateExtension, \
+                     BuildExt, InstallLib, InstallData
+
+
+if sys.platform != 'win32':
+    msg =  '*' * 68 + '\n'
+    msg += '* Building PyGObject using distutils is only supported on windows. *\n'
+    msg += '* To build PyGObject in a supported way, read the INSTALL file.    *\n'
+    msg += '*' * 68
+    raise SystemExit(msg)
+
+MIN_PYTHON_VERSION = (2, 6, 0)
+
+if sys.version_info[:3] < MIN_PYTHON_VERSION:
+    raise SystemExit('ERROR: Python %s or higher is required, %s found.' % (
+                         '.'.join(map(str, MIN_PYTHON_VERSION)),
+                         '.'.join(map(str, sys.version_info[:3]))))
+
+if not have_pkgconfig():
+    raise SystemExit('ERROR: Could not find pkg-config: '
+                     'Please check your PATH environment variable.')
+
+
+PYGTK_SUFFIX = '2.0'
+PYGTK_SUFFIX_LONG = 'gtk-' + PYGTK_SUFFIX
+
+GLIB_REQUIRED = get_m4_define('glib_required_version')
+
+MAJOR_VERSION = int(get_m4_define('pygobject_major_version'))
+MINOR_VERSION = int(get_m4_define('pygobject_minor_version'))
+MICRO_VERSION = int(get_m4_define('pygobject_micro_version'))
+VERSION       = '%d.%d.%d' % (MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION)
+
+GLOBAL_INC += ['gobject']
+GLOBAL_MACROS += [('PYGOBJECT_MAJOR_VERSION', MAJOR_VERSION),
+                  ('PYGOBJECT_MINOR_VERSION', MINOR_VERSION),
+                  ('PYGOBJECT_MICRO_VERSION', MICRO_VERSION),
+                  ('VERSION', '\\"%s\\"' % VERSION)]
+
+BIN_DIR     = os.path.join('Scripts')
+INCLUDE_DIR = os.path.join('include', 'pygtk-%s' % PYGTK_SUFFIX)
+DEFS_DIR    = os.path.join('share', 'pygobject', PYGTK_SUFFIX, 'defs')
+XSL_DIR     = os.path.join('share', 'pygobject','xsl')
+HTML_DIR    = os.path.join('share', 'gtk-doc', 'html', 'pygobject')
+
+
+class PyGObjectInstallLib(InstallLib):
+    def run(self):
+        # Install pygtk.pth, pygtk.py[c] and templates
+        self.install_pth()
+        self.install_pygtk()
+
+        # Modify the base installation dir
+        install_dir = os.path.join(self.install_dir, PYGTK_SUFFIX_LONG)
+        self.set_install_dir(install_dir)
+
+        # Install tests
+        self.install_tests()
+
+        InstallLib.run(self)
+
+    def install_pth(self):
+        '''Create 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')
+
+    def install_pygtk(self):
+        '''Install pygtk.py in the right place.'''
+        self.copy_file('pygtk.py', self.install_dir)
+        pygtk = os.path.join(self.install_dir, 'pygtk.py')
+        self.byte_compile([pygtk])
+        self.local_outputs.append(pygtk)
+        self.local_inputs.append('pygtk.py')
+
+    def copy_test(self, srcfile, dstfile=None):
+        if dstfile is None:
+            dstfile = os.path.join(self.test_dir, srcfile)
+        else:
+            dstfile = os.path.join(self.test_dir, dstfile)
+
+        srcfile = os.path.join('tests', srcfile)
+
+        self.copy_file(srcfile, os.path.abspath(dstfile))
+        self.local_outputs.append(dstfile)
+        self.local_inputs.append('srcfile')
+
+    def install_tests(self):
+        self.test_dir = os.path.join(self.install_dir, 'tests', 'pygobject')
+        self.mkpath(self.test_dir)
+
+        self.copy_test('runtests-windows.py', 'runtests.py')
+        self.copy_test('compathelper.py')
+
+        for testfile in glob.glob('tests/test*.py'):
+            self.copy_test(os.path.basename(testfile))
+
+
+class PyGObjectInstallData(InstallData):
+    def run(self):
+        self.add_template_option('VERSION', VERSION)
+        self.add_template_option('FFI_LIBS', '')
+        self.add_template_option('LIBFFI_PC', '')
+        self.prepare()
+
+        # Install templates
+        self.install_templates()
+
+        InstallData.run(self)
+
+    def install_templates(self):
+        self.install_template('pygobject-%s.pc.in' % PYGTK_SUFFIX,
+                              os.path.join(self.install_dir, 'lib', 'pkgconfig'))
+
+        self.install_template('docs/xsl/fixxref.py.in',
+                              os.path.join(self.install_dir, XSL_DIR))
+
+
+class PyGObjectBuild(build):
+    enable_threading = True
+
+PyGObjectBuild.user_options.append(('enable-threading', None,
+                                    'enable threading support'))
+
+
+class PyGObjectBuildScripts(build_scripts):
+    '''
+    Overrides distutils' build_script command so we can generate
+    a valid pygobject-codegen script that works on windows.
+    '''
+
+    def run(self):
+        self.mkpath(self.build_dir)
+        self.install_codegen_script()
+        build_scripts.run(self)
+
+    def install_codegen_script(self):
+        '''Create pygobject-codegen'''
+        script = ('#!/bin/sh\n\n'
+                  'codegendir=`pkg-config pygobject-%s --variable=codegendir`\n\n'
+                  'PYTHONPATH=$codegendir\n'
+                  'export PYTHONPATH\n\n'
+                  'exec pythonw.exe "$codegendir/codegen.py" "$@"\n' % PYGTK_SUFFIX)
+
+        outfile = os.path.join(self.build_dir, 'pygobject-codegen-%s' % PYGTK_SUFFIX)
+        open(outfile, 'w').write(script)
+
+
+# glib
+glib = PkgConfigExtension(name='glib._glib',
+                          pkc_name='glib-%s' % PYGTK_SUFFIX,
+                          pkc_version=GLIB_REQUIRED,
+                          pygobject_pkc=None,
+                          include_dirs=['glib'],
+                          libraries=['pyglib'],
+                          sources=['glib/glibmodule.c',
+                                   'glib/pygiochannel.c',
+                                   'glib/pygmaincontext.c',
+                                   'glib/pygmainloop.c',
+                                   'glib/pygoptioncontext.c',
+                                   'glib/pygoptiongroup.c',
+                                   'glib/pygsource.c',
+                                   'glib/pygspawn.c',
+                                   ])
+
+# GObject
+gobject = PkgConfigExtension(name='gobject._gobject',
+                             pkc_name='gobject-%s' % PYGTK_SUFFIX,
+                             pkc_version=GLIB_REQUIRED,
+                             pygobject_pkc=None,
+                             include_dirs=['glib','gi'],
+                             libraries=['pyglib'],
+                             sources=['gobject/gobjectmodule.c',
+                                      'gobject/pygboxed.c',
+                                      'gobject/pygenum.c',
+                                      'gobject/pygflags.c',
+                                      'gobject/pyginterface.c',
+                                      'gobject/pygobject.c',
+                                      'gobject/pygparamspec.c',
+                                      'gobject/pygpointer.c',
+                                      'gobject/pygtype.c',
+                                      ])
+
+# gio
+gio = TemplateExtension(name='gio',
+                        pkc_name='gio-%s' % PYGTK_SUFFIX,
+                        pkc_version=GLIB_REQUIRED,
+                        output='gio._gio',
+                        defs='gio/gio.defs',
+                        include_dirs=['glib'],
+                        libraries=['pyglib'],
+                        sources=['gio/giomodule.c',
+                                 'gio/gio.c',
+                                 'gio/pygio-utils.c'],
+                        register=['gio/gio-types.defs'],
+                        override='gio/gio.override')
+
+clibs = []
+data_files = []
+ext_modules = []
+
+#Install dsextras and codegen so that the pygtk installer can find them
+py_modules = ['dsextras']
+packages = ['codegen']
+
+if glib.can_build():
+    #It would have been nice to create another class, such as PkgConfigCLib to
+    #encapsulate this dictionary, but it is impossible. build_clib.py does
+    #a dumb check to see if its only arguments are a 2-tuple containing a
+    #string and a Dictionary type - which makes it impossible to hide behind a
+    #subclass
+    #
+    #So we are stuck with this ugly thing
+    clibs.append(('pyglib', {'sources': ['glib/pyglib.c'],
+                             'macros': GLOBAL_MACROS,
+                             'include_dirs': ['glib', get_python_inc()] +
+                                              pkgc_get_include_dirs('glib-%s' % PYGTK_SUFFIX)}))
+    #this library is not installed, so probably should not include its header
+    #data_files.append((INCLUDE_DIR, ('glib/pyglib.h',)))
+
+    ext_modules.append(glib)
+    py_modules += ['glib.__init__', 'glib.option']
+else:
+    raise SystemExit('ERROR: Nothing to do, glib could not be found and is essential.')
+
+if gobject.can_build():
+    ext_modules.append(gobject)
+    data_files.append((INCLUDE_DIR, ('gobject/pygobject.h',)))
+    data_files.append((HTML_DIR, glob.glob('docs/html/*.html')))
+    data_files.append((HTML_DIR, ['docs/style.css']))
+    data_files.append((XSL_DIR,  glob.glob('docs/xsl/*.xsl')))
+    py_modules += ['gobject.__init__', 'gobject.propertyhelper', 'gobject.constants']
+else:
+    raise SystemExit('ERROR: Nothing to do, gobject could not be found and is essential.')
+
+if gio.can_build():
+    ext_modules.append(gio)
+    py_modules += ['gio.__init__']
+    data_files.append((DEFS_DIR,('gio/gio.defs', 'gio/gio-types.defs',)))
+else:
+    raise SystemExit, 'ERROR: Nothing to do, gio could not be found and is essential.'
+
+# Build testhelper library
+testhelper = Extension(name='testhelper',
+                       sources=['tests/testhelpermodule.c',
+                                'tests/test-floating.c',
+                                'tests/test-thread.c',
+                                'tests/test-unknown.c'],
+                       libraries=['pyglib'] +
+                                 pkgc_get_libraries('glib-%s' % PYGTK_SUFFIX) +
+                                 pkgc_get_libraries('gobject-%s' % PYGTK_SUFFIX),
+                       include_dirs=['tests', 'glib',
+                                     'gobject', get_python_inc()] +
+                                    pkgc_get_include_dirs('glib-%s' % PYGTK_SUFFIX) +
+                                    pkgc_get_include_dirs('gobject-%s' % PYGTK_SUFFIX),
+                       library_dirs=pkgc_get_library_dirs('glib%s' % PYGTK_SUFFIX) +
+                                    pkgc_get_library_dirs('gobject-%s' % PYGTK_SUFFIX))
+
+ext_modules.append(testhelper)
+
+# 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
+    except ImportError:
+        print ('* Could not import thread module, disabling threading')
+        enable_threading = False
+    else:
+        enable_threading = True
+
+if enable_threading:
+    name = 'gthread-%s' % PYGTK_SUFFIX
+    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': 'pygobject_postinstall.py',
+                             'user_access_control': 'auto'}}
+
+setup(name='pygobject',
+      url='http://www.pygtk.org/',
+      version=VERSION,
+      license='LGPL',
+      platforms=['MS Windows'],
+      maintainer='Johan Dahlin',
+      maintainer_email='johan@gnome.org',
+      description=doclines[0],
+      long_description='\n'.join(doclines[2:]),
+      provides=['codegen', 'dsextras', 'gio', 'glib', 'gobject'],
+      py_modules=py_modules,
+      packages=packages,
+      ext_modules=ext_modules,
+      libraries=clibs,
+      data_files=data_files,
+      scripts=['pygobject_postinstall.py'],
+      options=options,
+      cmdclass={'install_lib': PyGObjectInstallLib,
+                'install_data': PyGObjectInstallData,
+                'build_scripts': PyGObjectBuildScripts,
+                'build_clib' : build_clib,
+                'build_ext': BuildExt,
+                'build': PyGObjectBuild})
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644 (file)
index 0000000..bad15f0
--- /dev/null
@@ -0,0 +1,137 @@
+CLEANFILES =
+noinst_LTLIBRARIES = 
+if ENABLE_INTROSPECTION
+noinst_LTLIBRARIES += libregress.la libgimarshallingtests.la
+
+nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
+libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
+libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(PYCAIRO_LIBS)
+nodist_libgimarshallingtests_la_SOURCES = $(GI_DATADIR)/tests/gimarshallingtests.c $(GI_DATADIR)/tests/gimarshallingtests.h
+libgimarshallingtests_la_CFLAGS = $(GLIB_CFLAGS)
+libgimarshallingtests_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS)
+
+# This is a hack to make sure a shared library is built
+libregress.la: $(libregress_la_OBJECTS) $(libregress_la_DEPENDENCIES)
+       $(LINK) -rpath $(pkgpyexecdir) $(libregress_la_LDFLAGS) $(libregress_la_OBJECTS) $(libregress_la_LIBADD) $(LIBS)
+
+libgimarshallingtests.la: $(libgimarshallingtests_la_OBJECTS) $(libgimarshallingtests_la_DEPENDENCIES)
+       $(LINK) -rpath $(pkgpyexecdir) $(libgimarshallingtests_la_LDFLAGS) $(libgimarshallingtests_la_OBJECTS) $(libgimarhallingtests_la_LIBADD) $(LIBS)
+
+# g-i doesn't ship these as shared libraries anymore; we build them here
+Regress-1.0.gir: libregress.la Makefile
+       $(AM_V_GEN) g-ir-scanner --include=cairo-1.0 --include=Gio-2.0 \
+       --namespace=Regress --nsversion=1.0 \
+       --warn-all --warn-error \
+       --library=libregress.la \
+       --libtool="$(top_builddir)/libtool" \
+       --output $@ \
+       $(nodist_libregress_la_SOURCES)
+Regress-1.0.typelib: Regress-1.0.gir Makefile
+       $(AM_V_GEN) g-ir-compiler $< -o $@
+
+GIMarshallingTests-1.0.gir: libgimarshallingtests.la Makefile
+       $(AM_V_GEN) g-ir-scanner --include=Gio-2.0 \
+       --namespace=GIMarshallingTests --nsversion=1.0 --symbol-prefix=gi_marshalling_tests \
+       --warn-all --warn-error \
+       --library=libgimarshallingtests.la \
+       --libtool="$(top_builddir)/libtool" \
+       --output $@ \
+       $(nodist_libgimarshallingtests_la_SOURCES)
+GIMarshallingTests-1.0.typelib: GIMarshallingTests-1.0.gir Makefile
+       $(AM_V_GEN) g-ir-compiler $< -o $@
+
+gschemas.compiled: org.gnome.test.gschema.xml
+       glib-compile-schemas --targetdir=. --schema-file=$<
+
+CLEANFILES += Regress-1.0.gir Regress-1.0.typelib GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib gschemas.compiled
+endif
+
+noinst_LTLIBRARIES += testhelper.la
+
+testhelper_la_CFLAGS = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
+testhelper_la_LDFLAGS = -module -avoid-version
+testhelper_la_LIBADD = $(GLIB_LIBS)
+testhelper_la_SOURCES = \
+       testhelpermodule.c \
+       test-floating.c \
+       test-thread.c \
+       test-unknown.c
+
+# This is a hack to make sure a shared library is built
+testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
+       $(LINK) -rpath $(pkgpyexecdir) $(testhelper_la_LDFLAGS) $(testhelper_la_OBJECTS) $(testhelper_la_LIBADD) $(LIBS)
+
+
+.la.so:
+       test -L $@ || $(LN_S) .libs/$@ $@
+
+
+all: $(LTLIBRARIES:.la=.so)
+
+TEST_FILES_STATIC = \
+       test_gobject.py \
+       test_interface.py \
+       test_mainloop.py \
+       test_option.py \
+       test_properties.py \
+       test_signal.py \
+       test_source.py \
+       test_subprocess.py \
+       test_thread.py \
+       test_uris.py
+
+if BUILD_GIO
+TEST_FILES_GIO = \
+       test_gio.py \
+       test_gresolver.py \
+       test_gsocket.py \
+       test_gicon.py \
+       test_gcancellable.py
+endif 
+
+if ENABLE_INTROSPECTION
+TEST_FILES_GI = \
+       test_everything.py \
+       test_gi.py \
+       test_gdbus.py \
+       test_overrides.py
+endif
+
+EXTRA_DIST = \
+       compathelper.py \
+       runtests.py \
+       testmodule.py \
+       test-floating.h \
+       test-thread.h \
+       test-unknown.h \
+       org.gnome.test.gschema.xml
+
+EXTRA_DIST += $(TEST_FILES_STATIC) $(TEST_FILES_GI) $(TEST_FILES_GIO)
+
+clean-local:
+       rm -f $(LTLIBRARIES:.la=.so) file.txt~
+
+DBUS_LAUNCH=$(shell which dbus-launch)
+RUN_TESTS_ENV_VARS= \
+       PYTHONPATH=$(top_builddir):$(top_builddir)/tests:$${PYTHONPATH:+:$$PYTHONPATH} \
+       LD_LIBRARY_PATH=$(builddir)/.libs:$$LD_LIBRARY_PATH \
+       GI_TYPELIB_PATH=$(builddir):$$GI_TYPELIB_PATH \
+       XDG_DATA_DIRS=$$XDG_DATA_DIRS:/usr/share \
+       TESTS_BUILDDIR=$(builddir)
+RUN_TESTS_LAUNCH=$(RUN_TESTS_ENV_VARS) $(DBUS_LAUNCH) $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py
+
+# run tests in separately to avoid loading static and introspection bindings in the same process
+check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
+       TEST_FILES="$(TEST_FILES_STATIC)" $(RUN_TESTS_LAUNCH)
+       TEST_FILES="$(TEST_FILES_GI)" $(RUN_TESTS_LAUNCH)
+if BUILD_GIO
+       TEST_FILES="$(TEST_FILES_GIO)" $(RUN_TESTS_LAUNCH)
+endif 
+
+check.gdb:
+       EXEC_NAME="gdb --args" $(MAKE) check
+
+check.valgrind:
+       EXEC_NAME="valgrind --suppressions=python.supp" G_SLICE=always-malloc G_DEBUG=gc-friendly $(MAKE) check
+
+-include $(top_srcdir)/git.mk
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644 (file)
index 0000000..a695412
--- /dev/null
@@ -0,0 +1,728 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_INTROSPECTION_TRUE@am__append_1 = libregress.la libgimarshallingtests.la
+@ENABLE_INTROSPECTION_TRUE@am__append_2 = Regress-1.0.gir Regress-1.0.typelib GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib gschemas.compiled
+subdir = tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+       $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libgimarshallingtests_la_LIBADD =
+@ENABLE_INTROSPECTION_TRUE@nodist_libgimarshallingtests_la_OBJECTS = libgimarshallingtests_la-gimarshallingtests.lo
+libgimarshallingtests_la_OBJECTS =  \
+       $(nodist_libgimarshallingtests_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libgimarshallingtests_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(libgimarshallingtests_la_CFLAGS) $(CFLAGS) \
+       $(libgimarshallingtests_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_INTROSPECTION_TRUE@am_libgimarshallingtests_la_rpath =
+libregress_la_LIBADD =
+@ENABLE_INTROSPECTION_TRUE@nodist_libregress_la_OBJECTS =  \
+@ENABLE_INTROSPECTION_TRUE@    libregress_la-regress.lo
+libregress_la_OBJECTS = $(nodist_libregress_la_OBJECTS)
+libregress_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libregress_la_CFLAGS) \
+       $(CFLAGS) $(libregress_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_INTROSPECTION_TRUE@am_libregress_la_rpath =
+am__DEPENDENCIES_1 =
+testhelper_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_testhelper_la_OBJECTS = testhelper_la-testhelpermodule.lo \
+       testhelper_la-test-floating.lo testhelper_la-test-thread.lo \
+       testhelper_la-test-unknown.lo
+testhelper_la_OBJECTS = $(am_testhelper_la_OBJECTS)
+testhelper_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testhelper_la_CFLAGS) \
+       $(CFLAGS) $(testhelper_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(nodist_libgimarshallingtests_la_SOURCES) \
+       $(nodist_libregress_la_SOURCES) $(testhelper_la_SOURCES)
+DIST_SOURCES = $(testhelper_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GI_CFLAGS = @GI_CFLAGS@
+GI_DATADIR = @GI_DATADIR@
+GI_LIBS = @GI_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PLATFORM = @PLATFORM@
+PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@
+PYCAIRO_LIBS = @PYCAIRO_LIBS@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+CLEANFILES = $(am__append_2)
+noinst_LTLIBRARIES = $(am__append_1) testhelper.la
+@ENABLE_INTROSPECTION_TRUE@nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
+@ENABLE_INTROSPECTION_TRUE@libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
+@ENABLE_INTROSPECTION_TRUE@libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(PYCAIRO_LIBS)
+@ENABLE_INTROSPECTION_TRUE@nodist_libgimarshallingtests_la_SOURCES = $(GI_DATADIR)/tests/gimarshallingtests.c $(GI_DATADIR)/tests/gimarshallingtests.h
+@ENABLE_INTROSPECTION_TRUE@libgimarshallingtests_la_CFLAGS = $(GLIB_CFLAGS)
+@ENABLE_INTROSPECTION_TRUE@libgimarshallingtests_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS)
+testhelper_la_CFLAGS = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
+testhelper_la_LDFLAGS = -module -avoid-version
+testhelper_la_LIBADD = $(GLIB_LIBS)
+testhelper_la_SOURCES = \
+       testhelpermodule.c \
+       test-floating.c \
+       test-thread.c \
+       test-unknown.c
+
+TEST_FILES_STATIC = \
+       test_gobject.py \
+       test_interface.py \
+       test_mainloop.py \
+       test_option.py \
+       test_properties.py \
+       test_signal.py \
+       test_source.py \
+       test_subprocess.py \
+       test_thread.py \
+       test_uris.py
+
+@BUILD_GIO_TRUE@TEST_FILES_GIO = \
+@BUILD_GIO_TRUE@       test_gio.py \
+@BUILD_GIO_TRUE@       test_gresolver.py \
+@BUILD_GIO_TRUE@       test_gsocket.py \
+@BUILD_GIO_TRUE@       test_gicon.py \
+@BUILD_GIO_TRUE@       test_gcancellable.py
+
+@ENABLE_INTROSPECTION_TRUE@TEST_FILES_GI = \
+@ENABLE_INTROSPECTION_TRUE@    test_everything.py \
+@ENABLE_INTROSPECTION_TRUE@    test_gi.py \
+@ENABLE_INTROSPECTION_TRUE@    test_gdbus.py \
+@ENABLE_INTROSPECTION_TRUE@    test_overrides.py
+
+EXTRA_DIST = compathelper.py runtests.py testmodule.py test-floating.h \
+       test-thread.h test-unknown.h org.gnome.test.gschema.xml \
+       $(TEST_FILES_STATIC) $(TEST_FILES_GI) $(TEST_FILES_GIO)
+DBUS_LAUNCH = $(shell which dbus-launch)
+RUN_TESTS_ENV_VARS = \
+       PYTHONPATH=$(top_builddir):$(top_builddir)/tests:$${PYTHONPATH:+:$$PYTHONPATH} \
+       LD_LIBRARY_PATH=$(builddir)/.libs:$$LD_LIBRARY_PATH \
+       GI_TYPELIB_PATH=$(builddir):$$GI_TYPELIB_PATH \
+       XDG_DATA_DIRS=$$XDG_DATA_DIRS:/usr/share \
+       TESTS_BUILDDIR=$(builddir)
+
+RUN_TESTS_LAUNCH = $(RUN_TESTS_ENV_VARS) $(DBUS_LAUNCH) $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .la .lo .o .obj .so
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+       -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+       @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+@ENABLE_INTROSPECTION_FALSE@libgimarshallingtests.la: $(libgimarshallingtests_la_OBJECTS) $(libgimarshallingtests_la_DEPENDENCIES) 
+@ENABLE_INTROSPECTION_FALSE@   $(AM_V_CCLD)$(libgimarshallingtests_la_LINK) $(am_libgimarshallingtests_la_rpath) $(libgimarshallingtests_la_OBJECTS) $(libgimarshallingtests_la_LIBADD) $(LIBS)
+@ENABLE_INTROSPECTION_FALSE@libregress.la: $(libregress_la_OBJECTS) $(libregress_la_DEPENDENCIES) 
+@ENABLE_INTROSPECTION_FALSE@   $(AM_V_CCLD)$(libregress_la_LINK) $(am_libregress_la_rpath) $(libregress_la_OBJECTS) $(libregress_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgimarshallingtests_la-gimarshallingtests.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libregress_la-regress.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhelper_la-test-floating.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhelper_la-test-thread.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhelper_la-test-unknown.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhelper_la-testhelpermodule.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+
+libgimarshallingtests_la-gimarshallingtests.lo: $(GI_DATADIR)/tests/gimarshallingtests.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgimarshallingtests_la_CFLAGS) $(CFLAGS) -MT libgimarshallingtests_la-gimarshallingtests.lo -MD -MP -MF $(DEPDIR)/libgimarshallingtests_la-gimarshallingtests.Tpo -c -o libgimarshallingtests_la-gimarshallingtests.lo `test -f '$(GI_DATADIR)/tests/gimarshallingtests.c' || echo '$(srcdir)/'`$(GI_DATADIR)/tests/gimarshallingtests.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libgimarshallingtests_la-gimarshallingtests.Tpo $(DEPDIR)/libgimarshallingtests_la-gimarshallingtests.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(GI_DATADIR)/tests/gimarshallingtests.c' object='libgimarshallingtests_la-gimarshallingtests.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgimarshallingtests_la_CFLAGS) $(CFLAGS) -c -o libgimarshallingtests_la-gimarshallingtests.lo `test -f '$(GI_DATADIR)/tests/gimarshallingtests.c' || echo '$(srcdir)/'`$(GI_DATADIR)/tests/gimarshallingtests.c
+
+libregress_la-regress.lo: $(GI_DATADIR)/tests/regress.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libregress_la_CFLAGS) $(CFLAGS) -MT libregress_la-regress.lo -MD -MP -MF $(DEPDIR)/libregress_la-regress.Tpo -c -o libregress_la-regress.lo `test -f '$(GI_DATADIR)/tests/regress.c' || echo '$(srcdir)/'`$(GI_DATADIR)/tests/regress.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libregress_la-regress.Tpo $(DEPDIR)/libregress_la-regress.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(GI_DATADIR)/tests/regress.c' object='libregress_la-regress.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libregress_la_CFLAGS) $(CFLAGS) -c -o libregress_la-regress.lo `test -f '$(GI_DATADIR)/tests/regress.c' || echo '$(srcdir)/'`$(GI_DATADIR)/tests/regress.c
+
+testhelper_la-testhelpermodule.lo: testhelpermodule.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -MT testhelper_la-testhelpermodule.lo -MD -MP -MF $(DEPDIR)/testhelper_la-testhelpermodule.Tpo -c -o testhelper_la-testhelpermodule.lo `test -f 'testhelpermodule.c' || echo '$(srcdir)/'`testhelpermodule.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/testhelper_la-testhelpermodule.Tpo $(DEPDIR)/testhelper_la-testhelpermodule.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testhelpermodule.c' object='testhelper_la-testhelpermodule.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -c -o testhelper_la-testhelpermodule.lo `test -f 'testhelpermodule.c' || echo '$(srcdir)/'`testhelpermodule.c
+
+testhelper_la-test-floating.lo: test-floating.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -MT testhelper_la-test-floating.lo -MD -MP -MF $(DEPDIR)/testhelper_la-test-floating.Tpo -c -o testhelper_la-test-floating.lo `test -f 'test-floating.c' || echo '$(srcdir)/'`test-floating.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/testhelper_la-test-floating.Tpo $(DEPDIR)/testhelper_la-test-floating.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='test-floating.c' object='testhelper_la-test-floating.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -c -o testhelper_la-test-floating.lo `test -f 'test-floating.c' || echo '$(srcdir)/'`test-floating.c
+
+testhelper_la-test-thread.lo: test-thread.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -MT testhelper_la-test-thread.lo -MD -MP -MF $(DEPDIR)/testhelper_la-test-thread.Tpo -c -o testhelper_la-test-thread.lo `test -f 'test-thread.c' || echo '$(srcdir)/'`test-thread.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/testhelper_la-test-thread.Tpo $(DEPDIR)/testhelper_la-test-thread.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='test-thread.c' object='testhelper_la-test-thread.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -c -o testhelper_la-test-thread.lo `test -f 'test-thread.c' || echo '$(srcdir)/'`test-thread.c
+
+testhelper_la-test-unknown.lo: test-unknown.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -MT testhelper_la-test-unknown.lo -MD -MP -MF $(DEPDIR)/testhelper_la-test-unknown.Tpo -c -o testhelper_la-test-unknown.lo `test -f 'test-unknown.c' || echo '$(srcdir)/'`test-unknown.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/testhelper_la-test-unknown.Tpo $(DEPDIR)/testhelper_la-test-unknown.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='test-unknown.c' object='testhelper_la-test-unknown.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testhelper_la_CFLAGS) $(CFLAGS) -c -o testhelper_la-test-unknown.lo `test -f 'test-unknown.c' || echo '$(srcdir)/'`test-unknown.c
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$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
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+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:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 clean-local \
+       clean-noinstLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+       clean-generic clean-libtool clean-local \
+       clean-noinstLTLIBRARIES ctags distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags uninstall uninstall-am
+
+
+# This is a hack to make sure a shared library is built
+@ENABLE_INTROSPECTION_TRUE@libregress.la: $(libregress_la_OBJECTS) $(libregress_la_DEPENDENCIES)
+@ENABLE_INTROSPECTION_TRUE@    $(LINK) -rpath $(pkgpyexecdir) $(libregress_la_LDFLAGS) $(libregress_la_OBJECTS) $(libregress_la_LIBADD) $(LIBS)
+
+@ENABLE_INTROSPECTION_TRUE@libgimarshallingtests.la: $(libgimarshallingtests_la_OBJECTS) $(libgimarshallingtests_la_DEPENDENCIES)
+@ENABLE_INTROSPECTION_TRUE@    $(LINK) -rpath $(pkgpyexecdir) $(libgimarshallingtests_la_LDFLAGS) $(libgimarshallingtests_la_OBJECTS) $(libgimarhallingtests_la_LIBADD) $(LIBS)
+
+# g-i doesn't ship these as shared libraries anymore; we build them here
+@ENABLE_INTROSPECTION_TRUE@Regress-1.0.gir: libregress.la Makefile
+@ENABLE_INTROSPECTION_TRUE@    $(AM_V_GEN) g-ir-scanner --include=cairo-1.0 --include=Gio-2.0 \
+@ENABLE_INTROSPECTION_TRUE@    --namespace=Regress --nsversion=1.0 \
+@ENABLE_INTROSPECTION_TRUE@    --warn-all --warn-error \
+@ENABLE_INTROSPECTION_TRUE@    --library=libregress.la \
+@ENABLE_INTROSPECTION_TRUE@    --libtool="$(top_builddir)/libtool" \
+@ENABLE_INTROSPECTION_TRUE@    --output $@ \
+@ENABLE_INTROSPECTION_TRUE@    $(nodist_libregress_la_SOURCES)
+@ENABLE_INTROSPECTION_TRUE@Regress-1.0.typelib: Regress-1.0.gir Makefile
+@ENABLE_INTROSPECTION_TRUE@    $(AM_V_GEN) g-ir-compiler $< -o $@
+
+@ENABLE_INTROSPECTION_TRUE@GIMarshallingTests-1.0.gir: libgimarshallingtests.la Makefile
+@ENABLE_INTROSPECTION_TRUE@    $(AM_V_GEN) g-ir-scanner --include=Gio-2.0 \
+@ENABLE_INTROSPECTION_TRUE@    --namespace=GIMarshallingTests --nsversion=1.0 --symbol-prefix=gi_marshalling_tests \
+@ENABLE_INTROSPECTION_TRUE@    --warn-all --warn-error \
+@ENABLE_INTROSPECTION_TRUE@    --library=libgimarshallingtests.la \
+@ENABLE_INTROSPECTION_TRUE@    --libtool="$(top_builddir)/libtool" \
+@ENABLE_INTROSPECTION_TRUE@    --output $@ \
+@ENABLE_INTROSPECTION_TRUE@    $(nodist_libgimarshallingtests_la_SOURCES)
+@ENABLE_INTROSPECTION_TRUE@GIMarshallingTests-1.0.typelib: GIMarshallingTests-1.0.gir Makefile
+@ENABLE_INTROSPECTION_TRUE@    $(AM_V_GEN) g-ir-compiler $< -o $@
+
+@ENABLE_INTROSPECTION_TRUE@gschemas.compiled: org.gnome.test.gschema.xml
+@ENABLE_INTROSPECTION_TRUE@    glib-compile-schemas --targetdir=. --schema-file=$<
+
+# This is a hack to make sure a shared library is built
+testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
+       $(LINK) -rpath $(pkgpyexecdir) $(testhelper_la_LDFLAGS) $(testhelper_la_OBJECTS) $(testhelper_la_LIBADD) $(LIBS)
+
+.la.so:
+       test -L $@ || $(LN_S) .libs/$@ $@
+
+all: $(LTLIBRARIES:.la=.so)
+
+clean-local:
+       rm -f $(LTLIBRARIES:.la=.so) file.txt~
+
+# run tests in separately to avoid loading static and introspection bindings in the same process
+check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
+       TEST_FILES="$(TEST_FILES_STATIC)" $(RUN_TESTS_LAUNCH)
+       TEST_FILES="$(TEST_FILES_GI)" $(RUN_TESTS_LAUNCH)
+@BUILD_GIO_TRUE@       TEST_FILES="$(TEST_FILES_GIO)" $(RUN_TESTS_LAUNCH)
+
+check.gdb:
+       EXEC_NAME="gdb --args" $(MAKE) check
+
+check.valgrind:
+       EXEC_NAME="valgrind --suppressions=python.supp" G_SLICE=always-malloc G_DEBUG=gc-friendly $(MAKE) check
+
+-include $(top_srcdir)/git.mk
+
+# 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:
diff --git a/tests/compathelper.py b/tests/compathelper.py
new file mode 100644 (file)
index 0000000..2465747
--- /dev/null
@@ -0,0 +1,69 @@
+import sys
+
+if sys.version_info >= (3, 0):
+    '''
+    for tests that need to test long values in python 2
+
+    python 3 does not differentiate between long and int
+    and does not supply a long keyword
+
+    instead of testing longs by using values such as 10L
+    test writters should do this:
+
+    from compathelper import _long
+    _long(10)
+    '''
+    _long = int
+
+    '''
+    for tests that need to test string values in python 2
+
+    python 3 does differentiate between str and bytes
+    and does not supply a basestring keyword
+
+    any tests that use basestring should do this:
+
+    from compathelper import _basestring
+    isinstance(_basestring, "hello")
+    '''
+    _basestring = str
+
+    '''
+    for tests that need to write to intefaces that take bytes in
+    python 3
+
+    python 3 has a seperate bytes type for low level functions like os.write
+
+    python 2 treats these as strings
+
+    any tests that need to write a string of bytes should do something like
+    this:
+
+    from compathelper import _bytes
+    os.write(_bytes("hello"))
+    '''
+
+    _bytes = lambda s: s.encode()
+
+    '''
+    for tests that need to write to intefaces that take unicode in
+    python 2
+
+    python 3 strings are unicode encoded as UTF-8 so the unicode object 
+    doesn't exist
+
+    python 2 differs between a string an unicode string and you must specify
+    an encoding.  This macro will specify UTF-8 in python 2
+
+    any tests that need to use unicode should do this
+
+    from compathelper import _unicode
+    unicode_string = _unicode('this is a unicode string')
+    '''
+
+    _unicode = lambda s: str(s)
+else:
+    _long = long
+    _basestring = basestring
+    _bytes = str
+    _unicode = lambda s: unicode(s, 'UTF-8')
diff --git a/tests/org.gnome.test.gschema.xml b/tests/org.gnome.test.gschema.xml
new file mode 100644 (file)
index 0000000..221b87a
--- /dev/null
@@ -0,0 +1,25 @@
+<schemalist>
+    <schema id="org.gnome.test" path="/tests/">
+       <key name="test-boolean" type="b">
+           <default>true</default>
+       </key>
+       <key name="test-string" type="s">
+           <default>"Hello"</default>
+       </key>
+       <key name="test-tuple" type="(ii)">
+          <default>(1,2)</default>
+       </key>
+       <key name="test-array" type="ai">
+           <default>[1,2]</default>
+       </key>
+    </schema>
+
+    <schema id="org.gnome.nopathtest">
+       <key name="np-int" type="i">
+           <default>42</default>
+       </key>
+    </schema>
+
+    <schema id="org.gnome.empty" path="/tests/">
+    </schema>
+</schemalist>
diff --git a/tests/runtests.py b/tests/runtests.py
new file mode 100644 (file)
index 0000000..2bb8637
--- /dev/null
@@ -0,0 +1,34 @@
+# -*- Mode: Python -*-
+
+import os
+import glob
+import sys
+
+import unittest
+
+
+# force untranslated messages, as we check for them in some tests
+os.environ['LC_MESSAGES'] = 'C'
+
+# Load tests.
+if 'TEST_NAMES' in os.environ:
+       names = os.environ['TEST_NAMES'].split()
+elif 'TEST_FILES' in os.environ:
+       names = []
+       for filename in os.environ['TEST_FILES'].split():
+               names.append(filename[:-3])
+else:
+       names = []
+       for filename in glob.iglob("test_*.py"):
+               names.append(filename[:-3])
+
+loader = unittest.TestLoader()
+suite = loader.loadTestsFromNames(names)
+
+
+# Run tests.
+runner = unittest.TextTestRunner(verbosity=2)
+result = runner.run(suite)
+if not result.wasSuccessful():
+       sys.exit(1) # exit code so "make check" reports error
+
diff --git a/tests/test-floating.c b/tests/test-floating.c
new file mode 100644 (file)
index 0000000..8e8ba5d
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * test-floating.c - Source for TestFloatingWithSinkFunc and TestFloatingWithoutSinkFunc
+ * Copyright (C) 2010 Collabora Ltd.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "test-floating.h"
+
+/* TestFloatingWithSinkFunc */
+
+G_DEFINE_TYPE(TestFloatingWithSinkFunc, test_floating_with_sink_func, G_TYPE_INITIALLY_UNOWNED)
+
+static void
+test_floating_with_sink_func_finalize (GObject *gobject)
+{
+  TestFloatingWithSinkFunc *object = TEST_FLOATING_WITH_SINK_FUNC (gobject);
+
+  if (g_object_is_floating (object))
+    {
+      g_warning ("A floating object was finalized. This means that someone\n"
+                "called g_object_unref() on an object that had only a floating\n"
+                "reference; the initial floating reference is not owned by anyone\n"
+                "and must be removed with g_object_ref_sink().");
+    }
+  
+  G_OBJECT_CLASS (test_floating_with_sink_func_parent_class)->finalize (gobject);
+}
+
+static void
+test_floating_with_sink_func_class_init (TestFloatingWithSinkFuncClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  gobject_class->finalize = test_floating_with_sink_func_finalize;
+}
+
+static void
+test_floating_with_sink_func_init (TestFloatingWithSinkFunc *self)
+{
+}
+
+void
+sink_test_floating_with_sink_func (GObject *object)
+{
+    if (g_object_is_floating(object)) {
+           g_object_ref_sink(object);
+    }
+}
+
+/* TestFloatingWithoutSinkFunc */
+
+G_DEFINE_TYPE(TestFloatingWithoutSinkFunc, test_floating_without_sink_func, G_TYPE_INITIALLY_UNOWNED)
+
+static void
+test_floating_without_sink_func_finalize (GObject *gobject)
+{
+  TestFloatingWithoutSinkFunc *object = TEST_FLOATING_WITHOUT_SINK_FUNC (gobject);
+
+  if (g_object_is_floating (object))
+    {
+      g_warning ("A floating object was finalized. This means that someone\n"
+                "called g_object_unref() on an object that had only a floating\n"
+                "reference; the initial floating reference is not owned by anyone\n"
+                "and must be removed without g_object_ref_sink().");
+    }
+
+  G_OBJECT_CLASS (test_floating_without_sink_func_parent_class)->finalize (gobject);
+}
+
+static void
+test_floating_without_sink_func_class_init (TestFloatingWithoutSinkFuncClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  gobject_class->finalize = test_floating_without_sink_func_finalize;
+}
+
+static void
+test_floating_without_sink_func_init (TestFloatingWithoutSinkFunc *self)
+{
+}
+
+/* TestOwnedByLibrary */
+
+G_DEFINE_TYPE(TestOwnedByLibrary, test_owned_by_library, G_TYPE_OBJECT)
+
+static GSList *obl_instance_list = NULL;
+
+static void
+test_owned_by_library_class_init (TestOwnedByLibraryClass *klass)
+{
+}
+
+static void
+test_owned_by_library_init (TestOwnedByLibrary *self)
+{
+    g_object_ref (self);
+    obl_instance_list = g_slist_prepend (obl_instance_list, self);
+}
+
+void
+test_owned_by_library_release (TestOwnedByLibrary *self)
+{
+    obl_instance_list = g_slist_remove (obl_instance_list, self);
+    g_object_unref (self);
+}
+
+GSList *
+test_owned_by_library_get_instance_list (void)
+{
+    return obl_instance_list;
+}
+
+/* TestFloatingAndSunk
+ * This object is mimicking the GtkWindow behaviour, ie a GInitiallyUnowned subclass
+ * whose floating reference has already been sunk when g_object_new() returns it.
+ * The reference is already sunk because the instance is already owned by the instance
+ * list.
+ */
+
+G_DEFINE_TYPE(TestFloatingAndSunk, test_floating_and_sunk, G_TYPE_INITIALLY_UNOWNED)
+
+static GSList *fas_instance_list = NULL;
+
+static void
+test_floating_and_sunk_class_init (TestFloatingAndSunkClass *klass)
+{
+}
+
+static void
+test_floating_and_sunk_init (TestFloatingAndSunk *self)
+{
+    g_object_ref_sink (self);
+    fas_instance_list = g_slist_prepend (fas_instance_list, self);
+}
+
+void
+test_floating_and_sunk_release (TestFloatingAndSunk *self)
+{
+    fas_instance_list = g_slist_remove (fas_instance_list, self);
+    g_object_unref (self);
+}
+
+GSList *
+test_floating_and_sunk_get_instance_list (void)
+{
+    return fas_instance_list;
+}
diff --git a/tests/test-floating.h b/tests/test-floating.h
new file mode 100644 (file)
index 0000000..bf4e101
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * test-floating.h - Header for TestFloatingWithSinkFunc and TestFloatingWithoutSinkFunc
+ * Copyright (C) 2010 Collabora Ltd.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <glib-object.h>
+
+/* TestFloatingWithSinkFunc */
+
+typedef struct {
+  GInitiallyUnowned parent;
+} TestFloatingWithSinkFunc;
+
+typedef struct {
+  GInitiallyUnownedClass parent_class;
+} TestFloatingWithSinkFuncClass;
+
+#define TEST_TYPE_FLOATING_WITH_SINK_FUNC (test_floating_with_sink_func_get_type())
+#define TEST_FLOATING_WITH_SINK_FUNC(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_FLOATING_WITH_SINK_FUNC, TestFloatingWithSinkFunc))
+#define TEST_FLOATING_WITH_SINK_FUNC_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TEST_TYPE_FLOATING_WITH_SINK_FUNC, TestFloatingWithSinkFuncClass))
+#define TEST_IS_FLOATING_WITH_SINK_FUNC(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_FLOATING_WITH_SINK_FUNC))
+#define TEST_IS_FLOATING_WITH_SINK_FUNC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TEST_TYPE_FLOATING_WITH_SINK_FUNC))
+#define TEST_FLOATING_WITH_SINK_FUNC_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), TEST_TYPE_FLOATING_WITH_SINK_FUNC, TestFloatingWithSinkFuncClass))
+
+GType test_floating_with_sink_func_get_type (void);
+void sink_test_floating_with_sink_func (GObject *object);
+
+/* TestFloatingWithoutSinkFunc */
+
+typedef struct {
+  GInitiallyUnowned parent;
+} TestFloatingWithoutSinkFunc;
+
+typedef struct {
+  GInitiallyUnownedClass parent_class;
+} TestFloatingWithoutSinkFuncClass;
+
+#define TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC (test_floating_without_sink_func_get_type())
+#define TEST_FLOATING_WITHOUT_SINK_FUNC(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC, TestFloatingWithoutSinkFunc))
+#define TEST_FLOATING_WITHOUT_SINK_FUNC_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC, TestFloatingWithoutSinkFuncClass))
+#define TEST_IS_FLOATING_WITHOUT_SINK_FUNC(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC))
+#define TEST_IS_FLOATING_WITHOUT_SINK_FUNC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC))
+#define TEST_FLOATING_WITHOUT_SINK_FUNC_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC, TestFloatingWithoutSinkFuncClass))
+
+GType test_floating_without_sink_func_get_type (void);
+
+/* TestOwnedByLibrary */
+
+typedef struct {
+  GObject parent;
+} TestOwnedByLibrary;
+
+typedef struct {
+  GObjectClass parent_class;
+} TestOwnedByLibraryClass;
+
+#define TEST_TYPE_OWNED_BY_LIBRARY            (test_owned_by_library_get_type())
+#define TEST_OWNED_BY_LIBRARY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_OWNED_BY_LIBRARY, TestOwnedByLibrary))
+#define TEST_OWNED_BY_LIBRARY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TEST_TYPE_OWNED_BY_LIBRARY, TestOwnedByLibraryClass))
+#define TEST_IS_OWNED_BY_LIBRARY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_OWNED_BY_LIBRARY))
+#define TEST_IS_OWNED_BY_LIBRARY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TEST_TYPE_OWNED_BY_LIBRARY))
+#define TEST_OWNED_BY_LIBRARY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), TEST_TYPE_OWNED_BY_LIBRARY, TestOwnedByLibraryClass))
+
+GType test_owned_by_library_get_type (void);
+void test_owned_by_library_release (TestOwnedByLibrary *self);
+GSList *test_owned_by_library_get_instance_list (void);
+
+/* TestFloatingAndSunk */
+
+typedef struct {
+  GInitiallyUnowned parent;
+} TestFloatingAndSunk;
+
+typedef struct {
+  GInitiallyUnownedClass parent_class;
+} TestFloatingAndSunkClass;
+
+#define TEST_TYPE_FLOATING_AND_SUNK            (test_floating_and_sunk_get_type())
+#define TEST_FLOATING_AND_SUNK(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_FLOATING_AND_SUNK, TestFloatingAndSunk))
+#define TEST_FLOATING_AND_SUNK_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TEST_TYPE_FLOATING_AND_SUNK, TestFloatingAndSunkClass))
+#define TEST_IS_FLOATING_AND_SUNK(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_FLOATING_AND_SUNK))
+#define TEST_IS_FLOATING_AND_SUNK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TEST_TYPE_FLOATING_AND_SUNK))
+#define TEST_FLOATING_AND_SUNK_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), TEST_TYPE_FLOATING_AND_SUNK, TestFloatingAndSunkClass))
+
+GType test_floating_and_sunk_get_type (void);
+void test_floating_and_sunk_release (TestFloatingAndSunk *self);
+GSList *test_floating_and_sunk_get_instance_list (void);
diff --git a/tests/test-thread.c b/tests/test-thread.c
new file mode 100644 (file)
index 0000000..0f5b909
--- /dev/null
@@ -0,0 +1,64 @@
+#include "test-thread.h"
+
+enum
+{
+  /* methods */
+  SIGNAL_EMIT_SIGNAL,
+  SIGNAL_FROM_THREAD,
+  LAST_SIGNAL
+};
+
+static guint test_thread_signals[LAST_SIGNAL] = { 0 };
+
+typedef enum {
+  TEST_THREAD_A,
+  TEST_THREAD_B
+} ThreadEnumType;
+
+static GType
+test_thread_enum_get_type (void)
+{
+  static GType enum_type = 0;
+  static GEnumValue enum_values[] = {
+    {TEST_THREAD_A, "TEST_THREAD_A", "a as in apple"},
+    {0, NULL, NULL},
+  };
+
+  if (!enum_type) {
+    enum_type =
+        g_enum_register_static ("TestThreadEnum", enum_values);
+  }
+  return enum_type;
+}
+
+G_DEFINE_TYPE(TestThread, test_thread, G_TYPE_OBJECT);
+
+static void
+other_thread_cb (TestThread *self)
+{
+  g_signal_emit_by_name (self, "from-thread", 0, NULL);
+  g_thread_exit (0);
+}
+
+static void
+test_thread_emit_signal (TestThread *self)
+{
+  self->thread = g_thread_create ((GThreadFunc)other_thread_cb,
+                                 self, TRUE, NULL);
+}
+
+static void test_thread_init (TestThread *self) {}
+static void test_thread_class_init (TestThreadClass *klass)
+{
+  test_thread_signals[SIGNAL_EMIT_SIGNAL] =
+    g_signal_new ("emit-signal", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
+                 G_STRUCT_OFFSET (TestThreadClass, emit_signal),
+                 NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+  test_thread_signals[SIGNAL_FROM_THREAD] =
+    g_signal_new ("from-thread", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
+                 G_STRUCT_OFFSET (TestThreadClass, from_thread),
+                 NULL, NULL, g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1,
+                 test_thread_enum_get_type ());
+
+  klass->emit_signal = test_thread_emit_signal;
+}
diff --git a/tests/test-thread.h b/tests/test-thread.h
new file mode 100644 (file)
index 0000000..db12fe4
--- /dev/null
@@ -0,0 +1,22 @@
+#include <glib-object.h>
+
+typedef struct {
+  GObject parent;
+  GThread *thread;
+} TestThread;
+
+typedef struct {
+  GObjectClass parent_class;
+  void (*emit_signal) (TestThread *sink);
+  void (*from_thread)  (TestThread *sink);
+} TestThreadClass;
+
+GType        test_thread_get_type   (void);
+
+#define TEST_TYPE_THREAD            (test_thread_get_type())
+#define TEST_THREAD(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_THREAD, TestTHREAD))
+#define TEST_THREAD_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TEST_TYPE_THREAD, TestTHREADClass))
+#define TEST_IS_THREAD(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_THREAD))
+#define TEST_IS_THREAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TEST_TYPE_THREAD))
+#define TEST_THREAD_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), TEST_TYPE_THREAD, TestTHREADClass))
+
diff --git a/tests/test-unknown.c b/tests/test-unknown.c
new file mode 100644 (file)
index 0000000..85aba73
--- /dev/null
@@ -0,0 +1,113 @@
+#include "test-unknown.h"
+
+enum {
+  PROP_SOME_PROPERTY = 1,
+};
+
+
+static void
+test_interface_base_init (gpointer g_iface)
+{
+  static gboolean initialized = FALSE;
+  
+  if (!initialized)
+    {
+      g_object_interface_install_property (g_iface,
+                                          g_param_spec_string ("some-property",
+                                                               "some-property",
+                                                               "A simple test property",
+                                                               NULL,
+                                                               G_PARAM_READWRITE));
+      initialized = TRUE;
+    }
+}
+
+
+GType
+test_interface_get_type (void)
+{
+  static GType gtype = 0;
+
+  if (!gtype)
+    {
+      static const GTypeInfo info =
+      {
+        sizeof (TestInterfaceIface), /* class_size */
+       test_interface_base_init,   /* base_init */
+        NULL,           /* base_finalize */
+        NULL,
+        NULL,           /* class_finalize */
+        NULL,           /* class_data */
+        0,
+        0,              /* n_preallocs */
+        NULL
+      };
+
+      gtype =
+        g_type_register_static (G_TYPE_INTERFACE, "TestInterface",
+                                &info, 0);
+
+      g_type_interface_add_prerequisite (gtype, G_TYPE_OBJECT);
+    }
+
+  return gtype;
+}
+
+void test_unknown_iface_method (TestInterface *iface)
+{
+}
+
+static void
+test_unknown_test_interface_init (TestInterfaceIface *iface)
+{
+  iface->iface_method = test_unknown_iface_method;
+}
+
+G_DEFINE_TYPE_WITH_CODE (TestUnknown, test_unknown, G_TYPE_OBJECT,
+                        G_IMPLEMENT_INTERFACE (TEST_TYPE_INTERFACE,
+                                               test_unknown_test_interface_init));
+
+static void test_unknown_init (TestUnknown *self) {}
+
+
+static void
+test_unknown_get_property (GObject              *object,
+                           guint                 prop_id,
+                           GValue               *value,
+                           GParamSpec           *pspec)
+{
+
+}
+
+static void
+test_unknown_set_property (GObject              *object,
+                           guint                 prop_id,
+                           const GValue         *value,
+                           GParamSpec           *pspec)
+{
+
+}
+
+static void test_unknown_class_init (TestUnknownClass *klass)
+{
+  GObjectClass *gobject_class = (GObjectClass*) klass;
+
+  gobject_class->get_property = test_unknown_get_property;
+  gobject_class->set_property = test_unknown_set_property;
+
+
+  g_object_class_install_property (G_OBJECT_CLASS (klass),
+                                   PROP_SOME_PROPERTY,
+                                   g_param_spec_string ("some-property",
+                                                        "some-property",
+                                                        "A simple test property",
+                                                        NULL,
+                                                        G_PARAM_READWRITE));
+}
+
+void test_interface_iface_method (TestInterface *instance)
+{
+  TestInterfaceIface *iface = TEST_INTERFACE_GET_IFACE (instance);
+
+  (* iface->iface_method) (instance);
+}
diff --git a/tests/test-unknown.h b/tests/test-unknown.h
new file mode 100644 (file)
index 0000000..e0f51a2
--- /dev/null
@@ -0,0 +1,40 @@
+#include <glib-object.h>
+
+/* TestUnknown */
+
+typedef struct {
+  GObject parent;
+} TestUnknown;
+
+typedef struct {
+  GObjectClass parent_class;
+} TestUnknownClass;
+
+#define TEST_TYPE_UNKNOWN            (test_unknown_get_type())
+#define TEST_UNKNOWN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_UNKNOWN, TestUnknown))
+#define TEST_UNKNOWN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TEST_TYPE_UNKNOWN, TestUnknownClass))
+#define TEST_IS_UNKNOWN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_UNKNOWN))
+#define TEST_IS_UNKNOWN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TEST_TYPE_UNKNOWN))
+#define TEST_UNKNOWN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), TEST_TYPE_UNKNOWN, TestUnknownClass))
+
+GType test_unknown_get_type (void);
+
+/* TestInterface */
+typedef struct _TestInterface TestInterface;
+typedef struct _TestInterfaceIface TestInterfaceIface;
+
+struct _TestInterfaceIface
+{
+  GTypeInterface g_iface;
+  /* VTable */
+  void (* iface_method) (TestInterface *iface);
+};
+
+#define TEST_TYPE_INTERFACE            (test_interface_get_type ())
+#define TEST_INTERFACE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_TYPE_INTERFACE, TestInterface))
+#define TEST_IS_INTERFACE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_TYPE_INTERFACE))
+#define TEST_INTERFACE_GET_IFACE(obj)  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TEST_TYPE_INTERFACE, TestInterfaceIface))
+
+GType test_interface_get_type (void);
+
+void test_interface_iface_method (TestInterface *iface);
diff --git a/tests/test_everything.py b/tests/test_everything.py
new file mode 100644 (file)
index 0000000..5fadc36
--- /dev/null
@@ -0,0 +1,467 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# coding=utf-8
+# vim: tabstop=4 shiftwidth=4 expandtab
+
+import unittest
+
+import sys
+sys.path.insert(0, "../")
+from sys import getrefcount
+
+import cairo
+
+from gi.repository import GObject
+from gi.repository import Regress as Everything
+
+if sys.version_info < (3, 0):
+    UNICHAR = "\xe2\x99\xa5"
+    PY2_UNICODE_UNICHAR = unicode(UNICHAR, 'UTF-8')
+else:
+    UNICHAR = "♥"
+
+
+class TestEverything(unittest.TestCase):
+
+    def test_cairo_context(self):
+        context = Everything.test_cairo_context_full_return()
+        self.assertTrue(isinstance(context, cairo.Context))
+
+        surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 10, 10)
+        context = cairo.Context(surface)
+        Everything.test_cairo_context_none_in(context)
+
+    def test_cairo_surface(self):
+        surface = Everything.test_cairo_surface_none_return()
+        self.assertTrue(isinstance(surface, cairo.ImageSurface))
+        self.assertTrue(isinstance(surface, cairo.Surface))
+        self.assertEquals(surface.get_format(), cairo.FORMAT_ARGB32)
+        self.assertEquals(surface.get_width(), 10)
+        self.assertEquals(surface.get_height(), 10)
+
+        surface = Everything.test_cairo_surface_full_return()
+        self.assertTrue(isinstance(surface, cairo.ImageSurface))
+        self.assertTrue(isinstance(surface, cairo.Surface))
+        self.assertEquals(surface.get_format(), cairo.FORMAT_ARGB32)
+        self.assertEquals(surface.get_width(), 10)
+        self.assertEquals(surface.get_height(), 10)
+
+        surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 10, 10)
+        Everything.test_cairo_surface_none_in(surface)
+
+        surface = Everything.test_cairo_surface_full_out()
+        self.assertTrue(isinstance(surface, cairo.ImageSurface))
+        self.assertTrue(isinstance(surface, cairo.Surface))
+        self.assertEquals(surface.get_format(), cairo.FORMAT_ARGB32)
+        self.assertEquals(surface.get_width(), 10)
+        self.assertEquals(surface.get_height(), 10)
+
+    def test_unichar(self):
+        self.assertEquals("c", Everything.test_unichar("c"))
+
+        if sys.version_info < (3, 0):
+            self.assertEquals(UNICHAR, Everything.test_unichar(PY2_UNICODE_UNICHAR))
+        self.assertEquals(UNICHAR, Everything.test_unichar(UNICHAR))
+        self.assertRaises(TypeError, Everything.test_unichar, "")
+        self.assertRaises(TypeError, Everything.test_unichar, "morethanonechar")
+        
+
+    def test_floating(self):
+        e = Everything.TestFloating()
+        self.assertEquals(e.__grefcount__, 1)
+
+        e = GObject.new(Everything.TestFloating)
+        self.assertEquals(e.__grefcount__, 1)
+
+        e = Everything.TestFloating.new()
+        self.assertEquals(e.__grefcount__, 1)
+
+    def test_caller_allocates(self):
+        struct_a = Everything.TestStructA()
+        struct_a.some_int = 10
+        struct_a.some_int8 = 21
+        struct_a.some_double = 3.14
+        struct_a.some_enum = Everything.TestEnum.VALUE3
+
+        struct_a_clone = struct_a.clone()
+        self.assertTrue(struct_a != struct_a_clone)
+        self.assertEquals(struct_a.some_int, struct_a_clone.some_int)
+        self.assertEquals(struct_a.some_int8, struct_a_clone.some_int8)
+        self.assertEquals(struct_a.some_double, struct_a_clone.some_double)
+        self.assertEquals(struct_a.some_enum, struct_a_clone.some_enum)
+
+        struct_b = Everything.TestStructB()
+        struct_b.some_int8 = 8
+        struct_b.nested_a.some_int = 20
+        struct_b.nested_a.some_int8 = 12
+        struct_b.nested_a.some_double = 333.3333
+        struct_b.nested_a.some_enum = Everything.TestEnum.VALUE2
+
+        struct_b_clone = struct_b.clone()
+        self.assertTrue(struct_b != struct_b_clone)
+        self.assertEquals(struct_b.some_int8, struct_b_clone.some_int8)
+        self.assertEquals(struct_b.nested_a.some_int, struct_b_clone.nested_a.some_int)
+        self.assertEquals(struct_b.nested_a.some_int8, struct_b_clone.nested_a.some_int8)
+        self.assertEquals(struct_b.nested_a.some_double, struct_b_clone.nested_a.some_double)
+        self.assertEquals(struct_b.nested_a.some_enum, struct_b_clone.nested_a.some_enum)
+
+    def test_wrong_type_of_arguments(self):
+        try:
+            Everything.test_int8()
+        except TypeError:
+            (e_type, e) = sys.exc_info()[:2]
+            self.assertEquals(e.args, ("test_int8() takes exactly 1 argument(s) (0 given)",))
+
+    def test_gtypes(self):
+        gchararray_gtype = GObject.type_from_name('gchararray')
+        gtype = Everything.test_gtype(str)
+        self.assertEquals(gchararray_gtype, gtype)
+        gtype = Everything.test_gtype('gchararray')
+        self.assertEquals(gchararray_gtype, gtype)
+        gobject_gtype = GObject.GObject.__gtype__
+        gtype = Everything.test_gtype(GObject.GObject)
+        self.assertEquals(gobject_gtype, gtype)
+        gtype = Everything.test_gtype('GObject')
+        self.assertEquals(gobject_gtype, gtype)
+        self.assertRaises(TypeError, Everything.test_gtype, 'invalidgtype')
+
+        class NotARegisteredClass(object):
+            pass
+
+        self.assertRaises(TypeError, Everything.test_gtype, NotARegisteredClass)
+
+        class ARegisteredClass(GObject.GObject):
+            __gtype_name__ = 'EverythingTestsARegisteredClass'
+
+        gtype = Everything.test_gtype('EverythingTestsARegisteredClass')
+        self.assertEquals(ARegisteredClass.__gtype__, gtype)
+        gtype = Everything.test_gtype(ARegisteredClass)
+        self.assertEquals(ARegisteredClass.__gtype__, gtype)
+        self.assertRaises(TypeError, Everything.test_gtype, 'ARegisteredClass')
+        
+    def test_dir(self):
+        attr_list = dir(Everything)
+        
+        # test that typelib attributes are listed
+        self.assertTrue('TestStructA' in attr_list)
+        
+        # test that class attributes and methods are listed
+        self.assertTrue('__class__' in attr_list)
+        self.assertTrue('__dir__' in attr_list)
+        self.assertTrue('__repr__' in attr_list)
+        
+        # test that instance members are listed
+        self.assertTrue('_namespace' in attr_list)
+        self.assertTrue('_version' in attr_list)
+        
+        # test that there are no duplicates returned
+        self.assertEqual(len(attr_list), len(set(attr_list)))
+
+class TestNullableArgs(unittest.TestCase):
+    def test_in_nullable_hash(self):
+        Everything.test_ghash_null_in(None)
+
+    def test_in_nullable_list(self):
+        Everything.test_gslist_null_in(None)
+        Everything.test_glist_null_in(None)
+        Everything.test_gslist_null_in([])
+        Everything.test_glist_null_in([])
+
+    def test_in_nullable_array(self):
+        Everything.test_array_int_null_in(None)
+        Everything.test_array_int_null_in([])
+
+    def test_in_nullable_string(self):
+        Everything.test_utf8_null_in(None)
+
+    def test_in_nullable_object(self):
+        Everything.func_obj_null_in(None)
+
+    def test_out_nullable_hash(self):
+        self.assertEqual(None, Everything.test_ghash_null_out())
+
+    def test_out_nullable_list(self):
+        self.assertEqual([], Everything.test_gslist_null_out())
+        self.assertEqual([], Everything.test_glist_null_out())
+
+    def test_out_nullable_array(self):
+        self.assertEqual([], Everything.test_array_int_null_out())
+
+    def test_out_nullable_string(self):
+        self.assertEqual(None, Everything.test_utf8_null_out())
+
+    def test_out_nullable_object(self):
+        self.assertEqual(None, Everything.TestObj.null_out())
+
+
+class TestCallbacks(unittest.TestCase):
+    called = False
+    main_loop = GObject.MainLoop()
+
+    def testCallback(self):
+        TestCallbacks.called = False
+        def callback():
+            TestCallbacks.called = True
+        
+        Everything.test_simple_callback(callback)
+        self.assertTrue(TestCallbacks.called)
+
+    def testCallbackException(self):
+        """
+        This test ensures that we get errors from callbacks correctly
+        and in particular that we do not segv when callbacks fail
+        """
+        def callback():
+            x = 1 / 0
+            
+        try:
+            Everything.test_simple_callback(callback)
+        except ZeroDivisionError:
+            pass
+
+    def testDoubleCallbackException(self):
+        """
+        This test ensures that we get errors from callbacks correctly
+        and in particular that we do not segv when callbacks fail
+        """
+        def badcallback():
+            x = 1 / 0
+
+        def callback():
+            Everything.test_boolean(True)
+            Everything.test_boolean(False)
+            Everything.test_simple_callback(badcallback())
+
+        try:
+            Everything.test_simple_callback(callback)
+        except ZeroDivisionError:
+            pass
+
+    def testReturnValueCallback(self):
+        TestCallbacks.called = False
+        def callback():
+            TestCallbacks.called = True
+            return 44
+
+        self.assertEquals(Everything.test_callback(callback), 44)
+        self.assertTrue(TestCallbacks.called)
+    
+    def testCallbackAsync(self):
+        TestCallbacks.called = False
+        def callback(foo):
+            TestCallbacks.called = True
+            return foo
+
+        Everything.test_callback_async(callback, 44);
+        i = Everything.test_callback_thaw_async();
+        self.assertEquals(44, i);
+        self.assertTrue(TestCallbacks.called)
+
+    def testCallbackScopeCall(self):
+        TestCallbacks.called = 0
+        def callback():
+            TestCallbacks.called += 1
+            return 0
+
+        Everything.test_multi_callback(callback)
+        self.assertEquals(TestCallbacks.called, 2)
+
+    def testCallbackUserdata(self):
+        TestCallbacks.called = 0
+        def callback(userdata):
+            self.assertEquals(userdata, "Test%d" % TestCallbacks.called)
+            TestCallbacks.called += 1
+            return TestCallbacks.called
+        
+        for i in range(100):
+            val = Everything.test_callback_user_data(callback, "Test%d" % i)
+            self.assertEquals(val, i+1)
+            
+        self.assertEquals(TestCallbacks.called, 100)
+
+    def testCallbackUserdataRefCount(self):
+        TestCallbacks.called = False
+        def callback(userdata):
+            TestCallbacks.called = True
+            return 1
+
+        ud = "Test User Data"
+
+        start_ref_count = getrefcount(ud)
+        for i in range(100):
+            Everything.test_callback_destroy_notify(callback, ud)
+            
+        Everything.test_callback_thaw_notifications()
+        end_ref_count = getrefcount(ud)
+
+        self.assertEquals(start_ref_count, end_ref_count)
+
+    def testAsyncReadyCallback(self):
+        TestCallbacks.called = False
+        TestCallbacks.main_loop = GObject.MainLoop()
+
+        def callback(obj, result, user_data):
+            TestCallbacks.main_loop.quit()
+            TestCallbacks.called = True
+
+        Everything.test_async_ready_callback(callback)
+
+        TestCallbacks.main_loop.run()
+
+        self.assertTrue(TestCallbacks.called)
+
+    def testCallbackDestroyNotify(self):
+        def callback(user_data):
+            TestCallbacks.called = True
+            return 42
+
+        TestCallbacks.called = False
+        self.assertEquals(Everything.test_callback_destroy_notify(callback, 42), 42)
+        self.assertTrue(TestCallbacks.called)
+        self.assertEquals(Everything.test_callback_thaw_notifications(), 42)
+
+    def testCallbackInMethods(self):
+        object_ = Everything.TestObj()
+
+        def callback():
+            TestCallbacks.called = True
+            return 42
+
+        TestCallbacks.called = False
+        object_.instance_method_callback(callback)
+        self.assertTrue(TestCallbacks.called)
+
+        TestCallbacks.called = False
+        Everything.TestObj.static_method_callback(callback)
+        self.assertTrue(TestCallbacks.called)
+
+        def callbackWithUserData(user_data):
+            TestCallbacks.called = True
+            return 42
+
+        TestCallbacks.called = False
+        obj_ = Everything.TestObj.new_callback(callbackWithUserData, None)
+        self.assertTrue(TestCallbacks.called)
+
+    def testCallbackNone(self):
+        # make sure this doesn't assert or crash
+        Everything.test_simple_callback(None)
+
+
+class TestProperties(unittest.TestCase):
+
+    def test_basic(self):
+        object_ = Everything.TestObj()
+
+        self.assertEquals(object_.props.int, 0)
+        object_.props.int = 42
+        self.assertTrue(isinstance(object_.props.int, int))
+        self.assertEquals(object_.props.int, 42)
+
+        self.assertEquals(object_.props.float, 0.0)
+        object_.props.float = 42.42
+        self.assertTrue(isinstance(object_.props.float, float))
+        self.assertAlmostEquals(object_.props.float, 42.42, places=5)
+
+        self.assertEquals(object_.props.double, 0.0)
+        object_.props.double = 42.42
+        self.assertTrue(isinstance(object_.props.double, float))
+        self.assertAlmostEquals(object_.props.double, 42.42, places=5)
+
+        self.assertEquals(object_.props.string, None)
+        object_.props.string = 'mec'
+        self.assertTrue(isinstance(object_.props.string, str))
+        self.assertEquals(object_.props.string, 'mec')
+
+    def test_hash_table(self):
+        object_ = Everything.TestObj()
+        self.assertEquals(object_.props.hash_table, None)
+
+        object_.props.hash_table = {'mec': 56}
+        self.assertTrue(isinstance(object_.props.hash_table, dict))
+        self.assertEquals(list(object_.props.hash_table.items())[0], ('mec', 56))
+
+    def test_list(self):
+        object_ = Everything.TestObj()
+        self.assertEquals(object_.props.list, [])
+
+        object_.props.list = ['1', '2', '3']
+        self.assertTrue(isinstance(object_.props.list, list))
+        self.assertEquals(object_.props.list, ['1', '2', '3'])
+
+    def test_boxed(self):
+        object_ = Everything.TestObj()
+        self.assertEquals(object_.props.boxed, None)
+
+        boxed = Everything.TestBoxed()
+        boxed.some_int8 = 42
+        object_.props.boxed = boxed
+
+        self.assertTrue(isinstance(object_.props.boxed, Everything.TestBoxed))
+        self.assertEquals(object_.props.boxed.some_int8, 42)
+
+class TestTortureProfile(unittest.TestCase):
+    def test_torture_profile(self):
+        import time
+        total_time = 0
+        print("")
+        object_ = Everything.TestObj()
+        sys.stdout.write("\ttorture test 1 (10000 iterations): ")
+
+        start_time = time.clock()
+        for i in range(10000):
+            (y,z,q) = object_.torture_signature_0(5000,
+                                                  "Torture Test 1",
+                                                  12345)
+
+        end_time = time.clock()
+        delta_time = end_time - start_time
+        total_time += delta_time
+        print("%f secs" % delta_time)
+
+        sys.stdout.write("\ttorture test 2 (10000 iterations): ")
+
+        start_time = time.clock()
+        for i in range(10000):
+            (y,z,q) = Everything.TestObj().torture_signature_0(5000,
+                                                               "Torture Test 2",
+                                                               12345)
+
+        end_time = time.clock()
+        delta_time = end_time - start_time
+        total_time += delta_time
+        print("%f secs" % delta_time)
+
+
+        sys.stdout.write("\ttorture test 3 (10000 iterations): ")
+        start_time = time.clock()
+        for i in range(10000):
+            try:
+                (y,z,q) = object_.torture_signature_1(5000,
+                                                      "Torture Test 3",
+                                                      12345)
+            except:
+                pass
+        end_time = time.clock()
+        delta_time = end_time - start_time
+        total_time += delta_time
+        print("%f secs" % delta_time)
+
+        sys.stdout.write("\ttorture test 4 (10000 iterations): ")
+        def callback(userdata):
+            pass
+
+        userdata = [1,2,3,4]
+        start_time = time.clock()
+        for i in range(10000):
+            (y,z,q) = Everything.test_torture_signature_2(5000,
+                                                          callback,
+                                                          userdata,
+                                                          "Torture Test 4",
+                                                          12345)
+        end_time = time.clock()
+        delta_time = end_time - start_time
+        total_time += delta_time
+        print("%f secs" % delta_time)
+        print("\t====")
+        print("\tTotal: %f sec" % total_time)
+
diff --git a/tests/test_gcancellable.py b/tests/test_gcancellable.py
new file mode 100644 (file)
index 0000000..f911572
--- /dev/null
@@ -0,0 +1,15 @@
+# -*- Mode: Python -*-
+
+import unittest
+
+import glib
+import gio
+
+
+class TestResolver(unittest.TestCase):
+    def setUp(self):
+        self.cancellable = gio.Cancellable()
+    
+    def test_make_poll_fd(self):
+        poll = self.cancellable.make_pollfd()
+        self.failUnless(isinstance(poll, glib.PollFD))
diff --git a/tests/test_gdbus.py b/tests/test_gdbus.py
new file mode 100644 (file)
index 0000000..a9442fe
--- /dev/null
@@ -0,0 +1,218 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+
+import unittest
+
+import sys
+sys.path.insert(0, "../")
+
+import gobject
+from gi.repository import GLib
+from gi.repository import Gio
+
+class TestGDBusClient(unittest.TestCase):
+    def setUp(self):
+        self.bus = Gio.bus_get_sync(Gio.BusType.SESSION, None)
+
+        self.dbus_proxy = Gio.DBusProxy.new_sync(self.bus,
+                Gio.DBusProxyFlags.NONE, None, 
+                'org.freedesktop.DBus',
+                '/org/freedesktop/DBus',
+                'org.freedesktop.DBus', None)
+
+    def test_native_calls_sync(self):
+        result = self.dbus_proxy.call_sync('ListNames', None, 
+                Gio.DBusCallFlags.NO_AUTO_START, 500, None)
+        self.assertTrue(isinstance(result, GLib.Variant))
+        result = result.unpack()[0] # result is always a tuple
+        self.assertTrue(len(result) > 1)
+        self.assertTrue('org.freedesktop.DBus' in result)
+
+        result = self.dbus_proxy.call_sync('GetNameOwner', 
+                GLib.Variant('(s)', ('org.freedesktop.DBus',)),
+                Gio.DBusCallFlags.NO_AUTO_START, 500, None)
+        self.assertTrue(isinstance(result, GLib.Variant))
+        self.assertEqual(type(result.unpack()[0]), type(''))
+
+    def test_native_calls_sync_errors(self):
+        # error case: invalid argument types
+        try:
+            self.dbus_proxy.call_sync('GetConnectionUnixProcessID', None,
+                    Gio.DBusCallFlags.NO_AUTO_START, 500, None)
+            self.fail('call with invalid arguments should raise an exception')
+        except Exception:
+            etype, e = sys.exc_info()[:2]
+            self.assertTrue('InvalidArgs' in str(e))
+
+        # error case: invalid argument
+        try:
+            self.dbus_proxy.call_sync('GetConnectionUnixProcessID', 
+                    GLib.Variant('(s)', (' unknown',)),
+                    Gio.DBusCallFlags.NO_AUTO_START, 500, None)
+            self.fail('call with invalid arguments should raise an exception')
+        except Exception:
+            etype, e = sys.exc_info()[:2]
+
+            self.assertTrue('NameHasNoOwner' in str(e))
+
+        # error case: unknown method
+        try:
+            self.dbus_proxy.call_sync('UnknownMethod', None,
+                    Gio.DBusCallFlags.NO_AUTO_START, 500, None)
+            self.fail('call for unknown method should raise an exception')
+        except Exception:
+            etype, e = sys.exc_info()[:2]
+
+            self.assertTrue('UnknownMethod' in str(e))
+
+    def test_native_calls_async(self):
+        def call_done(obj, result, user_data):
+            user_data['result'] = obj.call_finish(result)
+            user_data['main_loop'].quit()
+
+        main_loop = gobject.MainLoop()
+        data = {'main_loop': main_loop}
+        self.dbus_proxy.call('ListNames', None, 
+                Gio.DBusCallFlags.NO_AUTO_START, 500, None,
+                call_done, data)
+        main_loop.run()
+
+        self.assertTrue(isinstance(data['result'], GLib.Variant))
+        result = data['result'].unpack()[0] # result is always a tuple
+        self.assertTrue(len(result) > 1)
+        self.assertTrue('org.freedesktop.DBus' in result)
+
+    def test_native_calls_async_errors(self):
+        def call_done(obj, result, user_data):
+            try:
+                obj.call_finish(result)
+                self.fail('call_finish() for unknown method should raise an exception')
+            except Exception:
+                etype, e = sys.exc_info()[:2]
+
+                self.assertTrue('UnknownMethod' in str(e))
+            finally:
+                user_data['main_loop'].quit()
+
+        main_loop = gobject.MainLoop()
+        data = {'main_loop': main_loop}
+        self.dbus_proxy.call('UnknownMethod', None,
+                Gio.DBusCallFlags.NO_AUTO_START, 500, None, call_done, data)
+        main_loop.run()
+
+    def test_python_calls_sync(self):
+        # single value return tuples get unboxed to the one element
+        result = self.dbus_proxy.ListNames('()')
+        self.assertTrue(isinstance(result, list))
+        self.assertTrue(len(result) > 1)
+        self.assertTrue('org.freedesktop.DBus' in result)
+
+        result = self.dbus_proxy.GetNameOwner('(s)', 'org.freedesktop.DBus')
+        self.assertEqual(type(result), type(''))
+
+        # empty return tuples get unboxed to None
+        self.assertEqual(self.dbus_proxy.ReloadConfig('()'), None)
+
+        # multiple return values remain a tuple; unfortunately D-BUS itself
+        # does not have any method returning multiple results, so try talking
+        # to notification-daemon (and don't fail the test if it does not exist)
+        try:
+            notification_daemon = Gio.DBusProxy.new_sync(self.bus,
+                    Gio.DBusProxyFlags.NONE, None,
+                    'org.freedesktop.Notifications',
+                    '/org/freedesktop/Notifications',
+                    'org.freedesktop.Notifications', None)
+            result = notification_daemon.GetServerInformation('()')
+            self.assertTrue(isinstance(result, tuple))
+            self.assertEqual(len(result), 4)
+            for i in result:
+                self.assertEqual(type(i), type(''))
+        except Exception:
+            etype, e = sys.exc_info()[:2]
+
+            if 'Error.ServiceUnknown' not in str(e):
+                raise
+
+        # test keyword argument; timeout=0 will fail immediately
+        try:
+            self.dbus_proxy.GetConnectionUnixProcessID('()', timeout=0)
+            self.fail('call with timeout=0 should raise an exception')
+        except Exception:
+            etype, e = sys.exc_info()[:2]
+
+            self.assertTrue('Timeout' in str(e), str(e))
+
+    def test_python_calls_sync_noargs(self):
+        # methods without arguments don't need an explicit signature
+        result = self.dbus_proxy.ListNames()
+        self.assertTrue(isinstance(result, list))
+        self.assertTrue(len(result) > 1)
+        self.assertTrue('org.freedesktop.DBus' in result)
+
+    def test_python_calls_sync_errors(self):
+        # error case: invalid argument types
+        try:
+            self.dbus_proxy.GetConnectionUnixProcessID('()')
+            self.fail('call with invalid arguments should raise an exception')
+        except Exception:
+            etype, e = sys.exc_info()[:2]
+
+            self.assertTrue('InvalidArgs' in str(e), str(e))
+
+        try:
+            self.dbus_proxy.GetConnectionUnixProcessID(None, 'foo')
+            self.fail('call with None signature should raise an exception')
+        except TypeError as e:
+            self.assertTrue('signature' in str(e), str(e))
+
+    def test_python_calls_async(self):
+        def call_done(obj, result, user_data):
+            user_data['result'] = result
+            user_data['main_loop'].quit()
+
+        main_loop = gobject.MainLoop()
+        data = {'main_loop': main_loop}
+        self.dbus_proxy.ListNames('()', result_handler=call_done,
+                user_data=data)
+        main_loop.run()
+
+        result = data['result']
+        self.assertEqual(type(result), type([]))
+        self.assertTrue(len(result) > 1)
+        self.assertTrue('org.freedesktop.DBus' in result)
+
+    def test_python_calls_async_error_result(self):
+        # when only specifying a result handler, this will get the error
+        def call_done(obj, result, user_data):
+            user_data['result'] = result
+            user_data['main_loop'].quit()
+
+        main_loop = gobject.MainLoop()
+        data = {'main_loop': main_loop}
+        self.dbus_proxy.ListNames('(s)', 'invalid_argument',
+                result_handler=call_done, user_data=data)
+        main_loop.run()
+
+        self.assertTrue(isinstance(data['result'], Exception))
+        self.assertTrue('InvalidArgs' in str(data['result']), str(data['result']))
+
+    def test_python_calls_async_error(self):
+        # when specifying an explicit error handler, this will get the error
+        def call_done(obj, result, user_data):
+            user_data['main_loop'].quit()
+            self.fail('result handler should not be called')
+
+        def call_error(obj, error, user_data):
+            user_data['error'] = error
+            user_data['main_loop'].quit()
+
+        main_loop = gobject.MainLoop()
+        data = {'main_loop': main_loop}
+        self.dbus_proxy.ListNames('(s)', 'invalid_argument',
+                result_handler=call_done, error_handler=call_error,
+                user_data=data)
+        main_loop.run()
+
+        self.assertTrue(isinstance(data['error'], Exception))
+        self.assertTrue('InvalidArgs' in str(data['error']), str(data['error']))
+
diff --git a/tests/test_gi.py b/tests/test_gi.py
new file mode 100644 (file)
index 0000000..6990225
--- /dev/null
@@ -0,0 +1,1752 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# coding=utf-8
+# vim: tabstop=4 shiftwidth=4 expandtab
+
+import sys
+
+import unittest
+import tempfile
+import shutil
+import os
+import locale
+import subprocess
+from gi.repository import GObject
+
+import gobject
+from gi.repository import GIMarshallingTests
+
+from compathelper import _bytes
+
+if sys.version_info < (3, 0):
+    CONSTANT_UTF8 = "const \xe2\x99\xa5 utf8"
+    PY2_UNICODE_UTF8 = unicode(CONSTANT_UTF8, 'UTF-8')
+    CHAR_255='\xff'
+else:
+    CONSTANT_UTF8 = "const â™¥ utf8"
+    CHAR_255=bytes([255])
+
+CONSTANT_NUMBER = 42
+
+
+class Number(object):
+
+    def __init__(self, value):
+        self.value = value
+
+    def __int__(self):
+        return int(self.value)
+
+    def __float__(self):
+        return float(self.value)
+
+
+class Sequence(object):
+
+    def __init__(self, sequence):
+        self.sequence = sequence
+
+    def __len__(self):
+        return len(self.sequence)
+
+    def __getitem__(self, key):
+        return self.sequence[key]
+
+
+class TestConstant(unittest.TestCase):
+
+# Blocked by https://bugzilla.gnome.org/show_bug.cgi?id=595773
+#    def test_constant_utf8(self):
+#        self.assertEquals(CONSTANT_UTF8, GIMarshallingTests.CONSTANT_UTF8)
+
+    def test_constant_number(self):
+        self.assertEquals(CONSTANT_NUMBER, GIMarshallingTests.CONSTANT_NUMBER)
+
+
+class TestBoolean(unittest.TestCase):
+
+    def test_boolean_return(self):
+        self.assertEquals(True, GIMarshallingTests.boolean_return_true())
+        self.assertEquals(False, GIMarshallingTests.boolean_return_false())
+
+    def test_boolean_in(self):
+        GIMarshallingTests.boolean_in_true(True)
+        GIMarshallingTests.boolean_in_false(False)
+
+        GIMarshallingTests.boolean_in_true(1)
+        GIMarshallingTests.boolean_in_false(0)
+
+    def test_boolean_out(self):
+        self.assertEquals(True, GIMarshallingTests.boolean_out_true())
+        self.assertEquals(False, GIMarshallingTests.boolean_out_false())
+
+    def test_boolean_inout(self):
+        self.assertEquals(False, GIMarshallingTests.boolean_inout_true_false(True))
+        self.assertEquals(True, GIMarshallingTests.boolean_inout_false_true(False))
+
+
+class TestInt8(unittest.TestCase):
+
+    MAX = GObject.G_MAXINT8
+    MIN = GObject.G_MININT8
+
+    def test_int8_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.int8_return_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.int8_return_min())
+
+    def test_int8_in(self):
+        max = Number(self.MAX)
+        min = Number(self.MIN)
+
+        GIMarshallingTests.int8_in_max(max)
+        GIMarshallingTests.int8_in_min(min)
+
+        max.value += 1
+        min.value -= 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.int8_in_max, max)
+        self.assertRaises(ValueError, GIMarshallingTests.int8_in_min, min)
+
+        self.assertRaises(TypeError, GIMarshallingTests.int8_in_max, "self.MAX")
+
+    def test_int8_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.int8_out_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.int8_out_min())
+
+    def test_int8_inout(self):
+        self.assertEquals(self.MIN, GIMarshallingTests.int8_inout_max_min(Number(self.MAX)))
+        self.assertEquals(self.MAX, GIMarshallingTests.int8_inout_min_max(Number(self.MIN)))
+
+
+class TestUInt8(unittest.TestCase):
+
+    MAX = GObject.G_MAXUINT8
+
+    def test_uint8_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.uint8_return())
+
+    def test_uint8_in(self):
+        number = Number(self.MAX)
+
+        GIMarshallingTests.uint8_in(number)
+        GIMarshallingTests.uint8_in(CHAR_255)
+
+        number.value += 1
+        self.assertRaises(ValueError, GIMarshallingTests.uint8_in, number)
+        self.assertRaises(ValueError, GIMarshallingTests.uint8_in, Number(-1))
+
+        self.assertRaises(TypeError, GIMarshallingTests.uint8_in, "self.MAX")
+
+    def test_uint8_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.uint8_out())
+
+    def test_uint8_inout(self):
+        self.assertEquals(0, GIMarshallingTests.uint8_inout(Number(self.MAX)))
+
+
+class TestInt16(unittest.TestCase):
+
+    MAX = GObject.G_MAXINT16
+    MIN = GObject.G_MININT16
+
+    def test_int16_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.int16_return_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.int16_return_min())
+
+    def test_int16_in(self):
+        max = Number(self.MAX)
+        min = Number(self.MIN)
+
+        GIMarshallingTests.int16_in_max(max)
+        GIMarshallingTests.int16_in_min(min)
+
+        max.value += 1
+        min.value -= 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.int16_in_max, max)
+        self.assertRaises(ValueError, GIMarshallingTests.int16_in_min, min)
+
+        self.assertRaises(TypeError, GIMarshallingTests.int16_in_max, "self.MAX")
+
+    def test_int16_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.int16_out_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.int16_out_min())
+
+    def test_int16_inout(self):
+        self.assertEquals(self.MIN, GIMarshallingTests.int16_inout_max_min(Number(self.MAX)))
+        self.assertEquals(self.MAX, GIMarshallingTests.int16_inout_min_max(Number(self.MIN)))
+
+
+class TestUInt16(unittest.TestCase):
+
+    MAX = GObject.G_MAXUINT16
+
+    def test_uint16_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.uint16_return())
+
+    def test_uint16_in(self):
+        number = Number(self.MAX)
+
+        GIMarshallingTests.uint16_in(number)
+
+        number.value += 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.uint16_in, number)
+        self.assertRaises(ValueError, GIMarshallingTests.uint16_in, Number(-1))
+
+        self.assertRaises(TypeError, GIMarshallingTests.uint16_in, "self.MAX")
+
+    def test_uint16_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.uint16_out())
+
+    def test_uint16_inout(self):
+        self.assertEquals(0, GIMarshallingTests.uint16_inout(Number(self.MAX)))
+
+
+class TestInt32(unittest.TestCase):
+
+    MAX = GObject.G_MAXINT32
+    MIN = GObject.G_MININT32
+
+    def test_int32_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.int32_return_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.int32_return_min())
+
+    def test_int32_in(self):
+        max = Number(self.MAX)
+        min = Number(self.MIN)
+
+        GIMarshallingTests.int32_in_max(max)
+        GIMarshallingTests.int32_in_min(min)
+
+        max.value += 1
+        min.value -= 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.int32_in_max, max)
+        self.assertRaises(ValueError, GIMarshallingTests.int32_in_min, min)
+
+        self.assertRaises(TypeError, GIMarshallingTests.int32_in_max, "self.MAX")
+
+    def test_int32_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.int32_out_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.int32_out_min())
+
+    def test_int32_inout(self):
+        self.assertEquals(self.MIN, GIMarshallingTests.int32_inout_max_min(Number(self.MAX)))
+        self.assertEquals(self.MAX, GIMarshallingTests.int32_inout_min_max(Number(self.MIN)))
+
+
+class TestUInt32(unittest.TestCase):
+
+    MAX = GObject.G_MAXUINT32
+
+    def test_uint32_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.uint32_return())
+
+    def test_uint32_in(self):
+        number = Number(self.MAX)
+
+        GIMarshallingTests.uint32_in(number)
+
+        number.value += 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.uint32_in, number)
+        self.assertRaises(ValueError, GIMarshallingTests.uint32_in, Number(-1))
+
+        self.assertRaises(TypeError, GIMarshallingTests.uint32_in, "self.MAX")
+
+    def test_uint32_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.uint32_out())
+
+    def test_uint32_inout(self):
+        self.assertEquals(0, GIMarshallingTests.uint32_inout(Number(self.MAX)))
+
+
+class TestInt64(unittest.TestCase):
+
+    MAX = 2 ** 63 - 1
+    MIN = - (2 ** 63)
+
+    def test_int64_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.int64_return_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.int64_return_min())
+
+    def test_int64_in(self):
+        max = Number(self.MAX)
+        min = Number(self.MIN)
+
+        GIMarshallingTests.int64_in_max(max)
+        GIMarshallingTests.int64_in_min(min)
+
+        max.value += 1
+        min.value -= 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.int64_in_max, max)
+        self.assertRaises(ValueError, GIMarshallingTests.int64_in_min, min)
+
+        self.assertRaises(TypeError, GIMarshallingTests.int64_in_max, "self.MAX")
+
+    def test_int64_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.int64_out_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.int64_out_min())
+
+    def test_int64_inout(self):
+        self.assertEquals(self.MIN, GIMarshallingTests.int64_inout_max_min(Number(self.MAX)))
+        self.assertEquals(self.MAX, GIMarshallingTests.int64_inout_min_max(Number(self.MIN)))
+
+
+class TestUInt64(unittest.TestCase):
+
+    MAX = 2 ** 64 - 1
+
+    def test_uint64_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.uint64_return())
+
+    def test_uint64_in(self):
+        number = Number(self.MAX)
+
+        GIMarshallingTests.uint64_in(number)
+
+        number.value += 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.uint64_in, number)
+        self.assertRaises(ValueError, GIMarshallingTests.uint64_in, Number(-1))
+
+        self.assertRaises(TypeError, GIMarshallingTests.uint64_in, "self.MAX")
+
+    def test_uint64_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.uint64_out())
+
+    def test_uint64_inout(self):
+        self.assertEquals(0, GIMarshallingTests.uint64_inout(Number(self.MAX)))
+
+
+class TestShort(unittest.TestCase):
+
+    MAX = GObject.constants.G_MAXSHORT
+    MIN = GObject.constants.G_MINSHORT
+
+    def test_short_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.short_return_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.short_return_min())
+
+    def test_short_in(self):
+        max = Number(self.MAX)
+        min = Number(self.MIN)
+
+        GIMarshallingTests.short_in_max(max)
+        GIMarshallingTests.short_in_min(min)
+
+        max.value += 1
+        min.value -= 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.short_in_max, max)
+        self.assertRaises(ValueError, GIMarshallingTests.short_in_min, min)
+
+        self.assertRaises(TypeError, GIMarshallingTests.short_in_max, "self.MAX")
+
+    def test_short_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.short_out_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.short_out_min())
+
+    def test_short_inout(self):
+        self.assertEquals(self.MIN, GIMarshallingTests.short_inout_max_min(Number(self.MAX)))
+        self.assertEquals(self.MAX, GIMarshallingTests.short_inout_min_max(Number(self.MIN)))
+
+
+class TestUShort(unittest.TestCase):
+
+    MAX = GObject.constants.G_MAXUSHORT
+
+    def test_ushort_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.ushort_return())
+
+    def test_ushort_in(self):
+        number = Number(self.MAX)
+
+        GIMarshallingTests.ushort_in(number)
+
+        number.value += 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.ushort_in, number)
+        self.assertRaises(ValueError, GIMarshallingTests.ushort_in, Number(-1))
+
+        self.assertRaises(TypeError, GIMarshallingTests.ushort_in, "self.MAX")
+
+    def test_ushort_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.ushort_out())
+
+    def test_ushort_inout(self):
+        self.assertEquals(0, GIMarshallingTests.ushort_inout(Number(self.MAX)))
+
+
+class TestInt(unittest.TestCase):
+
+    MAX = GObject.constants.G_MAXINT
+    MIN = GObject.constants.G_MININT
+
+    def test_int_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.int_return_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.int_return_min())
+
+    def test_int_in(self):
+        max = Number(self.MAX)
+        min = Number(self.MIN)
+
+        GIMarshallingTests.int_in_max(max)
+        GIMarshallingTests.int_in_min(min)
+
+        max.value += 1
+        min.value -= 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.int_in_max, max)
+        self.assertRaises(ValueError, GIMarshallingTests.int_in_min, min)
+
+        self.assertRaises(TypeError, GIMarshallingTests.int_in_max, "self.MAX")
+
+    def test_int_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.int_out_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.int_out_min())
+
+    def test_int_inout(self):
+        self.assertEquals(self.MIN, GIMarshallingTests.int_inout_max_min(Number(self.MAX)))
+        self.assertEquals(self.MAX, GIMarshallingTests.int_inout_min_max(Number(self.MIN)))
+        self.assertRaises(TypeError, GIMarshallingTests.int_inout_min_max, Number(self.MIN), CONSTANT_NUMBER)
+
+
+class TestUInt(unittest.TestCase):
+
+    MAX = GObject.constants.G_MAXUINT
+
+    def test_uint_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.uint_return())
+
+    def test_uint_in(self):
+        number = Number(self.MAX)
+
+        GIMarshallingTests.uint_in(number)
+
+        number.value += 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.uint_in, number)
+        self.assertRaises(ValueError, GIMarshallingTests.uint_in, Number(-1))
+
+        self.assertRaises(TypeError, GIMarshallingTests.uint_in, "self.MAX")
+
+    def test_uint_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.uint_out())
+
+    def test_uint_inout(self):
+        self.assertEquals(0, GIMarshallingTests.uint_inout(Number(self.MAX)))
+
+
+class TestLong(unittest.TestCase):
+
+    MAX = GObject.constants.G_MAXLONG
+    MIN = GObject.constants.G_MINLONG
+
+    def test_long_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.long_return_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.long_return_min())
+
+    def test_long_in(self):
+        max = Number(self.MAX)
+        min = Number(self.MIN)
+
+        GIMarshallingTests.long_in_max(max)
+        GIMarshallingTests.long_in_min(min)
+
+        max.value += 1
+        min.value -= 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.long_in_max, max)
+        self.assertRaises(ValueError, GIMarshallingTests.long_in_min, min)
+
+        self.assertRaises(TypeError, GIMarshallingTests.long_in_max, "self.MAX")
+
+    def test_long_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.long_out_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.long_out_min())
+
+    def test_long_inout(self):
+        self.assertEquals(self.MIN, GIMarshallingTests.long_inout_max_min(Number(self.MAX)))
+        self.assertEquals(self.MAX, GIMarshallingTests.long_inout_min_max(Number(self.MIN)))
+
+
+class TestULong(unittest.TestCase):
+
+    MAX = GObject.constants.G_MAXULONG
+
+    def test_ulong_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.ulong_return())
+
+    def test_ulong_in(self):
+        number = Number(self.MAX)
+
+        GIMarshallingTests.ulong_in(number)
+
+        number.value += 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.ulong_in, number)
+        self.assertRaises(ValueError, GIMarshallingTests.ulong_in, Number(-1))
+
+        self.assertRaises(TypeError, GIMarshallingTests.ulong_in, "self.MAX")
+
+    def test_ulong_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.ulong_out())
+
+    def test_ulong_inout(self):
+        self.assertEquals(0, GIMarshallingTests.ulong_inout(Number(self.MAX)))
+
+
+class TestSSize(unittest.TestCase):
+
+    MAX = GObject.constants.G_MAXLONG
+    MIN = GObject.constants.G_MINLONG
+
+    def test_ssize_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.ssize_return_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.ssize_return_min())
+
+    def test_ssize_in(self):
+        max = Number(self.MAX)
+        min = Number(self.MIN)
+
+        GIMarshallingTests.ssize_in_max(max)
+        GIMarshallingTests.ssize_in_min(min)
+
+        max.value += 1
+        min.value -= 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.ssize_in_max, max)
+        self.assertRaises(ValueError, GIMarshallingTests.ssize_in_min, min)
+
+        self.assertRaises(TypeError, GIMarshallingTests.ssize_in_max, "self.MAX")
+
+    def test_ssize_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.ssize_out_max())
+        self.assertEquals(self.MIN, GIMarshallingTests.ssize_out_min())
+
+    def test_ssize_inout(self):
+        self.assertEquals(self.MIN, GIMarshallingTests.ssize_inout_max_min(Number(self.MAX)))
+        self.assertEquals(self.MAX, GIMarshallingTests.ssize_inout_min_max(Number(self.MIN)))
+
+
+class TestSize(unittest.TestCase):
+
+    MAX = GObject.constants.G_MAXULONG
+
+    def test_size_return(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.size_return())
+
+    def test_size_in(self):
+        number = Number(self.MAX)
+
+        GIMarshallingTests.size_in(number)
+
+        number.value += 1
+
+        self.assertRaises(ValueError, GIMarshallingTests.size_in, number)
+        self.assertRaises(ValueError, GIMarshallingTests.size_in, Number(-1))
+
+        self.assertRaises(TypeError, GIMarshallingTests.size_in, "self.MAX")
+
+    def test_size_out(self):
+        self.assertEquals(self.MAX, GIMarshallingTests.size_out())
+
+    def test_size_inout(self):
+        self.assertEquals(0, GIMarshallingTests.size_inout(Number(self.MAX)))
+
+
+class TestFloat(unittest.TestCase):
+
+    MAX = GObject.constants.G_MAXFLOAT
+    MIN = GObject.constants.G_MINFLOAT
+
+    def test_float_return(self):
+        self.assertAlmostEquals(self.MAX, GIMarshallingTests.float_return())
+
+    def test_float_in(self):
+        GIMarshallingTests.float_in(Number(self.MAX))
+
+        self.assertRaises(TypeError, GIMarshallingTests.float_in, "self.MAX")
+
+    def test_float_out(self):
+        self.assertAlmostEquals(self.MAX, GIMarshallingTests.float_out())
+
+    def test_float_inout(self):
+        self.assertAlmostEquals(self.MIN, GIMarshallingTests.float_inout(Number(self.MAX)))
+
+
+class TestDouble(unittest.TestCase):
+
+    MAX = GObject.constants.G_MAXDOUBLE
+    MIN = GObject.constants.G_MINDOUBLE
+
+    def test_double_return(self):
+        self.assertAlmostEquals(self.MAX, GIMarshallingTests.double_return())
+
+    def test_double_in(self):
+        GIMarshallingTests.double_in(Number(self.MAX))
+
+        self.assertRaises(TypeError, GIMarshallingTests.double_in, "self.MAX")
+
+    def test_double_out(self):
+        self.assertAlmostEquals(self.MAX, GIMarshallingTests.double_out())
+
+    def test_double_inout(self):
+        self.assertAlmostEquals(self.MIN, GIMarshallingTests.double_inout(Number(self.MAX)))
+
+
+class TestGType(unittest.TestCase):
+
+    def test_gtype_return(self):
+        self.assertEquals(GObject.TYPE_NONE, GIMarshallingTests.gtype_return())
+
+    def test_gtype_in(self):
+        GIMarshallingTests.gtype_in(GObject.TYPE_NONE)
+
+        self.assertRaises(TypeError, GIMarshallingTests.gtype_in, "GObject.TYPE_NONE")
+
+    def test_gtype_out(self):
+        self.assertEquals(GObject.TYPE_NONE, GIMarshallingTests.gtype_out())
+
+    def test_gtype_inout(self):
+        self.assertEquals(GObject.TYPE_INT, GIMarshallingTests.gtype_inout(GObject.TYPE_NONE))
+
+
+class TestUtf8(unittest.TestCase):
+
+    def test_utf8_none_return(self):
+        self.assertEquals(CONSTANT_UTF8, GIMarshallingTests.utf8_none_return())
+
+    def test_utf8_full_return(self):
+        self.assertEquals(CONSTANT_UTF8, GIMarshallingTests.utf8_full_return())
+
+    def test_utf8_none_in(self):
+        GIMarshallingTests.utf8_none_in(CONSTANT_UTF8)
+        if sys.version_info < (3, 0):
+            GIMarshallingTests.utf8_none_in(PY2_UNICODE_UTF8)
+
+        self.assertRaises(TypeError, GIMarshallingTests.utf8_none_in, CONSTANT_NUMBER)
+        self.assertRaises(TypeError, GIMarshallingTests.utf8_none_in, None)
+
+    def test_utf8_none_out(self):
+        self.assertEquals(CONSTANT_UTF8, GIMarshallingTests.utf8_none_out())
+
+    def test_utf8_full_out(self):
+        self.assertEquals(CONSTANT_UTF8, GIMarshallingTests.utf8_full_out())
+
+    def test_utf8_dangling_out(self):
+        GIMarshallingTests.utf8_dangling_out()
+
+    def test_utf8_none_inout(self):
+        self.assertEquals("", GIMarshallingTests.utf8_none_inout(CONSTANT_UTF8))
+
+    def test_utf8_full_inout(self):
+        self.assertEquals("", GIMarshallingTests.utf8_full_inout(CONSTANT_UTF8))
+
+
+class TestArray(unittest.TestCase):
+
+    def test_array_fixed_int_return(self):
+        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.array_fixed_int_return())
+
+    def test_array_fixed_short_return(self):
+        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.array_fixed_short_return())
+
+    def test_array_fixed_int_in(self):
+        GIMarshallingTests.array_fixed_int_in(Sequence([-1, 0, 1, 2]))
+
+        self.assertRaises(TypeError, GIMarshallingTests.array_fixed_int_in, Sequence([-1, '0', 1, 2]))
+
+        self.assertRaises(TypeError, GIMarshallingTests.array_fixed_int_in, 42)
+        self.assertRaises(TypeError, GIMarshallingTests.array_fixed_int_in, None)
+
+    def test_array_fixed_short_in(self):
+        GIMarshallingTests.array_fixed_short_in(Sequence([-1, 0, 1, 2]))
+
+    def test_array_fixed_out(self):
+        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.array_fixed_out())
+
+    def test_array_fixed_inout(self):
+        self.assertEquals([2, 1, 0, -1], GIMarshallingTests.array_fixed_inout([-1, 0, 1, 2]))
+
+
+    def test_array_return(self):
+        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.array_return())
+
+    def test_array_in(self):
+        GIMarshallingTests.array_in(Sequence([-1, 0, 1, 2]))
+
+    def test_array_uint8_in(self):
+        GIMarshallingTests.array_uint8_in(Sequence([97, 98, 99, 100]))
+        GIMarshallingTests.array_uint8_in(_bytes("abcd"))
+
+    def test_array_out(self):
+        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.array_out())
+
+    def test_array_inout(self):
+        self.assertEquals([-2, -1, 0, 1, 2], GIMarshallingTests.array_inout(Sequence([-1, 0, 1, 2])))
+
+    def test_method_array_in(self):
+        object_ = GIMarshallingTests.Object()
+        object_.method_array_in(Sequence([-1, 0, 1, 2]))
+
+    def test_method_array_out(self):
+        object_ = GIMarshallingTests.Object()
+        self.assertEquals([-1, 0, 1, 2], object_.method_array_out())
+
+    def test_method_array_inout(self):
+        object_ = GIMarshallingTests.Object()
+        self.assertEquals([-2, -1, 0, 1, 2], object_.method_array_inout(Sequence([-1, 0, 1, 2])))
+
+    def test_method_array_return(self):
+        object_ = GIMarshallingTests.Object()
+        self.assertEquals([-1, 0, 1, 2], object_.method_array_return())
+
+    def test_array_fixed_out_struct(self):
+        struct1, struct2 = GIMarshallingTests.array_fixed_out_struct()
+
+        self.assertEquals(7, struct1.long_)
+        self.assertEquals(6, struct1.int8)
+        self.assertEquals(6, struct2.long_)
+        self.assertEquals(7, struct2.int8)
+
+    def test_array_zero_terminated_return(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.array_zero_terminated_return())
+
+    def test_array_zero_terminated_in(self):
+        GIMarshallingTests.array_zero_terminated_in(Sequence(['0', '1', '2']))
+
+    def test_array_zero_terminated_out(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.array_zero_terminated_out())
+
+    def test_array_zero_terminated_out(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.array_zero_terminated_out())
+
+    def test_array_zero_terminated_inout(self):
+        self.assertEquals(['-1', '0', '1', '2'], GIMarshallingTests.array_zero_terminated_inout(['0', '1', '2']))
+
+    def test_gstrv_return(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gstrv_return())
+
+    def test_gstrv_in(self):
+        GIMarshallingTests.gstrv_in(Sequence(['0', '1', '2']))
+
+    def test_gstrv_out(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gstrv_out())
+
+    def test_gstrv_out(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gstrv_out())
+
+    def test_gstrv_inout(self):
+        self.assertEquals(['-1', '0', '1', '2'], GIMarshallingTests.gstrv_inout(['0', '1', '2']))
+
+
+class TestGArray(unittest.TestCase):
+
+    def test_garray_int_none_return(self):
+        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.garray_int_none_return())
+
+    def test_garray_utf8_none_return(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.garray_utf8_none_return())
+
+    def test_garray_utf8_container_return(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.garray_utf8_container_return())
+
+    def test_garray_utf8_full_return(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.garray_utf8_full_return())
+
+    def test_garray_int_none_in(self):
+        GIMarshallingTests.garray_int_none_in(Sequence([-1, 0, 1, 2]))
+
+        self.assertRaises(TypeError, GIMarshallingTests.garray_int_none_in, Sequence([-1, '0', 1, 2]))
+
+        self.assertRaises(TypeError, GIMarshallingTests.garray_int_none_in, 42)
+        self.assertRaises(TypeError, GIMarshallingTests.garray_int_none_in, None)
+
+    def test_garray_utf8_none_in(self):
+        GIMarshallingTests.garray_utf8_none_in(Sequence(['0', '1', '2']))
+
+    def test_garray_utf8_none_out(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.garray_utf8_none_out())
+
+    def test_garray_utf8_container_out(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.garray_utf8_container_out())
+
+    def test_garray_utf8_full_out(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.garray_utf8_full_out())
+
+    def test_garray_utf8_none_inout(self):
+        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.garray_utf8_none_inout(Sequence(('0', '1', '2'))))
+
+    def test_garray_utf8_container_inout(self):
+        self.assertEquals(['-2', '-1','0', '1'], GIMarshallingTests.garray_utf8_container_inout(['0', '1', '2']))
+
+    def test_garray_utf8_full_inout(self):
+        self.assertEquals(['-2', '-1','0', '1'], GIMarshallingTests.garray_utf8_full_inout(['0', '1', '2']))
+
+
+class TestGList(unittest.TestCase):
+
+    def test_glist_int_none_return(self):
+        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.glist_int_none_return())
+
+    def test_glist_utf8_none_return(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.glist_utf8_none_return())
+
+    def test_glist_utf8_container_return(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.glist_utf8_container_return())
+
+    def test_glist_utf8_full_return(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.glist_utf8_full_return())
+
+    def test_glist_int_none_in(self):
+        GIMarshallingTests.glist_int_none_in(Sequence((-1, 0, 1, 2)))
+
+        self.assertRaises(TypeError, GIMarshallingTests.glist_int_none_in, Sequence((-1, '0', 1, 2)))
+
+        self.assertRaises(TypeError, GIMarshallingTests.glist_int_none_in, 42)
+        self.assertRaises(TypeError, GIMarshallingTests.glist_int_none_in, None)
+
+    def test_glist_utf8_none_in(self):
+        GIMarshallingTests.glist_utf8_none_in(Sequence(('0', '1', '2')))
+
+    def test_glist_utf8_none_out(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.glist_utf8_none_out())
+
+    def test_glist_utf8_container_out(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.glist_utf8_container_out())
+
+    def test_glist_utf8_full_out(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.glist_utf8_full_out())
+
+    def test_glist_utf8_none_inout(self):
+        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.glist_utf8_none_inout(Sequence(('0', '1', '2'))))
+
+    def test_glist_utf8_container_inout(self):
+        self.assertEquals(['-2', '-1','0', '1'], GIMarshallingTests.glist_utf8_container_inout(('0', '1', '2')))
+
+    def test_glist_utf8_full_inout(self):
+        self.assertEquals(['-2', '-1','0', '1'], GIMarshallingTests.glist_utf8_full_inout(('0', '1', '2')))
+
+
+class TestGSList(unittest.TestCase):
+
+    def test_gslist_int_none_return(self):
+        self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.gslist_int_none_return())
+
+    def test_gslist_utf8_none_return(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gslist_utf8_none_return())
+
+    def test_gslist_utf8_container_return(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gslist_utf8_container_return())
+
+    def test_gslist_utf8_full_return(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gslist_utf8_full_return())
+
+    def test_gslist_int_none_in(self):
+        GIMarshallingTests.gslist_int_none_in(Sequence((-1, 0, 1, 2)))
+
+        self.assertRaises(TypeError, GIMarshallingTests.gslist_int_none_in, Sequence((-1, '0', 1, 2)))
+
+        self.assertRaises(TypeError, GIMarshallingTests.gslist_int_none_in, 42)
+        self.assertRaises(TypeError, GIMarshallingTests.gslist_int_none_in, None)
+
+    def test_gslist_utf8_none_in(self):
+        GIMarshallingTests.gslist_utf8_none_in(Sequence(('0', '1', '2')))
+
+    def test_gslist_utf8_none_out(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gslist_utf8_none_out())
+
+    def test_gslist_utf8_container_out(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gslist_utf8_container_out())
+
+    def test_gslist_utf8_full_out(self):
+        self.assertEquals(['0', '1', '2'], GIMarshallingTests.gslist_utf8_full_out())
+
+    def test_gslist_utf8_none_inout(self):
+        self.assertEquals(['-2', '-1', '0', '1'], GIMarshallingTests.gslist_utf8_none_inout(Sequence(('0', '1', '2'))))
+
+    def test_gslist_utf8_container_inout(self):
+        self.assertEquals(['-2', '-1','0', '1'], GIMarshallingTests.gslist_utf8_container_inout(('0', '1', '2')))
+
+    def test_gslist_utf8_full_inout(self):
+        self.assertEquals(['-2', '-1','0', '1'], GIMarshallingTests.gslist_utf8_full_inout(('0', '1', '2')))
+
+
+class TestGHashTable(unittest.TestCase):
+
+    def test_ghashtable_int_none_return(self):
+        self.assertEquals({-1: 1, 0: 0, 1: -1, 2: -2}, GIMarshallingTests.ghashtable_int_none_return())
+
+    def test_ghashtable_int_none_return(self):
+        self.assertEquals({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_none_return())
+
+    def test_ghashtable_int_container_return(self):
+        self.assertEquals({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_container_return())
+
+    def test_ghashtable_int_full_return(self):
+        self.assertEquals({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_full_return())
+
+    def test_ghashtable_int_none_in(self):
+        GIMarshallingTests.ghashtable_int_none_in({-1: 1, 0: 0, 1: -1, 2: -2})
+
+        self.assertRaises(TypeError, GIMarshallingTests.ghashtable_int_none_in, {-1: 1, '0': 0, 1: -1, 2: -2})
+        self.assertRaises(TypeError, GIMarshallingTests.ghashtable_int_none_in, {-1: 1, 0: '0', 1: -1, 2: -2})
+
+        self.assertRaises(TypeError, GIMarshallingTests.ghashtable_int_none_in, '{-1: 1, 0: 0, 1: -1, 2: -2}')
+        self.assertRaises(TypeError, GIMarshallingTests.ghashtable_int_none_in, None)
+
+    def test_ghashtable_utf8_none_in(self):
+        GIMarshallingTests.ghashtable_utf8_none_in({'-1': '1', '0': '0', '1': '-1', '2': '-2'})
+
+    def test_ghashtable_utf8_none_out(self):
+        self.assertEquals({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_none_out())
+
+    def test_ghashtable_utf8_container_out(self):
+        self.assertEquals({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_container_out())
+
+    def test_ghashtable_utf8_full_out(self):
+        self.assertEquals({'-1': '1', '0': '0', '1': '-1', '2': '-2'}, GIMarshallingTests.ghashtable_utf8_full_out())
+
+    def test_ghashtable_utf8_none_inout(self):
+        self.assertEquals({'-1': '1', '0': '0', '1': '1'},
+            GIMarshallingTests.ghashtable_utf8_none_inout({'-1': '1', '0': '0', '1': '-1', '2': '-2'}))
+
+    def test_ghashtable_utf8_container_inout(self):
+        self.assertEquals({'-1': '1', '0': '0', '1': '1'},
+            GIMarshallingTests.ghashtable_utf8_container_inout({'-1': '1', '0': '0', '1': '-1', '2': '-2'}))
+
+    def test_ghashtable_utf8_full_inout(self):
+        self.assertEquals({'-1': '1', '0': '0', '1': '1'},
+            GIMarshallingTests.ghashtable_utf8_full_inout({'-1': '1', '0': '0', '1': '-1', '2': '-2'}))
+
+
+class TestGValue(unittest.TestCase):
+
+    def test_gvalue_return(self):
+        self.assertEquals(42, GIMarshallingTests.gvalue_return())
+
+    def test_gvalue_in(self):
+        GIMarshallingTests.gvalue_in(42)
+        value = GObject.Value()
+        value.init(GObject.TYPE_INT)
+        value.set_int(42)
+        GIMarshallingTests.gvalue_in(value)
+
+    def test_gvalue_out(self):
+        self.assertEquals(42, GIMarshallingTests.gvalue_out())
+
+    def test_gvalue_inout(self):
+        self.assertEquals('42', GIMarshallingTests.gvalue_inout(42))
+        value = GObject.Value()
+        value.init(GObject.TYPE_INT)
+        value.set_int(42)
+        self.assertEquals('42', GIMarshallingTests.gvalue_inout(value))
+
+class TestGClosure(unittest.TestCase):
+
+    def test_gclosure_in(self):
+        GIMarshallingTests.gclosure_in(lambda: 42)
+
+        # test passing a closure between two C calls
+        closure = GIMarshallingTests.gclosure_return()
+        GIMarshallingTests.gclosure_in(closure)
+
+        self.assertRaises(TypeError, GIMarshallingTests.gclosure_in, 42)
+        self.assertRaises(TypeError, GIMarshallingTests.gclosure_in, None)
+
+
+class TestPointer(unittest.TestCase):
+    def test_pointer_in_return(self):
+        self.assertEquals(GIMarshallingTests.pointer_in_return(42), 42)
+
+
+class TestEnum(unittest.TestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        '''Run tests under a test locale.
+
+        Upper case conversion of member names should not be locale specific;
+        e.  g. in Turkish, "i".upper() == "i", which gives results like "iNVALiD"
+
+        Run test under a locale which defines toupper('a') == 'a'
+        '''
+        cls.locale_dir = tempfile.mkdtemp()
+        subprocess.check_call(['localedef', '-i',
+            os.path.join(os.path.dirname(os.path.realpath(__file__)), 'te_ST@nouppera'),
+            '-c', '-f', 'UTF-8', os.path.join(cls.locale_dir, 'te_ST.UTF-8@nouppera')])
+        os.environ['LOCPATH'] = cls.locale_dir
+        locale.setlocale(locale.LC_ALL, 'te_ST.UTF-8@nouppera')
+
+    @classmethod
+    def tearDownClass(cls):
+        locale.setlocale(locale.LC_ALL, 'C')
+        shutil.rmtree(cls.locale_dir)
+        try:
+            del os.environ['LOCPATH']
+        except KeyError:
+            pass
+
+    def test_enum(self):
+        self.assertTrue(issubclass(GIMarshallingTests.Enum, int))
+        self.assertTrue(isinstance(GIMarshallingTests.Enum.VALUE1, GIMarshallingTests.Enum))
+        self.assertTrue(isinstance(GIMarshallingTests.Enum.VALUE2, GIMarshallingTests.Enum))
+        self.assertTrue(isinstance(GIMarshallingTests.Enum.VALUE3, GIMarshallingTests.Enum))
+        self.assertEquals(42, GIMarshallingTests.Enum.VALUE3)
+
+    def test_value_nick_and_name(self):
+        self.assertEqual(GIMarshallingTests.Enum.VALUE1.value_nick, 'value1')
+        self.assertEqual(GIMarshallingTests.Enum.VALUE2.value_nick, 'value2')
+        self.assertEqual(GIMarshallingTests.Enum.VALUE3.value_nick, 'value3')
+
+        self.assertEqual(GIMarshallingTests.Enum.VALUE1.value_name, 'GI_MARSHALLING_TESTS_ENUM_VALUE1')
+        self.assertEqual(GIMarshallingTests.Enum.VALUE2.value_name, 'GI_MARSHALLING_TESTS_ENUM_VALUE2')
+        self.assertEqual(GIMarshallingTests.Enum.VALUE3.value_name, 'GI_MARSHALLING_TESTS_ENUM_VALUE3')
+
+    def test_enum_in(self):
+        GIMarshallingTests.enum_in(GIMarshallingTests.Enum.VALUE3)
+        GIMarshallingTests.enum_in(42)
+
+        self.assertRaises(TypeError, GIMarshallingTests.enum_in, 43)
+        self.assertRaises(TypeError, GIMarshallingTests.enum_in, 'GIMarshallingTests.Enum.VALUE3')
+
+    def test_enum_out(self):
+        enum = GIMarshallingTests.enum_out()
+        self.assertTrue(isinstance(enum, GIMarshallingTests.Enum))
+        self.assertEquals(enum, GIMarshallingTests.Enum.VALUE3)
+
+    def test_enum_inout(self):
+        enum = GIMarshallingTests.enum_inout(GIMarshallingTests.Enum.VALUE3)
+        self.assertTrue(isinstance(enum, GIMarshallingTests.Enum))
+        self.assertEquals(enum, GIMarshallingTests.Enum.VALUE1)
+
+    def test_enum_second(self):
+        # check for the bug where different non-gtype enums share the same class
+        self.assertNotEqual(GIMarshallingTests.Enum, GIMarshallingTests.SecondEnum)
+
+        # check that values are not being shared between different enums
+        self.assertTrue(hasattr(GIMarshallingTests.SecondEnum, "SECONDVALUE1"))
+        self.assertRaises(AttributeError, getattr, GIMarshallingTests.Enum, "SECONDVALUE1")
+        self.assertTrue(hasattr(GIMarshallingTests.Enum, "VALUE1"))
+        self.assertRaises(AttributeError, getattr, GIMarshallingTests.SecondEnum, "VALUE1")
+
+
+class TestGEnum(unittest.TestCase):
+
+    def test_genum(self):
+        self.assertTrue(issubclass(GIMarshallingTests.GEnum, GObject.GEnum))
+        self.assertTrue(isinstance(GIMarshallingTests.GEnum.VALUE1, GIMarshallingTests.GEnum))
+        self.assertTrue(isinstance(GIMarshallingTests.GEnum.VALUE2, GIMarshallingTests.GEnum))
+        self.assertTrue(isinstance(GIMarshallingTests.GEnum.VALUE3, GIMarshallingTests.GEnum))
+        self.assertEquals(42, GIMarshallingTests.GEnum.VALUE3)
+
+    def test_value_nick_and_name(self):
+        self.assertEqual(GIMarshallingTests.GEnum.VALUE1.value_nick, 'value1')
+        self.assertEqual(GIMarshallingTests.GEnum.VALUE2.value_nick, 'value2')
+        self.assertEqual(GIMarshallingTests.GEnum.VALUE3.value_nick, 'value3')
+
+        self.assertEqual(GIMarshallingTests.GEnum.VALUE1.value_name, 'GI_MARSHALLING_TESTS_GENUM_VALUE1')
+        self.assertEqual(GIMarshallingTests.GEnum.VALUE2.value_name, 'GI_MARSHALLING_TESTS_GENUM_VALUE2')
+        self.assertEqual(GIMarshallingTests.GEnum.VALUE3.value_name, 'GI_MARSHALLING_TESTS_GENUM_VALUE3')
+
+    def test_genum_in(self):
+        GIMarshallingTests.genum_in(GIMarshallingTests.GEnum.VALUE3)
+        GIMarshallingTests.genum_in(42)
+
+        self.assertRaises(TypeError, GIMarshallingTests.genum_in, 43)
+        self.assertRaises(TypeError, GIMarshallingTests.genum_in, 'GIMarshallingTests.GEnum.VALUE3')
+
+    def test_genum_out(self):
+        genum = GIMarshallingTests.genum_out()
+        self.assertTrue(isinstance(genum, GIMarshallingTests.GEnum))
+        self.assertEquals(genum, GIMarshallingTests.GEnum.VALUE3)
+
+    def test_genum_inout(self):
+        genum = GIMarshallingTests.genum_inout(GIMarshallingTests.GEnum.VALUE3)
+        self.assertTrue(isinstance(genum, GIMarshallingTests.GEnum))
+        self.assertEquals(genum, GIMarshallingTests.GEnum.VALUE1)
+
+
+class TestGFlags(unittest.TestCase):
+
+    def test_flags(self):
+        self.assertTrue(issubclass(GIMarshallingTests.Flags, GObject.GFlags))
+        self.assertTrue(isinstance(GIMarshallingTests.Flags.VALUE1, GIMarshallingTests.Flags))
+        self.assertTrue(isinstance(GIMarshallingTests.Flags.VALUE2, GIMarshallingTests.Flags))
+        self.assertTrue(isinstance(GIMarshallingTests.Flags.VALUE3, GIMarshallingTests.Flags))
+        # __or__() operation should still return an instance, not an int.
+        self.assertTrue(isinstance(GIMarshallingTests.Flags.VALUE1 | GIMarshallingTests.Flags.VALUE2,
+                                   GIMarshallingTests.Flags))
+        self.assertEquals(1 << 1, GIMarshallingTests.Flags.VALUE2)
+
+    def test_value_nick_and_name(self):
+        self.assertEqual(GIMarshallingTests.Flags.VALUE1.first_value_nick, 'value1')
+        self.assertEqual(GIMarshallingTests.Flags.VALUE2.first_value_nick, 'value2')
+        self.assertEqual(GIMarshallingTests.Flags.VALUE3.first_value_nick, 'value3')
+
+        self.assertEqual(GIMarshallingTests.Flags.VALUE1.first_value_name, 'GI_MARSHALLING_TESTS_FLAGS_VALUE1')
+        self.assertEqual(GIMarshallingTests.Flags.VALUE2.first_value_name, 'GI_MARSHALLING_TESTS_FLAGS_VALUE2')
+        self.assertEqual(GIMarshallingTests.Flags.VALUE3.first_value_name, 'GI_MARSHALLING_TESTS_FLAGS_VALUE3')
+
+    def test_flags_in(self):
+        GIMarshallingTests.flags_in(GIMarshallingTests.Flags.VALUE2)
+        # result of __or__() operation should still be valid instance, not an int.
+        GIMarshallingTests.flags_in(GIMarshallingTests.Flags.VALUE2 | GIMarshallingTests.Flags.VALUE2)
+        GIMarshallingTests.flags_in_zero(Number(0))
+
+        self.assertRaises(TypeError, GIMarshallingTests.flags_in, 1 << 1)
+        self.assertRaises(TypeError, GIMarshallingTests.flags_in, 'GIMarshallingTests.Flags.VALUE2')
+
+    def test_flags_out(self):
+        flags = GIMarshallingTests.flags_out()
+        self.assertTrue(isinstance(flags, GIMarshallingTests.Flags))
+        self.assertEquals(flags, GIMarshallingTests.Flags.VALUE2)
+
+    def test_flags_inout(self):
+        flags = GIMarshallingTests.flags_inout(GIMarshallingTests.Flags.VALUE2)
+        self.assertTrue(isinstance(flags, GIMarshallingTests.Flags))
+        self.assertEquals(flags, GIMarshallingTests.Flags.VALUE1)
+
+class TestNoTypeFlags(unittest.TestCase):
+
+    def test_flags(self):
+        self.assertTrue(issubclass(GIMarshallingTests.NoTypeFlags, GObject.GFlags))
+        self.assertTrue(isinstance(GIMarshallingTests.NoTypeFlags.VALUE1, GIMarshallingTests.NoTypeFlags))
+        self.assertTrue(isinstance(GIMarshallingTests.NoTypeFlags.VALUE2, GIMarshallingTests.NoTypeFlags))
+        self.assertTrue(isinstance(GIMarshallingTests.NoTypeFlags.VALUE3, GIMarshallingTests.NoTypeFlags))
+        # __or__() operation should still return an instance, not an int.
+        self.assertTrue(isinstance(GIMarshallingTests.NoTypeFlags.VALUE1 | GIMarshallingTests.NoTypeFlags.VALUE2,
+                                   GIMarshallingTests.NoTypeFlags))
+        self.assertEquals(1 << 1, GIMarshallingTests.NoTypeFlags.VALUE2)
+
+    def test_value_nick_and_name(self):
+        self.assertEqual(GIMarshallingTests.NoTypeFlags.VALUE1.first_value_nick, 'value1')
+        self.assertEqual(GIMarshallingTests.NoTypeFlags.VALUE2.first_value_nick, 'value2')
+        self.assertEqual(GIMarshallingTests.NoTypeFlags.VALUE3.first_value_nick, 'value3')
+
+        self.assertEqual(GIMarshallingTests.NoTypeFlags.VALUE1.first_value_name, 'GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE1')
+        self.assertEqual(GIMarshallingTests.NoTypeFlags.VALUE2.first_value_name, 'GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2')
+        self.assertEqual(GIMarshallingTests.NoTypeFlags.VALUE3.first_value_name, 'GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE3')
+
+    def test_flags_in(self):
+        GIMarshallingTests.no_type_flags_in(GIMarshallingTests.NoTypeFlags.VALUE2)
+        GIMarshallingTests.no_type_flags_in(GIMarshallingTests.NoTypeFlags.VALUE2 | GIMarshallingTests.NoTypeFlags.VALUE2)
+        GIMarshallingTests.no_type_flags_in_zero(Number(0))
+
+        self.assertRaises(TypeError, GIMarshallingTests.no_type_flags_in, 1 << 1)
+        self.assertRaises(TypeError, GIMarshallingTests.no_type_flags_in, 'GIMarshallingTests.NoTypeFlags.VALUE2')
+
+    def test_flags_out(self):
+        flags = GIMarshallingTests.no_type_flags_out()
+        self.assertTrue(isinstance(flags, GIMarshallingTests.NoTypeFlags))
+        self.assertEquals(flags, GIMarshallingTests.NoTypeFlags.VALUE2)
+
+    def test_flags_inout(self):
+        flags = GIMarshallingTests.no_type_flags_inout(GIMarshallingTests.NoTypeFlags.VALUE2)
+        self.assertTrue(isinstance(flags, GIMarshallingTests.NoTypeFlags))
+        self.assertEquals(flags, GIMarshallingTests.NoTypeFlags.VALUE1)
+
+
+class TestStructure(unittest.TestCase):
+
+    def test_simple_struct(self):
+        self.assertTrue(issubclass(GIMarshallingTests.SimpleStruct, GObject.GPointer))
+
+        struct = GIMarshallingTests.SimpleStruct()
+        self.assertTrue(isinstance(struct, GIMarshallingTests.SimpleStruct))
+
+        self.assertEquals(0, struct.long_)
+        self.assertEquals(0, struct.int8)
+
+        struct.long_ = 6
+        struct.int8 = 7
+
+        self.assertEquals(6, struct.long_)
+        self.assertEquals(7, struct.int8)
+
+        del struct
+
+    def test_nested_struct(self):
+        struct = GIMarshallingTests.NestedStruct()
+
+        self.assertTrue(isinstance(struct.simple_struct, GIMarshallingTests.SimpleStruct))
+
+        struct.simple_struct.long_ = 42
+        self.assertEquals(42, struct.simple_struct.long_)
+
+        del struct
+
+    def test_not_simple_struct(self):
+        struct = GIMarshallingTests.NotSimpleStruct()
+        self.assertEquals(None, struct.pointer)
+
+    def test_simple_struct_return(self):
+        struct = GIMarshallingTests.simple_struct_returnv()
+
+        self.assertTrue(isinstance(struct, GIMarshallingTests.SimpleStruct))
+        self.assertEquals(6, struct.long_)
+        self.assertEquals(7, struct.int8)
+
+        del struct
+
+    def test_simple_struct_in(self):
+        struct = GIMarshallingTests.SimpleStruct()
+        struct.long_ = 6
+        struct.int8 = 7
+
+        GIMarshallingTests.SimpleStruct.inv(struct)
+
+        del struct
+
+        struct = GIMarshallingTests.NestedStruct()
+
+        self.assertRaises(TypeError, GIMarshallingTests.SimpleStruct.inv, struct)
+
+        del struct
+
+        self.assertRaises(TypeError, GIMarshallingTests.SimpleStruct.inv, None)
+
+    def test_simple_struct_method(self):
+        struct = GIMarshallingTests.SimpleStruct()
+        struct.long_ = 6
+        struct.int8 = 7
+
+        struct.method()
+
+        del struct
+
+        self.assertRaises(TypeError, GIMarshallingTests.SimpleStruct.method)
+
+
+    def test_pointer_struct(self):
+        self.assertTrue(issubclass(GIMarshallingTests.PointerStruct, GObject.GPointer))
+
+        struct = GIMarshallingTests.PointerStruct()
+        self.assertTrue(isinstance(struct, GIMarshallingTests.PointerStruct))
+
+        del struct
+
+    def test_pointer_struct_return(self):
+        struct = GIMarshallingTests.pointer_struct_returnv()
+
+        self.assertTrue(isinstance(struct, GIMarshallingTests.PointerStruct))
+        self.assertEquals(42, struct.long_)
+
+        del struct
+
+    def test_pointer_struct_in(self):
+        struct = GIMarshallingTests.PointerStruct()
+        struct.long_ = 42
+
+        struct.inv()
+
+        del struct
+
+    def test_boxed_struct(self):
+        self.assertTrue(issubclass(GIMarshallingTests.BoxedStruct, GObject.GBoxed))
+
+        struct = GIMarshallingTests.BoxedStruct()
+        self.assertTrue(isinstance(struct, GIMarshallingTests.BoxedStruct))
+
+        self.assertEquals(0, struct.long_)
+        self.assertEquals([], struct.g_strv)
+
+        del struct
+
+    def test_boxed_struct_new(self):
+        struct = GIMarshallingTests.BoxedStruct.new()
+        self.assertTrue(isinstance(struct, GIMarshallingTests.BoxedStruct))
+
+        del struct
+
+    def test_boxed_struct_copy(self):
+        struct = GIMarshallingTests.BoxedStruct()
+
+        new_struct = struct.copy()
+        self.assertTrue(isinstance(new_struct, GIMarshallingTests.BoxedStruct))
+
+        del new_struct
+        del struct
+
+    def test_boxed_struct_return(self):
+        struct = GIMarshallingTests.boxed_struct_returnv()
+
+        self.assertTrue(isinstance(struct, GIMarshallingTests.BoxedStruct))
+        self.assertEquals(42, struct.long_)
+        self.assertEquals(['0', '1', '2'], struct.g_strv)
+
+        del struct
+
+    def test_boxed_struct_in(self):
+        struct = GIMarshallingTests.BoxedStruct()
+        struct.long_ = 42
+
+        struct.inv()
+
+        del struct
+
+    def test_boxed_struct_out(self):
+        struct = GIMarshallingTests.boxed_struct_out()
+
+        self.assertTrue(isinstance(struct, GIMarshallingTests.BoxedStruct))
+        self.assertEquals(42, struct.long_)
+
+        del struct
+
+    def test_boxed_struct_inout(self):
+        in_struct = GIMarshallingTests.BoxedStruct()
+        in_struct.long_ = 42
+
+        out_struct = GIMarshallingTests.boxed_struct_inout(in_struct)
+
+        self.assertTrue(isinstance(out_struct, GIMarshallingTests.BoxedStruct))
+        self.assertEquals(0, out_struct.long_)
+
+        del in_struct
+        del out_struct
+
+    def test_union(self):
+        union = GIMarshallingTests.Union()
+
+        self.assertTrue(isinstance(union, GIMarshallingTests.Union))
+
+        new_union = union.copy()
+        self.assertTrue(isinstance(new_union, GIMarshallingTests.Union))
+
+        del union
+        del new_union
+
+    def test_union_return(self):
+        union = GIMarshallingTests.union_returnv()
+
+        self.assertTrue(isinstance(union, GIMarshallingTests.Union))
+        self.assertEquals(42, union.long_)
+
+        del union
+
+    def test_union_in(self):
+        union = GIMarshallingTests.Union()
+        union.long_ = 42
+
+        union.inv()
+
+        del union
+
+    def test_union_method(self):
+        union = GIMarshallingTests.Union()
+        union.long_ = 42
+
+        union.method()
+
+        del union
+
+        self.assertRaises(TypeError, GIMarshallingTests.Union.method)
+
+class TestGObject(unittest.TestCase):
+
+    def test_object(self):
+        self.assertTrue(issubclass(GIMarshallingTests.Object, GObject.GObject))
+
+        object_ = GIMarshallingTests.Object()
+        self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
+        self.assertEquals(object_.__grefcount__, 1)
+
+    def test_object_new(self):
+        object_ = GIMarshallingTests.Object.new(42)
+        self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
+        self.assertEquals(object_.__grefcount__, 1)
+
+    def test_object_int(self):
+        object_ = GIMarshallingTests.Object(int = 42)
+        self.assertEquals(object_.int_, 42)
+# FIXME: Don't work yet.
+#        object_.int_ = 0
+#        self.assertEquals(object_.int_, 0)
+
+    def test_object_static_method(self):
+        GIMarshallingTests.Object.static_method()
+
+    def test_object_method(self):
+        GIMarshallingTests.Object(int = 42).method()
+        self.assertRaises(TypeError, GIMarshallingTests.Object.method, GObject.GObject())
+        self.assertRaises(TypeError, GIMarshallingTests.Object.method)
+
+
+    def test_sub_object(self):
+        self.assertTrue(issubclass(GIMarshallingTests.SubObject, GIMarshallingTests.Object))
+
+        object_ = GIMarshallingTests.SubObject()
+        self.assertTrue(isinstance(object_, GIMarshallingTests.SubObject))
+
+    def test_sub_object_new(self):
+        self.assertRaises(TypeError, GIMarshallingTests.SubObject.new, 42)
+
+    def test_sub_object_static_method(self):
+        object_ = GIMarshallingTests.SubObject()
+        object_.static_method()
+
+    def test_sub_object_method(self):
+        object_ = GIMarshallingTests.SubObject(int = 42)
+        object_.method()
+
+    def test_sub_object_sub_method(self):
+        object_ = GIMarshallingTests.SubObject()
+        object_.sub_method()
+
+    def test_sub_object_overwritten_method(self):
+        object_ = GIMarshallingTests.SubObject()
+        object_.overwritten_method()
+
+        self.assertRaises(TypeError, GIMarshallingTests.SubObject.overwritten_method, GIMarshallingTests.Object())
+
+    def test_sub_object_int(self):
+        object_ = GIMarshallingTests.SubObject()
+        self.assertEquals(object_.int_, 0)
+# FIXME: Don't work yet.
+#        object_.int_ = 42
+#        self.assertEquals(object_.int_, 42)
+
+    def test_object_none_return(self):
+        object_ = GIMarshallingTests.Object.none_return()
+        self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
+        self.assertEquals(object_.__grefcount__, 2)
+
+    def test_object_full_return(self):
+        object_ = GIMarshallingTests.Object.full_return()
+        self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
+        self.assertEquals(object_.__grefcount__, 1)
+
+    def test_object_none_in(self):
+        object_ = GIMarshallingTests.Object(int = 42)
+        GIMarshallingTests.Object.none_in(object_)
+        self.assertEquals(object_.__grefcount__, 1)
+
+        object_ = GIMarshallingTests.SubObject(int = 42)
+        GIMarshallingTests.Object.none_in(object_)
+
+        object_ = GObject.GObject()
+        self.assertRaises(TypeError, GIMarshallingTests.Object.none_in, object_)
+
+        self.assertRaises(TypeError, GIMarshallingTests.Object.none_in, None)
+
+    def test_object_none_out(self):
+        object_ = GIMarshallingTests.Object.none_out()
+        self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
+        self.assertEquals(object_.__grefcount__, 2)
+
+        new_object = GIMarshallingTests.Object.none_out()
+        self.assertTrue(new_object is object_)
+
+    def test_object_full_out(self):
+        object_ = GIMarshallingTests.Object.full_out()
+        self.assertTrue(isinstance(object_, GIMarshallingTests.Object))
+        self.assertEquals(object_.__grefcount__, 1)
+
+    def test_object_none_inout(self):
+        object_ = GIMarshallingTests.Object(int = 42)
+        new_object = GIMarshallingTests.Object.none_inout(object_)
+
+        self.assertTrue(isinstance(new_object, GIMarshallingTests.Object))
+
+        self.assertFalse(object_ is new_object)
+
+        self.assertEquals(object_.__grefcount__, 1)
+        self.assertEquals(new_object.__grefcount__, 2)
+
+        new_new_object = GIMarshallingTests.Object.none_inout(object_)
+        self.assertTrue(new_new_object is new_object)
+
+        GIMarshallingTests.Object.none_inout(GIMarshallingTests.SubObject(int = 42))
+
+    def test_object_full_inout(self):
+        object_ = GIMarshallingTests.Object(int = 42)
+        new_object = GIMarshallingTests.Object.full_inout(object_)
+
+        self.assertTrue(isinstance(new_object, GIMarshallingTests.Object))
+
+        self.assertFalse(object_ is new_object)
+
+        self.assertEquals(object_.__grefcount__, 2)
+        self.assertEquals(new_object.__grefcount__, 1)
+
+# FIXME: Doesn't actually return the same object.
+#    def test_object_inout_same(self):
+#        object_ = GIMarshallingTests.Object()
+#        new_object = GIMarshallingTests.object_full_inout(object_)
+#        self.assertTrue(object_ is new_object)
+#        self.assertEquals(object_.__grefcount__, 1)
+
+
+class TestPythonGObject(unittest.TestCase):
+
+    class Object(GIMarshallingTests.Object):
+        def __init__(self, int):
+            GIMarshallingTests.Object.__init__(self)
+            self.val = None
+
+        def method(self):
+            # Don't call super, which asserts that self.int == 42.
+            pass
+
+        def do_method_int8_in(self, int8):
+            self.val = int8
+
+        def do_method_int8_out(self):
+            return 42
+
+        def do_method_with_default_implementation(self, int8):
+            GIMarshallingTests.Object.do_method_with_default_implementation(self, int8)
+            self.props.int += int8
+
+    class SubObject(GIMarshallingTests.SubObject):
+        def __init__(self, int):
+            GIMarshallingTests.SubObject.__init__(self)
+            self.val = None
+
+        def do_method_with_default_implementation(self, int8):
+            self.val = int8
+
+    def test_object(self):
+        self.assertTrue(issubclass(self.Object, GIMarshallingTests.Object))
+
+        object_ = self.Object(int = 42)
+        self.assertTrue(isinstance(object_, self.Object))
+
+    def test_object_method(self):
+        self.Object(int = 0).method()
+
+    def test_object_vfuncs(self):
+        object_ = self.Object(int = 42)
+        object_.method_int8_in(84)
+        self.assertEqual(object_.val, 84)
+        self.assertEqual(object_.method_int8_out(), 42)
+
+        object_.method_with_default_implementation(42)
+        self.assertEqual(object_.props.int, 84)
+
+        class ObjectWithoutVFunc(GIMarshallingTests.Object):
+            def __init__(self, int):
+                GIMarshallingTests.Object.__init__(self)
+
+        object_ = ObjectWithoutVFunc(int = 42)
+        object_.method_with_default_implementation(84)
+        self.assertEqual(object_.props.int, 84)
+
+    def test_subobject_parent_vfunc(self):
+        object_ = self.SubObject(int = 81)
+        object_.method_with_default_implementation(87)
+        self.assertEquals(object_.val, 87)
+
+    def test_dynamic_module(self):
+        from gi.module import DynamicGObjectModule
+        self.assertTrue(isinstance(GObject, DynamicGObjectModule))
+        # compare the same enum from both the pygobject attrs and gi GObject attrs
+        self.assertEquals(GObject.SIGNAL_ACTION, GObject.SignalFlags.ACTION)
+        # compare a static gobject attr with a dynamic GObject attr
+        self.assertEquals(GObject.GObject, gobject.GObject)
+
+    def test_subobject_non_vfunc_do_method(self):
+        class PythonObjectWithNonVFuncDoMethod:
+            def do_not_a_vfunc(self):
+                return 5
+
+        class ObjectOverrideNonVFuncDoMethod(GIMarshallingTests.Object, PythonObjectWithNonVFuncDoMethod):
+            def do_not_a_vfunc(self):
+                value = super(ObjectOverrideNonVFuncDoMethod, self).do_not_a_vfunc()
+                return 13 + value
+
+        object_ = ObjectOverrideNonVFuncDoMethod()
+        self.assertEquals(18, object_.do_not_a_vfunc())
+
+    def test_native_function_not_set_in_subclass_dict(self):
+        # Previously, GI was setting virtual functions on the class as well
+        # as any *native* class that subclasses it. Here we check that it is only
+        # set on the class that the method is originally from.
+        self.assertTrue('do_method_with_default_implementation' in GIMarshallingTests.Object.__dict__)
+        self.assertTrue('do_method_with_default_implementation' not in GIMarshallingTests.SubObject.__dict__)
+
+        # Here we check that accessing a vfunc from the subclass returns the same wrapper object,
+        # meaning that multiple wrapper objects have not been created for the same vfunc.
+        func1 = GIMarshallingTests.Object.do_method_with_default_implementation
+        func2 = GIMarshallingTests.SubObject.do_method_with_default_implementation
+        if sys.version_info < (3,0):
+            func1 = func1.im_func
+            func2 = func2.im_func
+            
+        self.assertTrue(func1 is func2)
+
+    def test_subobject_with_interface_and_non_vfunc_do_method(self):
+        # There was a bug for searching for vfuncs in interfaces. It was
+        # triggered by having a do_* method that wasn't overriding
+        # a native vfunc, as well as inheriting from an interface.
+        class GObjectSubclassWithInterface(GObject.GObject, GIMarshallingTests.Interface):
+            def do_method_not_a_vfunc(self):
+                pass
+
+class TestMultiOutputArgs(unittest.TestCase):
+
+    def test_int_out_out(self):
+        self.assertEquals((6, 7), GIMarshallingTests.int_out_out())
+
+    def test_int_return_out(self):
+        self.assertEquals((6, 7), GIMarshallingTests.int_return_out())
+
+class TestGErrorException(unittest.TestCase):
+    def test_gerror_exception(self):
+        self.assertRaises(GObject.GError, GIMarshallingTests.gerror)
+        try:
+            GIMarshallingTests.gerror()
+        except Exception:
+            etype, e = sys.exc_info()[:2]
+            self.assertEquals(e.domain, GIMarshallingTests.CONSTANT_GERROR_DOMAIN)
+            self.assertEquals(e.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
+            self.assertEquals(e.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
+
+
+# Interface
+
+class TestInterfaces(unittest.TestCase):
+
+    def test_wrapper(self):
+        self.assertTrue(issubclass(GIMarshallingTests.Interface, GObject.GInterface))
+        self.assertEquals(GIMarshallingTests.Interface.__gtype__.name, 'GIMarshallingTestsInterface')
+        self.assertRaises(NotImplementedError, GIMarshallingTests.Interface)
+
+    def test_implementation(self):
+
+        class TestInterfaceImpl(GObject.GObject, GIMarshallingTests.Interface):
+            def __init__(self):
+                GObject.GObject.__init__(self)
+                self.val = None
+
+            def do_test_int8_in(self, int8):
+                self.val = int8
+
+        self.assertTrue(issubclass(TestInterfaceImpl, GIMarshallingTests.Interface))
+
+        instance = TestInterfaceImpl()
+        self.assertTrue(isinstance(instance, GIMarshallingTests.Interface))
+
+        GIMarshallingTests.test_interface_test_int8_in(instance, 42)
+        self.assertEquals(instance.val, 42)
+
+        class TestInterfaceImplA(TestInterfaceImpl):
+            pass
+
+        class TestInterfaceImplB(TestInterfaceImplA):
+            pass
+
+        instance = TestInterfaceImplA()
+        GIMarshallingTests.test_interface_test_int8_in(instance, 42)
+        self.assertEquals(instance.val, 42)
+
+    def test_mro(self):
+        # there was a problem with Python bailing out because of
+        # http://en.wikipedia.org/wiki/Diamond_problem with interfaces,
+        # which shouldn't really be a problem.
+
+        class TestInterfaceImpl(GObject.GObject, GIMarshallingTests.Interface):
+            pass
+
+        class TestInterfaceImpl2(GIMarshallingTests.Interface,
+                                 TestInterfaceImpl):
+            pass
+
+        class TestInterfaceImpl3(TestInterfaceImpl,
+                                 GIMarshallingTests.Interface2):
+            pass
+
+
+class TestInterfaceClash(unittest.TestCase):
+
+    def test_clash(self):
+        def create_clash():
+            class TestClash(GObject.GObject, GIMarshallingTests.Interface, GIMarshallingTests.Interface2):
+                def do_test_int8_in(self, int8):
+                    pass
+            TestClash()
+
+        self.assertRaises(TypeError, create_clash)
+
+
+class TestOverrides(unittest.TestCase):
+
+    def test_constant(self):
+        self.assertEquals(GIMarshallingTests.OVERRIDES_CONSTANT, 7)
+
+    def test_struct(self):
+        # Test that the constructor has been overridden.
+        struct = GIMarshallingTests.OverridesStruct(42)
+
+        self.assertTrue(isinstance(struct, GIMarshallingTests.OverridesStruct))
+
+        # Test that the method has been overridden.
+        self.assertEquals(6, struct.method())
+
+        del struct
+
+        # Test that the overrides wrapper has been registered.
+        struct = GIMarshallingTests.overrides_struct_returnv()
+
+        self.assertTrue(isinstance(struct, GIMarshallingTests.OverridesStruct))
+
+        del struct
+
+    def test_object(self):
+        # Test that the constructor has been overridden.
+        object_ = GIMarshallingTests.OverridesObject(42)
+
+        self.assertTrue(isinstance(object_, GIMarshallingTests.OverridesObject))
+
+        # Test that the alternate constructor has been overridden.
+        object_ = GIMarshallingTests.OverridesObject.new(42)
+
+        self.assertTrue(isinstance(object_, GIMarshallingTests.OverridesObject))
+
+        # Test that the method has been overridden.
+        self.assertEquals(6, object_.method())
+
+        # Test that the overrides wrapper has been registered.
+        object_ = GIMarshallingTests.OverridesObject.returnv()
+
+        self.assertTrue(isinstance(object_, GIMarshallingTests.OverridesObject))
+
+    def test_module_name(self):
+        self.assertEquals(GIMarshallingTests.OverridesStruct.__module__, 'gi.overrides.GIMarshallingTests')
+        self.assertEquals(GObject.InitiallyUnowned.__module__, 'gi.repository.GObject')
+
+class TestDir(unittest.TestCase):
+    def test_members_list(self):
+        list = dir(GIMarshallingTests)
+        self.assertTrue('OverridesStruct' in list)
+        self.assertTrue('BoxedStruct' in list)
+        self.assertTrue('OVERRIDES_CONSTANT' in list)
+        self.assertTrue('GEnum' in list)
+        self.assertTrue('int32_return_max' in list)
+
+    def test_modules_list(self):
+        import gi.repository
+        list = dir(gi.repository)
+        self.assertTrue('GIMarshallingTests' in list)
+
+        # FIXME: test to see if a module which was not imported is in the list
+        #        we should be listing every typelib we find, not just the ones
+        #        which are imported
+        #
+        #        to test this I recommend we compile a fake module which
+        #        our tests would never import and check to see if it is
+        #        in the list:
+        #
+        # self.assertTrue('DoNotImportDummyTests' in list)
+
+class TestGErrorArrayInCrash(unittest.TestCase):
+    # Previously there was a bug in invoke, in which C arrays were unwrapped
+    # from inside GArrays to be passed to the C function. But when a GError was
+    # set, invoke would attempt to free the C array as if it were a GArray.
+    # This crash is only for C arrays. It does not happen for C functions which
+    # take in GArrays. See https://bugzilla.gnome.org/show_bug.cgi?id=642708
+    def test_gerror_array_in_crash(self):
+        self.assertRaises(GObject.GError, GIMarshallingTests.gerror_array_in, [1, 2, 3])
diff --git a/tests/test_gicon.py b/tests/test_gicon.py
new file mode 100644 (file)
index 0000000..b9af6ff
--- /dev/null
@@ -0,0 +1,112 @@
+# -*- Mode: Python -*-
+
+import os
+import unittest
+
+import glib
+import gio
+
+
+class TestIcon(unittest.TestCase):
+    def test_eq(self):
+        self.assertEquals(gio.FileIcon(gio.File('foo.png')),
+                          gio.FileIcon(gio.File('foo.png')))
+        self.assertEquals(gio.ThemedIcon('foo'),
+                          gio.ThemedIcon('foo'))
+
+        self.assertNotEqual(gio.FileIcon(gio.File('foo.png')),
+                            gio.FileIcon(gio.File('bar.png')))
+        self.assertNotEquals(gio.ThemedIcon('foo'),
+                             gio.ThemedIcon('bar'))
+        self.assertNotEquals(gio.FileIcon(gio.File('foo.png')),
+                             gio.ThemedIcon('foo'))
+
+    def test_hash(self):
+        self.assertEquals(hash(gio.FileIcon(gio.File('foo.png'))),
+                          hash(gio.FileIcon(gio.File('foo.png'))))
+        self.assertEquals(hash(gio.ThemedIcon('foo')),
+                          hash(gio.ThemedIcon('foo')))
+
+class TestLoadableIcon(unittest.TestCase):
+    def setUp(self):
+        self.file = open('temp.svg', 'w')
+        self.svg = ('<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
+                    '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" '
+                    '"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">'
+                    '<svg width="32" height="32"/>')
+        self.file.write(self.svg)
+        self.file.close()
+        self.icon = gio.FileIcon(gio.File('temp.svg'))
+
+    def tearDown(self):
+        if os.path.exists('temp.svg'):
+            os.unlink('temp.svg')
+
+    def test_load(self):
+        stream, type = self.icon.load()
+        try:
+            self.assert_(isinstance(stream, gio.InputStream))
+            self.assertEquals(self.svg, stream.read())
+        finally:
+            stream.close()
+
+    def test_load_async(self):
+        def callback(icon, result):
+            try:
+                stream, type = icon.load_finish(result)
+                self.assert_(isinstance(stream, gio.InputStream))
+                self.assertEquals(self.svg, stream.read())
+            finally:
+                loop.quit()
+                stream.close()
+
+        self.icon.load_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+class TestFileIcon(unittest.TestCase):
+    def test_constructor(self):
+        file = gio.File('foo.png')
+        self.assert_(file is gio.FileIcon(file).get_file())
+
+class TestThemedIcon(unittest.TestCase):
+    def setUp(self):
+        self.icon = gio.ThemedIcon("open")
+
+    def test_constructor(self):
+        have_use_default_fallbacks = ('use_default_fallbacks'
+                                      in gio.ThemedIcon.props.__members__)
+        icon = gio.ThemedIcon('foo')
+        self.assertEquals(['foo'], icon.props.names)
+        self.assert_(not have_use_default_fallbacks
+                     or not icon.props.use_default_fallbacks)
+
+        icon = gio.ThemedIcon(['foo', 'bar', 'baz'])
+        self.assertEquals(['foo', 'bar', 'baz'], icon.props.names)
+        self.assert_(not have_use_default_fallbacks
+                     or not icon.props.use_default_fallbacks)
+
+        icon = gio.ThemedIcon('xxx-yyy-zzz', True)
+        self.assertEquals(['xxx-yyy-zzz', 'xxx-yyy', 'xxx'], icon.props.names)
+        self.assert_(not have_use_default_fallbacks
+                     or icon.props.use_default_fallbacks)
+
+    def test_constructor_illegals(self):
+        self.assertRaises(TypeError, lambda: gio.ThemedIcon(42))
+        self.assertRaises(TypeError, lambda: gio.ThemedIcon(['foo', 42, 'bar']))
+
+    def test_get_names(self):
+        self.assertEquals(self.icon.get_names(), ['open'])
+
+    def test_append_name(self):
+        self.assertEquals(self.icon.get_names(), ['open'])
+        self.icon.append_name('close')
+        self.assertEquals(self.icon.get_names(), ['open', 'close'])
+
+class TestEmblemedIcon(unittest.TestCase):
+    def test_emblemed_icon(self):
+        icon = gio.FileIcon(gio.File('foo.png'))
+        emblem = gio.Emblem(icon)
+        emblemed = gio.EmblemedIcon(icon, emblem)
+        self.assertEquals(emblemed.get_emblems()[0], emblem)
diff --git a/tests/test_gio.py b/tests/test_gio.py
new file mode 100644 (file)
index 0000000..e14eddf
--- /dev/null
@@ -0,0 +1,1138 @@
+# -*- Mode: Python -*-
+
+import os
+import unittest
+
+import glib
+import gio
+
+
+class TestFile(unittest.TestCase):
+    def setUp(self):
+        self._f = open("file.txt", "w+")
+        self.file = gio.File("file.txt")
+
+    def tearDown(self):
+        self._f.close()
+        if os.path.exists('file.txt'):
+            os.unlink("file.txt")
+
+    def testReadAsync(self):
+        self._f.write("testing")
+        self._f.seek(0)
+
+        def callback(file, result):
+            try:
+                stream = file.read_finish(result)
+                self.failUnless(isinstance(stream, gio.InputStream))
+                self.assertEquals(stream.read(), "testing")
+            finally:
+                loop.quit()
+
+        self.file.read_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testAppendToAsync(self):
+        self._f.write("append_to ")
+        self._f.close()
+
+        def callback(file, result):
+            try:
+                stream = file.append_to_finish(result)
+                self.failUnless(isinstance(stream, gio.OutputStream))
+                w = stream.write("testing")
+                cont, leng, etag = self.file.load_contents()
+                self.assertEqual(cont, "append_to testing")
+            finally:
+                loop.quit()
+
+        self.file.append_to_async(callback, gio.FILE_CREATE_NONE,
+                                  glib.PRIORITY_HIGH)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testAppendToAsyncNoargs(self):
+        self._f.write("append_to ")
+        self._f.close()
+
+        def callback(file, result):
+            try:
+                stream = file.append_to_finish(result)
+                self.failUnless(isinstance(stream, gio.OutputStream))
+                w = stream.write("testing")
+                cont, leng, etag = self.file.load_contents()
+                self.assertEqual(cont, "append_to testing")
+            finally:
+                loop.quit()
+
+        self.file.append_to_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testCreateAsync(self):
+        def callback(file, result):
+            try:
+                stream = file.create_finish(result)
+                self.failUnless(isinstance(stream, gio.OutputStream))
+                w = stream.write("testing")
+                cont, leng, etag = file.load_contents()
+                self.assertEqual(cont, "testing")
+            finally:
+                if os.path.exists('temp.txt'):
+                    os.unlink("temp.txt")
+                loop.quit()
+
+        gfile = gio.File("temp.txt")
+        gfile.create_async(callback, gio.FILE_CREATE_NONE,
+                           glib.PRIORITY_HIGH)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testCreateReadWriteAsync(self):
+        def callback(file, result):
+            try:
+                iostream = file.create_readwrite_finish(result)
+                self.failUnless(isinstance(iostream, gio.FileIOStream))
+
+                ostream = iostream.get_output_stream()
+                self.failUnless(isinstance(ostream, gio.OutputStream))
+
+                w = ostream.write("testing")
+                cont, leng, etag = file.load_contents()
+                self.assertEqual(cont, "testing")
+            finally:
+                if os.path.exists('temp.txt'):
+                    os.unlink("temp.txt")
+                loop.quit()
+
+        gfile = gio.File("temp.txt")
+        gfile.create_readwrite_async(callback, gio.FILE_CREATE_NONE,
+                                     glib.PRIORITY_HIGH)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testCreateAsyncNoargs(self):
+        def callback(file, result):
+            try:
+                stream = file.create_finish(result)
+                self.failUnless(isinstance(stream, gio.OutputStream))
+                w = stream.write("testing")
+                cont, leng, etag = file.load_contents()
+                self.assertEqual(cont, "testing")
+            finally:
+                if os.path.exists('temp.txt'):
+                    os.unlink("temp.txt")
+                loop.quit()
+
+        gfile = gio.File("temp.txt")
+        gfile.create_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testReplaceAsync(self):
+        self._f.write("testing")
+        self._f.close()
+
+        def callback(file, result):
+            try:
+                stream = file.replace_finish(result)
+                self.failUnless(isinstance(stream, gio.OutputStream))
+                stream.write("some new string")
+                stream.close()
+                cont, leng, etag = file.load_contents()
+                self.assertEqual(cont, "some new string")
+            finally:
+                loop.quit()
+
+
+        self.file.replace_async(callback, None, True, gio.FILE_CREATE_NONE,
+                                glib.PRIORITY_HIGH)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testReplaceAsyncNoargs(self):
+        self._f.write("testing")
+        self._f.close()
+
+        def callback(file, result):
+            try:
+                stream = file.replace_finish(result)
+                self.failUnless(isinstance(stream, gio.OutputStream))
+                stream.write("some new string")
+                stream.close()
+                cont, leng, etag = file.load_contents()
+                self.assertEqual(cont, "some new string")
+            finally:
+                loop.quit()
+
+
+        self.file.replace_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testReadAsyncError(self):
+        self.assertRaises(TypeError, self.file.read_async)
+        self.assertRaises(TypeError, self.file.read_async, "foo", "bar")
+        self.assertRaises(TypeError, self.file.read_async, "foo",
+                          priority="bar")
+        self.assertRaises(TypeError, self.file.read_async, "foo",
+                          priority="bar")
+        self.assertRaises(TypeError, self.file.read_async, "foo",
+                          priority=1, cancellable="bar")
+        self.assertRaises(TypeError, self.file.read_async, "foo", 1, "bar")
+
+    def testConstructor(self):
+        for gfile in [gio.File("/"),
+                      gio.File("file:///"),
+                      gio.File(uri="file:///"),
+                      gio.File(path="/"),
+                      gio.File(u"/"),
+                      gio.File(path=u"/")]:
+            self.failUnless(isinstance(gfile, gio.File))
+            self.assertEquals(gfile.get_path(), "/")
+            self.assertEquals(gfile.get_uri(), "file:///")
+
+    def testConstructorError(self):
+        self.assertRaises(TypeError, gio.File)
+        self.assertRaises(TypeError, gio.File, 1)
+        self.assertRaises(TypeError, gio.File, "foo", "bar")
+        self.assertRaises(TypeError, gio.File, foo="bar")
+        self.assertRaises(TypeError, gio.File, uri=1)
+        self.assertRaises(TypeError, gio.File, path=1)
+
+    def testLoadContents(self):
+        self._f.write("testing load_contents")
+        self._f.seek(0)
+        c = gio.Cancellable()
+        cont, leng, etag = self.file.load_contents(cancellable=c)
+        self.assertEqual(cont, "testing load_contents")
+        self.assertEqual(leng, 21)
+        self.assertNotEqual(etag, '')
+
+    def testLoadContentsAsync(self):
+        self._f.write("testing load_contents_async")
+        self._f.seek(0)
+
+        def callback(contents, result):
+            try:
+                cont, leng, etag = contents.load_contents_finish(result)
+                self.assertEqual(cont, "testing load_contents_async")
+                self.assertEqual(leng, 27)
+                self.assertNotEqual(etag, '')
+            finally:
+                loop.quit()
+
+        canc = gio.Cancellable()
+        self.file.load_contents_async(callback, cancellable=canc)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testQueryInfoAsync(self):
+        def callback(file, result):
+            try:
+                info = file.query_info_finish(result)
+                self.failUnless(isinstance(info, gio.FileInfo))
+                self.failUnless(info.get_name(), "file.txt")
+            finally:
+                loop.quit()
+
+        self.file.query_info_async("standard", callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testMountMountable(self):
+        gfile = gio.File('localtest:')
+        def unmount_done(mount, result):
+            try:
+                retval = mount.unmount_finish(result)
+                self.failUnless(retval)
+            finally:
+                loop.quit()
+
+        def mount_enclosing_volume_done(gfile, result):
+            try:
+                try:
+                    retval = gfile.mount_enclosing_volume_finish(result)
+                except gio.Error, e:
+                    # If we run the tests too fast
+                    if e.code == gio.ERROR_ALREADY_MOUNTED:
+                        print ('WARNING: testfile is already mounted, '
+                        'skipping test')
+                        loop.quit()
+                        return
+                    raise
+                self.failUnless(retval)
+            finally:
+                try:
+                    mount = gfile.find_enclosing_mount()
+                except gio.Error:
+                    loop.quit()
+                    return
+                mount.unmount(unmount_done)
+
+        mount_operation = gio.MountOperation()
+        gfile.mount_enclosing_volume(mount_operation,
+                                     mount_enclosing_volume_done)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testCopy(self):
+        if os.path.exists('copy.txt'):
+            os.unlink("copy.txt")
+
+        source = gio.File('file.txt')
+        destination = gio.File('copy.txt')
+        try:
+            retval = source.copy(destination)
+            self.failUnless(retval)
+
+            self.failUnless(os.path.exists('copy.txt'))
+            self.assertEqual(open('file.txt').read(),
+                             open('copy.txt').read())
+        finally:
+            os.unlink("copy.txt")
+
+        self.called = False
+        def callback(current, total):
+            self.called = True
+        source = gio.File('file.txt')
+        destination = gio.File('copy.txt')
+        try:
+            retval = source.copy(destination, callback)
+            self.failUnless(retval)
+
+            self.failUnless(os.path.exists('copy.txt'))
+            self.assertEqual(open('file.txt').read(),
+                             open('copy.txt').read())
+            self.failUnless(self.called)
+        finally:
+            os.unlink("copy.txt")
+
+    def test_copy_async(self):
+        if os.path.exists('copy.txt'):
+            os.unlink("copy.txt")
+
+        source = gio.File('file.txt')
+        destination = gio.File('copy.txt')
+
+        def copied(source_, result):
+            try:
+                self.assert_(source_ is source)
+                self.failUnless(source_.copy_finish(result))
+            finally:
+                loop.quit()
+
+        def progress(current, total):
+            self.assert_(isinstance(current, long))
+            self.assert_(isinstance(total, long))
+            self.assert_(0 <= current <= total)
+
+        try:
+            loop = glib.MainLoop()
+            source.copy_async(destination, copied, progress_callback = progress)
+            loop.run()
+
+            self.failUnless(os.path.exists('copy.txt'))
+            self.assertEqual(open('file.txt').read(),
+                             open('copy.txt').read())
+        finally:
+            os.unlink("copy.txt")
+
+    # See bug 546591.
+    def test_copy_progress(self):
+        source = gio.File('file.txt')
+        destination = gio.File('copy.txt')
+
+        def progress(current, total):
+            self.assert_(isinstance(current, long))
+            self.assert_(isinstance(total, long))
+            self.assert_(0 <= current <= total)
+
+        try:
+            retval = source.copy(destination,
+                                 flags=gio.FILE_COPY_OVERWRITE,
+                                 progress_callback=progress)
+            self.failUnless(retval)
+
+            self.failUnless(os.path.exists('copy.txt'))
+            self.assertEqual(open('file.txt').read(),
+                             open('copy.txt').read())
+        finally:
+            os.unlink("copy.txt")
+
+    def testMove(self):
+        if os.path.exists('move.txt'):
+            os.unlink("move.txt")
+
+        source = gio.File('file.txt')
+        destination = gio.File('move.txt')
+        retval = source.move(destination)
+        self.failUnless(retval)
+
+        self.failIf(os.path.exists('file.txt'))
+        self.failUnless(os.path.exists('move.txt'))
+
+        self.called = False
+        def callback(current, total):
+            self.called = True
+        source = gio.File('move.txt')
+        destination = gio.File('move-2.txt')
+        try:
+            retval = source.move(destination, callback)
+            self.failUnless(retval)
+
+            self.failIf(os.path.exists('move.txt'))
+            self.failUnless(os.path.exists('move-2.txt'))
+            self.failUnless(self.called)
+        finally:
+            os.unlink("move-2.txt")
+
+    def testInfoList(self):
+        infolist = self.file.query_settable_attributes()
+        for info in infolist:
+            if info.name == "time::modified":
+                self.assertEqual(info.type, gio.FILE_ATTRIBUTE_TYPE_UINT64)
+                self.assertEqual(info.name, "time::modified")
+                self.assertEqual(info.flags,
+                                 gio.FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED |
+                                 gio.FILE_ATTRIBUTE_INFO_COPY_WITH_FILE)
+
+    def testQueryWritableNamespaces(self):
+        infolist = self.file.query_writable_namespaces()
+        for info in infolist:
+            if info.name == "xattr":
+                self.assertEqual(info.type, gio.FILE_ATTRIBUTE_TYPE_STRING)
+
+    def testSetAttribute(self):
+        self._f.write("testing attributes")
+        self._f.seek(0)
+        infolist = self.file.query_settable_attributes()
+
+        self.assertNotEqual(len(infolist), 0)
+
+        for info in infolist:
+            if info.name == "time::modified-usec":
+                ret = self.file.set_attribute("time::modified-usec",
+                                              gio.FILE_ATTRIBUTE_TYPE_UINT32,
+                                              10, gio.FILE_QUERY_INFO_NONE)
+                self.assertEqual(ret, True)
+
+    def testSetAttributesAsync(self):
+        def callback(gfile, result):
+            try:
+                info = gfile.set_attributes_finish(result)
+                usec = info.get_attribute_uint32("time::modified-usec")
+                self.assertEqual(usec, 10)
+            finally:
+                loop.quit()        
+
+        info = gio.FileInfo()
+        info.set_attribute_uint32("time::modified-usec", 10)
+        
+        canc = gio.Cancellable()
+        self.file.set_attributes_async(info, callback)
+        
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testReplaceContents(self):
+        self.file.replace_contents("testing replace_contents")
+        cont, leng, etag = self.file.load_contents()
+        self.assertEqual(cont, "testing replace_contents")
+
+        caught = False
+        try:
+            self.file.replace_contents("this won't work", etag="wrong")
+        except gio.Error, e:
+            self.assertEqual(e.code, gio.ERROR_WRONG_ETAG)
+            caught = True
+        self.failUnless(caught)
+
+        self.file.replace_contents("testing replace_contents again", etag=etag)
+        cont, leng, etag = self.file.load_contents()
+        self.assertEqual(cont, "testing replace_contents again")
+
+        self.file.replace_contents("testing replace_contents yet again", etag=None)
+        cont, leng, etag = self.file.load_contents()
+        self.assertEqual(cont, "testing replace_contents yet again")
+
+    def testReplaceContentsAsync(self):
+
+        def callback(contents, result):
+            try:
+                newetag = contents.replace_contents_finish(result)
+                cont, leng, etag = self.file.load_contents()
+                self.assertEqual(cont, "testing replace_contents_async")
+                self.assertEqual(leng, 30)
+                self.assertEqual(etag, newetag)
+                self.assertNotEqual(newetag, '')
+            finally:
+                loop.quit()
+
+        canc = gio.Cancellable()
+        self.file.replace_contents_async("testing replace_contents_async", callback, cancellable=canc)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def test_eq(self):
+        self.assertEqual(gio.File('foo'),
+                         gio.File('foo'))
+        self.assertNotEqual(gio.File('foo'),
+                            gio.File('bar'))
+
+    def test_hash(self):
+        self.assertEquals(hash(gio.File('foo')),
+                          hash(gio.File('foo')))
+
+    def testSetDisplayNameAsync(self):
+        def callback(gfile, result):
+            try:
+                new_gfile = gfile.set_display_name_finish(result)
+                new_name = new_gfile.get_basename()
+                self.assertEqual(new_name, "new.txt")
+                deleted = new_gfile.delete()
+                self.assertEqual(deleted, True)
+            finally:
+                loop.quit()        
+
+        canc = gio.Cancellable()
+        self.file.set_display_name_async("new.txt", callback, cancellable=canc)
+        
+        loop = glib.MainLoop()
+        loop.run()
+
+class TestGFileEnumerator(unittest.TestCase):
+    def setUp(self):
+        self.file = gio.File(os.path.dirname(__file__))
+
+    def testEnumerateChildren(self):
+        enumerator = self.file.enumerate_children(
+            "standard::*", gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS)
+        for file_info in enumerator:
+            if file_info.get_name() == os.path.basename(__file__):
+                break
+        else:
+            raise AssertionError
+
+    def testEnumerateChildrenAsync(self):
+        def callback(gfile, result):
+            try:
+                for file_info in gfile.enumerate_children_finish(result):
+                    if file_info.get_name() == __file__:
+                        break
+                else:
+                    raise AssertionError
+            finally:
+                loop.quit()
+
+        self.file.enumerate_children_async(
+            "standard::*", callback)
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testNextFilesAsync(self):
+        def callback(enumerator, result):
+            try:
+                for file_info in enumerator.next_files_finish(result):
+                    if file_info.get_name() == __file__:
+                        break
+                else:
+                    raise AssertionError
+            finally:
+                loop.quit()
+
+        enumerator = self.file.enumerate_children(
+            "standard::*", gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS)
+        enumerator.next_files_async(1000, callback)
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testCloseFilesAsync(self):
+        def callback(enumerator, result):
+            try:
+                enumerator.close_finish(result)
+            finally:
+                loop.quit()
+
+        enumerator = self.file.enumerate_children(
+            "standard::*", gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS)
+
+        enumerator.close_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+
+class TestInputStream(unittest.TestCase):
+    def setUp(self):
+        self._f = open("inputstream.txt", "w+")
+        self._f.write("testing")
+        self._f.seek(0)
+        self.stream = gio.unix.InputStream(self._f.fileno(), False)
+
+    def tearDown(self):
+        self._f.close()
+        os.unlink("inputstream.txt")
+
+    def testRead(self):
+        self.assertEquals(self.stream.read(), "testing")
+
+        self.stream = gio.MemoryInputStream()
+        self.assertEquals(self.stream.read(), '')
+
+        self.stream = gio.MemoryInputStream()
+        some_data = open(__file__, "rb").read()
+        self.stream.add_data(some_data)
+        self.assertEquals(self.stream.read(), some_data)
+
+        stream = gio.MemoryInputStream()
+        stream.add_data(some_data)
+        self.assertEquals(self._read_in_loop(stream,
+                                             lambda: stream.read(50),
+                                             50),
+                          some_data)
+
+    def testSkip(self):
+        self.stream.skip(2)
+        res = self.stream.read()
+        self.assertEqual(res, "sting")
+        
+    def testSkipAsync(self):
+        def callback(stream, result):
+            try:
+                size = stream.skip_finish(result)
+                self.assertEqual(size, 2)
+                res = stream.read()
+                self.assertEqual(res, "sting")
+            finally:
+                loop.quit()
+        
+        self.stream.skip_async(2, callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def test_read_part(self):
+        self.assertEquals(self._read_in_loop(self.stream,
+                                             lambda: self.stream.read_part()),
+                          'testing')
+
+        stream = gio.MemoryInputStream()
+        some_data = open(__file__, 'rb').read()
+        stream.add_data(some_data)
+        self.assertEquals(self._read_in_loop(stream,
+                                             lambda: stream.read_part(50),
+                                             50),
+                          some_data)
+
+    def _read_in_loop(self, stream, reader, size_limit=0):
+        read_data = ''
+        while True:
+            read_part = reader()
+            if read_part:
+                read_data += read_part
+                if size_limit > 0:
+                    self.assert_(len(read_part) <= size_limit,
+                                 '%d <= %d' % (len(read_part), size_limit))
+            else:
+                return read_data
+
+    def testReadAsync(self):
+        def callback(stream, result):
+            self.assertEquals(result.get_op_res_gssize(), 7)
+            try:
+                data = stream.read_finish(result)
+                self.assertEquals(data, "testing")
+                stream.close()
+            finally:
+                loop.quit()
+
+        self.stream.read_async(7, callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testReadAsyncError(self):
+        self.count = 0
+        def callback(stream, result):
+            try:
+                self.count += 1
+                if self.count == 1:
+                    return
+                self.assertRaises(gio.Error, stream.read_finish, result)
+            finally:
+                loop.quit()
+
+        self.stream.read_async(10240, callback)
+        self.stream.read_async(10240, callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+        self.assertEquals(self.count, 2)
+
+        self.assertRaises(TypeError, self.stream.read_async)
+        self.assertRaises(TypeError, self.stream.read_async, "foo")
+        self.assertRaises(TypeError, self.stream.read_async, 1024, "bar")
+        self.assertRaises(TypeError, self.stream.read_async, 1024,
+                          priority="bar")
+        self.assertRaises(TypeError, self.stream.read_async, 1024,
+                          priority="bar")
+        self.assertRaises(TypeError, self.stream.read_async, 1024,
+                          priority=1, cancellable="bar")
+        self.assertRaises(TypeError, self.stream.read_async, 1024, 1, "bar")
+
+
+    # FIXME: this makes 'make check' freeze
+    def _testCloseAsync(self):
+        def callback(stream, result):
+            try:
+                self.failUnless(stream.close_finish(result))
+            finally:
+                loop.quit()
+
+        self.stream.close_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+
+class TestDataInputStream(unittest.TestCase):
+    def setUp(self):
+        self.base_stream = gio.MemoryInputStream()
+        self.data_stream = gio.DataInputStream(self.base_stream)
+
+    def test_read_line(self):
+        self.base_stream.add_data('foo\nbar\n\nbaz')
+        self.assertEquals('foo', self.data_stream.read_line())
+        self.assertEquals('bar', self.data_stream.read_line())
+        self.assertEquals('', self.data_stream.read_line())
+        self.assertEquals('baz', self.data_stream.read_line())
+
+    def test_read_line_async(self):
+        def do_read_line_async():
+            loop = glib.MainLoop()
+            line = []
+
+            def callback(stream, result):
+                try:
+                    line.append(stream.read_line_finish(result))
+                finally:
+                    loop.quit()
+
+            self.data_stream.read_line_async(callback)
+            loop.run()
+            return line[0]
+
+        self.base_stream.add_data('foo\nbar\n\nbaz')
+        self.assertEquals('foo', do_read_line_async())
+        self.assertEquals('bar', do_read_line_async())
+        self.assertEquals('', do_read_line_async())
+        self.assertEquals('baz', do_read_line_async())
+
+    def test_read_until(self):
+        self.base_stream.add_data('sentence.end of line\nthe rest')
+        self.assertEquals('sentence', self.data_stream.read_until('.!?'))
+        self.assertEquals('end of line', self.data_stream.read_until('\n\r'))
+        self.assertEquals('the rest', self.data_stream.read_until('#$%^&'))
+
+    def test_read_until_async(self):
+        def do_read_until_async(stop_chars):
+            loop = glib.MainLoop()
+            data = []
+
+            def callback(stream, result):
+                try:
+                    data.append(stream.read_until_finish(result))
+                finally:
+                    loop.quit()
+
+            self.data_stream.read_until_async(stop_chars, callback)
+            loop.run()
+            return data[0]
+
+        # Note the weird difference between synchronous and
+        # asynchronous version.  See bug #584284.
+        self.base_stream.add_data('sentence.end of line\nthe rest')
+        self.assertEquals('sentence', do_read_until_async('.!?'))
+        self.assertEquals('.end of line', do_read_until_async('\n\r'))
+        self.assertEquals('\nthe rest', do_read_until_async('#$%^&'))
+
+
+class TestMemoryInputStream(unittest.TestCase):
+    def setUp(self):
+        self.stream = gio.MemoryInputStream()
+
+    def test_add_data(self):
+        self.stream.add_data('foobar')
+        self.assertEquals('foobar', self.stream.read())
+
+        self.stream.add_data('ham ')
+        self.stream.add_data(None)
+        self.stream.add_data('spam')
+        self.assertEquals('ham spam', self.stream.read())
+    
+    def test_new_from_data(self):
+        stream = gio.memory_input_stream_new_from_data('spam')
+        self.assertEquals('spam', stream.read())
+
+
+class TestOutputStream(unittest.TestCase):
+    def setUp(self):
+        self._f = open("outputstream.txt", "w")
+        self.stream = gio.unix.OutputStream(self._f.fileno(), False)
+
+    def tearDown(self):
+        self._f.close()
+        os.unlink("outputstream.txt")
+
+    def testWrite(self):
+        self.stream.write("testing")
+        self.stream.close()
+        self.failUnless(os.path.exists("outputstream.txt"))
+        self.assertEquals(open("outputstream.txt").read(), "testing")
+
+    def test_write_part(self):
+        stream = gio.MemoryOutputStream()
+        some_data = open(__file__, 'rb').read()
+        buffer = some_data
+
+        # In fact this makes only one looping (memory stream is fast,
+        # write_part behaves just like write), but let's still be
+        # complete.
+        while buffer:
+            written = stream.write_part(buffer)
+            if written == len(buffer):
+                break
+            else:
+                buffer = buffer[written:]
+
+        self.assertEquals(stream.get_contents(), some_data)
+
+    def testWriteAsync(self):
+        def callback(stream, result):
+            self.assertEquals(result.get_op_res_gssize(), 7)
+            try:
+                self.assertEquals(stream.write_finish(result), 7)
+                self.failUnless(os.path.exists("outputstream.txt"))
+                self.assertEquals(open("outputstream.txt").read(), "testing")
+            finally:
+                loop.quit()
+
+        self.stream.write_async("testing", callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def testWriteAsyncError(self):
+        def callback(stream, result):
+            self.assertEquals(result.get_op_res_gssize(), 0)
+            try:
+                self.assertRaises(gio.Error, stream.write_finish, result)
+            finally:
+                loop.quit()
+
+        self.stream.close()
+        self.stream.write_async("testing", callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+        self.assertRaises(TypeError, self.stream.write_async)
+        self.assertRaises(TypeError, self.stream.write_async, 1138)
+        self.assertRaises(TypeError, self.stream.write_async, "foo", "bar")
+        self.assertRaises(TypeError, self.stream.write_async, "foo",
+                          priority="bar")
+        self.assertRaises(TypeError, self.stream.write_async, "foo",
+                          priority="bar")
+        self.assertRaises(TypeError, self.stream.write_async, "foo",
+                          priority=1, cancellable="bar")
+        self.assertRaises(TypeError, self.stream.write_async, "foo", 1, "bar")
+
+    # FIXME: this makes 'make check' freeze
+    def _testCloseAsync(self):
+        def callback(stream, result):
+            try:
+                self.failUnless(stream.close_finish(result))
+            finally:
+                loop.quit()
+
+        self.stream.close_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+        
+    def testFlushAsync(self):
+        def callback(stream, result):
+            try:
+                self.failUnless(stream.flush_finish(result))
+            finally:
+                loop.quit()
+
+        self.stream.flush_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+    
+    def testSpliceAsync(self):
+        _f = open("stream.txt", "w+")
+        _f.write("testing")
+        _f.seek(0)
+        instream = gio.unix.InputStream(_f.fileno(), False)
+        
+        def callback(stream, result):
+            try:
+                size = stream.splice_finish(result)
+                self.assertEqual(size, 7)
+                
+            finally:
+                os.unlink("stream.txt")
+                loop.quit()
+
+        self.stream.splice_async(instream, callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+class TestMemoryOutputStream(unittest.TestCase):
+    def setUp(self):
+        self.stream = gio.MemoryOutputStream()
+
+    def test_get_contents(self):
+        self.stream.write('foobar')
+        self.assertEquals('foobar', self.stream.get_contents())
+
+        self.stream.write('baz')
+        self.assertEquals('foobarbaz', self.stream.get_contents())
+
+
+class TestVolumeMonitor(unittest.TestCase):
+    def setUp(self):
+        self.monitor = gio.volume_monitor_get()
+
+    def testGetConnectedDrives(self):
+        drives = self.monitor.get_connected_drives()
+        self.failUnless(isinstance(drives, list))
+
+    def testGetVolumes(self):
+        volumes = self.monitor.get_volumes()
+        self.failUnless(isinstance(volumes, list))
+
+    def testGetMounts(self):
+        mounts = self.monitor.get_mounts()
+        self.failUnless(isinstance(mounts, list))
+        if not mounts:
+            return
+
+        self.failUnless(isinstance(mounts[0], gio.Mount))
+        # Bug 538601
+        icon = mounts[0].get_icon()
+        if not icon:
+            return
+        self.failUnless(isinstance(icon, gio.Icon))
+
+
+class TestContentTypeGuess(unittest.TestCase):
+    def testFromName(self):
+        mime_type = gio.content_type_guess('diagram.svg')
+        self.assertEquals('image/svg+xml', mime_type)
+
+    def testFromContents(self):
+        mime_type = gio.content_type_guess(data='<html></html>')
+        self.assertEquals('text/html', mime_type)
+
+    def testFromContentsUncertain(self):
+        mime_type, result_uncertain = gio.content_type_guess(
+            data='<html></html>', want_uncertain=True)
+        self.assertEquals('text/html', mime_type)
+        self.assertEquals(bool, type(result_uncertain))
+
+
+class TestFileInfo(unittest.TestCase):
+    def setUp(self):
+        self.fileinfo = gio.File(__file__).query_info("*")
+
+    def testListAttributes(self):
+        attributes = self.fileinfo.list_attributes("standard")
+        self.failUnless(attributes)
+        self.failUnless('standard::name' in attributes)
+
+    def testGetModificationTime(self):
+        mtime = self.fileinfo.get_modification_time()
+        self.assertEqual(type(mtime), float)
+
+    def testSetModificationTime(self):
+        self.fileinfo.set_modification_time(1000)
+        mtime = self.fileinfo.get_modification_time()
+        self.assertEqual(mtime, 1000)
+
+
+class TestAppInfo(unittest.TestCase):
+    def setUp(self):
+        self.appinfo = gio.AppInfo("does-not-exist")
+
+    def testSimple(self):
+        self.assertEquals(self.appinfo.get_description(),
+                          "Custom definition for does-not-exist")
+
+    def test_eq(self):
+        info1 = gio.app_info_get_all()[0]
+        info2 = info1.dup()
+        self.assert_(info1 is not info2)
+        self.assertEquals(info1, info2)
+
+        self.assertNotEqual(gio.app_info_get_all()[0], gio.app_info_get_all()[1])
+
+class TestVfs(unittest.TestCase):
+    def setUp(self):
+        self.vfs = gio.vfs_get_default()
+
+    def testGetSupportedURISchemes(self):
+        result = self.vfs.get_supported_uri_schemes()
+        self.failUnless(type(result), [])
+
+class TestVolume(unittest.TestCase):
+    def setUp(self):
+        self.monitor = gio.volume_monitor_get()
+    
+    def testVolumeEnumerate(self):
+        volumes = self.monitor.get_volumes()
+        self.failUnless(isinstance(volumes, list))
+        for v in volumes:
+            if v is not None:
+                ids = v.enumerate_identifiers()
+                self.failUnless(isinstance(ids, list))
+                for id in ids:
+                    if id is not None:
+                        self.failUnless(isinstance(id, str))
+
+class TestFileInputStream(unittest.TestCase):
+    def setUp(self):
+        self._f = open("file.txt", "w+")
+        self._f.write("testing")
+        self._f.seek(0)
+        self.file = gio.File("file.txt")
+
+    def tearDown(self):
+        self._f.close()
+        if os.path.exists('file.txt'):
+            os.unlink("file.txt")
+
+    def testQueryInfoAsync(self):
+        def callback(stream, result):
+            try:
+                info = stream.query_info_finish(result)
+                self.failUnless(isinstance(info, gio.FileInfo))
+                self.failUnless(info.get_attribute_uint64("standard::size"), 7)
+            finally:
+                loop.quit()
+
+        inputstream = self.file.read()
+        inputstream.query_info_async("standard", callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+class TestFileOutputStream(unittest.TestCase):
+    def setUp(self):
+        self._f = open("file.txt", "w+")
+        self._f.write("testing")
+        self._f.seek(0)
+        self.file = gio.File("file.txt")
+
+    def tearDown(self):
+        self._f.close()
+        if os.path.exists('file.txt'):
+            os.unlink("file.txt")
+
+    def testQueryInfoAsync(self):
+        def callback(stream, result):
+            try:
+                info = stream.query_info_finish(result)
+                self.failUnless(isinstance(info, gio.FileInfo))
+                self.failUnless(info.get_attribute_uint64("standard::size"), 7)
+            finally:
+                loop.quit()
+
+        outputstream = self.file.append_to()
+        outputstream.query_info_async("standard", callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+class TestBufferedInputStream(unittest.TestCase):
+    def setUp(self):
+        self._f = open("buffer.txt", "w+")
+        self._f.write("testing")
+        self._f.seek(0)
+        stream = gio.unix.InputStream(self._f.fileno(), False)
+        self.buffered = gio.BufferedInputStream(stream)
+
+    def tearDown(self):
+        self._f.close()
+        os.unlink("buffer.txt")
+
+    def test_fill_async(self):
+        def callback(stream, result):
+            try:
+                size = stream.fill_finish(result)
+                self.failUnlessEqual(size, 4)
+            finally:
+                loop.quit()
+
+        self.buffered.fill_async(4, callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+class TestIOStream(unittest.TestCase):
+    def setUp(self):
+        self.file = gio.File("file.txt")
+        self.iofile = self.file.create_readwrite(gio.FILE_CREATE_NONE)
+
+    def tearDown(self):
+        if os.path.exists('file.txt'):
+            os.unlink("file.txt")
+
+    def testIOStreamCloseAsync(self):
+        def callback(stream, result):
+            try:
+                self.failUnless(stream.close_finish(result))
+            finally:
+                loop.quit()
+
+        self.iofile.close_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+
+    def testQueryInfoAsync(self):
+        def callback(stream, result):
+            try:
+                info = stream.query_info_finish(result)
+                self.failUnless(isinstance(info, gio.FileInfo))
+                self.failUnless(info.get_attribute_uint64("standard::size"), 7)
+            finally:
+                loop.quit()
+        
+        ostream = self.iofile.get_output_stream()
+        ostream.write("testing")
+
+        self.iofile.query_info_async("standard", callback)
+
+        loop = glib.MainLoop()
+        loop.run()
diff --git a/tests/test_gobject.py b/tests/test_gobject.py
new file mode 100644 (file)
index 0000000..d628b0e
--- /dev/null
@@ -0,0 +1,186 @@
+# -*- Mode: Python -*-
+
+import unittest
+
+import gobject
+import sys
+import testhelper
+
+
+class TestGObjectAPI(unittest.TestCase):
+    def testGObjectModule(self):
+        obj = gobject.GObject()
+        self.assertEquals(obj.__module__,
+                          'gobject._gobject')
+
+
+class TestReferenceCounting(unittest.TestCase):
+    def testRegularObject(self):
+        obj = gobject.GObject()
+        self.assertEquals(obj.__grefcount__, 1)
+
+        obj = gobject.new(gobject.GObject)
+        self.assertEquals(obj.__grefcount__, 1)
+
+    def testFloatingWithSinkFunc(self):
+        obj = testhelper.FloatingWithSinkFunc()
+        self.assertEquals(obj.__grefcount__, 1)
+
+        obj = gobject.new(testhelper.FloatingWithSinkFunc)
+        self.assertEquals(obj.__grefcount__, 1)
+
+    def testFloatingWithoutSinkFunc(self):
+        obj = testhelper.FloatingWithoutSinkFunc()
+        self.assertEquals(obj.__grefcount__, 1)
+
+        obj = gobject.new(testhelper.FloatingWithoutSinkFunc)
+        self.assertEquals(obj.__grefcount__, 1)
+
+    def testOwnedByLibrary(self):
+        # Upon creation, the refcount of the object should be 2:
+        # - someone already has a reference on the new object.
+        # - the python wrapper should hold its own reference.
+        obj = testhelper.OwnedByLibrary()
+        self.assertEquals(obj.__grefcount__, 2)
+
+        # We ask the library to release its reference, so the only
+        # remaining ref should be our wrapper's. Once the wrapper
+        # will run out of scope, the object will get finalized.
+        obj.release()
+        self.assertEquals(obj.__grefcount__, 1)
+
+    def testOwnedByLibraryOutOfScope(self):
+        obj = testhelper.OwnedByLibrary()
+        self.assertEquals(obj.__grefcount__, 2)
+
+        # We are manually taking the object out of scope. This means
+        # that our wrapper has been freed, and its reference dropped. We
+        # cannot check it but the refcount should now be 1 (the ref held
+        # by the library is still there, we didn't call release()
+        obj = None
+
+        # When we get the object back from the lib, the wrapper is
+        # re-created, so our refcount will be 2 once again.
+        obj = testhelper.owned_by_library_get_instance_list()[0]
+        self.assertEquals(obj.__grefcount__, 2)
+
+        obj.release()
+        self.assertEquals(obj.__grefcount__, 1)
+
+    def testOwnedByLibraryUsingGObjectNew(self):
+        # Upon creation, the refcount of the object should be 2:
+        # - someone already has a reference on the new object.
+        # - the python wrapper should hold its own reference.
+        obj = gobject.new(testhelper.OwnedByLibrary)
+        self.assertEquals(obj.__grefcount__, 2)
+
+        # We ask the library to release its reference, so the only
+        # remaining ref should be our wrapper's. Once the wrapper
+        # will run out of scope, the object will get finalized.
+        obj.release()
+        self.assertEquals(obj.__grefcount__, 1)
+
+    def testOwnedByLibraryOutOfScopeUsingGobjectNew(self):
+        obj = gobject.new(testhelper.OwnedByLibrary)
+        self.assertEquals(obj.__grefcount__, 2)
+
+        # We are manually taking the object out of scope. This means
+        # that our wrapper has been freed, and its reference dropped. We
+        # cannot check it but the refcount should now be 1 (the ref held
+        # by the library is still there, we didn't call release()
+        obj = None
+
+        # When we get the object back from the lib, the wrapper is
+        # re-created, so our refcount will be 2 once again.
+        obj = testhelper.owned_by_library_get_instance_list()[0]
+        self.assertEquals(obj.__grefcount__, 2)
+
+        obj.release()
+        self.assertEquals(obj.__grefcount__, 1)
+
+    def testFloatingAndSunk(self):
+        # Upon creation, the refcount of the object should be 2:
+        # - someone already has a reference on the new object.
+        # - the python wrapper should hold its own reference.
+        obj = testhelper.FloatingAndSunk()
+        self.assertEquals(obj.__grefcount__, 2)
+
+        # We ask the library to release its reference, so the only
+        # remaining ref should be our wrapper's. Once the wrapper
+        # will run out of scope, the object will get finalized.
+        obj.release()
+        self.assertEquals(obj.__grefcount__, 1)
+
+    def testFloatingAndSunkOutOfScope(self):
+        obj = testhelper.FloatingAndSunk()
+        self.assertEquals(obj.__grefcount__, 2)
+
+        # We are manually taking the object out of scope. This means
+        # that our wrapper has been freed, and its reference dropped. We
+        # cannot check it but the refcount should now be 1 (the ref held
+        # by the library is still there, we didn't call release()
+        obj = None
+
+        # When we get the object back from the lib, the wrapper is
+        # re-created, so our refcount will be 2 once again.
+        obj = testhelper.floating_and_sunk_get_instance_list()[0]
+        self.assertEquals(obj.__grefcount__, 2)
+
+        obj.release()
+        self.assertEquals(obj.__grefcount__, 1)
+
+    def testFloatingAndSunkUsingGObjectNew(self):
+        # Upon creation, the refcount of the object should be 2:
+        # - someone already has a reference on the new object.
+        # - the python wrapper should hold its own reference.
+        obj = gobject.new(testhelper.FloatingAndSunk)
+        self.assertEquals(obj.__grefcount__, 2)
+
+        # We ask the library to release its reference, so the only
+        # remaining ref should be our wrapper's. Once the wrapper
+        # will run out of scope, the object will get finalized.
+        obj.release()
+        self.assertEquals(obj.__grefcount__, 1)
+
+    def testFloatingAndSunkOutOfScopeUsingGObjectNew(self):
+        obj = gobject.new(testhelper.FloatingAndSunk)
+        self.assertEquals(obj.__grefcount__, 2)
+
+        # We are manually taking the object out of scope. This means
+        # that our wrapper has been freed, and its reference dropped. We
+        # cannot check it but the refcount should now be 1 (the ref held
+        # by the library is still there, we didn't call release()
+        obj = None
+
+        # When we get the object back from the lib, the wrapper is
+        # re-created, so our refcount will be 2 once again.
+        obj = testhelper.floating_and_sunk_get_instance_list()[0]
+        self.assertEquals(obj.__grefcount__, 2)
+
+        obj.release()
+        self.assertEquals(obj.__grefcount__, 1)
+
+class A(gobject.GObject):
+    def __init__(self):
+        super(A, self).__init__()
+
+class TestPythonReferenceCounting(unittest.TestCase):
+    # Newly created instances should alwayshave two references: one for
+    # the GC, and one for the bound variable in the local scope.
+
+    def testNewInstanceHasTwoRefs(self):
+        obj = gobject.GObject()
+        self.assertEquals(sys.getrefcount(obj), 2)
+
+    def testNewInstanceHasTwoRefsUsingGObjectNew(self):
+        obj = gobject.new(gobject.GObject)
+        self.assertEquals(sys.getrefcount(obj), 2)
+
+    def testNewSubclassInstanceHasTwoRefs(self):
+        obj = A()
+        self.assertEquals(sys.getrefcount(obj), 2)
+
+    def testNewSubclassInstanceHasTwoRefsUsingGObjectNew(self):
+        obj = gobject.new(A)
+        self.assertEquals(sys.getrefcount(obj), 2)
diff --git a/tests/test_gresolver.py b/tests/test_gresolver.py
new file mode 100644 (file)
index 0000000..4238df7
--- /dev/null
@@ -0,0 +1,68 @@
+# -*- Mode: Python -*-
+
+import unittest
+
+import glib
+import gio
+
+
+class TestResolver(unittest.TestCase):
+    def setUp(self):
+        self.resolver = gio.resolver_get_default()
+
+    def test_resolver_lookup_by_name(self):
+        addresses = self.resolver.lookup_by_name("pygtk.org", cancellable=None)
+        self.failUnless(isinstance(addresses[0], gio.InetAddress))
+
+    def test_resolver_lookup_by_address(self):
+        address = gio.inet_address_new_from_string("8.8.8.8")
+        dns = self.resolver.lookup_by_address(address, cancellable=None)
+        self.failUnlessEqual(dns, "google-public-dns-a.google.com")
+    
+    def test_resolver_lookup_by_name_async(self):
+        def callback(resolver, result):
+            try:
+                addresses = resolver.lookup_by_name_finish(result)
+                self.failUnless(isinstance(addresses[0], gio.InetAddress))
+            finally:
+                loop.quit()
+
+        self.resolver.lookup_by_name_async(callback, "pygtk.org")
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def test_resolver_lookup_by_address_async(self):
+        def callback(resolver, result):
+            try:
+                dns = resolver.lookup_by_address_finish(result)
+                self.failUnlessEqual(dns, "google-public-dns-b.google.com")
+            finally:
+                loop.quit()
+
+        address = gio.inet_address_new_from_string("8.8.4.4")
+        self.resolver.lookup_by_address_async(callback, address)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+""" Commented out because this requires an active internet connection and a
+    router that supports SRV lookups
+
+    def test_resolver_lookup_service(self):
+        targets = self.resolver.lookup_service("xmpp-client", "tcp", "google.com")
+        self.failUnless(isinstance(targets[0], gio.SrvTarget))
+
+    def test_resolver_lookup_service_async(self):
+        def callback(resolver, result):
+            try:
+                targets = resolver.lookup_service_finish(result)
+                self.failUnless(isinstance(targets[0], gio.SrvTarget))
+            finally:
+                loop.quit()
+
+        self.resolver.lookup_service_async(callback, "xmpp-client", "tcp", "google.com")
+
+        loop = glib.MainLoop()
+        loop.run()
+"""
diff --git a/tests/test_gsocket.py b/tests/test_gsocket.py
new file mode 100644 (file)
index 0000000..627f6fd
--- /dev/null
@@ -0,0 +1,126 @@
+# -*- Mode: Python -*-
+
+import os
+import unittest
+
+import glib
+import gobject
+import gio
+
+
+class TestSocket(unittest.TestCase):
+    def setUp(self):
+        self.sock = gio.Socket(gio.SOCKET_FAMILY_IPV4,
+                               gio.SOCKET_TYPE_STREAM,
+                               gio.SOCKET_PROTOCOL_TCP)
+
+    def test_socket_condition_check(self):
+        check = self.sock.condition_check(glib.IO_OUT)
+        self.failUnless(isinstance(check, gobject.GFlags))
+        self.failUnlessEqual(check, glib.IO_OUT | glib.IO_HUP)
+
+    def test_socket_condition_wait(self):
+        res = self.sock.condition_wait(glib.IO_OUT)
+        self.failUnless(res)
+
+    def tearDown(self):
+        self.sock.close()
+
+class TestSocketAddress(unittest.TestCase):
+    def test_socket_address_enumerator_next_async(self):
+        def callback(enumerator, result):
+            try:
+                address = enumerator.next_finish(result)
+                self.failUnless(isinstance(address, gio.SocketAddress))
+            finally:
+                loop.quit()
+
+        socket = gio.NetworkAddress("www.pygtk.org", 80)
+        enumerator = socket.enumerate()
+        enumerator.next_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+class TestSocketListener(unittest.TestCase):
+    def test_socket_listener_add_address(self):
+        address = gio.inet_address_new_from_string("127.0.0.1")
+        inetsock = gio.InetSocketAddress(address, 1024)
+        
+        listener = gio.SocketListener()
+        effective = listener.add_address(inetsock, gio.SOCKET_TYPE_STREAM, gio.SOCKET_PROTOCOL_TCP)
+        self.failUnless(isinstance(effective, gio.InetSocketAddress))
+
+    def test_socket_listener_accept(self):
+        address = gio.inet_address_new_from_string("127.0.0.1")
+        inetsock = gio.InetSocketAddress(address, 1024)
+
+        listener = gio.SocketListener()
+        listener.add_address(inetsock, gio.SOCKET_TYPE_STREAM, gio.SOCKET_PROTOCOL_TCP)
+
+        client = gio.SocketClient()
+        client.connect_to_host("127.0.0.1:1024", 1024)
+
+        connection, source = listener.accept(cancellable=None)
+        self.failUnless(isinstance(connection, gio.TcpConnection))
+
+    def test_socket_listener_accept_socket(self):
+        address = gio.inet_address_new_from_string("127.0.0.1")
+        inetsock = gio.InetSocketAddress(address, 1024)
+
+        listener = gio.SocketListener()
+        listener.add_address(inetsock, gio.SOCKET_TYPE_STREAM, gio.SOCKET_PROTOCOL_TCP)
+
+        client = gio.SocketClient()
+        client.connect_to_host("127.0.0.1:1024", 1024)
+
+        socket, source = listener.accept_socket(cancellable=None)
+        self.failUnless(isinstance(socket, gio.Socket))
+
+    def test_socket_listener_accept_async(self):
+        def callback(listener, result):
+            try:
+                connection, source = listener.accept_finish(result)
+                self.failUnless(isinstance(connection, gio.TcpConnection))
+            finally:
+                loop.quit()
+
+        address = gio.inet_address_new_from_string("127.0.0.1")
+        inetsock = gio.InetSocketAddress(address, 1024)
+        
+        listener = gio.SocketListener()
+        listener.add_address(inetsock,
+                             gio.SOCKET_TYPE_STREAM,
+                             gio.SOCKET_PROTOCOL_TCP)
+
+        client = gio.SocketClient()
+        client.connect_to_host("127.0.0.1:1024", 1024)
+        
+        listener.accept_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
+
+    def test_socket_listener_accept_socket_async(self):
+        def callback(listener, result):
+            try:
+                socket, source = listener.accept_socket_finish(result)
+                self.failUnless(isinstance(socket, gio.Socket))
+            finally:
+                loop.quit()
+
+        address = gio.inet_address_new_from_string("127.0.0.1")
+        inetsock = gio.InetSocketAddress(address, 1024)
+        
+        listener = gio.SocketListener()
+        listener.add_address(inetsock,
+                             gio.SOCKET_TYPE_STREAM,
+                             gio.SOCKET_PROTOCOL_TCP)
+
+        client = gio.SocketClient()
+        client.connect_to_host("127.0.0.1:1024", 1024)
+        
+        listener.accept_socket_async(callback)
+
+        loop = glib.MainLoop()
+        loop.run()
diff --git a/tests/test_interface.py b/tests/test_interface.py
new file mode 100644 (file)
index 0000000..fbc0586
--- /dev/null
@@ -0,0 +1,49 @@
+# -*- Mode: Python -*-
+
+import unittest
+
+import gobject
+import testhelper
+
+
+GUnknown = gobject.type_from_name("TestUnknown")
+Unknown = GUnknown.pytype
+
+
+class MyUnknown(Unknown, testhelper.Interface):
+    some_property = gobject.property(type=str)
+
+    def __init__(self):
+        Unknown.__init__(self)
+        self.called = False
+
+    def do_iface_method(self):
+        self.called = True
+        Unknown.do_iface_method(self)
+gobject.type_register(MyUnknown)
+
+
+class MyObject(gobject.GObject, testhelper.Interface):
+    some_property = gobject.property(type=str)
+
+    def __init__(self):
+        gobject.GObject.__init__(self)
+        self.called = False
+
+    def do_iface_method(self):
+        self.called = True
+gobject.type_register(MyObject)
+
+
+class TestIfaceImpl(unittest.TestCase):
+
+    def testReImplementInterface(self):
+        m = MyUnknown()
+        m.iface_method()
+        self.assertEqual(m.called, True)
+
+    def testImplementInterface(self):
+        m = MyObject()
+        m.iface_method()
+        self.assertEqual(m.called, True)
+
diff --git a/tests/test_mainloop.py b/tests/test_mainloop.py
new file mode 100644 (file)
index 0000000..80e2aec
--- /dev/null
@@ -0,0 +1,51 @@
+# -*- Mode: Python -*-
+
+import os
+import sys
+import select
+import unittest
+
+import glib
+
+from compathelper import _bytes
+
+class TestMainLoop(unittest.TestCase):
+    def testExceptionHandling(self):
+        pipe_r, pipe_w = os.pipe()
+
+        pid = os.fork()
+        if pid == 0:
+            os.close(pipe_w)
+            select.select([pipe_r], [], [])
+            os.close(pipe_r)
+            os._exit(1)
+
+        def child_died(pid, status, loop):
+            loop.quit()
+            raise Exception("deadbabe")
+
+        loop = glib.MainLoop()
+        glib.child_watch_add(pid, child_died, loop)
+
+        os.close(pipe_r)
+        os.write(pipe_w, _bytes("Y"))
+        os.close(pipe_w)
+
+        def excepthook(type, value, traceback):
+            assert type is Exception
+            assert value.args[0] == "deadbabe"
+        sys.excepthook = excepthook
+
+        got_exception = False
+        try:
+            loop.run()
+        except:
+            got_exception = True
+
+        #
+        # The exception should be handled (by printing it)
+        # immediately on return from child_died() rather
+        # than here. See bug #303573
+        #
+        sys.excepthook = sys.__excepthook__
+        assert not got_exception
diff --git a/tests/test_option.py b/tests/test_option.py
new file mode 100644 (file)
index 0000000..a6ecc98
--- /dev/null
@@ -0,0 +1,120 @@
+#!/usr/bin/env python
+
+import unittest
+import sys
+
+# py3k has StringIO in a different module
+try:
+    from StringIO import StringIO
+except ImportError:
+    from io import StringIO
+
+from glib.option import OptionParser, OptionGroup, OptionValueError, \
+     make_option, BadOptionError
+
+from compathelper import _bytes
+
+class TestOption(unittest.TestCase):
+    EXCEPTION_MESSAGE = "This callback fails"
+
+    def setUp(self):
+        self.parser = OptionParser("NAMES...",
+                                     description="Option unit test")
+        self.parser.add_option("-t", "--test", help="Unit test option",
+                          action="store_false", dest="test", default=True)
+        self.parser.add_option("--g-fatal-warnings",
+                               action="store_true",
+                               dest="fatal_warnings",
+                               help="dummy"),
+
+    def _create_group(self):
+        def option_callback(option, opt, value, parser):
+            raise Exception(self.EXCEPTION_MESSAGE)
+
+        group = OptionGroup(
+            "unittest", "Unit test options", "Show all unittest options",
+            option_list = [
+                make_option("-f", "-u", "--file", "--unit-file",
+                                   type="filename",
+                                   dest="unit_file",
+                                   help="Unit test option"),
+                make_option("--test-integer",
+                                   type="int",
+                                   dest="test_integer",
+                                   help="Unit integer option"),
+                make_option("--callback-failure-test",
+                                   action="callback",
+                                   callback=option_callback,
+                                   dest="test_integer",
+                                   help="Unit integer option"),
+            ])
+        group.add_option("-t", "--test",
+                         action="store_false",
+                         dest="test",
+                         default=True,
+                         help="Unit test option")
+        self.parser.add_option_group(group)
+        return group
+
+    def testParseArgs(self):
+        options, args = self.parser.parse_args(
+            ["test_option.py"])
+        self.failIf(args)
+
+        options, args = self.parser.parse_args(
+            ["test_option.py", "foo"])
+        self.assertEquals(args, ["foo"])
+
+        options, args = self.parser.parse_args(
+            ["test_option.py", "foo", "bar"])
+        self.assertEquals(args, ["foo", "bar"])
+
+    def testParseArgsDoubleDash(self):
+        options, args = self.parser.parse_args(
+            ["test_option.py", "--", "-xxx"])
+        #self.assertEquals(args, ["-xxx"])
+
+    def testParseArgs(self):
+        options, args = self.parser.parse_args()
+
+    def testParseArgsGroup(self):
+        group = self._create_group()
+
+        options, args = self.parser.parse_args(
+            ["test_option.py", "--test", "-f", "test"])
+
+        self.failIf(options.test)
+        self.assertEqual(options.unit_file, "test")
+
+        self.failUnless(group.values.test)
+        self.failIf(self.parser.values.test)
+        self.assertEqual(group.values.unit_file, "test")
+        self.failIf(args)
+
+    def testOptionValueError(self):
+        self._create_group()
+        self.assertRaises(OptionValueError, self.parser.parse_args,
+                          ["test_option.py", "--test-integer=text"])
+
+    def testBadOptionError(self):
+        self.assertRaises(BadOptionError,
+                          self.parser.parse_args,
+                          ["test_option.py", "--unknwon-option"])
+
+    def testOptionGroupConstructor(self):
+        self.assertRaises(TypeError, OptionGroup)
+
+    def testStandardError(self):
+        self._create_group()
+        sio = StringIO()
+        old_stderr = sys.stderr
+        sys.stderr = sio
+        try:
+            self.parser.parse_args(
+                ["test_option.py", "--callback-failure-test"])
+        finally:
+            sys.stderr = old_stderr
+
+        assert (sio.getvalue().split('\n')[-2] ==
+                "Exception: " + self.EXCEPTION_MESSAGE)
+
diff --git a/tests/test_overrides.py b/tests/test_overrides.py
new file mode 100644 (file)
index 0000000..47f38a3
--- /dev/null
@@ -0,0 +1,1505 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# vim: tabstop=4 shiftwidth=4 expandtab
+
+import unittest
+
+import sys
+import os
+sys.path.insert(0, "../")
+
+from compathelper import _long, _unicode, _bytes
+
+from gi.repository import GLib
+from gi.repository import GObject
+from gi.repository import Gdk
+from gi.repository import Gtk
+from gi.repository import Gio
+from gi.repository import Pango
+from gi.repository import GdkPixbuf
+import gi.overrides as overrides
+import gi.types
+
+class TestGLib(unittest.TestCase):
+
+    def test_gvariant_create(self):
+        # simple values
+
+        variant = GLib.Variant('i', 42)
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertEquals(variant.get_int32(), 42)
+
+        variant = GLib.Variant('s', '')
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertEquals(variant.get_string(), '')
+
+        variant = GLib.Variant('s', 'hello')
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertEquals(variant.get_string(), 'hello')
+
+        # boxed variant
+        variant = GLib.Variant('v', GLib.Variant('i', 42))
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertTrue(isinstance(variant.get_variant(), GLib.Variant))
+        self.assertEqual(variant.get_type_string(), 'v')
+        self.assertEqual(variant.get_variant().get_type_string(), 'i')
+        self.assertEquals(variant.get_variant().get_int32(), 42)
+
+        variant = GLib.Variant('v', GLib.Variant('v', GLib.Variant('i', 42)))
+        self.assertEqual(variant.get_type_string(), 'v')
+        self.assertEqual(variant.get_variant().get_type_string(), 'v')
+        self.assertEqual(variant.get_variant().get_variant().get_type_string(), 'i')
+        self.assertEquals(variant.get_variant().get_variant().get_int32(), 42)
+
+        # tuples
+
+        variant = GLib.Variant('()', ())
+        self.assertEqual(variant.get_type_string(), '()')
+        self.assertEquals(variant.n_children(), 0)
+
+        variant = GLib.Variant('(i)', (3,))
+        self.assertEqual(variant.get_type_string(), '(i)')
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertEquals(variant.n_children(), 1)
+        self.assertTrue(isinstance(variant.get_child_value(0), GLib.Variant))
+        self.assertEquals(variant.get_child_value(0).get_int32(), 3)
+
+        variant = GLib.Variant('(ss)', ('mec', 'mac'))
+        self.assertEqual(variant.get_type_string(), '(ss)')
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(0), GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(1), GLib.Variant))
+        self.assertEquals(variant.get_child_value(0).get_string(), 'mec')
+        self.assertEquals(variant.get_child_value(1).get_string(), 'mac')
+
+        # nested tuples
+        variant = GLib.Variant('((si)(ub))', (('hello', -1), (42, True)))
+        self.assertEqual(variant.get_type_string(), '((si)(ub))')
+        self.assertEqual(variant.unpack(), (('hello', -1), (_long(42), True)))
+
+        # dictionaries
+
+        variant = GLib.Variant('a{si}', {})
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertEqual(variant.get_type_string(), 'a{si}')
+        self.assertEquals(variant.n_children(), 0)
+
+        variant = GLib.Variant('a{si}', {'': 1, 'key1': 2, 'key2': 3})
+        self.assertEqual(variant.get_type_string(), 'a{si}')
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(0), GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(1), GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(2), GLib.Variant))
+        self.assertEqual(variant.unpack(), {'': 1, 'key1': 2, 'key2': 3})
+
+        # nested dictionaries
+        variant = GLib.Variant('a{sa{si}}', {})
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertEqual(variant.get_type_string(), 'a{sa{si}}')
+        self.assertEquals(variant.n_children(), 0)
+
+        d = {'':     {'': 1, 'keyn1': 2},
+             'key1': {'key11': 11, 'key12': 12}}
+        variant = GLib.Variant('a{sa{si}}', d)
+        self.assertEqual(variant.get_type_string(), 'a{sa{si}}')
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertEqual(variant.unpack(), d)
+
+        # arrays
+
+        variant = GLib.Variant('ai', [])
+        self.assertEqual(variant.get_type_string(), 'ai')
+        self.assertEquals(variant.n_children(), 0)
+
+        variant = GLib.Variant('ai', [1, 2])
+        self.assertEqual(variant.get_type_string(), 'ai')
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(0), GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(1), GLib.Variant))
+        self.assertEquals(variant.get_child_value(0).get_int32(), 1)
+        self.assertEquals(variant.get_child_value(1).get_int32(), 2)
+
+        variant = GLib.Variant('as', [])
+        self.assertEqual(variant.get_type_string(), 'as')
+        self.assertEquals(variant.n_children(), 0)
+
+        variant = GLib.Variant('as', [''])
+        self.assertEqual(variant.get_type_string(), 'as')
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(0), GLib.Variant))
+        self.assertEquals(variant.get_child_value(0).get_string(), '')
+
+        variant = GLib.Variant('as', ['hello', 'world'])
+        self.assertEqual(variant.get_type_string(), 'as')
+        self.assertTrue(isinstance(variant, GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(0), GLib.Variant))
+        self.assertTrue(isinstance(variant.get_child_value(1), GLib.Variant))
+        self.assertEquals(variant.get_child_value(0).get_string(), 'hello')
+        self.assertEquals(variant.get_child_value(1).get_string(), 'world')
+
+        # nested arrays
+        variant = GLib.Variant('aai', [])
+        self.assertEqual(variant.get_type_string(), 'aai')
+        self.assertEquals(variant.n_children(), 0)
+
+        variant = GLib.Variant('aai', [[]])
+        self.assertEqual(variant.get_type_string(), 'aai')
+        self.assertEquals(variant.n_children(), 1)
+        self.assertEquals(variant.get_child_value(0).n_children(), 0)
+
+        variant = GLib.Variant('aai', [[1, 2], [3, 4, 5]])
+        self.assertEqual(variant.get_type_string(), 'aai')
+        self.assertEquals(variant.unpack(), [[1, 2], [3, 4, 5]])
+
+        #
+        # complex types
+        #
+
+        variant = GLib.Variant('(as)', ([],))
+        self.assertEqual(variant.get_type_string(), '(as)')
+        self.assertEquals(variant.n_children(), 1)
+        self.assertEquals(variant.get_child_value(0).n_children(), 0)
+
+        variant = GLib.Variant('(as)', ([''],))
+        self.assertEqual(variant.get_type_string(), '(as)')
+        self.assertEquals(variant.n_children(), 1)
+        self.assertEquals(variant.get_child_value(0).n_children(), 1)
+        self.assertEquals(variant.get_child_value(0).get_child_value(0).get_string(), '')
+
+        variant = GLib.Variant('(as)', (['hello'],))
+        self.assertEqual(variant.get_type_string(), '(as)')
+        self.assertEquals(variant.n_children(), 1)
+        self.assertEquals(variant.get_child_value(0).n_children(), 1)
+        self.assertEquals(variant.get_child_value(0).get_child_value(0).get_string(), 'hello')
+
+        obj = {'a1': (1, True), 'a2': (2, False)}
+        variant = GLib.Variant('a{s(ib)}', obj)
+        self.assertEqual(variant.get_type_string(), 'a{s(ib)}')
+        self.assertEqual(variant.unpack(), obj)
+
+        obj = {'a1': (1, GLib.Variant('b', True)), 'a2': (2, GLib.Variant('y', 255))}
+        variant = GLib.Variant('a{s(iv)}', obj)
+        self.assertEqual(variant.get_type_string(), 'a{s(iv)}')
+        self.assertEqual(variant.unpack(), {'a1': (1, True), 'a2': (2, 255)})
+
+        obj = (1, {'a': {'a1': True, 'a2': False},
+                   'b': {'b1': False},
+                   'c': {}
+                  },
+               'foo')
+        variant = GLib.Variant('(ia{sa{sb}}s)', obj)
+        self.assertEqual(variant.get_type_string(), '(ia{sa{sb}}s)')
+        self.assertEqual(variant.unpack(), obj)
+
+        obj = {"frequency": GLib.Variant('t', 738000000),
+            "hierarchy": GLib.Variant('i', 0),
+            "bandwidth": GLib.Variant('x', 8),
+            "code-rate-hp": GLib.Variant('d', 2.0/3.0),
+            "constellation": GLib.Variant('s', "QAM16"),
+            "guard-interval": GLib.Variant('u', 4),}
+        variant = GLib.Variant('a{sv}', obj)
+        self.assertEqual(variant.get_type_string(), 'a{sv}')
+        self.assertEqual(variant.unpack(), {"frequency": 738000000,
+            "hierarchy": 0,
+            "bandwidth": 8,
+            "code-rate-hp": 2.0/3.0,
+            "constellation": "QAM16",
+            "guard-interval": 4})
+
+    def test_gvariant_create_errors(self):
+        # excess arguments
+        self.assertRaises(TypeError, GLib.Variant, 'i', 42, 3)
+        self.assertRaises(TypeError, GLib.Variant, '(i)', (42, 3))
+
+        # not enough arguments
+        self.assertRaises(TypeError, GLib.Variant, '(ii)', (42,))
+
+        # data type mismatch
+        self.assertRaises(TypeError, GLib.Variant, 'i', 'hello')
+        self.assertRaises(TypeError, GLib.Variant, 's', 42)
+        self.assertRaises(TypeError, GLib.Variant, '(ss)', 'mec', 'mac')
+
+        # unimplemented data type
+        self.assertRaises(NotImplementedError, GLib.Variant, 'Q', 1)
+
+    def test_gvariant_unpack(self):
+        # simple values
+        res = GLib.Variant.new_int32(-42).unpack()
+        self.assertEqual(res, -42)
+
+        res = GLib.Variant.new_uint64(34359738368).unpack()
+        self.assertEqual(res, 34359738368)
+
+        res = GLib.Variant.new_boolean(True).unpack()
+        self.assertEqual(res, True)
+
+        res = GLib.Variant.new_object_path('/foo/Bar').unpack()
+        self.assertEqual(res, '/foo/Bar')
+
+        # variant
+        res = GLib.Variant('v', GLib.Variant.new_int32(-42)).unpack()
+        self.assertEqual(res, -42)
+
+        variant = GLib.Variant('v', GLib.Variant('v', GLib.Variant('i', 42)))
+        self.assertEqual(res, -42)
+
+        # tuple
+        res = GLib.Variant.new_tuple(GLib.Variant.new_int32(-1),
+                GLib.Variant.new_string('hello')).unpack()
+        self.assertEqual(res, (-1, 'hello'))
+
+        # array
+        vb = GLib.VariantBuilder()
+        vb.init(gi._gi.variant_type_from_string('ai'))
+        vb.add_value(GLib.Variant.new_int32(-1))
+        vb.add_value(GLib.Variant.new_int32(3))
+        res = vb.end().unpack()
+        self.assertEqual(res, [-1, 3])
+
+        # dictionary
+        res = GLib.Variant('a{si}', {'key1': 1, 'key2': 2}).unpack()
+        self.assertEqual(res, {'key1': 1, 'key2': 2})
+
+    def test_gvariant_iteration(self):
+        # array index access
+        vb = GLib.VariantBuilder()
+        vb.init(gi._gi.variant_type_from_string('ai'))
+        vb.add_value(GLib.Variant.new_int32(-1))
+        vb.add_value(GLib.Variant.new_int32(3))
+        v = vb.end()
+
+        self.assertEqual(len(v), 2)
+        self.assertEqual(v[0], -1)
+        self.assertEqual(v[1], 3)
+        self.assertEqual(v[-1], 3)
+        self.assertEqual(v[-2], -1)
+        self.assertRaises(IndexError, v.__getitem__, 2)
+        self.assertRaises(IndexError, v.__getitem__, -3)
+        self.assertRaises(ValueError, v.__getitem__, 'a')
+
+        # array iteration
+        self.assertEqual([x for x in v], [-1, 3])
+        self.assertEqual(list(v), [-1, 3])
+
+        # tuple index access
+        v = GLib.Variant.new_tuple(GLib.Variant.new_int32(-1),
+                GLib.Variant.new_string('hello'))
+        self.assertEqual(len(v), 2)
+        self.assertEqual(v[0], -1)
+        self.assertEqual(v[1], 'hello')
+        self.assertEqual(v[-1], 'hello')
+        self.assertEqual(v[-2], -1)
+        self.assertRaises(IndexError, v.__getitem__, 2)
+        self.assertRaises(IndexError, v.__getitem__, -3)
+        self.assertRaises(ValueError, v.__getitem__, 'a')
+
+        # tuple iteration
+        self.assertEqual([x for x in v], [-1, 'hello'])
+        self.assertEqual(tuple(v), (-1, 'hello'))
+
+        # dictionary index access
+        vsi = GLib.Variant('a{si}', {'key1': 1, 'key2': 2})
+        vis = GLib.Variant('a{is}', {1: 'val1', 5: 'val2'})
+
+        self.assertEqual(len(vsi), 2)
+        self.assertEqual(vsi['key1'], 1)
+        self.assertEqual(vsi['key2'], 2)
+        self.assertRaises(KeyError, vsi.__getitem__, 'unknown')
+
+        self.assertEqual(len(vis), 2)
+        self.assertEqual(vis[1], 'val1')
+        self.assertEqual(vis[5], 'val2')
+        self.assertRaises(KeyError, vsi.__getitem__, 3)
+
+        # dictionary iteration
+        self.assertEqual(set(vsi.keys()), set(['key1', 'key2']))
+        self.assertEqual(set(vis.keys()), set([1, 5]))
+
+        # string index access
+        v = GLib.Variant('s', 'hello')
+        self.assertEqual(len(v), 5)
+        self.assertEqual(v[0], 'h')
+        self.assertEqual(v[4], 'o')
+        self.assertEqual(v[-1], 'o')
+        self.assertEqual(v[-5], 'h')
+        self.assertRaises(IndexError, v.__getitem__, 5)
+        self.assertRaises(IndexError, v.__getitem__, -6)
+
+        # string iteration
+        self.assertEqual([x for x in v], ['h', 'e', 'l', 'l', 'o'])
+
+class TestPango(unittest.TestCase):
+
+    def test_default_font_description(self):
+        desc = Pango.FontDescription()
+        self.assertEquals(desc.get_variant(), Pango.Variant.NORMAL)
+
+    def test_font_description(self):
+        desc = Pango.FontDescription('monospace')
+        self.assertEquals(desc.get_family(), 'monospace')
+        self.assertEquals(desc.get_variant(), Pango.Variant.NORMAL)
+
+    def test_layout(self):
+        self.assertRaises(TypeError, Pango.Layout)
+        context = Pango.Context()
+        layout = Pango.Layout(context)
+        self.assertEquals(layout.get_context(), context)
+
+class TestGdk(unittest.TestCase):
+
+    def test_constructor(self):
+        attribute = Gdk.WindowAttr()
+        attribute.window_type = Gdk.WindowType.CHILD
+        attributes_mask = Gdk.WindowAttributesType.X | \
+            Gdk.WindowAttributesType.Y
+        window = Gdk.Window(None, attribute, attributes_mask)
+        self.assertEquals(window.get_window_type(), Gdk.WindowType.CHILD)
+
+    def test_color(self):
+        color = Gdk.Color(100, 200, 300)
+        self.assertEquals(color.red, 100)
+        self.assertEquals(color.green, 200)
+        self.assertEquals(color.blue, 300)
+        self.assertEquals(color, Gdk.Color(100, 200, 300))
+        self.assertNotEquals(color, Gdk.Color(1, 2, 3))
+
+    def test_rgba(self):
+        self.assertEquals(Gdk.RGBA, overrides.Gdk.RGBA)
+        rgba = Gdk.RGBA(0.1, 0.2, 0.3, 0.4)
+        self.assertEquals(rgba, Gdk.RGBA(0.1, 0.2, 0.3, 0.4))
+        self.assertNotEquals(rgba, Gdk.RGBA(0.0, 0.2, 0.3, 0.4))
+        self.assertEquals(rgba.red, 0.1)
+        self.assertEquals(rgba.green, 0.2)
+        self.assertEquals(rgba.blue, 0.3)
+        self.assertEquals(rgba.alpha, 0.4)
+        rgba.green = 0.9
+        self.assertEquals(rgba.green, 0.9)
+
+    def test_event(self):
+        event = Gdk.Event.new(Gdk.EventType.CONFIGURE)
+        self.assertEquals(event.type, Gdk.EventType.CONFIGURE)
+        self.assertEquals(event.send_event, 0)
+
+        event = Gdk.Event.new(Gdk.EventType.DRAG_MOTION)
+        event.x_root, event.y_root = 0, 5
+        self.assertEquals(event.x_root, 0)
+        self.assertEquals(event.y_root, 5)
+
+        event = Gdk.Event()
+        event.type = Gdk.EventType.SCROLL
+        self.assertRaises(AttributeError, lambda: getattr(event, 'foo_bar'))
+
+    def test_event_structures(self):
+        def button_press_cb(button, event):
+            self.assertTrue(isinstance(event, Gdk.EventButton))
+            self.assertTrue(event.type == Gdk.EventType.BUTTON_PRESS)
+            self.assertEquals(event.send_event, 0)
+            self.assertEquals(event.get_state(), Gdk.ModifierType.CONTROL_MASK)
+            self.assertEquals(event.get_root_coords(), (2, 5))
+
+            event.time = 12345
+            self.assertEquals(event.get_time(), 12345)
+
+        w = Gtk.Window()
+        b = Gtk.Button()
+        b.connect('button-press-event', button_press_cb)
+        w.add(b)
+        w.show_all()
+        Gdk.test_simulate_button(b.get_window(),
+                                 2, 5,
+                                 0,
+                                 Gdk.ModifierType.CONTROL_MASK,
+                                 Gdk.EventType.BUTTON_PRESS)
+
+    def test_cursor(self):
+        self.assertEquals(Gdk.Cursor, overrides.Gdk.Cursor)
+        c = Gdk.Cursor(Gdk.CursorType.WATCH)
+        self.assertNotEqual(c, None)
+        c = Gdk.Cursor(cursor_type = Gdk.CursorType.WATCH)
+        self.assertNotEqual(c, None)
+
+        display_manager = Gdk.DisplayManager.get()
+        display = display_manager.get_default_display()
+
+        test_pixbuf = GdkPixbuf.Pixbuf.new(GdkPixbuf.Colorspace.RGB,
+                                           False,
+                                           8,
+                                           5,
+                                           10)
+
+        c = Gdk.Cursor(display,
+                       test_pixbuf,
+                       y=0, x=0)
+
+        self.assertNotEqual(c, None)
+        self.assertRaises(ValueError, Gdk.Cursor, 1, 2, 3)
+
+class TestGtk(unittest.TestCase):
+
+    def test_container(self):
+        box = Gtk.Box()
+        self.assertTrue(box)
+        label = Gtk.Label()
+        label2 = Gtk.Label()
+        box.add(label)
+        box.add(label2)
+        self.assertTrue(label in box)
+        self.assertTrue(label2 in box)
+        self.assertEqual(len(box), 2)
+        self.assertTrue(box)
+        l = [x for x in box]
+        self.assertEqual(l, [label, label2])
+
+    def test_actions(self):
+        self.assertEquals(Gtk.Action, overrides.Gtk.Action)
+        self.assertRaises(TypeError, Gtk.Action)
+        action = Gtk.Action("test", "Test", "Test Action", Gtk.STOCK_COPY)
+        self.assertEquals(action.get_name(), "test")
+        self.assertEquals(action.get_label(), "Test")
+        self.assertEquals(action.get_tooltip(), "Test Action")
+        self.assertEquals(action.get_stock_id(), Gtk.STOCK_COPY)
+
+        self.assertEquals(Gtk.RadioAction, overrides.Gtk.RadioAction)
+        self.assertRaises(TypeError, Gtk.RadioAction)
+        action = Gtk.RadioAction("test", "Test", "Test Action", Gtk.STOCK_COPY, 1)
+        self.assertEquals(action.get_name(), "test")
+        self.assertEquals(action.get_label(), "Test")
+        self.assertEquals(action.get_tooltip(), "Test Action")
+        self.assertEquals(action.get_stock_id(), Gtk.STOCK_COPY)
+        self.assertEquals(action.get_current_value(), 1)
+
+    def test_actiongroup(self):
+        self.assertEquals(Gtk.ActionGroup, overrides.Gtk.ActionGroup)
+        self.assertRaises(TypeError, Gtk.ActionGroup)
+
+        action_group = Gtk.ActionGroup (name = 'TestActionGroup')
+        callback_data = "callback data"
+
+        def test_action_callback_data(action, user_data):
+            self.assertEquals(user_data, callback_data);
+
+        def test_radio_action_callback_data(action, current, user_data):
+            self.assertEquals(user_data, callback_data);
+
+        action_group.add_actions ([
+            ('test-action1', None, 'Test Action 1',
+             None, None, test_action_callback_data),
+            ('test-action2', Gtk.STOCK_COPY, 'Test Action 2',
+              None, None, test_action_callback_data)], callback_data)
+        action_group.add_toggle_actions([
+            ('test-toggle-action1', None, 'Test Toggle Action 1',
+             None, None, test_action_callback_data, False),
+            ('test-toggle-action2', Gtk.STOCK_COPY, 'Test Toggle Action 2',
+              None, None, test_action_callback_data, True)], callback_data)
+        action_group.add_radio_actions([
+            ('test-radio-action1', None, 'Test Radio Action 1'),
+            ('test-radio-action2', Gtk.STOCK_COPY, 'Test Radio Action 2')], 1,
+            test_radio_action_callback_data,
+            callback_data)
+
+        expected_results = [('test-action1', Gtk.Action),
+                            ('test-action2', Gtk.Action),
+                            ('test-toggle-action1', Gtk.ToggleAction),
+                            ('test-toggle-action2', Gtk.ToggleAction),
+                            ('test-radio-action1', Gtk.RadioAction),
+                            ('test-radio-action2', Gtk.RadioAction)]
+
+        for action in action_group.list_actions():
+            a = (action.get_name(), type(action))
+            self.assertTrue(a in expected_results)
+            expected_results.remove(a)
+            action.activate()
+
+    def test_uimanager(self):
+        self.assertEquals(Gtk.UIManager, overrides.Gtk.UIManager)
+        ui = Gtk.UIManager()
+        ui.add_ui_from_string(
+"""
+<ui>
+    <menubar name="menubar1"></menubar>
+</ui>
+"""
+)
+        menubar = ui.get_widget("/menubar1")
+        self.assertEquals(type(menubar), Gtk.MenuBar)
+
+        ag = Gtk.ActionGroup (name="ag1")
+        ui.insert_action_group(ag)
+        ag2 = Gtk.ActionGroup (name="ag2")
+        ui.insert_action_group(ag2)
+        groups = ui.get_action_groups()
+        self.assertEquals(ag, groups[-2])
+        self.assertEquals(ag2, groups[-1])
+
+    def test_builder(self):
+        self.assertEquals(Gtk.Builder, overrides.Gtk.Builder)
+
+        class SignalTest(GObject.GObject):
+            __gtype_name__ = "GIOverrideSignalTest"
+            __gsignals__ = {
+                "test-signal": (GObject.SIGNAL_RUN_FIRST,
+                                GObject.TYPE_NONE,
+                                []),
+            }
+
+
+        class SignalCheck:
+            def __init__(self):
+                self.sentinel = 0
+
+            def on_signal_1(self, *args):
+                self.sentinel += 1
+
+            def on_signal_3(self, *args):
+                self.sentinel += 3
+
+        signal_checker = SignalCheck()
+        builder = Gtk.Builder()
+
+        # add object1 to the builder
+        builder.add_from_string(
+"""
+<interface>
+  <object class="GIOverrideSignalTest" id="object1">
+      <signal name="test-signal" handler="on_signal_1" />
+  </object>
+</interface>
+""")
+
+        # only add object3 to the builder
+        builder.add_objects_from_string(
+"""
+<interface>
+  <object class="GIOverrideSignalTest" id="object2">
+      <signal name="test-signal" handler="on_signal_2" />
+  </object>
+  <object class="GIOverrideSignalTest" id="object3">
+      <signal name="test-signal" handler="on_signal_3" />
+  </object>
+  <object class="GIOverrideSignalTest" id="object4">
+      <signal name="test-signal" handler="on_signal_4" />
+  </object>
+</interface>
+
+""",
+            ['object3'])
+
+        # hook up signals
+        builder.connect_signals(signal_checker)
+
+        # call their notify signals and check sentinel
+        objects = builder.get_objects()
+        self.assertEquals(len(objects), 2)
+        for obj in objects:
+            obj.emit('test-signal')
+
+        self.assertEquals(signal_checker.sentinel, 4)
+
+    def test_dialogs(self):
+        self.assertEquals(Gtk.Dialog, overrides.Gtk.Dialog)
+        self.assertEquals(Gtk.AboutDialog, overrides.Gtk.AboutDialog)
+        self.assertEquals(Gtk.MessageDialog, overrides.Gtk.MessageDialog)
+        self.assertEquals(Gtk.ColorSelectionDialog, overrides.Gtk.ColorSelectionDialog)
+        self.assertEquals(Gtk.FileChooserDialog, overrides.Gtk.FileChooserDialog)
+        self.assertEquals(Gtk.FontSelectionDialog, overrides.Gtk.FontSelectionDialog)
+        self.assertEquals(Gtk.RecentChooserDialog, overrides.Gtk.RecentChooserDialog)
+
+        # Gtk.Dialog
+        dialog = Gtk.Dialog (title='Foo',
+                             flags=Gtk.DialogFlags.MODAL,
+                             buttons=('test-button1', 1))
+
+        dialog.add_buttons ('test-button2', 2, Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
+
+        self.assertEquals('Foo', dialog.get_title())
+        self.assertTrue(dialog.get_modal())
+        button = dialog.get_widget_for_response (1)
+        self.assertEquals('test-button1', button.get_label())
+        button = dialog.get_widget_for_response (2)
+        self.assertEquals('test-button2', button.get_label())
+        button = dialog.get_widget_for_response (Gtk.ResponseType.CLOSE)
+        self.assertEquals(Gtk.STOCK_CLOSE, button.get_label())
+
+        # Gtk.AboutDialog
+        dialog = Gtk.AboutDialog()
+
+        # Gtk.MessageDialog
+        dialog = Gtk.MessageDialog (title='message dialog test',
+                                    flags=Gtk.DialogFlags.MODAL,
+                                    buttons=Gtk.ButtonsType.OK,
+                                    message_format='dude!')
+
+        self.assertEquals('message dialog test', dialog.get_title())
+        self.assertTrue(dialog.get_modal())
+        text = dialog.get_property('text')
+        self.assertEquals('dude!', text)
+
+        dialog.format_secondary_text('2nd text')
+        self.assertEqual(dialog.get_property('secondary-text'), '2nd text')
+        self.assertFalse(dialog.get_property('secondary-use-markup'))
+
+        dialog.format_secondary_markup('2nd markup')
+        self.assertEqual(dialog.get_property('secondary-text'), '2nd markup')
+        self.assertTrue(dialog.get_property('secondary-use-markup'))
+
+        # Gtk.ColorSelectionDialog
+        dialog = Gtk.ColorSelectionDialog("color selection dialog test")
+        self.assertEquals('color selection dialog test', dialog.get_title())
+
+        # Gtk.FileChooserDialog
+        dialog = Gtk.FileChooserDialog (title='file chooser dialog test',
+                                        buttons=('test-button1', 1),
+                                        action=Gtk.FileChooserAction.SAVE)
+
+        dialog.add_buttons ('test-button2', 2, Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
+        self.assertEquals('file chooser dialog test', dialog.get_title())
+        button = dialog.get_widget_for_response (1)
+        self.assertEquals('test-button1', button.get_label())
+        button = dialog.get_widget_for_response (2)
+        self.assertEquals('test-button2', button.get_label())
+        button = dialog.get_widget_for_response (Gtk.ResponseType.CLOSE)
+        self.assertEquals(Gtk.STOCK_CLOSE, button.get_label())
+        action = dialog.get_property('action')
+        self.assertEquals(Gtk.FileChooserAction.SAVE, action)
+
+
+        # Gtk.FontSelectionDialog
+        dialog = Gtk.ColorSelectionDialog("font selection dialog test")
+        self.assertEquals('font selection dialog test', dialog.get_title())
+
+        # Gtk.RecentChooserDialog
+        test_manager = Gtk.RecentManager()
+        dialog = Gtk.RecentChooserDialog (title='recent chooser dialog test',
+                                          buttons=('test-button1', 1),
+                                          manager=test_manager)
+
+        dialog.add_buttons ('test-button2', 2, Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
+        self.assertEquals('recent chooser dialog test', dialog.get_title())
+        button = dialog.get_widget_for_response (1)
+        self.assertEquals('test-button1', button.get_label())
+        button = dialog.get_widget_for_response (2)
+        self.assertEquals('test-button2', button.get_label())
+        button = dialog.get_widget_for_response (Gtk.ResponseType.CLOSE)
+        self.assertEquals(Gtk.STOCK_CLOSE, button.get_label())
+
+    class TestClass(GObject.GObject):
+        __gtype_name__ = "GIOverrideTreeAPITest"
+
+        def __init__(self, tester, int_value, string_value):
+            super(TestGtk.TestClass, self).__init__()
+            self.tester = tester
+            self.int_value = int_value
+            self.string_value = string_value
+
+        def check(self, int_value, string_value):
+            self.tester.assertEquals(int_value, self.int_value)
+            self.tester.assertEquals(string_value, self.string_value)
+
+    def test_tree_store(self):
+        self.assertEquals(Gtk.TreeStore, overrides.Gtk.TreeStore)
+        self.assertEquals(Gtk.ListStore, overrides.Gtk.ListStore)
+        self.assertEquals(Gtk.TreeModel, overrides.Gtk.TreeModel)
+        self.assertEquals(Gtk.TreeViewColumn, overrides.Gtk.TreeViewColumn)
+
+        class TestPyObject(object):
+            pass
+
+        test_pyobj = TestPyObject()
+        test_pydict = {1:1, "2":2, "3":"3"}
+        test_pylist = [1,"2", "3"]
+        tree_store = Gtk.TreeStore(int,
+                                   'gchararray',
+                                   TestGtk.TestClass,
+                                   object,
+                                   object,
+                                   object,
+                                   bool,
+                                   bool,
+                                   GObject.TYPE_UINT,
+                                   GObject.TYPE_ULONG,
+                                   GObject.TYPE_INT64,
+                                   GObject.TYPE_UINT64,
+                                   GObject.TYPE_UCHAR,
+                                   GObject.TYPE_CHAR)
+
+        parent = None
+        for i in range(100):
+            label = 'this is child #%d' % i
+            testobj = TestGtk.TestClass(self, i, label)
+            parent = tree_store.append(parent, (i,
+                                                label,
+                                                testobj,
+                                                test_pyobj,
+                                                test_pydict,
+                                                test_pylist,
+                                                i % 2,
+                                                bool(i % 2),
+                                                i,
+                                                9223372036854775808,
+                                                -9223372036854775808,
+                                                0xffffffffffffffff,
+                                                254,
+                                                _bytes('a')
+                                                ))
+
+        # len gets the number of children in the root node
+        # since we kept appending to the previous node
+        # there should only be one child of the root
+        self.assertEquals(len(tree_store), 1)
+
+        # walk the tree to see if the values were stored correctly
+        parent = None
+        i = 0
+
+        treeiter = tree_store.iter_children(parent)
+        while treeiter:
+           i = tree_store.get_value(treeiter, 0)
+           s = tree_store.get_value(treeiter, 1)
+           obj = tree_store.get_value(treeiter, 2)
+           obj.check(i, s)
+
+           pyobj = tree_store.get_value(treeiter, 3)
+           self.assertEquals(pyobj, test_pyobj)
+           pydict = tree_store.get_value(treeiter, 4)
+           self.assertEquals(pydict, test_pydict)
+           pylist = tree_store.get_value(treeiter, 5)
+           self.assertEquals(pylist, test_pylist)
+
+           bool_1 = tree_store.get_value(treeiter, 6)
+           bool_2 = tree_store.get_value(treeiter, 7)
+           self.assertEquals(bool_1, bool_2)
+           self.assertTrue(isinstance(bool_1, bool))
+           self.assertTrue(isinstance(bool_2, bool))
+
+           uint_ = tree_store.get_value(treeiter, 8)
+           self.assertEquals(uint_, i)
+           ulong_ = tree_store.get_value(treeiter, 9)
+           self.assertEquals(ulong_, 9223372036854775808)
+           int64_ = tree_store.get_value(treeiter, 10)
+           self.assertEquals(int64_, -9223372036854775808)
+           uint64_ = tree_store.get_value(treeiter, 11)
+           self.assertEquals(uint64_, 0xffffffffffffffff)
+           uchar_ = tree_store.get_value(treeiter, 12)
+           self.assertEquals(ord(uchar_), 254)
+           char_ = tree_store.get_value(treeiter, 13)
+           self.assertEquals(char_, 'a')
+
+           parent = treeiter
+           treeiter = tree_store.iter_children(parent)
+
+        self.assertEquals(i, 99)
+
+    def test_list_store(self):
+        class TestPyObject(object):
+            pass
+
+        class TestPyGObject(GObject.Object):
+            __gtype_name__ = 'TestPyGObject'
+            def __init__(self, i):
+                GObject.Object.__init__(self)
+                self.sentinal = i + 5
+
+        test_pyobj = TestPyObject()
+        test_pydict = {1:1, "2":2, "3":"3"}
+        test_pylist = [1,"2", "3"]
+
+        list_store = Gtk.ListStore(int, str, 'GIOverrideTreeAPITest', object, object, object, bool, bool, object)
+        for i in range(93):
+            label = 'this is row #%d' % i
+            testobj = TestGtk.TestClass(self, i, label)
+            testpygobj = TestPyGObject(i)
+            parent = list_store.append((i,
+                                        label,
+                                        testobj,
+                                        test_pyobj,
+                                        test_pydict,
+                                        test_pylist,
+                                        i % 2,
+                                        bool(i % 2),
+                                        testpygobj))
+
+        i = 93
+        label = _unicode('this is row #93')
+        treeiter = list_store.append()
+        list_store.set_value(treeiter, 0, i)
+        list_store.set_value(treeiter, 1, label)
+        list_store.set_value(treeiter, 2, TestGtk.TestClass(self, i, label))
+        list_store.set_value(treeiter, 3, test_pyobj)
+        list_store.set_value(treeiter, 4, test_pydict)
+        list_store.set_value(treeiter, 5, test_pylist)
+        list_store.set_value(treeiter, 6, 1)
+        list_store.set_value(treeiter, 7, True)
+        list_store.set_value(treeiter, 8, TestPyGObject(i))
+
+        # test automatic unicode->str conversion
+        i = 94
+        label = _unicode('this is row #94')
+        treeiter = list_store.append((i,
+                                      label,
+                                      TestGtk.TestClass(self, i, label),
+                                      test_pyobj,
+                                      test_pydict,
+                                      test_pylist,
+                                      0,
+                                      False,
+                                      TestPyGObject(i)))
+
+        # add sorted items out of order to test insert* apis
+        # also test sending in None to not set a column
+        i = 97
+        label = 'this is row #97'
+        treeiter = list_store.append((None,
+                                      None,
+                                      None,
+                                      test_pyobj,
+                                      None,
+                                      test_pylist,
+                                      1,
+                                      None,
+                                      TestPyGObject(i)))
+
+        list_store.set_value(treeiter, 0, i)
+        list_store.set_value(treeiter, 1, label)
+        list_store.set_value(treeiter, 2, TestGtk.TestClass(self, i, label))
+        list_store.set_value(treeiter, 4, test_pydict)
+        list_store.set_value(treeiter, 7, True)
+        # this should append
+        i = 99
+        label = 'this is row #99'
+        list_store.insert(9999, (i,
+                                 label,
+                                 TestGtk.TestClass(self, i, label),
+                                 test_pyobj,
+                                 test_pydict,
+                                 test_pylist,
+                                 1,
+                                 True,
+                                 TestPyGObject(i)))
+
+        i = 96
+        label = 'this is row #96'
+        list_store.insert_before(treeiter, (i,
+                                            label,
+                                            TestGtk.TestClass(self, i, label),
+                                            test_pyobj,
+                                            test_pydict,
+                                            test_pylist,
+                                            0,
+                                            False,
+                                            TestPyGObject(i)))
+
+        i = 98
+        label = 'this is row #98'
+        list_store.insert_after(treeiter, (i,
+                                           label,
+                                           TestGtk.TestClass(self, i, label),
+                                           test_pyobj,
+                                           test_pydict,
+                                           test_pylist,
+                                           0,
+                                           False,
+                                           TestPyGObject(i)))
+
+
+        i = 95
+        label = 'this is row #95'
+        list_store.insert(95, (i,
+                               label,
+                               TestGtk.TestClass(self, i, label),
+                               test_pyobj,
+                               test_pydict,
+                               test_pylist,
+                               1,
+                               True,
+                               TestPyGObject(i)))
+
+        self.assertEquals(len(list_store), 100)
+
+        # walk the list to see if the values were stored correctly
+        i = 0
+        treeiter = list_store.get_iter_first()
+
+        counter = 0
+        while treeiter:
+            i = list_store.get_value(treeiter, 0)
+            self.assertEquals(i, counter)
+            s = list_store.get_value(treeiter, 1)
+            obj = list_store.get_value(treeiter, 2)
+            obj.check(i, s)
+
+            pyobj = list_store.get_value(treeiter, 3)
+            self.assertEquals(pyobj, test_pyobj)
+            pydict = list_store.get_value(treeiter, 4)
+            self.assertEquals(pydict, test_pydict)
+            pylist = list_store.get_value(treeiter, 5)
+            self.assertEquals(pylist, test_pylist)
+
+            bool_1 = list_store.get_value(treeiter, 6)
+            bool_2 = list_store.get_value(treeiter, 7)
+            self.assertEquals(bool_1, bool_2)
+            self.assertTrue(isinstance(bool_1, bool))
+            self.assertTrue(isinstance(bool_2, bool))
+
+            pygobj = list_store.get_value(treeiter, 8)
+            self.assertEquals(pygobj.sentinal, i + 5)
+
+            treeiter = list_store.iter_next(treeiter)
+
+            counter += 1
+
+        self.assertEquals(i, 99)
+
+    def test_tree_path(self):
+        p1 = Gtk.TreePath()
+        p2 = Gtk.TreePath.new_first()
+        self.assertEqual(p1, p2)
+        self.assertEqual(str(p1), '0')
+        p1 = Gtk.TreePath(2)
+        p2 = Gtk.TreePath.new_from_string('2')
+        self.assertEqual(p1, p2)
+        self.assertEqual(str(p1), '2')
+        p1 = Gtk.TreePath('1:2:3')
+        p2 = Gtk.TreePath.new_from_string('1:2:3')
+        self.assertEqual(p1, p2)
+        self.assertEqual(str(p1), '1:2:3')
+        p1 = Gtk.TreePath((1,2,3))
+        p2 = Gtk.TreePath.new_from_string('1:2:3')
+        self.assertEqual(p1, p2)
+        self.assertEqual(str(p1), '1:2:3')
+        self.assertTrue(p1 != None)
+        self.assertFalse(p1 == None)
+        self.assertTrue(p1 > None)
+        self.assertTrue(p1 >= None)
+        self.assertFalse(p1 < None)
+        self.assertFalse(p1 <= None)
+
+    def test_tree_model(self):
+        tree_store = Gtk.TreeStore(int, str)
+
+        self.assertTrue(tree_store)
+        self.assertEqual(len(tree_store), 0)
+        self.assertEqual(tree_store.get_iter_first(), None)
+
+        def get_by_index(row, col=None):
+            if col:
+                return tree_store[row][col]
+            else:
+                return tree_store[row]
+
+        self.assertRaises(TypeError, get_by_index, None)
+        self.assertRaises(TypeError, get_by_index, "")
+        self.assertRaises(TypeError, get_by_index, ())
+
+        self.assertRaises(IndexError, get_by_index, "0")
+        self.assertRaises(IndexError, get_by_index, 0)
+        self.assertRaises(IndexError, get_by_index, (0,))
+
+        self.assertRaises(ValueError, tree_store.get_iter, "0")
+        self.assertRaises(ValueError, tree_store.get_iter, 0)
+        self.assertRaises(ValueError, tree_store.get_iter, (0,))
+
+        self.assertRaises(ValueError, tree_store.get_iter_from_string, "0")
+
+        for row in tree_store:
+            self.fail("Should not be reached")
+
+        class DerivedIntType(int):
+            pass
+
+        class DerivedStrType(str):
+            pass
+
+        for i in range(100):
+            label = 'this is row #%d' % i
+            parent = tree_store.append(None, (DerivedIntType(i), DerivedStrType(label),))
+            self.assertNotEquals(parent, None)
+            for j in range(20):
+                label = 'this is child #%d of node #%d' % (j, i)
+                child = tree_store.append(parent, (j, label,))
+                self.assertNotEqual(child, None)
+
+        self.assertTrue(tree_store)
+        self.assertEqual(len(tree_store), 100)
+
+        for i,row in enumerate(tree_store):
+            self.assertEqual(row.model, tree_store)
+            self.assertEqual(row.parent, None)
+
+            self.assertEqual(tree_store[i].path, row.path)
+            self.assertEqual(tree_store[str(i)].path, row.path)
+            self.assertEqual(tree_store[(i,)].path, row.path)
+
+            self.assertEqual(tree_store[i][0], i)
+            self.assertEqual(tree_store[i][1], "this is row #%d" % i)
+
+            aiter = tree_store.get_iter(i)
+            self.assertEqual(tree_store.get_path(aiter), row.path)
+
+            aiter = tree_store.get_iter(str(i))
+            self.assertEqual(tree_store.get_path(aiter), row.path)
+
+            aiter = tree_store.get_iter((i,))
+            self.assertEqual(tree_store.get_path(aiter), row.path)
+
+            self.assertEqual(tree_store.iter_parent(aiter), row.parent)
+
+            next = tree_store.iter_next(aiter)
+            if i < len(tree_store) - 1:
+                self.assertEqual(tree_store.get_path(next), row.next.path)
+            else:
+                self.assertEqual(next, None)
+
+            self.assertEqual(tree_store.iter_n_children(row.iter), 20)
+
+            child = tree_store.iter_children(row.iter)
+            for j,childrow in enumerate(row.iterchildren()):
+                child_path = tree_store.get_path(child)
+                self.assertEqual(childrow.path, child_path)
+                self.assertEqual(childrow.parent.path, row.path)
+                self.assertEqual(childrow.path, tree_store[child].path)
+                self.assertEqual(childrow.path, tree_store[child_path].path)
+
+                self.assertEqual(childrow[0], tree_store[child][0])
+                self.assertEqual(childrow[0], j)
+                self.assertEqual(childrow[1], tree_store[child][1])
+                self.assertEqual(childrow[1], 'this is child #%d of node #%d' % (j, i))
+
+                self.assertRaises(IndexError, get_by_index, child, 2)
+
+                tree_store[child][1] = 'this was child #%d of node #%d' % (j, i)
+                self.assertEqual(childrow[1], 'this was child #%d of node #%d' % (j, i))
+
+                nth_child = tree_store.iter_nth_child(row.iter, j)
+                self.assertEqual(childrow.path, tree_store.get_path(nth_child))
+
+                childrow2 = tree_store["%d:%d" % (i, j)]
+                self.assertEqual(childrow.path, childrow2.path)
+
+                childrow2 = tree_store[(i, j,)]
+                self.assertEqual(childrow.path, childrow2.path)
+
+                child = tree_store.iter_next(child)
+                if j < 19:
+                    self.assertEqual(childrow.next.path, tree_store.get_path(child))
+                else:
+                    self.assertEqual(child, childrow.next)
+                    self.assertEqual(child, None)
+
+            self.assertEqual(j, 19)
+
+        self.assertEqual(i, 99)
+
+        # negative indices
+        for i in range(-1,-100,-1):
+            i_real = i + 100
+            self.assertEqual(tree_store[i][0], i_real)
+
+            row = tree_store[i]
+            for j in range(-1, -20, -1):
+                j_real = j + 20
+                path = (i_real, j_real,)
+
+                self.assertEqual(tree_store[path][-2], j_real)
+
+                label = 'this was child #%d of node #%d' % (j_real, i_real)
+                self.assertEqual(tree_store[path][-1], label)
+
+                new_label = 'this still is child #%d of node #%d' % (j_real, i_real)
+                tree_store[path][-1] = new_label
+                self.assertEqual(tree_store[path][-1], new_label)
+
+                self.assertRaises(IndexError, get_by_index, path, -3)
+
+        self.assertRaises(IndexError, get_by_index, -101)
+
+        last_row = tree_store[99]
+        self.assertNotEqual(last_row, None)
+
+        for i,childrow in enumerate(last_row.iterchildren()):
+            if i < 19:
+                self.assertTrue(tree_store.remove(childrow.iter))
+            else:
+                self.assertFalse(tree_store.remove(childrow.iter))
+
+        self.assertEqual(i, 19)
+
+        self.assertEqual(tree_store.iter_n_children(last_row.iter), 0)
+        for childrow in last_row.iterchildren():
+            self.fail("Should not be reached")
+
+        aiter = tree_store.get_iter(10)
+        self.assertRaises(TypeError, tree_store.get, aiter, 1, 'a')
+        self.assertRaises(ValueError, tree_store.get, aiter, 1, -1)
+        self.assertRaises(ValueError, tree_store.get, aiter, 1, 100)
+        self.assertEqual(tree_store.get(aiter, 0, 1), (10, 'this is row #10'))
+
+    def test_tree_view_column(self):
+        cell = Gtk.CellRendererText()
+        column = Gtk.TreeViewColumn(title='This is just a test',
+                                    cell_renderer=cell,
+                                    text=0,
+                                    style=2)
+
+    def test_tree_selection(self):
+        store = Gtk.ListStore(int, str)
+        for i in range(10):
+            store.append((i, "foo"))
+        view = Gtk.TreeView()
+        view.set_model(store)
+        firstpath = store.get_path(store.get_iter_first())
+        sel = view.get_selection()
+
+        sel.select_path(firstpath)
+        (m, s) = sel.get_selected()
+        self.assertEqual(m, store)
+        self.assertEqual(store.get_path(s), firstpath)
+
+        sel.select_path(0)
+        (m, s) = sel.get_selected()
+        self.assertEqual(m, store)
+        self.assertEqual(store.get_path(s), firstpath)
+
+        sel.select_path("0:0")
+        (m, s) = sel.get_selected()
+        self.assertEqual(m, store)
+        self.assertEqual(store.get_path(s), firstpath)
+
+        sel.select_path((0,0))
+        (m, s) = sel.get_selected()
+        self.assertEqual(m, store)
+        self.assertEqual(store.get_path(s), firstpath)
+
+    def test_text_buffer(self):
+        self.assertEquals(Gtk.TextBuffer, overrides.Gtk.TextBuffer)
+        buffer = Gtk.TextBuffer()
+        tag = buffer.create_tag ('title', font = 'Sans 18')
+
+        self.assertEquals(tag.props.name, 'title')
+        self.assertEquals(tag.props.font, 'Sans 18')
+
+        (start, end) = buffer.get_bounds()
+
+        mark = buffer.create_mark(None, start)
+        self.assertFalse(mark.get_left_gravity())
+
+        buffer.set_text('Hello Jane Hello Bob')
+        (start, end) = buffer.get_bounds()
+        text = buffer.get_text(start, end, False)
+        self.assertEquals(text, 'Hello Jane Hello Bob')
+
+        buffer.set_text('')
+        (start, end) = buffer.get_bounds()
+        text = buffer.get_text(start, end, False)
+        self.assertEquals(text, '')
+
+        buffer.insert(end, 'HelloHello')
+        buffer.insert(end, ' Bob')
+
+        cursor_iter = end.copy()
+        cursor_iter.backward_chars(9)
+        buffer.place_cursor(cursor_iter)
+        buffer.insert_at_cursor(' Jane ')
+
+        (start, end) = buffer.get_bounds()
+        text = buffer.get_text(start, end, False)
+        self.assertEquals(text, 'Hello Jane Hello Bob')
+
+        sel = buffer.get_selection_bounds()
+        self.assertEquals(sel, ())
+        buffer.select_range(start, end)
+        sel = buffer.get_selection_bounds()
+        self.assertTrue(sel[0].equal(start))
+        self.assertTrue(sel[1].equal(end))
+
+        buffer.set_text('')
+        buffer.insert_with_tags(buffer.get_start_iter(), 'HelloHello', tag)
+        (start, end) = buffer.get_bounds()
+        self.assertTrue(start.begins_tag(tag))
+        self.assertTrue(start.has_tag(tag))
+
+        buffer.set_text('')
+        buffer.insert_with_tags_by_name(buffer.get_start_iter(), 'HelloHello', 'title')
+        (start, end) = buffer.get_bounds()
+        self.assertTrue(start.begins_tag(tag))
+        self.assertTrue(start.has_tag(tag))
+
+        self.assertRaises(ValueError, buffer.insert_with_tags_by_name,
+                buffer.get_start_iter(), 'HelloHello', 'unknowntag')
+
+    def test_text_iter(self):
+        self.assertEquals(Gtk.TextIter, overrides.Gtk.TextIter)
+        buffer = Gtk.TextBuffer()
+        buffer.set_text('Hello Jane Hello Bob')
+        tag = buffer.create_tag ('title', font = 'Sans 18')
+        (start, end) = buffer.get_bounds()
+        start.forward_chars(10)
+        buffer.apply_tag(tag, start, end)
+        self.assertTrue(start.begins_tag())
+        self.assertTrue(end.ends_tag())
+        self.assertTrue(start.toggles_tag())
+        self.assertTrue(end.toggles_tag())
+        start.backward_chars(1)
+        self.assertFalse(start.begins_tag())
+        self.assertFalse(start.ends_tag())
+        self.assertFalse(start.toggles_tag())
+
+    def test_buttons(self):
+        self.assertEquals(Gtk.Button, overrides.Gtk.Button)
+
+        # test Gtk.Button
+        button = Gtk.Button()
+        button = Gtk.Button(stock=Gtk.STOCK_CLOSE)
+        self.assertEquals(Gtk.STOCK_CLOSE, button.get_label())
+        self.assertTrue(button.get_use_stock())
+        self.assertTrue(button.get_use_underline())
+
+        # test Gtk.LinkButton
+        self.assertRaises(TypeError, Gtk.LinkButton)
+        button = Gtk.LinkButton('http://www.gtk.org', 'Gtk')
+        self.assertEquals('http://www.gtk.org', button.get_uri())
+        self.assertEquals('Gtk', button.get_label())
+
+    def test_inheritance(self):
+        for name in overrides.Gtk.__all__:
+            over = getattr(overrides.Gtk, name)
+            for element in dir(Gtk):
+                try:
+                    klass = getattr(Gtk, element)
+                    info = klass.__info__
+                except (NotImplementedError, AttributeError):
+                    continue
+
+                # Get all parent classes and interfaces klass inherits from
+                if isinstance(info, gi.types.ObjectInfo):
+                    classes = list(info.get_interfaces())
+                    parent = info.get_parent()
+                    while parent.get_name() != "Object":
+                        classes.append(parent)
+                        parent = parent.get_parent()
+                    classes = [kl for kl in classes if kl.get_namespace() == "Gtk"]
+                else:
+                    continue
+
+                for kl in classes:
+                    if kl.get_name() == name:
+                        self.assertTrue(issubclass(klass, over,),
+                            "%r does not inherit from override %r" % (klass, over,))
+
+    def test_editable(self):
+        self.assertEquals(Gtk.Editable, overrides.Gtk.Editable)
+
+        # need to use Gtk.Entry because Editable is an interface
+        entry=Gtk.Entry()
+        pos = entry.insert_text('HeWorld', 0)
+        self.assertEquals(pos, 7)
+        pos = entry.insert_text('llo ', 2)
+        self.assertEquals(pos, 6)
+        text = entry.get_chars(0, 11)
+        self.assertEquals('Hello World', text)
+
+    def test_label(self):
+        label = Gtk.Label('Hello')
+        self.assertEquals(label.get_text(), 'Hello')
+
+    def adjustment_check(self, adjustment, value=0.0, lower=0.0, upper=0.0,
+                         step_increment=0.0, page_increment=0.0, page_size=0.0):
+        self.assertEquals(adjustment.get_value(), value)
+        self.assertEquals(adjustment.get_lower(), lower)
+        self.assertEquals(adjustment.get_upper(), upper)
+        self.assertEquals(adjustment.get_step_increment(), step_increment)
+        self.assertEquals(adjustment.get_page_increment(), page_increment)
+        self.assertEquals(adjustment.get_page_size(), page_size)
+
+    def test_adjustment(self):
+        adjustment =       Gtk.Adjustment(1, 0, 6, 4, 5, 3)
+        self.adjustment_check(adjustment, 1, 0, 6, 4, 5, 3)
+
+        adjustment =       Gtk.Adjustment(1, 0, 6, 4, 5)
+        self.adjustment_check(adjustment, 1, 0, 6, 4, 5)
+
+        adjustment =       Gtk.Adjustment(1, 0, 6, 4)
+        self.adjustment_check(adjustment, 1, 0, 6, 4)
+
+        adjustment =       Gtk.Adjustment(1, 0, 6)
+        self.adjustment_check(adjustment, 1, 0, 6)
+
+        adjustment = Gtk.Adjustment()
+        self.adjustment_check(adjustment)
+
+        adjustment = Gtk.Adjustment(value=1, lower=0, upper=6,
+                                    step_increment=4, page_increment=5, page_size=3)
+        self.adjustment_check(adjustment, 1, 0, 6, 4, 5, 3)
+
+    def test_table(self):
+        table = Gtk.Table()
+        self.assertEquals(table.get_size(), (1,1))
+        self.assertEquals(table.get_homogeneous(), False)
+        table = Gtk.Table(2, 3)
+        self.assertEquals(table.get_size(), (2,3))
+        self.assertEquals(table.get_homogeneous(), False)
+        table = Gtk.Table(2, 3, True)
+        self.assertEquals(table.get_size(), (2,3))
+        self.assertEquals(table.get_homogeneous(), True)
+
+        # Test PyGTK interface
+        table = Gtk.Table(rows=3, columns=2)
+        self.assertEquals(table.get_size(), (3,2))
+        # Test using the actual property names
+        table = Gtk.Table(n_rows=2, n_columns=3, homogeneous=True)
+        self.assertEquals(table.get_size(), (2,3))
+        self.assertEquals(table.get_homogeneous(), True)
+
+        label = Gtk.Label('Hello')
+        table.attach(label, 0, 1, 0, 1)
+        self.assertEquals(label, table.get_children()[0])
+
+    def test_scrolledwindow(self):
+        sw = Gtk.ScrolledWindow()
+        sb = sw.get_hscrollbar()
+        self.assertEquals(sw.get_hadjustment(), sb.get_adjustment())
+        sb = sw.get_vscrollbar()
+        self.assertEquals(sw.get_vadjustment(), sb.get_adjustment())
+
+    def test_widget_drag_methods(self):
+        widget = Gtk.Button()
+
+        # here we are not checking functionality, only that the methods exist
+        # and except the right number of arguments
+
+        widget.drag_check_threshold(0, 0, 0, 0)
+
+        # drag_dest_ methods
+        widget.drag_dest_set(Gtk.DestDefaults.DROP, None, Gdk.DragAction.COPY)
+        widget.drag_dest_add_image_targets()
+        widget.drag_dest_add_text_targets()
+        widget.drag_dest_add_uri_targets()
+        widget.drag_dest_get_track_motion()
+        widget.drag_dest_set_track_motion(True)
+        widget.drag_dest_get_target_list()
+        widget.drag_dest_set_target_list(Gtk.TargetList.new([Gtk.TargetEntry()]))
+        widget.drag_dest_unset()
+
+        widget.drag_highlight()
+        widget.drag_unhighlight()
+
+        # drag_source_ methods
+        widget.drag_source_set(Gdk.ModifierType.BUTTON1_MASK, None, Gdk.DragAction.MOVE)
+        widget.drag_source_add_image_targets()
+        widget.drag_source_add_text_targets()
+        widget.drag_source_add_uri_targets()
+        widget.drag_source_set_icon_name("")
+        widget.drag_source_set_icon_pixbuf(GdkPixbuf.Pixbuf())
+        widget.drag_source_set_icon_stock("")
+        widget.drag_source_get_target_list()
+        widget.drag_source_set_target_list(Gtk.TargetList.new([Gtk.TargetEntry()]))
+        widget.drag_source_unset()
+
+        # these methods cannot be called because they require a valid drag on
+        # a real GdkWindow. So we only check that they exist and are callable.
+        self.assertTrue(hasattr(widget.drag_dest_set_proxy, '__call__'))
+        self.assertTrue(hasattr(widget.drag_get_data, '__call__'))
+
+class TestGio(unittest.TestCase):
+    def setUp(self):
+        os.environ['GSETTINGS_BACKEND'] = 'memory'
+        # support a separate build tree, so look in build dir first
+        os.environ['GSETTINGS_SCHEMA_DIR'] = os.environ.get('TESTS_BUILDDIR', 
+                os.path.dirname(__file__))
+        self.settings = Gio.Settings('org.gnome.test')
+        # we change the values in the tests, so set them to predictable start
+        # value
+        self.settings.reset('test-string')
+        self.settings.reset('test-array')
+
+    def test_file_enumerator(self):
+        self.assertEquals(Gio.FileEnumerator, overrides.Gio.FileEnumerator)
+        f = Gio.file_new_for_path("./")
+
+        iter_info = []
+        for info in f.enumerate_children("standard::*", 0, None):
+            iter_info.append(info.get_name())
+
+        next_info = []
+        enumerator = f.enumerate_children("standard::*", 0, None)
+        while True:
+            info = enumerator.next_file(None)
+            if info is None:
+                break
+            next_info.append(info.get_name())
+
+        self.assertEquals(iter_info, next_info)
+
+    def test_gsettings_native(self):
+        self.assertTrue('test-array' in self.settings.list_keys())
+
+        # get various types
+        v = self.settings.get_value('test-boolean')
+        self.assertEqual(v.get_boolean(), True)
+        self.assertEqual(self.settings.get_boolean('test-boolean'), True)
+
+        v = self.settings.get_value('test-string')
+        self.assertEqual(v.get_string(), 'Hello')
+        self.assertEqual(self.settings.get_string('test-string'), 'Hello')
+
+        v = self.settings.get_value('test-array')
+        self.assertEqual(v.unpack(), [1, 2])
+
+        v = self.settings.get_value('test-tuple')
+        self.assertEqual(v.unpack(), (1, 2))
+
+        # set a value
+        self.settings.set_string('test-string', 'World')
+        self.assertEqual(self.settings.get_string('test-string'), 'World')
+
+        self.settings.set_value('test-string', GLib.Variant('s', 'Goodbye'))
+        self.assertEqual(self.settings.get_string('test-string'), 'Goodbye')
+
+    def test_gsettings_constructor(self):
+        # default constructor uses path from schema
+        self.assertEqual(self.settings.get_property('path'), '/tests/')
+
+        # optional constructor arguments
+        with_path = Gio.Settings('org.gnome.nopathtest', path='/mypath/')
+        self.assertEqual(with_path.get_property('path'), '/mypath/')
+        self.assertEqual(with_path['np-int'], 42)
+
+    def test_gsettings_override(self):
+        # dictionary interface
+        self.assertEqual(len(self.settings), 4)
+        self.assertTrue('test-array' in self.settings)
+        self.assertTrue('test-array' in self.settings.keys())
+        self.failIf('nonexisting' in self.settings)
+        self.failIf(4 in self.settings)
+        self.assertEqual(bool(self.settings), True)
+
+        # get various types
+        self.assertEqual(self.settings['test-boolean'], True)
+        self.assertEqual(self.settings['test-string'], 'Hello')
+        self.assertEqual(self.settings['test-array'], [1, 2])
+        self.assertEqual(self.settings['test-tuple'], (1, 2))
+
+        self.assertRaises(KeyError, self.settings.__getitem__, 'unknown')
+        self.assertRaises(KeyError, self.settings.__getitem__, 2)
+
+        # set a value
+        self.settings['test-string'] = 'Goodbye'
+        self.assertEqual(self.settings['test-string'], 'Goodbye')
+        self.settings['test-array'] = [3, 4, 5]
+        self.assertEqual(self.settings['test-array'], [3, 4, 5])
+
+        self.assertRaises(TypeError, self.settings.__setitem__, 'test-string', 1)
+        self.assertRaises(KeyError, self.settings.__setitem__, 'unknown', 'moo')
+
+    def test_gsettings_empty(self):
+        empty = Gio.Settings('org.gnome.empty', path='/tests/')
+        self.assertEqual(len(empty), 0)
+        self.assertEqual(bool(empty), True)
+        self.assertEqual(empty.keys(), [])
+
+    def test_closures(self):
+        # make sure this doesn't crash
+        def fake_cb(*args):
+            pass
+
+        ag = Gtk.AccelGroup()
+        ag.connect(Gdk.KEY_l, Gdk.ModifierType.CONTROL_MASK, 0, fake_cb)
diff --git a/tests/test_properties.py b/tests/test_properties.py
new file mode 100644 (file)
index 0000000..54afd11
--- /dev/null
@@ -0,0 +1,436 @@
+# coding=utf-8
+
+import sys
+import struct
+import unittest
+
+import gobject
+from gobject import GObject, GType, GEnum, new, PARAM_READWRITE, \
+     PARAM_CONSTRUCT, PARAM_READABLE, PARAM_WRITABLE, PARAM_CONSTRUCT_ONLY
+from gobject.constants import \
+     TYPE_INT, TYPE_UINT, TYPE_LONG, \
+     TYPE_ULONG, TYPE_INT64, TYPE_UINT64
+from gobject.constants import \
+     G_MININT, G_MAXINT, G_MAXUINT, G_MINLONG, G_MAXLONG, \
+     G_MAXULONG
+
+if sys.version_info < (3, 0):
+    TEST_UTF8 = "\xe2\x99\xa5"
+    UNICODE_UTF8 = unicode(TEST_UTF8, 'UTF-8')
+else:
+    TEST_UTF8 = "♥"
+    UNICODE_UTF8 = TEST_UTF8
+
+from compathelper import _long
+
+class PropertyObject(GObject):
+    normal = gobject.property(type=str)
+    construct = gobject.property(
+        type=str,
+        flags=PARAM_READWRITE|PARAM_CONSTRUCT, default='default')
+    construct_only = gobject.property(
+        type=str,
+        flags=PARAM_READWRITE|PARAM_CONSTRUCT_ONLY)
+    uint64 = gobject.property(
+        type=TYPE_UINT64, flags=PARAM_READWRITE|PARAM_CONSTRUCT)
+
+class TestProperties(unittest.TestCase):
+    def testGetSet(self):
+        obj = PropertyObject()
+        obj.props.normal = "value"
+        self.assertEqual(obj.props.normal, "value")
+
+    def testListWithInstance(self):
+        obj = PropertyObject()
+        self.failUnless(hasattr(obj.props, "normal"))
+
+    def testListWithoutInstance(self):
+        self.failUnless(hasattr(PropertyObject.props, "normal"))
+
+    def testSetNoInstance(self):
+        def set(obj):
+            obj.props.normal = "foobar"
+
+        self.assertRaises(TypeError, set, PropertyObject)
+
+    def testIterator(self):
+        for obj in (PropertyObject.props, PropertyObject().props):
+            for pspec in obj:
+                gtype = GType(pspec)
+                self.assertEqual(gtype.parent.name, 'GParam')
+                self.failUnless(pspec.name in ['normal',
+                                               'construct',
+                                               'construct-only',
+                                               'uint64'])
+            self.assertEqual(len(obj), 4)
+
+    def testNormal(self):
+        obj = new(PropertyObject, normal="123")
+        self.assertEqual(obj.props.normal, "123")
+        obj.set_property('normal', '456')
+        self.assertEqual(obj.props.normal, "456")
+        obj.props.normal = '789'
+        self.assertEqual(obj.props.normal, "789")
+
+    def testConstruct(self):
+        obj = new(PropertyObject, construct="123")
+        self.assertEqual(obj.props.construct, "123")
+        obj.set_property('construct', '456')
+        self.assertEqual(obj.props.construct, "456")
+        obj.props.construct = '789'
+        self.assertEqual(obj.props.construct, "789")
+   
+    def testUTF8(self):
+        obj = new(PropertyObject, construct_only=UNICODE_UTF8)
+        self.assertEqual(obj.props.construct_only, TEST_UTF8)
+        obj.set_property('construct', UNICODE_UTF8)
+        self.assertEqual(obj.props.construct, TEST_UTF8)
+        obj.props.normal = UNICODE_UTF8
+        self.assertEqual(obj.props.normal, TEST_UTF8)
+
+    def testIntToStr(self):
+        obj = new(PropertyObject, construct_only=1)
+        self.assertEqual(obj.props.construct_only, '1')
+        obj.set_property('construct', '2')
+        self.assertEqual(obj.props.construct, '2')
+        obj.props.normal = 3
+        self.assertEqual(obj.props.normal, '3')
+
+    def testConstructOnly(self):
+        obj = new(PropertyObject, construct_only="123")
+        self.assertEqual(obj.props.construct_only, "123")
+        self.assertRaises(TypeError,
+                          setattr, obj.props, 'construct_only', '456')
+        self.assertRaises(TypeError,
+                          obj.set_property, 'construct-only', '456')
+
+    def testUint64(self):
+        obj = new(PropertyObject)
+        self.assertEqual(obj.props.uint64, 0)
+        obj.props.uint64 = _long(1)
+        self.assertEqual(obj.props.uint64, _long(1))
+        obj.props.uint64 = 1
+        self.assertEqual(obj.props.uint64, _long(1))
+
+        self.assertRaises((TypeError, OverflowError), obj.set_property, "uint64", _long(-1))
+        self.assertRaises((TypeError, OverflowError), obj.set_property, "uint64", -1)
+
+    def testUInt64DefaultValue(self):
+        try:
+            class TimeControl(GObject):
+                __gproperties__ = {
+                    'time': (TYPE_UINT64, 'Time', 'Time',
+                             _long(0), (1<<64) - 1, _long(0),
+                             PARAM_READABLE)
+                    }
+        except OverflowError:
+            (etype, ex) = sys.exc_info()[2:]
+            self.fail(str(ex))
+
+    def testRange(self):
+        # kiwi code
+        def max(c):
+            return 2 ** ((8 * struct.calcsize(c)) - 1) - 1
+        def umax(c):
+            return 2 ** (8 * struct.calcsize(c)) - 1
+
+        maxint = max('i')
+        minint = -maxint - 1
+        maxuint = umax('I')
+        maxlong = max('l')
+        minlong = -maxlong - 1
+        maxulong = umax('L')
+        maxint64 = max('q')
+        minint64 = -maxint64 - 1
+        maxuint64 = umax('Q')
+
+        types = dict(int=(TYPE_INT, minint, maxint),
+                     uint=(TYPE_UINT, 0, maxuint),
+                     long=(TYPE_LONG, minlong, maxlong),
+                     ulong=(TYPE_ULONG, 0, maxulong),
+                     int64=(TYPE_INT64, minint64, maxint64),
+                     uint64=(TYPE_UINT64, 0, maxuint64))
+
+        def build_gproperties(types):
+            d = {}
+            for key, (gtype, min, max) in types.items():
+                d[key] = (gtype, 'blurb', 'desc', min, max, 0,
+                          PARAM_READABLE | PARAM_WRITABLE)
+            return d
+
+        class RangeCheck(GObject):
+            __gproperties__ = build_gproperties(types)
+
+            def __init__(self):
+                self.values = {}
+                GObject.__init__(self)
+
+            def do_set_property(self, pspec, value):
+                self.values[pspec.name] = value
+
+            def do_get_property(self, pspec):
+                return self.values.get(pspec.name, pspec.default_value)
+
+        self.assertEqual(RangeCheck.props.int.minimum, minint)
+        self.assertEqual(RangeCheck.props.int.maximum, maxint)
+        self.assertEqual(RangeCheck.props.uint.minimum, 0)
+        self.assertEqual(RangeCheck.props.uint.maximum, maxuint)
+        self.assertEqual(RangeCheck.props.long.minimum, minlong)
+        self.assertEqual(RangeCheck.props.long.maximum, maxlong)
+        self.assertEqual(RangeCheck.props.ulong.minimum, 0)
+        self.assertEqual(RangeCheck.props.ulong.maximum, maxulong)
+        self.assertEqual(RangeCheck.props.int64.minimum, minint64)
+        self.assertEqual(RangeCheck.props.int64.maximum, maxint64)
+        self.assertEqual(RangeCheck.props.uint64.minimum, 0)
+        self.assertEqual(RangeCheck.props.uint64.maximum, maxuint64)
+
+        obj = RangeCheck()
+        for key, (gtype, min, max) in types.items():
+            self.assertEqual(obj.get_property(key),
+                             getattr(RangeCheck.props, key).default_value)
+
+            obj.set_property(key, min)
+            self.assertEqual(obj.get_property(key), min)
+
+            obj.set_property(key, max)
+            self.assertEqual(obj.get_property(key), max)
+
+
+    def testMulti(self):
+        obj = PropertyObject()
+        obj.set_properties(normal="foo",
+                           uint64=7)
+        normal, uint64 = obj.get_properties("normal", "uint64")
+        self.assertEqual(normal, "foo")
+        self.assertEqual(uint64, 7)
+
+class TestProperty(unittest.TestCase):
+    def testSimple(self):
+        class C(gobject.GObject):
+            str = gobject.property(type=str)
+            int = gobject.property(type=int)
+            float = gobject.property(type=float)
+            long = gobject.property(type=_long)
+
+        self.failUnless(hasattr(C.props, 'str'))
+        self.failUnless(hasattr(C.props, 'int'))
+        self.failUnless(hasattr(C.props, 'float'))
+        self.failUnless(hasattr(C.props, 'long'))
+
+        o = C()
+        self.assertEqual(o.str, '')
+        o.str = 'str'
+        self.assertEqual(o.str, 'str')
+
+        self.assertEqual(o.int, 0)
+        o.int = 1138
+        self.assertEqual(o.int, 1138)
+
+        self.assertEqual(o.float, 0.0)
+        o.float = 3.14
+        self.assertEqual(o.float, 3.14)
+
+        self.assertEqual(o.long, _long(0))
+        o.long = _long(100)
+        self.assertEqual(o.long, _long(100))
+
+    def testCustomGetter(self):
+        class C(gobject.GObject):
+            def get_prop(self):
+                return 'value'
+            prop = gobject.property(getter=get_prop)
+
+        o = C()
+        self.assertEqual(o.prop, 'value')
+        self.assertRaises(TypeError, setattr, o, 'prop', 'xxx')
+
+    def testCustomSetter(self):
+        class C(gobject.GObject):
+            def set_prop(self, value):
+                self._value = value
+            prop = gobject.property(setter=set_prop)
+
+            def __init__(self):
+                self._value = None
+                gobject.GObject.__init__(self)
+
+        o = C()
+        self.assertEquals(o._value, None)
+        o.prop = 'bar'
+        self.assertEquals(o._value, 'bar')
+        self.assertRaises(TypeError, getattr, o, 'prop')
+
+    def testErrors(self):
+        self.assertRaises(TypeError, gobject.property, type='str')
+        self.assertRaises(TypeError, gobject.property, nick=False)
+        self.assertRaises(TypeError, gobject.property, blurb=False)
+        # this never fail while bool is a subclass of int
+        # >>> bool.__bases__
+        # (<type 'int'>,)
+        # self.assertRaises(TypeError, gobject.property, type=bool, default=0)
+        self.assertRaises(TypeError, gobject.property, type=bool, default='ciao mamma')
+        self.assertRaises(TypeError, gobject.property, type=bool)
+        self.assertRaises(TypeError, gobject.property, type=GEnum)
+        self.assertRaises(TypeError, gobject.property, type=GEnum, default=0)
+        self.assertRaises(TypeError, gobject.property, type=object, default=0)
+        self.assertRaises(TypeError, gobject.property, type=complex)
+        self.assertRaises(TypeError, gobject.property, flags=-10)
+
+    def testDefaults(self):
+        p1 = gobject.property(type=bool, default=True)
+        p2 = gobject.property(type=bool, default=False)
+
+    def testNameWithUnderscore(self):
+        class C(gobject.GObject):
+            prop_name = gobject.property(type=int)
+        o = C()
+        o.prop_name = 10
+        self.assertEqual(o.prop_name, 10)
+
+    def testRange(self):
+        maxint64 = 2 ** 62 - 1
+        minint64 = -2 ** 62 - 1
+        maxuint64 = 2 ** 63 - 1
+
+        types = [
+            (TYPE_INT, G_MININT, G_MAXINT),
+            (TYPE_UINT, 0, G_MAXUINT),
+            (TYPE_LONG, G_MINLONG, G_MAXLONG),
+            (TYPE_ULONG, 0, G_MAXULONG),
+            (TYPE_INT64, minint64, maxint64),
+            (TYPE_UINT64, 0, maxuint64),
+            ]
+
+        for gtype, min, max in types:
+            # Normal, everything is alright
+            prop = gobject.property(type=gtype, minimum=min, maximum=max)
+            subtype = type('', (gobject.GObject,),
+                         dict(prop=prop))
+            self.assertEqual(subtype.props.prop.minimum, min)
+            self.assertEqual(subtype.props.prop.maximum, max)
+
+            # Lower than minimum
+            self.assertRaises(TypeError,
+                              gobject.property, type=gtype, minimum=min-1,
+                              maximum=max)
+
+            # Higher than maximum
+            self.assertRaises(TypeError,
+                              gobject.property, type=gtype, minimum=min,
+                              maximum=max+1)
+
+    def testMultipleInstances(self):
+        class C(gobject.GObject):
+            prop = gobject.property(type=str, default='default')
+
+        o1 = C()
+        o2 = C()
+        self.assertEqual(o1.prop, 'default')
+        self.assertEqual(o2.prop, 'default')
+        o1.prop = 'value'
+        self.assertEqual(o1.prop, 'value')
+        self.assertEqual(o2.prop, 'default')
+
+    def testObjectProperty(self):
+        class PropertyObject(GObject):
+            obj = gobject.property(type=GObject)
+
+        pobj1 = PropertyObject()
+        obj1_hash = hash(pobj1)
+        pobj2 = PropertyObject()
+
+        pobj2.obj = pobj1
+        del pobj1
+        pobj1 = pobj2.obj
+        self.assertEqual(hash(pobj1), obj1_hash)
+
+    def testObjectSubclassProperty(self):
+        class ObjectSubclass(GObject):
+            __gtype_name__ = 'ObjectSubclass'
+
+        class PropertyObjectSubclass(GObject):
+            obj = gobject.property(type=ObjectSubclass)
+
+        obj1 = PropertyObjectSubclass(obj=ObjectSubclass())
+
+    def testPropertySubclass(self):
+        # test for #470718
+        class A(GObject):
+            prop1 = gobject.property(type=int)
+
+        class B(A):
+            prop2 = gobject.property(type=int)
+
+        b = B()
+        b.prop2 = 10
+        self.assertEquals(b.prop2, 10)
+        b.prop1 = 20
+        self.assertEquals(b.prop1, 20)
+
+    def testPropertySubclassCustomSetter(self):
+        # test for #523352
+        class A(GObject):
+            def get_first(self):
+                return 'first'
+            first = gobject.property(type=str, getter=get_first)
+
+        class B(A):
+            def get_second(self):
+                return 'second'
+            second = gobject.property(type=str, getter=get_second)
+
+        a = A()
+        self.assertEquals(a.first, 'first')
+        self.assertRaises(TypeError, setattr, a, 'first', 'foo')
+
+        b = B()
+        self.assertEquals(b.first, 'first')
+        self.assertRaises(TypeError, setattr, b, 'first', 'foo')
+        self.assertEquals(b.second, 'second')
+        self.assertRaises(TypeError, setattr, b, 'second', 'foo')
+
+    def testPropertySubclassCustomSetterError(self):
+        try:
+            class A(GObject):
+                def get_first(self):
+                    return 'first'
+                first = gobject.property(type=str, getter=get_first)
+
+                def do_get_property(self, pspec):
+                    pass
+        except TypeError:
+            pass
+        else:
+            raise AssertionError
+
+    # Bug 587637.
+    def test_float_min(self):
+        gobject.property(type=float, minimum=-1)
+        gobject.property(type=gobject.TYPE_FLOAT, minimum=-1)
+        gobject.property(type=gobject.TYPE_DOUBLE, minimum=-1)
+
+    # Bug 644039
+    def testReferenceCount(self):
+        # We can check directly if an object gets finalized, so we will
+        # observe it indirectly through the refcount of a member object.
+
+        # We create our dummy object and store its current refcount
+        o = object()
+        rc = sys.getrefcount(o)
+
+        # We add our object as a member to our newly created object we
+        # want to observe. Its refcount is increased by one.
+        t = PropertyObject(normal="test")
+        t.o = o
+        self.assertEquals(sys.getrefcount(o), rc + 1)
+
+        # Now we want to ensure we do not leak any references to our
+        # object with properties. If no ref is leaked, then when deleting
+        # the local reference to this object, its reference count shoud
+        # drop to zero, and our dummy object should loose one reference.
+        del t
+        self.assertEquals(sys.getrefcount(o), rc)
+
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/tests/test_signal.py b/tests/test_signal.py
new file mode 100644 (file)
index 0000000..d68cb5b
--- /dev/null
@@ -0,0 +1,395 @@
+# -*- Mode: Python -*-
+
+import gc
+import unittest
+import sys
+
+import gobject
+import testhelper
+from compathelper import _long
+
+class C(gobject.GObject):
+    __gsignals__ = { 'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+                                   (gobject.TYPE_INT,)) }
+    def do_my_signal(self, arg):
+        self.arg = arg
+
+class D(C):
+    def do_my_signal(self, arg2):
+        self.arg2 = arg2
+        C.do_my_signal(self, arg2)
+
+class TestSignalCreation(unittest.TestCase):
+    # Bug 540376.
+    def test_illegals(self):
+        self.assertRaises(TypeError, lambda: gobject.signal_new('test',
+                                                                None,
+                                                                0,
+                                                                gobject.TYPE_NONE,
+                                                                (gobject.TYPE_LONG,)))
+
+
+class TestChaining(unittest.TestCase):
+    def setUp(self):
+        self.inst = C()
+        self.inst.connect("my_signal", self.my_signal_handler_cb, 1, 2, 3)
+
+    def my_signal_handler_cb(self, *args):
+        assert len(args) == 5
+        assert isinstance(args[0], C)
+        assert args[0] == self.inst
+
+        assert isinstance(args[1], int)
+        assert args[1] == 42
+
+        assert args[2:] == (1, 2, 3)
+
+    def testChaining(self):
+        self.inst.emit("my_signal", 42)
+        assert self.inst.arg == 42
+
+    def testChaining(self):
+        inst2 = D()
+        inst2.emit("my_signal", 44)
+        assert inst2.arg == 44
+        assert inst2.arg2 == 44
+
+# This is for bug 153718
+class TestGSignalsError(unittest.TestCase):
+    def testInvalidType(self, *args):
+        def foo():
+            class Foo(gobject.GObject):
+                __gsignals__ = None
+        self.assertRaises(TypeError, foo)
+        gc.collect()
+
+    def testInvalidName(self, *args):
+        def foo():
+            class Foo(gobject.GObject):
+                __gsignals__ = {'not-exists' : 'override'}
+        self.assertRaises(TypeError, foo)
+        gc.collect()
+
+class TestGPropertyError(unittest.TestCase):
+    def testInvalidType(self, *args):
+        def foo():
+            class Foo(gobject.GObject):
+                __gproperties__ = None
+        self.assertRaises(TypeError, foo)
+        gc.collect()
+
+    def testInvalidName(self, *args):
+        def foo():
+            class Foo(gobject.GObject):
+                __gproperties__ = { None: None }
+
+        self.assertRaises(TypeError, foo)
+        gc.collect()
+
+class TestList(unittest.TestCase):
+    def testListObject(self):
+        self.assertEqual(gobject.signal_list_names(C), ('my-signal',))
+
+
+def my_accumulator(ihint, return_accu, handler_return, user_data):
+    """An accumulator that stops emission when the sum of handler
+    returned values reaches 3"""
+    assert user_data == "accum data"
+    if return_accu >= 3:
+        return False, return_accu
+    return True, return_accu + handler_return
+
+class Foo(gobject.GObject):
+    __gsignals__ = {
+        'my-acc-signal': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_INT,
+                                   (), my_accumulator, "accum data"),
+        'my-other-acc-signal': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_BOOLEAN,
+                                (), gobject.signal_accumulator_true_handled)
+        }
+
+class TestAccumulator(unittest.TestCase):
+
+    def testAccumulator(self):
+        inst = Foo()
+        inst.connect("my-acc-signal", lambda obj: 1)
+        inst.connect("my-acc-signal", lambda obj: 2)
+        ## the value returned in the following handler will not be
+        ## considered, because at this point the accumulator already
+        ## reached its limit.
+        inst.connect("my-acc-signal", lambda obj: 3)
+        retval = inst.emit("my-acc-signal")
+        self.assertEqual(retval, 3)
+
+    def testAccumulatorTrueHandled(self):
+        inst = Foo()
+        inst.connect("my-other-acc-signal", self._true_handler1)
+        inst.connect("my-other-acc-signal", self._true_handler2)
+        ## the following handler will not be called because handler2
+        ## returns True, so it should stop the emission.
+        inst.connect("my-other-acc-signal", self._true_handler3)
+        self.__true_val = None
+        inst.emit("my-other-acc-signal")
+        self.assertEqual(self.__true_val, 2)
+
+    def _true_handler1(self, obj):
+        self.__true_val = 1
+        return False
+    def _true_handler2(self, obj):
+        self.__true_val = 2
+        return True
+    def _true_handler3(self, obj):
+        self.__true_val = 3
+        return False
+
+class E(gobject.GObject):
+    __gsignals__ = { 'signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+                                ()) }
+    def __init__(self):
+        gobject.GObject.__init__(self)
+        self.status = 0
+
+    def do_signal(self):
+        assert self.status == 0
+        self.status = 1
+
+class F(gobject.GObject):
+    __gsignals__ = { 'signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+                                ()) }
+    def __init__(self):
+        gobject.GObject.__init__(self)
+        self.status = 0
+
+    def do_signal(self):
+        self.status += 1
+
+class TestEmissionHook(unittest.TestCase):
+    def testAdd(self):
+        self.hook = True
+        e = E()
+        e.connect('signal', self._callback)
+        gobject.add_emission_hook(E, "signal", self._emission_hook)
+        e.emit('signal')
+        self.assertEqual(e.status, 3)
+
+    def testRemove(self):
+        self.hook = False
+        e = E()
+        e.connect('signal', self._callback)
+        hook_id = gobject.add_emission_hook(E, "signal", self._emission_hook)
+        gobject.remove_emission_hook(E, "signal", hook_id)
+        e.emit('signal')
+        self.assertEqual(e.status, 3)
+
+    def _emission_hook(self, e):
+        self.assertEqual(e.status, 1)
+        e.status = 2
+
+    def _callback(self, e):
+        if self.hook:
+            self.assertEqual(e.status, 2)
+        else:
+            self.assertEqual(e.status, 1)
+        e.status = 3
+
+    def testCallbackReturnFalse(self):
+        self.hook = False
+        obj = F()
+        def _emission_hook(obj):
+            obj.status += 1
+            return False
+        hook_id = gobject.add_emission_hook(obj, "signal", _emission_hook)
+        obj.emit('signal')
+        obj.emit('signal')
+        self.assertEqual(obj.status, 3)
+
+    def testCallbackReturnTrue(self):
+        self.hook = False
+        obj = F()
+        def _emission_hook(obj):
+            obj.status += 1
+            return True
+        hook_id = gobject.add_emission_hook(obj, "signal", _emission_hook)
+        obj.emit('signal')
+        obj.emit('signal')
+        gobject.remove_emission_hook(obj, "signal", hook_id)
+        self.assertEqual(obj.status, 4)
+
+    def testCallbackReturnTrueButRemove(self):
+        self.hook = False
+        obj = F()
+        def _emission_hook(obj):
+            obj.status += 1
+            return True
+        hook_id = gobject.add_emission_hook(obj, "signal", _emission_hook)
+        obj.emit('signal')
+        gobject.remove_emission_hook(obj, "signal", hook_id)
+        obj.emit('signal')
+        self.assertEqual(obj.status, 3)
+
+class TestClosures(unittest.TestCase):
+    def setUp(self):
+        self.count = 0
+
+    def _callback(self, e):
+        self.count += 1
+
+    def testDisconnect(self):
+        e = E()
+        e.connect('signal', self._callback)
+        e.disconnect_by_func(self._callback)
+        e.emit('signal')
+        self.assertEqual(self.count, 0)
+
+    def testHandlerBlock(self):
+        e = E()
+        e.connect('signal', self._callback)
+        e.handler_block_by_func(self._callback)
+        e.emit('signal')
+        self.assertEqual(self.count, 0)
+
+    def testHandlerUnBlock(self):
+        e = E()
+        signal_id = e.connect('signal', self._callback)
+        e.handler_block(signal_id)
+        e.handler_unblock_by_func(self._callback)
+        e.emit('signal')
+        self.assertEqual(self.count, 1)
+
+    def testHandlerBlockMethod(self):
+        # Filed as #375589
+        class A:
+            def __init__(self):
+                self.a = 0
+
+            def callback(self, o):
+                self.a = 1
+                o.handler_block_by_func(self.callback)
+
+        inst = A()
+        e = E()
+        e.connect("signal", inst.callback)
+        e.emit('signal')
+        self.assertEqual(inst.a, 1)
+        gc.collect()
+
+    def testGString(self):
+        class C(gobject.GObject):
+            __gsignals__ = { 'my_signal': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_GSTRING,
+                                           (gobject.TYPE_GSTRING,)) }
+            def __init__(self, test):
+                gobject.GObject.__init__(self)
+                self.test = test
+            def do_my_signal(self, data):
+                self.data = data
+                self.test.assertEqual(len(data), 3)
+                return ''.join([data[2], data[1], data[0]])
+        c = C(self)
+        data = c.emit("my_signal", "\01\00\02")
+        self.assertEqual(data, "\02\00\01")
+
+class SigPropClass(gobject.GObject):
+    __gsignals__ = { 'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+                                   (gobject.TYPE_INT,)) }
+
+    __gproperties__ = {
+        'foo': (str, None, None, '', gobject.PARAM_WRITABLE|gobject.PARAM_CONSTRUCT),
+        }
+
+    signal_emission_failed = False
+
+    def do_my_signal(self, arg):
+        self.arg = arg
+
+    def do_set_property(self, pspec, value):
+        if pspec.name == 'foo':
+            self._foo = value
+        else:
+            raise AttributeError('unknown property %s' % pspec.name)
+        try:
+            self.emit("my-signal", 1)
+        except TypeError:
+            self.signal_emission_failed = True
+
+
+class TestSigProp(unittest.TestCase):
+    def testEmitInPropertySetter(self):
+        obj = SigPropClass()
+        self.failIf(obj.signal_emission_failed)
+
+f = gobject.SIGNAL_RUN_FIRST
+l = gobject.SIGNAL_RUN_LAST
+float = gobject.TYPE_FLOAT
+double = gobject.TYPE_DOUBLE
+uint = gobject.TYPE_UINT
+ulong = gobject.TYPE_ULONG
+
+class CM(gobject.GObject):
+    __gsignals__ = dict(
+        test1=(f, None, ()),
+        test2=(l, None, (str,)),
+        test3=(l, int, (double,)),
+        test4=(f, None, (bool, _long, float, double, int, uint, ulong)),
+        test_float=(l, float, (float,)),
+        test_double=(l, double, (double, )),
+        test_string=(l, str, (str, )),
+        test_object=(l, object, (object, )),
+    )
+
+class _TestCMarshaller:
+    def setUp(self):
+        self.obj = CM()
+        testhelper.connectcallbacks(self.obj)
+
+    def testTest1(self):
+        self.obj.emit("test1")
+
+    def testTest2(self):
+        self.obj.emit("test2", "string")
+
+    def testTest3(self):
+        rv = self.obj.emit("test3", 42.0)
+        self.assertEqual(rv, 20)
+
+    def testTest4(self):
+        self.obj.emit("test4", True, _long(10), 3.14, 1.78, 20, _long(30), _long(31))
+
+    def testTestReturnFloat(self):
+        rv = self.obj.emit("test-float", 1.234)
+        self.failUnless(rv >= 1.233999 and rv <= 1.2400001, rv)
+
+    def testTestReturnDouble(self):
+        rv = self.obj.emit("test-double", 1.234)
+        self.assertEqual(rv, 1.234)
+
+    def testTestReturnString(self):
+        rv = self.obj.emit("test-string", "str")
+        self.assertEqual(rv, "str")
+
+    def testTestReturnObject(self):
+        rv = self.obj.emit("test-object", self)
+        self.assertEqual(rv, self)
+
+if 'generic-c-marshaller' in gobject.features:
+    class TestCMarshaller(_TestCMarshaller, unittest.TestCase):
+        pass
+else:
+    print()
+    print('** WARNING: LIBFFI disabled, not testing')
+    print()
+
+# Test for 374653
+class TestPyGValue(unittest.TestCase):
+    def testNoneNULLBoxedConversion(self):
+        class C(gobject.GObject):
+            __gsignals__ = dict(my_boxed_signal=(
+                gobject.SIGNAL_RUN_LAST,
+                gobject.type_from_name('GStrv'), ()))
+
+        obj = C()
+        obj.connect('my-boxed-signal', lambda obj: None)
+        sys.last_type = None
+        obj.emit('my-boxed-signal')
+        assert not sys.last_type
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/tests/test_source.py b/tests/test_source.py
new file mode 100644 (file)
index 0000000..339fb32
--- /dev/null
@@ -0,0 +1,100 @@
+# -*- Mode: Python -*-
+
+import unittest
+
+import glib
+
+
+class Idle(glib.Idle):
+    def __init__(self, loop):
+        glib.Idle.__init__(self)
+        self.count = 0
+        self.set_callback(self.callback, loop)
+
+    def callback(self, loop):
+        self.count += 1
+        return True
+
+
+class MySource(glib.Source):
+    def __init__(self):
+        glib.Source.__init__(self)
+
+    def prepare(self):
+        return True, 0
+
+    def check(self):
+        return True
+
+    def dispatch(self, callback, args):
+        return callback(*args)
+
+
+class TestSource(unittest.TestCase):
+    def timeout_callback(self, loop):
+        loop.quit()
+
+    def my_callback(self, loop):
+        self.pos += 1
+        return True
+
+    def setup_timeout(self, loop):
+        timeout = glib.Timeout(500)
+        timeout.set_callback(self.timeout_callback, loop)
+        timeout.attach()
+
+    def testSources(self):
+        loop = glib.MainLoop()
+
+        self.setup_timeout(loop)
+
+        idle = Idle(loop)
+        idle.attach()
+
+        self.pos = 0
+
+        m = MySource()
+        m.set_callback(self.my_callback, loop)
+        m.attach()
+
+        loop.run()
+
+        assert self.pos >= 0 and idle.count >= 0
+
+    def testSourcePrepare(self):
+        # this test may not terminate if prepare() is wrapped incorrectly
+        dispatched = [False]
+        loop = glib.MainLoop()
+
+        class CustomTimeout(glib.Source):
+            def prepare(self):
+                return (False, 10)
+
+            def check(self):
+                return True
+
+            def dispatch(self, callback, args):
+                dispatched[0] = True
+
+                loop.quit()
+
+                return False
+
+        source = CustomTimeout()
+
+        source.attach()
+        source.set_callback(dir)
+
+        loop.run()
+
+        assert dispatched[0]
+
+
+class TestTimeout(unittest.TestCase):
+     def test504337(self):
+        timeout_source = glib.Timeout(20)
+        idle_source = glib.Idle()
+
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/tests/test_subprocess.py b/tests/test_subprocess.py
new file mode 100644 (file)
index 0000000..c90d1d6
--- /dev/null
@@ -0,0 +1,24 @@
+# -*- Mode: Python -*-
+
+import sys
+import unittest
+
+import glib
+
+
+class TestProcess(unittest.TestCase):
+
+    def _child_watch_cb(self, pid, condition, data):
+        self.data = data
+        self.loop.quit()
+
+    def testChildWatch(self):
+        self.data = None
+        self.loop = glib.MainLoop()
+        argv = [sys.executable, '-c', 'import sys']
+        pid, stdin, stdout, stderr = glib.spawn_async(
+            argv, flags=glib.SPAWN_DO_NOT_REAP_CHILD)
+        pid.close()
+        glib.child_watch_add(pid, self._child_watch_cb, 12345)
+        self.loop.run()
+        self.assertEqual(self.data, 12345)
diff --git a/tests/test_thread.py b/tests/test_thread.py
new file mode 100644 (file)
index 0000000..be746a4
--- /dev/null
@@ -0,0 +1,29 @@
+# -*- Mode: Python -*-
+
+import unittest
+
+import glib
+import testhelper
+
+
+class TestThread(unittest.TestCase):
+    def setUp(self):
+        self.main = glib.MainLoop()
+
+    def from_thread_cb(self, test, enum):
+        assert test == self.obj
+        assert int(enum) == 0
+        assert type(enum) != int
+
+    def idle_cb(self):
+        self.obj = testhelper.get_test_thread()
+        self.obj.connect('from-thread', self.from_thread_cb)
+        self.obj.emit('emit-signal')
+
+    def testExtensionModule(self):
+        glib.idle_add(self.idle_cb)
+        glib.timeout_add(50, self.timeout_cb)
+        self.main.run()
+
+    def timeout_cb(self):
+        self.main.quit()
diff --git a/tests/test_uris.py b/tests/test_uris.py
new file mode 100644 (file)
index 0000000..ee24215
--- /dev/null
@@ -0,0 +1,15 @@
+import unittest
+
+import glib
+
+class TestUris(unittest.TestCase):
+    def testExtractUris(self):
+        uri_list_text = "# urn:isbn:0-201-08372-8\n" + \
+                        "http://www.huh.org/books/foo.html\n" + \
+                        "http://www.huh.org/books/foo.pdf\n" + \
+                        "ftp://ftp.foo.org/books/foo.txt\n"
+        uri_list = glib.uri_list_extract_uris(uri_list_text)
+        assert uri_list[0] == "http://www.huh.org/books/foo.html"
+        assert uri_list[1] == "http://www.huh.org/books/foo.pdf"
+        assert uri_list[2] == "ftp://ftp.foo.org/books/foo.txt"
+
diff --git a/tests/testhelpermodule.c b/tests/testhelpermodule.c
new file mode 100644 (file)
index 0000000..4d1b44d
--- /dev/null
@@ -0,0 +1,613 @@
+#include "pygobject.h"
+#include <gobject/gmarshal.h>
+
+#include "test-thread.h"
+#include "test-unknown.h"
+#include "test-floating.h"
+
+#include <pyglib-python-compat.h>
+
+static PyTypeObject *_PyGObject_Type;
+#define PyGObject_Type (*_PyGObject_Type)
+
+static PyObject * _wrap_TestInterface__do_iface_method(PyObject *cls,
+                                                      PyObject *args,
+                                                      PyObject *kwargs);
+
+GType
+test_type_get_type(void)
+{
+    static GType gtype = 0;
+    GType parent_type;
+    
+    if (gtype == 0)
+    {
+        GTypeInfo *type_info;
+        GTypeQuery query;
+       
+       parent_type = g_type_from_name("PyGObject");
+       if (parent_type == 0)
+            g_error("could not get PyGObject from testmodule");
+
+       type_info = (GTypeInfo *)g_new0(GTypeInfo, 1);
+       
+        g_type_query(parent_type, &query);
+        type_info->class_size = query.class_size;
+        type_info->instance_size = query.instance_size;
+       
+        gtype = g_type_register_static(parent_type,
+                                      "TestType", type_info, 0);
+       if (!gtype)
+            g_error("Could not register TestType");
+    }
+    
+    return gtype;
+}
+
+#define TYPE_TEST (test_type_get_type())
+
+static PyObject *
+_wrap_get_test_thread (PyObject * self)
+{
+  GObject *obj;
+
+  test_thread_get_type();
+  g_assert (g_type_is_a (TEST_TYPE_THREAD, G_TYPE_OBJECT));
+  obj = g_object_new (TEST_TYPE_THREAD, NULL);
+  g_assert (obj != NULL);
+  
+  return pygobject_new(obj);
+}
+
+static PyObject *
+_wrap_get_unknown (PyObject * self)
+{
+  GObject *obj;
+  obj = g_object_new (TEST_TYPE_UNKNOWN, NULL);
+  return pygobject_new(obj);
+}
+
+static PyObject *
+_wrap_create_test_type (PyObject * self)
+{
+    GObject *obj;
+    PyObject *rv;
+    obj = g_object_new(TYPE_TEST, NULL);
+    rv = pygobject_new(obj);
+    g_object_unref(obj);
+    return rv;
+}
+
+static PyObject *
+_wrap_test_g_object_new (PyObject * self)
+{
+    GObject *obj;
+    PyObject *rv;
+
+    obj = g_object_new(g_type_from_name("PyGObject"), NULL);
+    rv = PYGLIB_PyLong_FromLong(obj->ref_count); /* should be == 2 at this point */
+    g_object_unref(obj);
+    return rv;
+}
+
+/* TestUnknown */
+static PyObject *
+_wrap_test_interface_iface_method(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { NULL };
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,":", kwlist))
+        return NULL;
+    
+    test_interface_iface_method(TEST_INTERFACE(self->obj));
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static const PyMethodDef _PyTestInterface_methods[] = {
+    { "iface_method", (PyCFunction)_wrap_test_interface_iface_method, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "do_iface_method", (PyCFunction)_wrap_TestInterface__do_iface_method, METH_VARARGS|METH_KEYWORDS|METH_CLASS,
+      NULL },
+    { NULL, NULL, 0, NULL }
+};
+
+/* TestInterface */
+PYGLIB_DEFINE_TYPE("test.Interface", PyTestInterface_Type, PyObject);
+
+static PyObject *
+_wrap_TestInterface__do_iface_method(PyObject *cls, PyObject *args, PyObject *kwargs)
+{
+  TestInterfaceIface *iface;
+  static char *kwlist[] = { "self", NULL };
+  PyGObject *self;
+
+  if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:TestInterface.iface_method", kwlist, &PyTestInterface_Type, &self))
+    return NULL;
+  
+  iface = g_type_interface_peek(g_type_class_peek(pyg_type_from_object(cls)),
+                               TEST_TYPE_INTERFACE);
+  if (iface->iface_method)
+    iface->iface_method(TEST_INTERFACE(self->obj));
+  else {
+    PyErr_SetString(PyExc_NotImplementedError,
+                   "interface method TestInterface.iface_method not implemented");
+    return NULL;
+  }
+  Py_INCREF(Py_None);
+  return Py_None;
+}
+
+PYGLIB_DEFINE_TYPE("testhelper.Unknown", PyTestUnknown_Type, PyGObject);
+
+static void
+_wrap_TestInterface__proxy_do_iface_method(TestInterface *self)
+{
+    PyGILState_STATE __py_state;
+    PyObject *py_self;
+    PyObject *py_retval;
+    PyObject *py_args;
+    PyObject *py_method;
+    
+    __py_state = pyg_gil_state_ensure();
+    py_self = pygobject_new((GObject *) self);
+    if (!py_self) {
+        if (PyErr_Occurred())
+            PyErr_Print();
+        pyg_gil_state_release(__py_state);
+        return;
+    }
+    py_args = PyTuple_New(0);
+    py_method = PyObject_GetAttrString(py_self, "do_iface_method");
+    if (!py_method) {
+        if (PyErr_Occurred())
+            PyErr_Print();
+        Py_DECREF(py_args);
+        Py_DECREF(py_self);
+        pyg_gil_state_release(__py_state);
+        return;
+    }
+    py_retval = PyObject_CallObject(py_method, py_args);
+    if (!py_retval) {
+        if (PyErr_Occurred())
+            PyErr_Print();
+        Py_DECREF(py_method);
+        Py_DECREF(py_args);
+        Py_DECREF(py_self);
+        pyg_gil_state_release(__py_state);
+        return;
+    }
+    if (py_retval != Py_None) {
+        if (PyErr_Occurred())
+            PyErr_Print();
+        PyErr_SetString(PyExc_TypeError, "retval should be None");
+        Py_DECREF(py_retval);
+        Py_DECREF(py_method);
+        Py_DECREF(py_args);
+        Py_DECREF(py_self);
+        pyg_gil_state_release(__py_state);
+        return;
+    }
+    
+    Py_DECREF(py_retval);
+    Py_DECREF(py_method);
+    Py_DECREF(py_args);
+    Py_DECREF(py_self);
+    pyg_gil_state_release(__py_state);
+}
+
+static void
+__TestInterface__interface_init(TestInterfaceIface *iface,
+                               PyTypeObject *pytype)
+{
+    TestInterfaceIface *parent_iface = g_type_interface_peek_parent(iface);
+    PyObject *py_method;
+
+    py_method = pytype ? PyObject_GetAttrString((PyObject *) pytype,
+                                               "do_iface_method") : NULL;
+
+    if (py_method && !PyObject_TypeCheck(py_method, &PyCFunction_Type)) {
+        iface->iface_method = _wrap_TestInterface__proxy_do_iface_method;
+    } else {
+        PyErr_Clear();
+        if (parent_iface) {
+            iface->iface_method = parent_iface->iface_method;
+        }
+       Py_XDECREF(py_method);
+    }
+}
+
+static const GInterfaceInfo __TestInterface__iinfo = {
+    (GInterfaceInitFunc) __TestInterface__interface_init,
+    NULL,
+    NULL
+};
+
+/* TestFloatingWithSinkFunc */
+PYGLIB_DEFINE_TYPE("testhelper.FloatingWithSinkFunc", PyTestFloatingWithSinkFunc_Type, PyGObject);
+
+/* TestFloatingWithoutSinkFunc */
+PYGLIB_DEFINE_TYPE("testhelper.FloatingWithoutSinkFunc", PyTestFloatingWithoutSinkFunc_Type, PyGObject);
+
+/* TestOwnedByLibrary */
+PYGLIB_DEFINE_TYPE("testhelper.OwnedByLibrary", PyTestOwnedByLibrary_Type, PyGObject);
+
+static PyObject *
+_wrap_test_owned_by_library_release (PyGObject *self)
+{
+    test_owned_by_library_release (TEST_OWNED_BY_LIBRARY (self->obj));
+    return Py_None;
+}
+
+static const PyMethodDef _PyTestOwnedByLibrary_methods[] = {
+    { "release", (PyCFunction)_wrap_test_owned_by_library_release, METH_NOARGS, NULL },
+    { NULL, NULL, 0, NULL }
+};
+
+/* TestFloatingAndSunk */
+PYGLIB_DEFINE_TYPE("testhelper.FloatingAndSunk", PyTestFloatingAndSunk_Type, PyGObject);
+
+static PyObject *
+_wrap_test_floating_and_sunk_release (PyGObject *self)
+{
+    test_floating_and_sunk_release (TEST_FLOATING_AND_SUNK (self->obj));
+    return Py_None;
+}
+
+static const PyMethodDef _PyTestFloatingAndSunk_methods[] = {
+    { "release", (PyCFunction)_wrap_test_floating_and_sunk_release, METH_NOARGS, NULL },
+    { NULL, NULL, 0, NULL }
+};
+
+
+#include <string.h>
+#include <glib-object.h>
+
+static void
+test1_callback (GObject *object, char *data)
+{
+  g_return_if_fail (G_IS_OBJECT (object));
+  g_return_if_fail (!strcmp (data, "user-data"));
+}
+
+static void
+test1_callback_swapped (char *data, GObject *object)
+{
+  g_return_if_fail (G_IS_OBJECT (object));
+  g_return_if_fail (!strcmp (data, "user-data"));
+}
+
+static void
+test2_callback (GObject *object, char *string)
+{
+  g_return_if_fail (G_IS_OBJECT (object));
+  g_return_if_fail (!strcmp (string, "string"));
+}
+
+static int
+test3_callback (GObject *object, double d)
+{
+  g_return_val_if_fail (G_IS_OBJECT (object), -1);
+  g_return_val_if_fail (d == 42.0, -1);
+
+  return 20;
+}
+
+static void
+test4_callback (GObject *object,
+                gboolean b, long l, float f, double d, guint uint, gulong ulong,
+                gpointer user_data)
+{
+  g_return_if_fail (b == TRUE);
+  g_return_if_fail (l == 10L);
+  g_return_if_fail (f <= 3.14001 && f >= 3.13999);
+  g_return_if_fail (d <= 1.78001 && d >= 1.77999);
+  g_return_if_fail (uint == 20);
+  g_return_if_fail (ulong == 30L);
+}
+
+static float
+test_float_callback (GObject *object, float f)
+{
+  g_return_val_if_fail (G_IS_OBJECT (object), -1);
+  g_return_val_if_fail (f <= 1.234001 && f >= 1.123999, -1);
+
+  return f;
+}
+
+static double
+test_double_callback (GObject *object, double d)
+{
+  g_return_val_if_fail (G_IS_OBJECT (object), -1);
+  g_return_val_if_fail (d <= 1.234001 && d >= 1.123999, -1);
+
+  return d;
+}
+
+static char *
+test_string_callback (GObject *object, char *s)
+{
+  g_return_val_if_fail (G_IS_OBJECT (object), NULL);
+  g_return_val_if_fail (!strcmp(s, "str"), NULL);
+
+  return g_strdup (s);
+}
+
+static GObject *
+test_object_callback (GObject *object, GObject *o)
+{
+  g_return_val_if_fail (G_IS_OBJECT (object), NULL);
+
+  return o;
+}
+
+void
+connectcallbacks (GObject *object)
+{
+
+  gchar *data = "user-data";
+  
+  g_signal_connect (G_OBJECT (object),
+                    "test1",
+                    G_CALLBACK (test1_callback), 
+                    data);
+  g_signal_connect_swapped (G_OBJECT (object),
+                    "test1",
+                    G_CALLBACK (test1_callback_swapped), 
+                    data);
+  g_signal_connect (G_OBJECT (object),
+                    "test2",
+                    G_CALLBACK (test2_callback), 
+                    NULL);
+  g_signal_connect (G_OBJECT (object),
+                    "test3",
+                    G_CALLBACK (test3_callback), 
+                    NULL);
+  g_signal_connect (G_OBJECT (object),
+                    "test4",
+                    G_CALLBACK (test4_callback), 
+                    NULL);
+  g_signal_connect (G_OBJECT (object),
+                    "test_float",
+                    G_CALLBACK (test_float_callback), 
+                    NULL);
+  g_signal_connect (G_OBJECT (object),
+                    "test_double",
+                    G_CALLBACK (test_double_callback), 
+                    NULL);
+  g_signal_connect (G_OBJECT (object),
+                    "test_string",
+                    G_CALLBACK (test_string_callback), 
+                    NULL);
+  g_signal_connect (G_OBJECT (object),
+                    "test_object",
+                    G_CALLBACK (test_object_callback), 
+                    NULL);
+}
+
+static PyObject *
+_wrap_connectcallbacks(PyObject * self, PyObject *args)
+{
+    PyGObject *obj;
+
+    if (!PyArg_ParseTuple(args, "O", &obj))
+      return NULL;
+
+    connectcallbacks (G_OBJECT (obj->obj));
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+_wrap_test_value(PyObject *self, PyObject *args)
+{
+  GValue tvalue = {0,}, *value = &tvalue;
+  PyObject *obj;
+
+  if (!PyArg_ParseTuple(args, "O", &obj))
+    return NULL;
+
+  g_value_init(value, G_TYPE_VALUE);
+  if (pyg_value_from_pyobject(value, obj)) {
+    PyErr_SetString(PyExc_TypeError, "Could not convert to GValue");
+    return NULL;
+  }
+  
+  return pyg_value_as_pyobject(value, FALSE);
+}
+
+static PyObject *
+_wrap_test_value_array(PyObject *self, PyObject *args)
+{
+  GValue tvalue = {0,}, *value = &tvalue;
+  PyObject *obj;
+
+  if (!PyArg_ParseTuple(args, "O", &obj))
+    return NULL;
+
+  g_value_init(value, G_TYPE_VALUE_ARRAY);
+  if (pyg_value_from_pyobject(value, obj)) {
+    PyErr_SetString(PyExc_TypeError, "Could not convert to GValueArray");
+    return NULL;
+  }
+  
+  return pyg_value_as_pyobject(value, FALSE);
+}
+
+static PyObject *
+_wrap_test_gerror_exception(PyObject *self, PyObject *args)
+{
+    PyObject *py_method;
+    PyObject *py_args;
+    PyObject *py_ret;
+    GError *err = NULL;
+
+    if (!PyArg_ParseTuple(args, "O", &py_method))
+        return NULL;
+
+    py_args = PyTuple_New(0);
+    py_ret = PyObject_CallObject(py_method, py_args);
+    if (pyg_gerror_exception_check(&err)) {
+        pyg_error_check(&err);
+        return NULL;
+    }      
+
+    Py_DECREF(py_method);
+    Py_DECREF(py_args);
+    Py_DECREF(py_ret);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+_wrap_test_owned_by_library_get_instance_list (PyObject *self)
+{
+    PyObject *py_list, *py_obj;
+    GSList *list, *tmp;
+
+    list = test_owned_by_library_get_instance_list ();
+
+    if ((py_list = PyList_New (0)) == NULL) {
+       return NULL;
+    }
+    for (tmp = list; tmp != NULL; tmp = tmp->next) {
+       py_obj = pygobject_new (G_OBJECT (tmp->data));
+       if (py_obj == NULL) {
+           Py_DECREF (py_list);
+           return NULL;
+       }
+       PyList_Append (py_list, py_obj);
+       Py_DECREF (py_obj);
+    }
+    return py_list;
+}
+
+static PyObject *
+_wrap_test_floating_and_sunk_get_instance_list (PyObject *self)
+{
+    PyObject *py_list, *py_obj;
+    GSList *list, *tmp;
+
+    list = test_floating_and_sunk_get_instance_list ();
+
+    if ((py_list = PyList_New (0)) == NULL) {
+       return NULL;
+    }
+    for (tmp = list; tmp != NULL; tmp = tmp->next) {
+       py_obj = pygobject_new (G_OBJECT (tmp->data));
+       if (py_obj == NULL) {
+           Py_DECREF (py_list);
+           return NULL;
+       }
+       PyList_Append (py_list, py_obj);
+       Py_DECREF (py_obj);
+    }
+    return py_list;
+}
+
+static PyMethodDef testhelper_functions[] = {
+    { "get_test_thread", (PyCFunction)_wrap_get_test_thread, METH_NOARGS },
+    { "get_unknown", (PyCFunction)_wrap_get_unknown, METH_NOARGS },
+    { "create_test_type", (PyCFunction)_wrap_create_test_type, METH_NOARGS },
+    { "test_g_object_new", (PyCFunction)_wrap_test_g_object_new, METH_NOARGS },
+    { "connectcallbacks", (PyCFunction)_wrap_connectcallbacks, METH_VARARGS },
+    { "test_value", (PyCFunction)_wrap_test_value, METH_VARARGS },      
+    { "test_value_array", (PyCFunction)_wrap_test_value_array, METH_VARARGS },
+    { "test_gerror_exception", (PyCFunction)_wrap_test_gerror_exception, METH_VARARGS },
+    { "owned_by_library_get_instance_list", (PyCFunction)_wrap_test_owned_by_library_get_instance_list, METH_NOARGS },
+    { "floating_and_sunk_get_instance_list", (PyCFunction)_wrap_test_floating_and_sunk_get_instance_list, METH_NOARGS },
+    { NULL, NULL }
+};
+
+PYGLIB_MODULE_START(testhelper, "testhelper")
+{
+  PyObject *m, *d;
+  
+  g_thread_init(NULL);
+  pygobject_init(-1, -1, -1);
+
+  d = PyModule_GetDict(module);
+
+  if ((m = PyImport_ImportModule("gobject")) != NULL) {
+    PyObject *moddict = PyModule_GetDict(m);
+    
+    _PyGObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "GObject");
+    if (_PyGObject_Type == NULL) {
+      PyErr_SetString(PyExc_ImportError,
+                     "cannot import name GObject from gobject");
+      return PYGLIB_MODULE_ERROR_RETURN;
+    }
+  } else {
+    PyErr_SetString(PyExc_ImportError,
+                   "could not import gobject");
+    return PYGLIB_MODULE_ERROR_RETURN;
+  }
+
+  /* TestInterface */
+  PyTestInterface_Type.tp_methods = (struct PyMethodDef*)_PyTestInterface_methods;
+  PyTestInterface_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);  
+  pyg_register_interface(d, "Interface", TEST_TYPE_INTERFACE,
+                        &PyTestInterface_Type);
+  pyg_register_interface_info(TEST_TYPE_INTERFACE, &__TestInterface__iinfo);
+
+
+  /* TestUnknown */
+  PyTestUnknown_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);
+  PyTestUnknown_Type.tp_weaklistoffset = offsetof(PyGObject, weakreflist);
+  PyTestUnknown_Type.tp_dictoffset = offsetof(PyGObject, inst_dict);
+  pygobject_register_class(d, "Unknown", TEST_TYPE_UNKNOWN,
+                          &PyTestUnknown_Type,
+                          Py_BuildValue("(O)",
+                           &PyGObject_Type,
+                           &PyTestInterface_Type));
+  pyg_set_object_has_new_constructor(TEST_TYPE_UNKNOWN);
+  //pyg_register_class_init(TEST_TYPE_UNKNOWN, __GtkUIManager_class_init);
+
+  /* TestFloatingWithSinkFunc */
+  PyTestFloatingWithSinkFunc_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);
+  PyTestFloatingWithSinkFunc_Type.tp_weaklistoffset = offsetof(PyGObject, weakreflist);
+  PyTestFloatingWithSinkFunc_Type.tp_dictoffset = offsetof(PyGObject, inst_dict);
+  pygobject_register_class(d, "FloatingWithSinkFunc", TEST_TYPE_FLOATING_WITH_SINK_FUNC,
+                          &PyTestFloatingWithSinkFunc_Type,
+                          Py_BuildValue("(O)",
+                           &PyGObject_Type));
+  pyg_set_object_has_new_constructor(TEST_TYPE_FLOATING_WITH_SINK_FUNC);
+  pygobject_register_sinkfunc(TEST_TYPE_FLOATING_WITH_SINK_FUNC, sink_test_floating_with_sink_func);
+
+  /* TestFloatingWithoutSinkFunc */
+  PyTestFloatingWithoutSinkFunc_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);
+  PyTestFloatingWithoutSinkFunc_Type.tp_weaklistoffset = offsetof(PyGObject, weakreflist);
+  PyTestFloatingWithoutSinkFunc_Type.tp_dictoffset = offsetof(PyGObject, inst_dict);
+  pygobject_register_class(d, "FloatingWithoutSinkFunc", TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC,
+                          &PyTestFloatingWithoutSinkFunc_Type,
+                          Py_BuildValue("(O)",
+                           &PyGObject_Type));
+  pyg_set_object_has_new_constructor(TEST_TYPE_FLOATING_WITHOUT_SINK_FUNC);
+
+  /* TestOwnedByLibrary */
+  PyTestOwnedByLibrary_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);
+  PyTestOwnedByLibrary_Type.tp_methods = (struct PyMethodDef*)_PyTestOwnedByLibrary_methods;
+  PyTestOwnedByLibrary_Type.tp_weaklistoffset = offsetof(PyGObject, weakreflist);
+  PyTestOwnedByLibrary_Type.tp_dictoffset = offsetof(PyGObject, inst_dict);
+  pygobject_register_class(d, "OwnedByLibrary", TEST_TYPE_OWNED_BY_LIBRARY,
+                          &PyTestOwnedByLibrary_Type,
+                          Py_BuildValue("(O)",
+                           &PyGObject_Type));
+  pyg_set_object_has_new_constructor(TEST_TYPE_OWNED_BY_LIBRARY);
+
+  /* TestFloatingAndSunk */
+  PyTestFloatingAndSunk_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE);
+  PyTestFloatingAndSunk_Type.tp_methods = (struct PyMethodDef*)_PyTestFloatingAndSunk_methods;
+  PyTestFloatingAndSunk_Type.tp_weaklistoffset = offsetof(PyGObject, weakreflist);
+  PyTestFloatingAndSunk_Type.tp_dictoffset = offsetof(PyGObject, inst_dict);
+  pygobject_register_class(d, "FloatingAndSunk", TEST_TYPE_FLOATING_AND_SUNK,
+                           &PyTestFloatingAndSunk_Type,
+                           Py_BuildValue("(O)",
+                           &PyGObject_Type));
+  pyg_set_object_has_new_constructor(TEST_TYPE_FLOATING_AND_SUNK);
+}
+PYGLIB_MODULE_END
+
diff --git a/tests/testmodule.py b/tests/testmodule.py
new file mode 100644 (file)
index 0000000..5fc29b3
--- /dev/null
@@ -0,0 +1,21 @@
+import gobject
+
+class PyGObject(gobject.GObject):
+    __gtype_name__ = 'PyGObject'
+    __gproperties__ = {
+        'label': (gobject.TYPE_STRING,
+                  'label property',
+                  'the label of the object',
+                  'default', gobject.PARAM_READWRITE),
+        }
+
+    def __init__(self):
+        self._props = {}
+        gobject.GObject.__init__(self)
+        self.set_property('label', 'hello')
+
+    def do_set_property(self, name, value):
+        self._props[name] = value
+
+    def do_get_property(self, name):
+        return self._props[name]